Skip to content

Add Message to Ticket

Send a reply or follow-up message to an existing support ticket. This endpoint enables back-and-forth communication with the agency's support team within the same ticket thread.

You can attach images or documents to your message, which is useful for providing evidence of issues (like photos of vehicle damage or screenshots of error messages). Attachments should be uploaded separately using the media upload endpoint before referencing them here.

Ticket Status Effects

  • Adding a message to a resolved ticket will automatically reopen it
  • You cannot add messages to closed tickets—create a new ticket instead

Endpoint

INFO

POST /api/v1/client/tickets/{ticket}/messages

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes
X-Agency-Signature{signature}Yes

Path Parameters

ParameterTypeDescription
ticketintegerTicket ID

Request Body

ParameterTypeRequiredDescription
messagestringYesMessage content
attachmentsarrayNoArray of attachment URLs

Example Request

bash
curl -X POST https://api.daakey.com/api/v1/client/tickets/1/messages \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -H "X-Agency-Signature: {signature}" \
  -d '{
    "message": "The technician arrived and fixed the issue. Thank you!",
    "attachments": []
  }'

Response

Success (201)

json
{
  "success": true,
  "message": "Message added",
  "data": {
    "id": 5,
    "message": "The technician arrived and fixed the issue. Thank you!",
    "sender": "client",
    "sender_name": "John Doe",
    "attachments": [],
    "created_at": "2024-01-15T12:00:00Z"
  },
  "meta": {
    "agency_id": 123,
    "agency_code": "AGENCY123"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (400)

json
{
  "success": false,
  "message": "Cannot add message to closed ticket",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (404)

json
{
  "success": false,
  "message": "Ticket not found",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Adding a message to a resolved ticket reopens it
  • Cannot add messages to closed tickets
  • Attachments should be uploaded first using the media upload endpoint

Daakey Car Sharing Platform