# Create Reply

{% hint style="warning" %}
all API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% 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="../objects/base-attachment">Base Attachment</a> models</td><td>Reply attachments</td></tr><tr><td>author</td><td><a href="../objects/reply-note-creator">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": {
			"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](https://developers.socialboards.com/docs/apis/tickets/reference/objects/reply) model.
