Skip to main content

Create a ticket

Creates a support ticket for a user. If the user already has an active ticket, that existing ticket is returned instead of creating a duplicate (create-or-find).

Query Parameters
bot string REQUIRED

The unique ID of the bot.

Request Body REQUIRED
requester object REQUIRED

Identifies the end user. At least one of email, phone, or external_id is required; the first present (in that order) becomes the ticket uid.

email email

Requester email. Validated for format.

phone string

Requester phone (E.164-style, 7–15 digits). Validated when used as the uid.

external_id string

External identifier for the requester.

name string

Requester display name.

source string REQUIRED

Possible values: [whatsapp, facebook, yellowmessenger, appleBusinessChat, email, lazada, instagram]

Channel the ticket originates from. Required.

subject string

Ticket subject text. Alias issue is also accepted.

priority string

Priority. Common aliases are mapped: normal→MEDIUM, urgent→HIGH. Accepted: LOW, MEDIUM, HIGH (or low/normal/high/urgent).

tags string[]

Tags to set on the ticket. Must be an array.

category string

Group/category code to assign. Alias group_id is also accepted.

assignedTo string

Agent to assign the ticket to. Alias assignee_id is also accepted.

customFields object

Key-value custom fields. Keys must be configured in the bot's support settings; unknown keys are rejected. The legacy array format ([{ id, value }]) is not supported.

Responses
200

An active ticket already exists for this user; the existing ticket is returned.

Schema OPTIONAL
ticket object OPTIONAL
201

Ticket created.

Schema OPTIONAL
ticket object OPTIONAL
400

Validation error (missing requester uid, invalid email/phone/source/priority, tags not an array, or an unknown custom-field key).

Schema OPTIONAL
error string OPTIONAL

Human-readable error message.

401

Missing/invalid API key, or the bot is not authorized to use this route.

Schema OPTIONAL
error string OPTIONAL

Human-readable error message.

429

Rate limit exceeded.

Schema OPTIONAL
error string OPTIONAL

Human-readable error message.

500

Internal server error.

Schema OPTIONAL
error string OPTIONAL

Human-readable error message.