# Reply to a ticket

You can reply to a ticket with a message from an admin or on behalf of a contact, or with a note for admins.

Endpoint: POST /tickets/{ticket_id}/reply
Version: 2.15
Security: bearerAuth

## Path parameters:

  - `ticket_id` (string, required)

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `message_type` (string, required)
    Enum: "comment"

  - `type` (string, required)
    Enum: "user"

  - `body` (string, required)
    The text body of the comment.

  - `created_at` (integer)
    The time the reply was created. If not provided, the current time will be used.
    Example: 1590000000

  - `attachment_urls` (array)
    A list of image URLs that will be added as attachments. You can include up to 10 URLs.

  - `reply_options` (array)
    The quick reply selection the contact wishes to respond with. These map to buttons displayed in the Messenger UI if sent by a bot, or the reply options sent by an Admin via the API.

  - `reply_options.text` (string, required)
    The text of the chosen reply option.

  - `reply_options.uuid` (string, required)
    The unique identifier for the quick reply option selected.

  - `body` (string)
    The text body of the reply. Notes accept some HTML formatting. Must be present for comment and note message types.
    Example: Hello there!

  - `admin_id` (string, required)
    The id of the admin who is authoring the comment.
    Example: 3156780

  - `reply_options` (array)
    The quick reply options to display. Must be present for quick_reply message types.

  - `reply_options.text` (string, required)
    The text to display in this quick reply option.

  - `reply_options.uuid` (string, required)
    A unique identifier for this quick reply option. This value will be available within the metadata of the comment ticket part that is created when a user clicks on this reply option.

  - `cross_post` (boolean)
    If set to true, the note will be cross-posted to all linked conversations. Only applicable to note message types on back-office tickets.
    Example: true

## Response 200 fields (application/json):

  - `type` (string)
    Always ticket_part
    Enum: "ticket_part"

  - `id` (string)
    The id representing the part.
    Example: 3

  - `part_type` (string)
    Type of the part
    Enum: "note", "comment", "quick_reply"

  - `body` (string)
    The message body, which may contain HTML.
    Example: <p>Okay!</p>

  - `created_at` (integer)
    The time the note was created.
    Example: 1663597223

  - `updated_at` (integer)
    The last time the note was updated.
    Example: 1663597260

  - `author` (object)
    The author that wrote or triggered the part. Can be a bot, admin, team or user.

  - `author.type` (string)
    The type of the author
    Enum: "admin", "bot", "team", "user"

  - `author.id` (string)
    The id of the author
    Example: 274

  - `author.name` (string)
    The name of the author
    Example: Operator

  - `author.email` (string)
    The email of the author
    Example: operator+abcd1234@intercom.io

  - `attachments` (array)
    A list of attachments for the part.

  - `attachments.type` (string)
    The type of attachment
    Example: upload

  - `attachments.name` (string)
    The name of the attachment
    Example: example.png

  - `attachments.url` (string)
    The URL of the attachment
    Example: https://picsum.photos/200/300

  - `attachments.content_type` (string)
    The content type of the attachment
    Example: image/png

  - `attachments.filesize` (integer)
    The size of the attachment
    Example: 100

  - `attachments.width` (integer)
    The width of the attachment
    Example: 100

  - `attachments.height` (integer)
    The height of the attachment
    Example: 100

  - `redacted` (boolean)
    Whether or not the ticket part has been redacted.
    Example: false

## Response 400 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 404 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

