# Create a ticket type

`POST /ticket_types`

> This is a subset of the full specification, limited to the `POST /ticket_types` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `POST /ticket_types` 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:
    post:
      summary: Create a ticket type
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
      tags:
        - Ticket Types
      operationId: createTicketType
      description: |
        You can create a new ticket type.
        > 📘 Creating ticket types.
        >
        > Every ticket type will be created with two default attributes: _default_title_ and _default_description_.
        > For the `icon` propery, use an emoji from [Twemoji Cheatsheet](https://twemoji-cheatsheet.vercel.app/)
      responses:
        '200':
          description: Ticket type created
          content:
            application/json:
              examples:
                Ticket type created:
                  value:
                    type: ticket_type
                    id: '70'
                    name: Customer Issue
                    description: Customer Report Template
                    icon: 🎟️
                    workspace_id: this_is_an_id652_that_should_be_at_least_
                    archived: false
                    created_at: 1734537869
                    updated_at: 1734537869
                    is_internal: false
                    ticket_type_attributes:
                      type: list
                      data:
                        - type: ticket_type_attribute
                          id: '174'
                          workspace_id: this_is_an_id652_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: 70
                          archived: false
                          created_at: 1734537869
                          updated_at: 1734537869
                        - type: ticket_type_attribute
                          id: '175'
                          workspace_id: this_is_an_id652_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: 70
                          archived: false
                          created_at: 1734537869
                          updated_at: 1734537869
                    category: Customer
                    ticket_states:
                      type: list
                      data:
                        - type: ticket_state
                          id: '8337'
                          category: submitted
                          internal_label: Submitted
                          external_label: Submitted
                        - type: ticket_state
                          id: '8338'
                          category: in_progress
                          internal_label: In progress
                          external_label: In progress
                        - type: ticket_state
                          id: '8339'
                          category: waiting_on_customer
                          internal_label: Waiting on customer
                          external_label: Waiting on you
                        - type: ticket_state
                          id: '8340'
                          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: 36b79d0c-b78f-4e1d-bd6d-bfc3dcc71f53
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_ticket_type_request'
            examples:
              ticket_type_created:
                summary: Ticket type created
                value:
                  name: Customer Issue
                  description: Customer Report Template
                  icon: 🎟️
                  category: Customer
components:
  schemas:
    create_ticket_type_request:
      description: |
        The request payload for creating a ticket type.
          You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet](https://twemoji-cheatsheet.vercel.app/)
      type: object
      title: Create 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: Used for tracking bugs
        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: 🎟️
        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
      required:
        - name
    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.15'
      default: '2.15'
      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'
        - '2.13'
        - '2.14'
        - '2.15'
    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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
