> ## 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.

# Perform ticket actions

> Perform actions on a ticket such as managing metadata, sending messages, assigning, changing status, and closing



## OpenAPI

````yaml https://api.theymes.com/v2/openapi.json post /tickets/{ticketId}/actions
openapi: 3.1.0
info:
  title: Theymes API v2
  version: 2.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:
  - url: https://api.theymes.com/v2
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 an app environment token.
paths:
  /tickets/{ticketId}/actions:
    post:
      tags:
        - Authenticated endpoints (API key)
      summary: Perform ticket actions
      description: >-
        Perform actions on a ticket such as managing metadata, sending messages,
        assigning, changing status, and closing
      operationId: performTicketActions
      parameters:
        - schema:
            type: string
            format: uuid
            description: The ID of the ticket to perform actions on
          required: true
          description: The ID of the ticket to perform actions on
          name: ticketId
          in: path
        - schema:
            type: string
            description: Bearer token API key
          required: true
          description: Bearer token API key
          name: Authorization
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                actions:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - addTags
                          tagNames:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - tagNames
                        title: addTags
                        description: Action to add tags to the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - setFields
                          fields:
                            type: object
                            additionalProperties:
                              anyOf:
                                - type: string
                                - type: number
                                - type: array
                                  items:
                                    type: string
                                - type: boolean
                              description: >-
                                Value of the custom field to add to the ticket,
                                type depends on field configuration in Theymes
                                support app
                            description: >-
                              Map of custom field keys to their values to set on
                              the ticket
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - fields
                        title: setFields
                        description: Action to add custom fields to the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - setOnHold
                          onHold:
                            type: boolean
                            description: >-
                              Whether to set the ticket on hold (true) or remove
                              from on hold (false)
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - onHold
                        title: setOnHold
                        description: >-
                          Action to set the ticket on hold or remove from on
                          hold. Only one ticket status action may be specified
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - setStatus
                          status:
                            type: string
                            enum:
                              - waiting
                              - assigned
                            description: >-
                              Status to set. Assigned resolves to unassigned
                              when the ticket has no assignee. Use setOnHold,
                              resolveTicket, or rejectTicket for hold and closed
                              states.
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - status
                        title: setStatus
                        description: >-
                          Action to set the status of an open ticket. Only one
                          ticket status action may be specified
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - setCustomerInfo
                          customer:
                            type: object
                            properties:
                              name:
                                type: string
                                description: The name of the customer
                              tier:
                                anyOf:
                                  - type: number
                                    enum:
                                      - 1
                                  - type: number
                                    enum:
                                      - 2
                                  - type: number
                                    enum:
                                      - 3
                                description: The tier of the customer
                        required:
                          - type
                          - customer
                        title: setCustomerInfo
                        description: The customer info to set on the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - sendMessage
                          message:
                            type: string
                            minLength: 1
                            description: >-
                              The outbound message content to send to the
                              ticket. The message must be in the language of the
                              ticket.
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as the message
                              sender. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - message
                        title: sendMessage
                        description: Action to send an outbound message to the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - addPrivateNote
                          message:
                            type: string
                            minLength: 1
                            description: The private note content to add to the ticket
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - message
                        title: addPrivateNote
                        description: Action to add a private note to the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - resolveTicket
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                        title: resolveTicket
                        description: Action to resolve the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - rejectTicket
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                        title: rejectTicket
                        description: Action to reject the ticket
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - assignTicket
                          assigneeId:
                            type: string
                            format: uuid
                            description: The user ID to assign the ticket to
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - assigneeId
                        title: assignTicket
                        description: Action to assign the ticket to a user
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - unassignTicket
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                        title: unassignTicket
                        description: Action to remove the current ticket assignee
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - removeTags
                          tagNames:
                            type: array
                            items:
                              type: string
                            minItems: 1
                          userId:
                            type: string
                            format: uuid
                            description: >-
                              The Theymes user to attribute as performing the
                              action. The user must have access to the ticket
                              app.
                        required:
                          - type
                          - tagNames
                        title: removeTags
                        description: Action to remove tags from the ticket
                  minItems: 1
              required:
                - actions
      responses:
        '200':
          description: Result of performing the actions
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.