Add Message to Ticket
Add a support response to a ticket.
Endpoint
INFO
POST /api/v1/dashboard/tickets/{ticket}/messages
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
ticket | integer | Ticket ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Message content |
attachments | array | No | Array of attachment URLs |
internal | boolean | No | Internal note (not visible to client) |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/dashboard/tickets/1/messages \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"message": "The technician has arrived at your location. Please meet them at the vehicle.",
"internal": false
}'Response
Success (201)
json
{
"success": true,
"message": "Message added",
"data": {
"id": 5,
"message": "The technician has arrived at your location. Please meet them at the vehicle.",
"sender": {
"type": "support",
"id": 2,
"name": "Support Agent"
},
"internal": false,
"attachments": [],
"created_at": "2024-01-15T12:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Internal messages are only visible to dashboard users
- Adding a message may send notification to client