# Add Note To Ticket

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

#### Request

```
POST /tickets/{ticketId}/notes
```

#### 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 note in</td></tr></tbody></table>

#### Request Body

```json
{
	"attachments": [
		{
			"isContentPart": null,
			"name": "filename.png",
			"url": "https://your.attachment.url/filename.png"
		}
	],
	"author": {
		"email": "staffEmailLogin@domain.com"
	},
	"htmlMessage": null,
	"message": "Note text"
}
```

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

| Field       | Type                                                                                       | Comments          |
| ----------- | ------------------------------------------------------------------------------------------ | ----------------- |
| attachments | array of [Base Attachment](/docs/apis/tickets/reference/objects/base-attachment.md) models | Note attachments  |
| author      | [Note Creator](/docs/apis/tickets/reference/objects/reply-note-creator.md) model           | Note creator info |
| htmlMessage | string                                                                                     | Note html content |
| message     | string                                                                                     | Note content      |

#### Response

```json
{
	"data": {
		"id": 297991,
		"message": "Note text",
		"htmlMessage": null,
		"attachments": [],
		"author": {
			"customIdentifier": null,
			"id": "0da5a9e8-90ef-403f-873c-e20e4d298558",
			"name": "Staff name",
			"image": "",
			"email": "staffEmailLogin@domain.com",
			"status": "team",
			"isBot": false
		},
		"mentionedUsers": [],
		"creationTime": "2020-03-05T18:34:51.2599354+00:00"
	},
	"errorCode": -1,
	"errorText": null
}
```

`Data` field will contain [Note](/docs/apis/tickets/reference/objects/note.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/add-note-to-ticket.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.
