POST https://app.alaaqat.com/api/tickets
Creates a ticket, and can link it to contacts and deals in the same request. Your API key needs the ticket-create ability.
{
"Accept": "application/json",
"Content-Type": "application/json"
}
The body is a flat object of property values. Each key is the internal_name of a ticket property, built in or yours, and each value must match that property's type. Read Properties for the types.
{
ticket_name: string,
contact_ids?: string[],
deal_ids?: string[],
[internal_name: string]: any
}
| Field | Required | Validation | Description |
|---|---|---|---|
| ticket_name | Required | Text of at least 3 characters | The ticket's name. |
| contact_ids | Optional | An array of contact IDs from your account | The contacts to link to the ticket. |
| deal_ids | Optional | An array of deal IDs from your account | The deals to link to the ticket. |
| Any other property | Optional | Must match the property's type | Use the property's internal_name as the key. |
Alaaqat sets _id itself. A request that sends it is rejected.
A single_select property such as category or priority takes the internal_name of one of its options:
{
"ticket_name": "Order not delivered",
"desc": "The client ordered five days ago and the parcel has not arrived.",
"category": "general_inquiry",
"priority": "high",
"contact_ids": [
"6650f1a2b3c4d5e6f7a8b901"
],
"deal_ids": [
"6651a0b1c2d3e4f5a6b7c801"
]
}
To link contacts or deals to an existing ticket, use Attach or detach contacts and Attach or detach deals.
Tickets have no unique keys by default. If you make a ticket property a unique key, a ticket cannot take a value that another ticket already holds for it: the ticket is not created, and the request is refused with 422 with the error reported on that field.
201 Created, with the new ticket under data. The linked contacts and deals are not part of the response.
{
"data": {
"properties": {
"ticket_name": "Order not delivered",
"desc": "The client ordered five days ago and the parcel has not arrived.",
"category": "general_inquiry",
"priority": "high",
"created_by": 12,
"updated_at": "2026-10-20T11:20:00.000000Z",
"created_at": "2026-10-20T11:20:00.000000Z",
"_id": "6652b0c1d2e3f4a5b6c7d901"
}
},
"message": "Entity was created successfully."
}
| Status | Meaning |
|---|---|
| 422 | ticket_name is missing or shorter than 3 characters, a contact or deal ID is not in your account, a value does not match its property's type, or a unique key value is already taken. |