# Update a ticket type

`PUT /ticket_types/{id}`

> This is a subset of the full specification, limited to the `PUT /ticket_types/{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 /ticket_types/{id}` operation.
  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: Ticket Types
    description: Everything about your ticket types
paths:
  /ticket_types/{id}:
    put:
      summary: Update a ticket type
      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 type which is given by Intercom.
          schema:
            type: string
      tags:
        - Ticket Types
      operationId: updateTicketType
      description: |

        You can update a ticket type.

        > 📘 Updating a ticket type.
        >
        > For the `icon` propery, use an emoji from [Twemoji Cheatsheet](https://twemoji-cheatsheet.vercel.app/)
      responses:
        '200':
          description: Ticket type updated
          content:
            application/json:
              examples:
                Ticket type updated:
                  value:
                    type: ticket_type
                    id: '22'
                    name: Bug Report 2
                    description: Bug Report Template
                    icon: 🎟️
                    workspace_id: this_is_an_id655_that_should_be_at_least_
                    archived: false
                    created_at: 1736201902
                    updated_at: 1736201902
                    is_internal: false
                    ticket_type_attributes:
                      type: list
                      data:
                        - type: ticket_type_attribute
                          id: '52'
                          workspace_id: this_is_an_id655_that_should_be_at_least_
                          name: _default_title_
                          description: ''
                          data_type: string
                          input_options:
                            multiline: false
                          order: 0
                          required_to_create: false
                          required_to_create_for_contacts: false
                          visible_on_create: true
                          visible_to_contacts: true
                          default: true
                          ticket_type_id: 22
                          archived: false
                          created_at: 1736201902
                          updated_at: 1736201902
                        - type: ticket_type_attribute
                          id: '54'
                          workspace_id: this_is_an_id655_that_should_be_at_least_
                          name: name
                          description: description
                          data_type: string
                          input_options: null
                          order: 0
                          required_to_create: false
                          required_to_create_for_contacts: false
                          visible_on_create: false
                          visible_to_contacts: false
                          default: false
                          ticket_type_id: 22
                          archived: false
                          created_at: 1736201902
                          updated_at: 1736201902
                        - type: ticket_type_attribute
                          id: '53'
                          workspace_id: this_is_an_id655_that_should_be_at_least_
                          name: _default_description_
                          description: ''
                          data_type: string
                          input_options:
                            multiline: true
                          order: 1
                          required_to_create: false
                          required_to_create_for_contacts: false
                          visible_on_create: true
                          visible_to_contacts: true
                          default: true
                          ticket_type_id: 22
                          archived: false
                          created_at: 1736201902
                          updated_at: 1736201902
                    category: Customer
                    ticket_states:
                      type: list
                      data:
                        - type: ticket_state
                          id: '2621'
                          category: submitted
                          internal_label: Submitted
                          external_label: Submitted
                        - type: ticket_state
                          id: '2622'
                          category: in_progress
                          internal_label: In progress
                          external_label: In progress
                        - type: ticket_state
                          id: '2623'
                          category: waiting_on_customer
                          internal_label: Waiting on customer
                          external_label: Waiting on you
                        - type: ticket_state
                          id: '2624'
                          category: resolved
                          internal_label: Resolved
                          external_label: Resolved
              schema:
                $ref: '#/components/schemas/ticket_type'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: 20727cfe-92eb-4d6e-b3d5-b6d2eff2f68e
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_ticket_type_request'
            examples:
              ticket_type_updated:
                summary: Ticket type updated
                value:
                  name: Bug Report 2
components:
  schemas:
    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
    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
    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:
      title: Ticket Type Attribute
      type: object
      description: Ticket type attribute, used to define each data field 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_attribute`.
          example: ticket_type_attribute
        id:
          type: string
          description: The id representing the ticket type attribute.
          example: '1'
        workspace_id:
          type: string
          description: The id of the workspace that the ticket type attribute belongs to.
          example: ecahpwf5
        name:
          type: string
          description: The name of the ticket type attribute
          example: Title
        description:
          type: string
          description: The description of the ticket type attribute
          example: Bug title.
        data_type:
          type: string
          description: 'The type of the data attribute (allowed values: "string list integer decimal boolean datetime files")'
          example: string
        input_options:
          type: object
          description: Input options for the attribute
          example: 'multiline: true'
        order:
          type: integer
          description: The order of the attribute against other attributes
          example: 1
        required_to_create:
          type: boolean
          description: Whether the attribute is required or not for teammates.
          default: false
          example: false
        required_to_create_for_contacts:
          type: boolean
          description: Whether the attribute is required or not for contacts.
          default: false
          example: false
        visible_on_create:
          type: boolean
          description: Whether the attribute is visible or not to teammates.
          default: true
          example: false
        visible_to_contacts:
          type: boolean
          description: Whether the attribute is visible or not to contacts.
          default: true
          example: false
        default:
          type: boolean
          description: Whether the attribute is built in or not.
          example: true
        ticket_type_id:
          type: integer
          description: The id of the ticket type that the attribute belongs to.
          example: 42
        archived:
          type: boolean
          description: Whether the ticket type attribute is archived or not.
          example: false
        created_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type attribute was created.
        updated_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type attribute 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_type_request:
      description: |
        The request payload for updating a ticket type.
        You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet](https://twemoji-cheatsheet.vercel.app/)
      type: object
      title: Update Ticket Type Request Payload
      nullable: true
      properties:
        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 has been occured
        category:
          type: string
          description: Category of the Ticket Type.
          enum:
            - Customer
            - Back-office
            - Tracker
          example: Customer
        icon:
          type: string
          description: The icon of the ticket type.
          example: 🐞
          default: 🎟️
        archived:
          type: boolean
          description: The archived status of the ticket type.
          example: false
        is_internal:
          type: boolean
          description: Whether the tickets associated with this ticket type are intended for internal use only or will be shared with customers. This is currently a limited attribute.
          example: false
          default: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
