# Update a ticket

`PUT /tickets/{id}`

> This is a subset of the full specification, limited to the `PUT /tickets/{id}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.12/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.12'
  description: This is a subset of the full specification, limited to the `PUT /tickets/{id}` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Tickets
    description: Everything about your tickets
paths:
  /tickets/{id}:
    put:
      summary: Update a ticket
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: id
          in: path
          required: true
          description: |-
            The unique identifier for the ticket which is given by Intercom.

            **Not the Inbox ticket ID**

            This is the internal `id` field from the API response, not the `ticket_id` displayed in the Intercom Inbox (e.g., #12345). Use the `id` value from the ticket object returned by the API.
          schema:
            type: string
      tags:
        - Tickets
      operationId: updateTicket
      description: You can update a ticket.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              examples:
                Successful response:
                  value:
                    type: ticket
                    id: '161'
                    ticket_id: '13'
                    ticket_attributes:
                      _default_title_: example
                      _default_description_: there is a problem
                    ticket_state:
                      type: ticket_state
                      id: '2750'
                      category: in_progress
                      internal_label: In progress
                      external_label: In progress
                    ticket_type:
                      type: ticket_type
                      id: '38'
                      name: my-ticket-type-25
                      description: my ticket type description is awesome.
                      icon: 🦁
                      workspace_id: this_is_an_id687_that_should_be_at_least_
                      archived: false
                      created_at: 1736201960
                      updated_at: 1736201960
                      is_internal: false
                      ticket_type_attributes:
                        type: list
                        data:
                          - type: ticket_type_attribute
                            id: '67'
                            workspace_id: this_is_an_id687_that_should_be_at_least_
                            name: _default_title_
                            description: ola
                            data_type: string
                            input_options: null
                            order: 0
                            required_to_create: true
                            required_to_create_for_contacts: false
                            visible_on_create: true
                            visible_to_contacts: false
                            default: false
                            ticket_type_id: 38
                            archived: false
                            created_at: 1736201960
                            updated_at: 1736201960
                          - type: ticket_type_attribute
                            id: '68'
                            workspace_id: this_is_an_id687_that_should_be_at_least_
                            name: _default_description_
                            description: ola
                            data_type: string
                            input_options: null
                            order: 0
                            required_to_create: true
                            required_to_create_for_contacts: false
                            visible_on_create: true
                            visible_to_contacts: false
                            default: false
                            ticket_type_id: 38
                            archived: false
                            created_at: 1736201960
                            updated_at: 1736201960
                      category: Back-office
                    contacts:
                      type: contact.list
                      contacts:
                        - type: contact
                          id: 677c56e96abd011ad17ff5c2
                          external_id: 113b5c67-c762-4dc6-ad96-6f2f1f9fbf79
                    admin_assignee_id: '991266766'
                    team_assignee_id: '0'
                    created_at: 1736201961
                    updated_at: 1736201965
                    ticket_parts:
                      type: ticket_part.list
                      ticket_parts:
                        - type: ticket_part
                          id: '51'
                          part_type: ticket_state_updated_by_admin
                          ticket_state: submitted
                          previous_ticket_state: submitted
                          created_at: 1736201962
                          updated_at: 1736201962
                          author:
                            id: '991266764'
                            type: admin
                            name: Ciaran475 Lee
                            email: admin475@email.com
                          attachments: []
                          redacted: false
                        - type: ticket_part
                          id: '52'
                          part_type: ticket_attribute_updated_by_admin
                          created_at: 1736201964
                          updated_at: 1736201964
                          author:
                            id: '991266765'
                            type: bot
                            name: Fin
                            email: operator+this_is_an_id687_that_should_be_at_least_@intercom.io
                          attachments: []
                          redacted: false
                        - type: ticket_part
                          id: '53'
                          part_type: ticket_attribute_updated_by_admin
                          created_at: 1736201964
                          updated_at: 1736201964
                          author:
                            id: '991266765'
                            type: bot
                            name: Fin
                            email: operator+this_is_an_id687_that_should_be_at_least_@intercom.io
                          attachments: []
                          redacted: false
                        - type: ticket_part
                          id: '54'
                          part_type: ticket_state_updated_by_admin
                          ticket_state: in_progress
                          previous_ticket_state: submitted
                          created_at: 1736201964
                          updated_at: 1736201964
                          author:
                            id: '991266765'
                            type: bot
                            name: Fin
                            email: operator+this_is_an_id687_that_should_be_at_least_@intercom.io
                          attachments: []
                          redacted: false
                        - type: ticket_part
                          id: '55'
                          part_type: assignment
                          created_at: 1736201965
                          updated_at: 1736201965
                          assigned_to:
                            type: admin
                            id: '991266766'
                          author:
                            id: '991266764'
                            type: admin
                            name: Ciaran475 Lee
                            email: admin475@email.com
                          attachments: []
                          redacted: false
                        - type: ticket_part
                          id: '56'
                          part_type: snoozed
                          created_at: 1736201965
                          updated_at: 1736201965
                          author:
                            id: '991266765'
                            type: bot
                            name: Fin
                            email: operator+this_is_an_id687_that_should_be_at_least_@intercom.io
                          attachments: []
                          redacted: false
                      total_count: 6
                    open: true
                    snoozed_until: 1736269200
                    linked_objects:
                      type: list
                      data: []
                      total_count: 0
                      has_more: false
                    category: Back-office
                    is_shared: false
              schema:
                $ref: '#/components/schemas/ticket'
        '400':
          description: Ticket state id is not valid or is not associated with the ticket type.
          content:
            application/json:
              examples:
                Ticket state id is not valid or is not associated with the ticket type.:
                  value:
                    type: error.list
                    request_id: 436c2cd6-f9f7-45be-8ab6-e259445312d7
                    errors:
                      - code: ticket_state_id_invalid
                        message: Ticket state id is not valid or is not associated with the ticket type
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: cb6bf8a2-56e4-46c5-bdef-85c66fb95edb
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Assignee not found
          content:
            application/json:
              examples:
                Admin not found:
                  value:
                    type: error.list
                    request_id: 2008f50e-1bfb-42ba-b8b7-35be65ceda40
                    errors:
                      - code: assignee_not_found
                        message: Assignee not found
                Assignee not found:
                  value:
                    type: error.list
                    request_id: 3e22c167-65f2-40be-9d11-fcf073b0e278
                    errors:
                      - code: assignee_not_found
                        message: Assignee not found
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_ticket_request'
            examples:
              successful_response:
                summary: Successful response
                value:
                  ticket_attributes:
                    _default_title_: example
                    _default_description_: there is a problem
                  assignment:
                    admin_id: '991266764'
                    assignee_id: '991266766'
                  open: true
                  snoozed_until: 1673609604
                  ticket_state_id: 2750
              admin_not_found:
                summary: Admin not found
                value:
                  ticket_attributes:
                    _default_title_: example
                    _default_description_: there is a problem
                  assignment:
                    admin_id: '123'
                    assignee_id: '991266774'
                  ticket_state_id: 2758
              assignee_not_found:
                summary: Assignee not found
                value:
                  ticket_attributes:
                    _default_title_: example
                    _default_description_: there is a problem
                  assignment:
                    admin_id: '991266780'
                    assignee_id: '456'
                  ticket_state_id: 2766
              ticket_state_id_is_not_valid_or_is_not_associated_with_the_ticket_type:
                summary: Ticket state id is not valid or is not associated with the ticket type.
                value:
                  ticket_state_id: 0
components:
  schemas:
    contact_reference:
      title: Contact Reference
      type: object
      description: reference to contact object
      properties:
        type:
          type: string
          description: always contact
          enum:
            - contact
          example: contact
        id:
          type: string
          description: The unique identifier for the contact which is given by Intercom.
          example: 5ba682d23d7cf92bef87bfd4
        external_id:
          type: string
          nullable: true
          description: The unique identifier for the contact which is provided by the Client.
          example: f3b87a2e09d514c6c2e79b9a
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    file_attribute:
      title: File
      type: object
      description: The value describing a file upload set for a custom attribute
      properties:
        type:
          type: string
          example: upload
        name:
          type: string
          description: The name of the file
          example: Screenshot.png
        url:
          type: string
          description: The url of the file. This is a temporary URL and will expire after 30 minutes.
          example: https://intercom-attachments-1.com/.../Screenshot.png
        content_type:
          type: string
          description: The type of file
          example: image/png
        filesize:
          type: integer
          description: The size of the file in bytes
          example: 11308309
        width:
          type: integer
          description: The width of the file in pixels, if applicable
          example: 3024
        height:
          type: integer
          description: The height of the file in pixels, if applicable
          example: 1964
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.12'
      default: '2.12'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - Preview
    linked_object:
      title: Linked Object
      type: object
      description: A linked conversation or ticket.
      properties:
        type:
          type: string
          description: ticket or conversation
          enum:
            - ticket
            - conversation
          example: ticket
        id:
          type: string
          description: The ID of the linked object
          example: '7583'
        category:
          type: string
          description: Category of the Linked Ticket Object.
          enum:
            - Customer
            - Back-office
            - Tracker
            - null
          example: Customer
          nullable: true
    linked_object_list:
      title: Linked Objects
      type: object
      description: An object containing metadata about linked conversations and linked tickets. Up to 1000 can be returned.
      properties:
        type:
          type: string
          description: Always list.
          enum:
            - list
          example: list
        total_count:
          type: integer
          description: The total number of linked objects.
          example: 100
        has_more:
          type: boolean
          description: Whether or not there are more linked objects than returned.
          example: false
        data:
          type: array
          description: An array containing the linked conversations and linked tickets.
          items:
            $ref: '#/components/schemas/linked_object'
    ticket:
      title: Ticket
      type: object
      x-tags:
        - Tickets
      description: Tickets are how you track requests from your users.
      nullable: true
      properties:
        type:
          type: string
          description: Always ticket
          enum:
            - ticket
          default: ticket
          example: ticket
        id:
          type: string
          description: The unique identifier for the ticket which is given by Intercom.
          example: '1295'
        ticket_id:
          type: string
          description: The ID of the Ticket used in the Intercom Inbox and Messenger. Do not use ticket_id for API queries.
          example: '1390'
        category:
          type: string
          description: Category of the Ticket.
          enum:
            - Customer
            - Back-office
            - Tracker
          example: Customer
        ticket_attributes:
          $ref: '#/components/schemas/ticket_custom_attributes'
        ticket_state:
          $ref: '#/components/schemas/ticket_state'
        ticket_type:
          $ref: '#/components/schemas/ticket_type'
        contacts:
          $ref: '#/components/schemas/ticket_contacts'
        admin_assignee_id:
          type: string
          description: The id representing the admin assigned to the ticket.
          example: '1295'
        team_assignee_id:
          type: string
          description: The id representing the team assigned to the ticket.
          example: '1295'
        created_at:
          type: integer
          format: date-time
          description: The time the ticket was created as a UTC Unix timestamp.
          example: 1663597223
        updated_at:
          type: integer
          format: date-time
          description: The last time the ticket was updated as a UTC Unix timestamp.
          example: 1663597260
        open:
          type: boolean
          description: Whether or not the ticket is open. If false, the ticket is closed.
          example: true
        snoozed_until:
          type: integer
          format: date-time
          description: The time the ticket will be snoozed until as a UTC Unix timestamp. If null, the ticket is not currently snoozed.
          example: 1663597260
        linked_objects:
          $ref: '#/components/schemas/linked_object_list'
        ticket_parts:
          $ref: '#/components/schemas/ticket_parts'
        is_shared:
          type: boolean
          description: Whether or not the ticket is shared with the customer.
          example: true
    ticket_contacts:
      title: Contacts
      type: object
      x-tags:
        - Tickets
      description: The list of contacts affected by a ticket.
      properties:
        type:
          type: string
          description: always contact.list
          enum:
            - contact.list
          example: contact.list
        contacts:
          type: array
          description: The list of contacts affected by this ticket.
          items:
            $ref: '#/components/schemas/contact_reference'
    ticket_custom_attributes:
      title: Ticket Attributes
      type: object
      description: An object containing the different attributes associated to the ticket as key-value pairs. For the default title and description attributes, the keys are `_default_title_` and `_default_description_`.
      additionalProperties:
        anyOf:
          - type: string
            nullable: true
          - type: number
          - type: boolean
          - type: array
          - $ref: '#/components/schemas/file_attribute'
      example:
        _default_title_: Found a bug
        _default_description_: The button's not working
    ticket_part:
      title: Ticket Part
      type: object
      x-tags:
        - Tickets
      description: A Ticket Part represents a message in the ticket.
      properties:
        type:
          type: string
          description: Always ticket_part
          example: ticket_part
        id:
          type: string
          description: The id representing the ticket part.
          example: '3'
        part_type:
          type: string
          description: The type of ticket part.
          example: comment
        body:
          type: string
          nullable: true
          description: The message body, which may contain HTML.
          example: <p>Okay!</p>
        previous_ticket_state:
          type: string
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
          description: The previous state of the ticket.
          example: submitted
        ticket_state:
          type: string
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
          description: The state of the ticket.
          example: submitted
        created_at:
          type: integer
          format: date-time
          description: The time the ticket part was created.
          example: 1663597223
        updated_at:
          type: integer
          format: date-time
          description: The last time the ticket part was updated.
          example: 1663597260
        assigned_to:
          $ref: '#/components/schemas/reference'
          nullable: true
          description: The assignee this ticket_part assigned the ticket to, as a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned the ticket, `type` is `nobody_admin` and `id` is `null`. Null when the part did not change the assignment, or when the assignee has since been deleted.
        author:
          $ref: '#/components/schemas/ticket_part_author'
        attachments:
          title: Ticket part attachments
          type: array
          description: A list of attachments for the part.
          items:
            $ref: '#/components/schemas/part_attachment'
        external_id:
          type: string
          nullable: true
          description: The external id of the ticket part
          example: abcd1234
        redacted:
          type: boolean
          description: Whether or not the ticket part has been redacted.
          example: false
    ticket_parts:
      title: Ticket Parts
      type: object
      description: A list of Ticket Part objects for each note and event in the ticket. There is a limit of 500 parts.
      properties:
        type:
          type: string
          description: ''
          enum:
            - ticket_part.list
          example: ticket_part.list
        ticket_parts:
          title: Tickt Parts
          type: array
          description: A list of Ticket Part objects for each ticket. There is a limit of 500 parts.
          items:
            $ref: '#/components/schemas/ticket_part'
        total_count:
          type: integer
          description: ''
          example: 2
    ticket_state:
      title: Ticket State
      type: object
      x-tags:
        - Tickets
      description: A ticket state, used to define the state of a ticket.
      nullable: true
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `ticket_state`.
          example: ticket_state
        id:
          type: string
          description: The id of the ticket state
          example: '12'
        category:
          type: string
          description: The category of the ticket state
          example: in_progress
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
        internal_label:
          type: string
          description: The state the ticket is currently in, in a human readable form - visible in Intercom
          example: With Dev Team
        external_label:
          type: string
          description: The state the ticket is currently in, in a human readable form - visible to customers, in the messenger, email and tickets portal.
          example: In Progress
    ticket_type:
      title: Ticket Type
      type: object
      x-tags:
        - Tickets
      description: A ticket type, used to define the data fields to be captured in a ticket.
      nullable: true
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `ticket_type`.
          example: ticket_type
        id:
          type: string
          description: The id representing the ticket type.
          example: '1295'
        category:
          type: string
          description: Category of the Ticket Type.
          enum:
            - Customer
            - Back-office
            - Tracker
          example: Customer
        name:
          type: string
          description: The name of the ticket type
          example: Bug
        description:
          type: string
          description: The description of the ticket type
          example: A bug that has been reported.
        icon:
          type: string
          description: The icon of the ticket type
          example: 🐞
        workspace_id:
          type: string
          description: The id of the workspace that the ticket type belongs to.
          example: ecahpwf5
        ticket_type_attributes:
          $ref: '#/components/schemas/ticket_type_attribute_list'
        ticket_states:
          title: Ticket States
          type: object
          description: A list of ticket states associated with a given ticket type.
          properties:
            type:
              type: string
              description: String representing the object's type. Always has the value `list`.
              example: list
            data:
              type: array
              description: A list of ticket states associated with a given ticket type.
              items:
                $ref: '#/components/schemas/ticket_state'
        archived:
          type: boolean
          description: Whether the ticket type is archived or not.
          example: false
        created_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type was created.
        updated_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type was last updated.
    ticket_type_attribute_list:
      title: Ticket Type Attributes
      type: object
      description: A list of attributes associated with a given ticket type.
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `ticket_type_attributes.list`.
        ticket_type_attributes:
          type: array
          description: A list of ticket type attributes associated with a given ticket type.
          items:
            $ref: '#/components/schemas/ticket_type_attribute'
    update_ticket_request:
      description: You can update a Ticket
      type: object
      title: Update Ticket Request Payload
      properties:
        ticket_attributes:
          type: object
          description: The attributes set on the ticket.
          example:
            _default_title_: example
            _default_description_: having a problem
        ticket_state_id:
          type: string
          description: The ID of the ticket state associated with the ticket type.
          example: '123'
        company_id:
          type: string
          description: The ID of the company that the ticket is associated with. The unique identifier for the company which is given by Intercom. Set to nil to remove company.
          example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
        open:
          type: boolean
          description: Specify if a ticket is open. Set to false to close a ticket. Closing a ticket will also unsnooze it.
          example: true
        is_shared:
          type: boolean
          description: Specify whether the ticket is visible to users.
          example: true
        snoozed_until:
          type: integer
          format: timestamp
          description: The time you want the ticket to reopen.
          example: 1673609604
        assignment:
          type: object
          properties:
            admin_id:
              type: string
              description: The ID of the admin performing the action.
              example: '123'
            assignee_id:
              type: string
              description: The ID of the admin or team to which the ticket is assigned. Set this 0 to unassign it.
              example: '123'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
