Create Support Ticket
Create a support ticket on behalf of a client.
Endpoint
INFO
POST /api/v1/dashboard/tickets
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
client_id | integer | Yes | Client ID |
subject | string | Yes | Ticket subject |
message | string | Yes | Initial message |
category | string | Yes | Ticket category |
priority | string | No | Priority level |
booking_id | integer | No | Related booking ID |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/dashboard/tickets \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"client_id": 1,
"subject": "Follow-up on vehicle issue",
"message": "Following up on the reported vehicle issue from call.",
"category": "vehicle_issue",
"priority": "normal",
"booking_id": 50
}'Response
Success (201)
json
{
"success": true,
"message": "Ticket created",
"data": {
"id": 10,
"reference": "TK-2024-00010",
"subject": "Follow-up on vehicle issue",
"status": "open",
"priority": "normal",
"category": "vehicle_issue",
"client": {
"id": 1,
"name": "John Doe"
},
"created_by": {
"id": 2,
"name": "Support Agent"
},
"created_at": "2024-01-15T12:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}