> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theymes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post tickets

> Create a new ticket. To include attachments, call POST /attachments to obtain upload URLs, upload the files, and pass the returned attachment IDs in the `attachments` array.



## OpenAPI

````yaml https://api.theymes.com/openapi post /tickets
openapi: 3.1.0
info:
  title: Theymes API
  version: 1.0.0
  description: >-
    Theymes API allows you to interact with the Theymes platform.



    Most endpoints require an API key for authentication. You can generate an
    API key in the Theymes dashboard.



    The API key should be included in the Authorization header
    (```Authorization: Bearer <YOUR_KEY>```).



    The public support link endpoints do not require authentication and are
    grouped separately below.
servers: []
security: []
tags:
  - name: Authenticated endpoints (API key)
    description: Endpoints that require an API key in the Authorization header.
  - name: Public support links (no authentication)
    description: >-
      Endpoints for creating web support sessions and links. These require no
      authentication and are identified by a game environment token.
paths:
  /tickets:
    post:
      tags:
        - Authenticated endpoints (API key)
      description: >-
        Create a new ticket. To include attachments, call POST /attachments to
        obtain upload URLs, upload the files, and pass the returned attachment
        IDs in the `attachments` array.
      operationId: createTicket
      parameters:
        - schema:
            type: string
            description: Bearer token API key
          required: true
          description: Bearer token API key
          name: Authorization
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                gameId:
                  type: string
                  format: uuid
                message:
                  type: string
                attachments:
                  type: array
                  items:
                    type: string
                  default: []
                  description: >-
                    List of attachment IDs returned by POST /attachments after
                    the file upload completes.
                skipDuplicateCheck:
                  type: boolean
                  default: false
                  description: If true, the duplicate ticket check will be skipped.
                language:
                  type: string
                  enum:
                    - en
                    - de
                    - es
                    - es-AR
                    - es-MX
                    - fi
                    - fil
                    - fr
                    - id
                    - ja
                    - ko
                    - ms
                    - pt
                    - pt-BR
                    - ru
                    - tr
                    - uk
                    - vi
                    - zh
                    - zh-Hans
                    - zh-Hant
                    - ar
                    - cs
                    - da
                    - nl
                    - el
                    - hu
                    - it
                    - 'no'
                    - nb
                    - pl
                    - ro
                    - sk
                    - sv
                    - th
                channels:
                  type: array
                  items:
                    type: string
                    enum:
                      - email
                  minItems: 1
                platform:
                  type: string
                  enum:
                    - ios
                    - android
                    - win
                    - macos
                    - linux
                    - web
                    - playstation_4
                    - playstation_5
                    - switch
                    - switch_2
                    - xbox_series
                    - xbox_one
                    - not_specified
                  default: not_specified
                metadata:
                  type: object
                  properties:
                    tags:
                      type: array
                      items:
                        type: string
                      description: List of tag names to associate with the ticket
                    fields:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: array
                            items:
                              type: string
                          - type: boolean
                      description: >-
                        Custom fields associated with the ticket, key value
                        where key is the field key as configured in Theymes and
                        value type depends on field configuration
                    player:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                          format: email
                        tier:
                          anyOf:
                            - type: number
                              enum:
                                - 1
                            - type: number
                              enum:
                                - 2
                            - type: number
                              enum:
                                - 3
                      required:
                        - email
                  required:
                    - player
              required:
                - gameId
                - message
                - language
                - channels
                - metadata
      responses:
        '200':
          description: The created ticket
          content:
            application/json:
              schema:
                type: object
                properties:
                  ticketId:
                    type: string
                    format: uuid
                  runningId:
                    type: integer
                    description: Human-readable running ticket number
                required:
                  - ticketId
                  - runningId
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  details:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - PLAYER_BLOCKED
                        required:
                          - type
                        title: PlayerBlocked
                        description: The user is blocked from contacting support
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - DUPLICATE_OPEN_TICKET_DETECTED
                          payload:
                            type: object
                            properties:
                              duplicateConversationId:
                                type: string
                                format: uuid
                                description: The ID of the existing similar open ticket
                            required:
                              - duplicateConversationId
                        required:
                          - type
                          - payload
                        title: DuplicateOpenTicketDetected
                        description: The user has already requested a similar open ticket
                required:
                  - details

````