5.4.Create a post (reply) — POST /v1/ats/tickets/:ticket_id/posts

5.4.Create a post (reply) — POST /v1/ats/tickets/:ticket_id/posts

Adds a new reply to an existing ticket. Use the nested route to associate the post with a ticket via the URL, or include ticket_id in the JSON body when posting to /v1/ats/posts.

Request body fields:

ticket_id (integer, required unless in URL)

ID of the ticket this reply belongs to. When using the nested route the value is taken from the URL segment; when using the standalone route it must be in the body.

content_html (string, required)

HTML body of the reply.

timespent (float, optional)

Hours of time to record against this reply. Defaults to 0.

enabled (integer, optional)

Publication state: 1 = published (default), 0 = unpublished. May only be set by a user with core.edit.state permission.

created_by (integer, optional)

Override the post author. Only accepted when the API user has core.admin on com_ats.

Note

The fields email_uid, created, modified, and modified_by are always ignored. The origin field is always forced to web.

Example request:

POST /api/index.php/v1/ats/tickets/42/postsAuthorization: Bearer <token>Accept: application/vnd.api+jsonContent-Type: application/json{  "ticket_id": 42,  "content_html": "<p>Thank you for contacting us. We are investigating the issue.</p>"}

HTTP codes:

200 OK

Post created successfully. Returns the new post resource.

400 Bad Request

A required field is missing or the save operation failed.

403 Forbidden

The API user is not an ATS manager, does not have post permission on the ticket category, or the ticket does not exist.