# Create Reply

{% hint style="warning" %}
all API requests should contain [authorization headers](/docs/apis/tickets/authorization-headers.md).
{% endhint %}

#### Request

```
POST /tickets/{ticketId}/replies
```

#### Query Parameters

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="100">Required</th><th>Comments</th></tr></thead><tbody><tr><td>ticketId</td><td>integer</td><td>yes</td><td>Id of ticket you want to create reply in</td></tr></tbody></table>

#### Request Body

{% code lineNumbers="true" %}

```json
{
    "attachments": [
        {
            "url": "https://your.attachment.url/filename.png",
            "name": "filename.png"
        }
    ],
    "author": {
        "email": "staffEmailLogin@domain.com",
    },
    "isDraft": false,
    "isHtml": false,
    "isTicketNeededToBeCompleted": false,
    "message": "new reply text",
    "parentReplyId": null,
    "suppressTicketStatusAutoupdate": true
}
```

{% endcode %}

Body of request should contain the following model serialized to JSON.

<table><thead><tr><th width="296">Field</th><th width="172.33333333333331">Type</th><th>Comments</th></tr></thead><tbody><tr><td>attachments</td><td>array of <a href="/pages/-LwD154vGbIRBumcPB3x">Base Attachment</a> models</td><td>Reply attachments</td></tr><tr><td>author</td><td><a href="/pages/-M1VI9qCqaG8HQhcOYu5">Reply Creator</a> model</td><td>Reply creator info</td></tr><tr><td>isDraft</td><td>boolean</td><td>If <code>true</code> draft of reply will be created instead.</td></tr><tr><td>isHtml</td><td>boolean</td><td>If <code>true</code> indicates that message content should be processed as HTML with tags, classes and attributes</td></tr><tr><td>isTicketNeededToBeCompleted</td><td>boolean</td><td>If <code>true</code> ticket status will be set to <code>completed</code> after a reply creation</td></tr><tr><td>message</td><td>string</td><td>Reply content</td></tr><tr><td>parentReplyId</td><td>nullable integer</td><td>If <code>null</code> reply of the 1st level will be created. Should contain reply Id of parent if subreply needs to be created</td></tr><tr><td>suppressTicketStatusAutoupdate</td><td>boolean</td><td>if <code>true</code> ticket status won't be updated automatically after adding a reply</td></tr></tbody></table>

#### Response

```json
{
	"data": {
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"ccEmails": [],
		"creationTime": "2020-03-05T17:58:23.0186292+00:00",
		"htmlMessage": "new reply text",
		"id": 156372820,
		"level": 0,
		"message": "new reply text",
		"parentReplyId": null,
		"properties": {
			"isByTeam": true,
			"isDraft": false,
			"isHidden": false
		},
		"ticketId": 443484636,
		"toEmails": []
	},
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain [Reply](/docs/apis/tickets/reference/objects/reply.md) model.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.socialboards.com/docs/apis/tickets/reference/endpoints/create-reply.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
