POST https://app.alaaqat.com/api/tickets/{ticket_id}/attach-deals
Where ticket_id is the ticket's _id. Links one or more deals to the ticket. Deals that are already linked stay linked. Your API key needs the ticket-update ability.
{
"Accept": "application/json",
"Content-Type": "application/json"
}
{
deal_ids: string[]
}
| Field | Required | Validation | Description |
|---|---|---|---|
| deal_ids | Required | An array of deal IDs from your account | The deals to link to the ticket. |
{
"deal_ids": [
"6651a0b1c2d3e4f5a6b7c801",
"6651a0b1c2d3e4f5a6b7c802"
]
}
200 OK, with every deal now linked to the ticket under data.
{
"data": [
{
"properties": {
"_id": "6651a0b1c2d3e4f5a6b7c801",
"deal_name": "Annual support contract",
"deal_stage": "appointment_scheduled",
"amount": 1200,
"created_at": "2026-10-20T10:05:00.000000Z"
}
},
{
"properties": {
"_id": "6651a0b1c2d3e4f5a6b7c802",
"deal_name": "Website redesign",
"deal_stage": "contract_sent",
"amount": 4500,
"created_at": "2026-10-18T13:40:00.000000Z"
}
}
]
}
POST https://app.alaaqat.com/api/tickets/{ticket_id}/detach-deal
Where ticket_id is the ticket's _id. Removes the link between the ticket and one deal. Neither record is deleted. Your API key needs the ticket-update ability.
{
"Accept": "application/json",
"Content-Type": "application/json"
}
{
deal_id: string
}
| Field | Required | Validation | Description |
|---|---|---|---|
| deal_id | Required | The ID of one of your deals | The deal to unlink from the ticket. |
{
"deal_id": "6651a0b1c2d3e4f5a6b7c802"
}
200 OK, with the ticket under data.
{
"data": {
"properties": {
"_id": "6652b0c1d2e3f4a5b6c7d901",
"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-21T10:02:00.000000Z",
"created_at": "2026-10-20T11:20:00.000000Z"
}
},
"message": "Entity was modified successfully."
}