HelpWave Developer DocsHelpWave Dev DocsReference-first docs for v1 customers and tickets APIs
POST

/api/v1/tickets

Create a new ticket (conversation) for an existing customer.

Authentication: API key required

Behavior
  • customerId and Channel are required.
  • The route verifies both the authenticated shop and the referenced customer before creating the conversation.
  • customerId and assigned_to are parsed as integers when present.
  • isOpenedTicket is true when the value is the boolean true or the string 'true'.
  • date and lastMessageTime default to the current time if omitted.
  • BigInt fields in the created conversation are serialized to strings before the JSON response is sent.
Body parameters
  • customerId (required)

    Customer ID to associate with the new conversation.

  • Channel (required)

    Communication channel, for example Mail, Website, Facebook, Instagram, or Helpwave.

  • name (optional)

    Conversation name or subject.

  • threadId (optional)

    Thread identifier for email conversations.

  • emailUsed (optional)

    Email address used for the conversation.

  • date (optional)

    Conversation timestamp as an ISO string.

  • lastMessage (optional)

    Initial or latest message content.

  • lastMessageTime (optional)

    Timestamp for lastMessage as an ISO string.

  • contact_reason (optional)

    Reason for contact.

  • assigned_to (optional)

    User ID to assign the conversation to.

  • isOpenedTicket (optional)

    Whether to open a HumanTicket.

  • unReadChatCount (optional)

    Unread message count.

  • tags (optional)

    Array of tags.

  • language_code (optional)

    Language code.

  • via (optional)

    Via field.

JSON body
{
  "customerId": 123,
  "Channel": "Mail",
  "name": "Refund request",
  "threadId": "thread-001",
  "emailUsed": "support@example.com",
  "lastMessage": "Hello, I need a refund.",
  "contact_reason": "refund",
  "assigned_to": 45,
  "isOpenedTicket": true,
  "unReadChatCount": 1,
  "tags": ["refund", "vip"],
  "language_code": "en",
  "via": "api"
}
Response
Response example
{
  "success": true,
  "ticket": {
    "id": "987654321012345678",
    "customerID": 123,
    "Channel": "Mail",
    "name": "Refund request",
    "threadId": "thread-001",
    "emailUsed": "support@example.com",
    "lastMessage": "Hello, I need a refund.",
    "contact_reason": "refund",
    "assigned_to": 45,
    "isOpenedTicket": true,
    "tags": ["refund", "vip"],
    "language_code": "en",
    "via": "api"
  }
}