# Create Ticket Request Payload

> This is a subset of the full specification, limited to the `create_ticket_request` schema.
>
> 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 `create_ticket_request` schema.
  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: []
paths: {}
components:
  schemas:
    create_ticket_request:
      description: You can create a Ticket
      type: object
      title: Create Ticket Request Payload
      properties:
        ticket_type_id:
          type: string
          description: The ID of the type of ticket you want to create
          example: '1234'
        contacts:
          type: array
          description: The list of contacts (users or leads) affected by this ticket. Currently only one is allowed
          items:
            type: object
            oneOf:
              - title: ID
                properties:
                  id:
                    type: string
                    description: The identifier for the contact as given by Intercom.
                required:
                  - id
              - title: External ID
                properties:
                  external_id:
                    type: string
                    description: The external_id you have defined for the contact who is being added as a participant.
                required:
                  - external_id
              - title: Email
                properties:
                  email:
                    type: string
                    description: The email you have defined for the contact who is being added as a participant. If a contact with this email does not exist, one will be created.
                required:
                  - email
          example:
            - id: '1234'
        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
          example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
        created_at:
          type: integer
          description: The time the ticket was created. If not provided, the current time will be used.
          example: 1590000000
        ticket_attributes:
          $ref: '#/components/schemas/ticket_request_custom_attributes'
      required:
        - ticket_type_id
        - contacts
    ticket_request_custom_attributes:
      title: Ticket Attributes
      type: object
      description: The attributes set on the ticket. When setting the default title and description attributes, the attribute keys that should be used are `_default_title_` and `_default_description_`. When setting ticket type attributes of the list attribute type, the key should be the attribute name and the value of the attribute should be the list item id, obtainable by [listing the ticket type](ref:get_ticket-types). For example, if the ticket type has an attribute called `priority` of type `list`, the key should be `priority` and the value of the attribute should be the guid of the list item (e.g. `de1825a0-0164-4070-8ca6-13e22462fa7e`).
      additionalProperties:
        anyOf:
          - type: string
            nullable: true
          - type: number
          - type: boolean
          - type: array
      example:
        _default_title_: Found a bug
        _default_description_: The button is not working
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
