Add message to an existing ticket
POST/truckers/tickets/:id/message
Add a new message and attachments to an existing ticket. Allows attaching up to 6 files (photos/documents) as evidence.
Required fields:
- _id: ID of the ticket to which the message is being added
- message: Content of the message
Usage example:
- Provide additional information about a reported problem
- Attach photos of damages or required documents
- Respond to questions from the support team
Notes:
- Only the ticket creator can add messages
- Attachments must be images (jpg, png) or documents (pdf)
- Maximum file size per attachment is 5MB
Request
Responses
- 200
- 400
- 401
- 404
Returns the updated ticket with the new message added. Includes the complete history of messages and attached files.
Invalid input. This may be due to:
- Missing required field (_id or message)
- Attachments exceed size or quantity limit
- Unsupported file format
Unauthorized. The JWT token is invalid or has expired. Or the user is not the creator of the ticket.
Ticket not found. This may be due to:
- The ID does not exist
- The ticket does not belong to the authenticated user