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

# Remove tag



## OpenAPI

````yaml /api/ticketing/openapi.json delete /v1/tickets/{ticketID}/tags/{tagID}
openapi: 3.0.3
info:
  title: Ticketing API
  version: 1.0.0
  description: >
    # Introduction


    This document describes the public API of the Ticketing API


    # Authentication


    The Ticketing API shares an authentication and authorization system with
    [Text](https://www.text.com). More details can be found in [Authorization
    Documentation](https://developers.text.com/docs/authorization).


    Endpoints require `Authorization` HTTP header. Authorization methods
    include:

     - Personal Access Tokens (good for testing and development purposes). PATs can be created in the Text app under **Settings → API access → Personal access tokens**. Use the `accounts--my:ro` scope when generating the token. After generating a token, use Basic authentication scheme with your **account_id** as the user name and the token as a password. [Detailed instructions](/authentication/personal-access-tokens).
     - OAuth 2 Authorization Code Grant flow (recommended for production deployment) - details of implementation are described in [Authorization code grant](https://developers.text.com/docs/authorization/authorizing-api-calls/#authorization-code-grant) documentation.
     - Other possible options are described in the [Use cases](https://developers.text.com/docs/authorization/authorizing-api-calls/#use-cases) documentation section.

    # Common notions


    ## Relative dates and date/time ranges


    All date/time ranges are half-open, i.e. `[from, to)`


    In addition to absolute timestamps/dates, it is possible to specify relative
    dates in the format:

    - `[-+][number][hHdDM]`. `Sign (+ or -)` denotes relation to the current
    timestamp

    - `number` denotes the number of units

    - `unit` represent minutes (`n`), hours (`h`), days (`d`) and months (`m`). 


    Lowercase units are relative to the current timestamp and uppercase units
    are relative to the start of current truncated period.


    Examples:


    | Relative date | Description |

    |-|-|

    | `-2d` | 48 hours before now |

    | `+1m` | 1 month from now in the future |

    | `-0M` | start of current month |

    | `-1M` | start of last month |

    | `-0D` | last midnight |

    | `-10n` | 10 minutes before now |


    ## Ticket silos (folders)


    Tickets are stored in the following silos:


    - `tickets`: recent tickets with read/write access

    - `archive`: archived tickets with read-only access

    - `spam`: spam tickets with read-only access (purged after 60 days since the
    last update)

    - `trash`: deleted tickets with read-only access (purged after 30 days since
    the last update)


    Important notes about silos:

    - When listing tickets, it is required to specify the silo name if the
    listing should contain tickets stored in a silo other than `tickets`.

    - To move a ticket to another silo, use [PUT
    /tickets/{ticket_id}/silo](#operation/ticketUpdateChangeSilo) endpoint.


    # Gotchas


    ## User-Agent header


    We advise always including `User-Agent` header in API requests. Requests
    missing it might be blocked by intermediary services.
servers:
  - url: https://api.helpdesk.com
security:
  - PersonalAccessToken: []
  - BearerAuth: []
tags:
  - name: Tickets
    description: >
      ## Fetch tickets in batches


      The `/v1/tickets` endpoint provides **cursor-based pagination** for
      efficient navigation through large or frequently updated datasets. This
      method avoids common pitfalls of offset-based pagination, offering greater
      stability and performance.


      ### How Cursor Pagination Works


      Cursor pagination uses a composite key of:


      - `value` - a timestamp (e.g., `createdAt`, `updatedAt`, `lastMessageAt`)

      - `ID` - a unique ticket ID (`UUID`) to guarantee stable sorting, even for
      duplicate timestamps


      These fields are used to determine **where to continue pagination** when
      requesting the next or previous page.


      You may provide **either** a `next` cursor (to fetch forward) or a `prev`
      cursor (to fetch backward) — **not both**.


      ### Query Parameters


      | Parameter       | Type     |
      Description                                                                
      |

      |----------------|----------|-----------------------------------------------------------------------------|

      | `pageSize`     | number   | Number of results per page (default = 20,
      max = 100)                        |

      | `order`        | string   | Sorting direction: `asc` or `desc` (default
      = `desc`)                       |

      | `sortBy`       | string   | Field to sort by: `createdAt`, `updatedAt`,
      `lastMessageAt` (default = `createdAt`) |

      | `next.value`   | string   | ISO 8601 timestamp for the last item on the
      current page                   |

      | `next.ID`      | UUID     | ID of the last item on the current
      page                                    |

      | `prev.value`   | string   | ISO 8601 timestamp for the first item on the
      current page                  |

      | `prev.ID`      | UUID     | ID of the first item on the current
      page                                   |


      ## Example: Step-by-Step Cursor Navigation


      Assume 7 tickets exist, sorted by `createdAt desc`:


      | ID (UUID)                              | Created At              |

      |----------------------------------------|--------------------------|

      | `fa1355ae-7e4f-4aa2-83df-20e6bc503a4b` | 2026-06-17T10:00:00.000Z |

      | `7c2037c2-0624-4a56-94e1-86e25b6c3727` | 2026-06-16T10:00:00.000Z |

      | `cb7a8b56-bc41-4e2a-b88a-6615a2ef45d9` | 2026-06-15T10:00:00.000Z |

      | `d3ea733f-7b0e-4075-8a64-8f994f2b76d2` | 2026-06-14T10:00:00.000Z |

      | `bd9a3d9c-12a3-4ba3-b438-1a3d8e3e6dc1` | 2026-06-13T10:00:00.000Z |

      | `ea0d7356-34dc-4899-a4de-2cbbdf71fcf0` | 2026-06-12T10:00:00.000Z |

      | `12c3d688-7a14-4dfb-9f82-74e2bc155fe9` | 2026-06-11T10:00:00.000Z |



      ### Step 1: Initial Request


      ```http

      GET /v1/tickets?pageSize=3&order=desc&sortBy=createdAt

      ```


      **Response:**


      ```json

      [

      { "ID": "fa1355ae-7e4f-4aa2-83df-20e6bc503a4b", "createdAt":
      "2026-06-17T10:00:00.000Z", ... },

      { "ID": "7c2037c2-0624-4a56-94e1-86e25b6c3727", "createdAt":
      "2026-06-16T10:00:00.000Z", ... },

      { "ID": "cb7a8b56-bc41-4e2a-b88a-6615a2ef45d9", "createdAt":
      "2026-06-15T10:00:00.000Z", ... }

      ]

      ```



      ### Step 2: Next Page


      ```http

      GET
      /v1/tickets?pageSize=3&order=desc&sortBy=createdAt&next.value=2026-06-15T10:00:00Z&next.ID=cb7a8b56-bc41-4e2a-b88a-6615a2ef45d9

      ```


      **Response:**


      ```json

      [

      { "ID": "d3ea733f-7b0e-4075-8a64-8f994f2b76d2", "createdAt":
      "2026-06-14T10:00:00.000Z", ... },

      { "ID": "bd9a3d9c-12a3-4ba3-b438-1a3d8e3e6dc1", "createdAt":
      "2026-06-13T10:00:00.000Z", ... },

      { "ID": "ea0d7356-34dc-4899-a4de-2cbbdf71fcf0", "createdAt":
      "2026-06-12T10:00:00.000Z", ... }

      ]

      ```



      ### Step 3: Final Page


      ```http

      GET
      /v1/tickets?pageSize=3&order=desc&sortBy=createdAt&next.value=2026-06-12T10:00:00Z&next.ID=ea0d7356-34dc-4899-a4de-2cbbdf71fcf0

      ```


      **Response:**


      ```json

      [

      { "ID": "12c3d688-7a14-4dfb-9f82-74e2bc155fe9", "createdAt":
      "2026-06-11T10:00:00.000Z", ... }

      ]

      ```


      ### Best Practices


      - Use the `next` or `prev` cursor values returned by your last result set
      to paginate forward or backward.

      - Keep `sortBy` and `order` consistent across requests for predictable
      behavior.

      - Use `eventsScope=none` if you don't need events in the response.
  - name: Licenses
    description: |
      The license describes a customer account. Contains:
       - [Subscription](#tag/Subscriptions) information (selected plan, number of agent slots)
       - Global license settings
       - Default team designation. The default team is selected among all teams and serves as a default/fallback mechanism, every place team can't be determined or hasn't been specified
       - Default template. The default template is served if the team hasn't got its own template set
  - name: Agents
    description: |
      Agent represent single agent account on a license. Contains:
        - teams agent belongs to
        - agent individual settings like notification preferences, avatars etc.
        - agent role (`owner`, `normal`, `viewer`)
  - name: Custom fields
    description: >
      Custom fields are customer defined fields in ticket. Tickets are created
      in license scope, visibility is set per team(s). 


      There are four types of custom fields (single line, multi line, url and
      date). 


      Every custom field has edit permission level:

      - normal, value editable by any agent in tickets view

      - owner, value editable by admins only in tickets view

      - read only, value not editable on interface, only via API


      Every custom field can be deactivated (hidden in interface).


      Amount of active custom fields is limited per license in license settings
      by `maxCustomFieldsActive` value.


      Only custom field that is not used in any ticket can be deleted.
  - name: Transactions
    description: >

      Transactions represent volatile sets of uploaded attachments used while
      modifying various elements in Text such as ticket messages, agent
      signatures etc.


      ## Basic flow


      Transactions are volatile. Transaction exists only until it is used in
      another `POST` or `PATCH` method. Unused transactions are purged after 24
      hours along with uploaded attachments with exception of "external"
      attachments i.e. attachments copied from another entities like agent
      signatures etc.


      Transactions have types. Currently `ticket`, `agent`, `templateLogo` and
      `cannedResponse`. The type determines path of uploaded attachment and the
      entity in which it can be used.


      Upon creation, transaction needs entity ID and can only be used in this
      entity afterwards - this allows to keep consistent naming in S3 paths. The
      exception to this rule is creating transaction for a ticket, template or
      canned response that don't exist yet. In this case entity ID should not be
      provided - it will be generated automatically and will determine final ID
      of created ticket, template or canned response.


      ### Create transaction


      ```

      POST /v1/transactions


      {
          // only one field allowed:
          "ticketID": "UUID", // do not add when ticket does not exist yet
          "agentID": "UUID", // use when uploading attachments for agent signature
          "templateID": "UUID", // do not add when template does not exist yet
          "cannedResponseID": "UUID", // do not add when canned resposne does not exist yet
      }

      ```


      This yields:


      ```

      {

      "ID": "9a1e8a52-e7f2-4f59-8b45-a1643d28c460",

      "type": "ticket",

      "createdAt": "2026-06-24T13:58:12.288Z",

      "attachments": []

      }

      ```


      ### Upload file


      ```

      POST /v1/transactions/9a1e8a52-e7f2-4f59-8b45-a1643d28c460/attachments

      ```


      Use multipart with `attachments` as key. Multiple files are allowed.


      Result:


      ```

      [

      {
          "ID": "af367f6b-5b8b-4468-a2ef-4990114d968a",
          "cid": "af367f6b-5b8b-4468-a2ef-4990114d968a",
          "url": "https://cdn-labs.livechat-static.com/api/file/helpdesk/att/1338/9a1e8a52-e7f2-4f59-8b45-a1643d28c460/9ce3d7c1ada659d0cf2da321ef41a4628192875aa7e0c80627b4243140ab02ae/earl.png",
          "name": "earl.png",
          "type": "image/png",
          "size": 25670
      }

      ]

      ```


      ### Remove uploaded file from transaction


      ```

      DELETE
      /v1/transactions/9a1e8a52-e7f2-4f59-8b45-a1643d28c460/attachments/af367f6b-5b8b-4468-a2ef-4990114d968a

      ```


      Result:


      ```

      "OK"

      ```


      ### Add attachments from agent signature


      ```

      POST /v1/transactions/6456b4e5-1e8f-4029-86f7-1e534d020225/attachments


      {

      "agentID": "GUID" // copy attachments from this agent's signature

      }

      ```


      Result:


      ```

      [

      {
          "ID": "44b004b7-2efd-4f73-b9f5-ac927816f18b",
          "cid": "44b004b7-2efd-4f73-b9f5-ac927816f18b",
          "url": "https://cdn-labs.livechat-static.com/api/file/helpdesk/att/1338/agent/ff623067-ba81-4613-bfa8-1c558e3a58f0/9ce3d7c1ada659d0cf2da321ef41a4628192875aa7e0c80627b4243140ab02ae/earl.png",
          "name": "earl.png",
          "type": "image/png",
          "size": 25670
      },

      {
          "ID": "a1fbb278-0bca-4eba-baa8-48cc9d1f1abc",
          "cid": "a1fbb278-0bca-4eba-baa8-48cc9d1f1abc",
          "url": "https://cdn-labs.livechat-static.com/api/file/helpdesk/att/1338/agent/ff623067-ba81-4613-bfa8-1c558e3a58f0/9ce3d7c1ada659d0cf2da321ef41a4628192875aa7e0c80627b4243140ab02ae/earl.png",
          "name": "earl.png",
          "type": "image/png",
          "size": 25670
      }

      ]

      ```


      ## Common tasks


      ### Change attachments in agent signature


      1. Create transaction of type `agent`


      ```

      POST /v1/transactions HTTP/1.1


      agentID=ff623067-ba81-4613-bfa8-1c558e3a58f0

      ```


      2. Upload attachments


      3. Update signature using `transactionID`


      ```

      PATCH /v1/agents/ff623067-ba81-4613-bfa8-1c558e3a58f0 HTTP/1.1


      signature.text=test

      transactionID=6efd3115-cf6e-4b2c-83d1-03fa5470c625

      ```
  - name: Email domains
    description: >-
      Email domain represent a domain with records authorizing Text to send
      emails on behalf of email owner. This allows for using original license
      owner domain for ticket communication. To achieve seamless end-user
      experience, additional setup of mailboxes (inboxes) and reply addresses is
      required.
  - name: Teams
    description: >
      Teams group agents. Every ticket is always assigned to specific team. At
      any given time one of the teams has to be designated as a default
      (fallback) team.
  - name: Templates
    description: >
      Teamplate describes HTML (or Visual) and plaintext version of every email
      sent to end-user. Templates can be used to customize these messages.
  - name: Audit log
    description: |
      Audit log contains all changes made in the system.
  - name: Mailboxes (inboxes)
    description: >
      Mailboxes (inboxes) are virtual email addresses provided by Text as an
      entry point for all email communcation. All messages that create tickets
      should be forwarded to one of the mailboxes. Each mailbox can be set to
      route incomming tickets to specific teams and optionally agents. Mailbox
      can also have a reply address customized allowing reply to be sent from
      different `From` address for each mailbox.


      Default mailbox is built in and can't be removed. It also won't be listed
      in `GET` responses.
  - name: Reply addresses
    description: >-
      Reply addresses are created automatically when configuring a mailbox with
      custom reply address. When this happens, an automatic verification message
      is being sent to verify, that reply address correctly forwards messages
      back to one of the mailboxes. This is to ensure that end-user will always
      be able to reply to agent's message.
  - name: Spam management
    description: >-
      Trusting and blocking emails/domains can be used to force message from
      specific sender to spam (block) or ignore spam filters (trust). In case of
      conflicting entries, more specific entry has precedence over more general
      (email is more important than domain). Adding an address or a domain to
      one list automatically removes it from the other.
  - name: Canned responses
    description: >-
      Canned responses represent short templates of replies fragments that can
      be used during message composition in the app.
  - name: Rules
    description: >-
      Rules allow automated processing of tickets. Rules are executed for every
      ticket during creation or any change that modifies the ticket. A rule
      consists of conditions (triggers) and actions. When every (or any -
      depending on quantifier) trigger is fulfilled, all action in the rule are
      being performed.
  - name: Macros
    description: >-
      Macros enable batch processing of tickets. A macro consists of several
      actions. When a user triggers a macro, all the actions within it are
      executed on the ticket. The number of macros is limited to 20 shared
      macros per license and 20 private macros per user.
  - name: Views
    description: >-
      Views are materialized ticket filters. Every ticket filter set can be
      saved as a view. Views are created per agent.
  - name: Webhooks
    description: >
      Webhooks represent HTTP addresses that are being requested every time an
      event occurs.

      Webhook payload for `tickets.*` webhooks (`POST` request with
      `application/json` payload):

      ```
          {
              eventType: <webhook event type>,
              createdAt: <webhook event timestamp>,
              payload: {
                  <new ticket content>
              }
          }
      ```


      Webhook payload for `tickets.events.*` webhooks (`POST` request with
      `application/json` payload):

      ```
          {
              eventType: <webhook event type>,
              createdAt: <webhook event timestamp>,
              payload: {
                  ticket: <new ticket content>
                  event: <the event content>
              }
          }
      ```


      Supported events:


      | Event type | Description |

      |-|-|

      | `tickets.create` | New ticket was created |

      | `tickets.update` | Ticket was modified |

      | `tickets.statusChange` | Ticket's status changed (deprecated - please
      use `tickets.events.status` instead) |

      | `tickets.events.status` | Ticket's status changed |

      | `tickets.events.priority` | Ticket's priority changed |

      | `tickets.events.message` | New message in ticket |

      | `tickets.events.tags` | Ticket's tags changed |

      | `tickets.events.followers` | Ticket's followers changed |

      | `tickets.events.assignment` | Ticket's assignment changed |



      The request will be retried for about 24 hours with increasing interval in
      case endpoint responds with HTTP code different than `200`.
paths:
  /v1/tickets/{ticketID}/tags/{tagID}:
    delete:
      tags:
        - Tickets
        - Tags
      summary: Remove tag
      operationId: ticketUpdateRemoveTag
      parameters:
        - in: path
          name: ticketID
          schema:
            $ref: '#/components/schemas/ID'
          required: true
        - in: path
          name: tagID
          schema:
            $ref: '#/components/schemas/ID'
          required: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketResult'
              example:
                ID: 42e113f9-9353-4e89-9f68-69b92f423b0c
                licenseID: 13381337
                createdAt: '2026-06-30T22:02:08.901Z'
                createdBy: f56caf69-3f05-4386-9567-fdc909d7ad77
                createdByType: agent
                updatedAt: '2026-06-30T22:02:08.901Z'
                updatedBy: f56caf69-3f05-4386-9567-fdc909d7ad77
                shortID: IIPZGJ
                lastMessageAt: '2026-06-30T22:02:08.901Z'
                parentTicket:
                  ID: 42e113f9-9353-4e89-9f68-69b92f423b0c
                  shortID: IIPZGJ
                  subject: Parent ticket subject
                childTickets:
                  - ID: 42e113f9-9353-4e89-9f68-69b92f423b0c
                    shortID: IIPZGJ
                    subject: Child ticket subject
                status: open
                priority: -10
                subject: Ticket subject
                teamIDs:
                  - 42e113f9-9353-4e89-9f68-69b92f423b0c
                requester:
                  email: ''
                  name: ''
                cc:
                  - email: cc@email.com
                    name: John Client
                tagIDs:
                  - 42e113f9-9353-4e89-9f68-69b92f423b0c
                followers:
                  - 42e113f9-9353-4e89-9f68-69b92f423b0c
                assignment:
                  team:
                    ID: 42e113f9-9353-4e89-9f68-69b92f423b0c
                    name: ''
                  agent:
                    ID: 42e113f9-9353-4e89-9f68-69b92f423b0c
                    name: ''
                integration:
                  type: livechat
                  referenceType: ''
                  referenceURL: ''
                  referenceID: ''
                customFields:
                  order-id: '1234'
                ratingRequeestSent: true
                rating:
                  rate: good
                  comment: ''
                  requestedAt: '2026-06-30T22:02:08.901Z'
                silo: tickets
                spam:
                  status: true
                  reason: licenseBlackList
                source:
                  type: api
                events:
                  - type: message
                integrations:
                  type: livechat
                  externalID: ''
                detectedLanguage: ''
components:
  schemas:
    ID:
      type: string
      example: 42e113f9-9353-4e89-9f68-69b92f423b0c
      description: Unique object identifier
      format: uuid
    TicketResult:
      allOf:
        - $ref: '#/components/schemas/ObjectBase'
        - type: object
          properties:
            shortID:
              type: string
              description: The short ticket ID.
        - $ref: '#/components/schemas/TicketBase'
        - type: object
          properties:
            requester:
              $ref: '#/components/schemas/TicketRequesterResult'
            assignment:
              $ref: '#/components/schemas/TicketAssignmentResult'
            ratingRequeestSent:
              type: boolean
              description: Has rating request been sent.
              default: false
            rating:
              $ref: '#/components/schemas/TicketRatingResult'
            silo:
              $ref: '#/components/schemas/TicketSilo'
            spam:
              $ref: '#/components/schemas/TicketSpam'
            source:
              $ref: '#/components/schemas/TicketSource'
            events:
              description: The ticket events.
              type: array
              items:
                $ref: '#/components/schemas/TicketEvent'
            integrations:
              oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - livechat
                    externalID:
                      type: string
                      description: The external ticket ID.
                - type: object
            detectedLanguage:
              description: The detected language code.
              type: string
    ObjectBase:
      type: object
      properties:
        ID:
          type: string
          description: Unique object identifier.
          format: uuid
        licenseID:
          type: integer
          description: Unique account identifier.
        createdAt:
          type: string
          description: The time of creation.
          format: date-time
        createdBy:
          type: string
          description: The creator identifier.
          format: uuid
        createdByType:
          type: string
          enum:
            - agent
            - client
            - system
          description: The creator type.
        updatedAt:
          type: string
          description: The time of last modification.
          format: date-time
        updatedBy:
          type: string
          description: The modification author identifier.
          format: uuid
    TicketBase:
      type: object
      properties:
        lastMessageAt:
          type: string
          description: The time of last public message.
          format: date-time
        parentTicket:
          nullable: true
          type: object
          description: The parent ticket reference.
          properties:
            ID:
              $ref: '#/components/schemas/ID'
            shortID:
              type: string
              description: The parent ticket short ID.
            subject:
              type: string
        childTickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketChildTicket'
          description: The merged ticket reference.
          uniqueItems: true
        status:
          $ref: '#/components/schemas/TicketStatus'
        priority:
          $ref: '#/components/schemas/TicketPriority'
        subject:
          type: string
        teamIDs:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/ID'
          description: The teams that can access the ticket.
        requester:
          type: object
          properties:
            email:
              type: string
              description: The requester's email.
            name:
              type: string
              description: The requester's name.
              default: Client
          required:
            - email
        cc:
          type: array
          uniqueItems: true
          items:
            type: object
            properties:
              email:
                type: string
                description: The requester's email.
              name:
                type: string
                description: The requester's name.
                default: Client
            required:
              - email
          description: A list of people in the loop.
        tagIDs:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/ID'
          description: A list of ticket tags.
        followers:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/ID'
          description: A list of ticket followers (agents).
        assignment:
          type: object
          properties:
            team:
              type: object
              description: The assigned team.
              properties:
                ID:
                  $ref: '#/components/schemas/ID'
              required:
                - ID
            agent:
              type: object
              description: The assigned agent.
              nullable: true
              properties:
                ID:
                  $ref: '#/components/schemas/ID'
              required:
                - ID
          minProperties: 1
          description: The team or agent assignment.
        integration:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - livechat
                referenceType:
                  type: string
                referenceURL:
                  type: string
                referenceID:
                  type: string
              required:
                - type
              minProperties: 2
        customFields:
          $ref: '#/components/schemas/TicketCustomFields'
          type: object
    TicketRequesterResult:
      type: object
      properties:
        email:
          type: string
          description: The requester's email.
          format: email
        name:
          type: string
          description: The requester's name.
      description: Ticket requester
    TicketAssignmentResult:
      type: object
      properties:
        team:
          type: object
          description: The assigned team.
          properties:
            ID:
              $ref: '#/components/schemas/ID'
            name:
              type: string
              description: The assigned team name.
        agent:
          type: object
          description: The assigned agent.
          properties:
            ID:
              $ref: '#/components/schemas/ID'
            name:
              type: string
              description: The assigned agent name.
      minProperties: 1
      description: Team / agent assignment
    TicketRatingResult:
      type: object
      nullable: true
      description: Ticket rating
      properties:
        rate:
          $ref: '#/components/schemas/TicketRating'
        comment:
          type: string
        requestedAt:
          type: string
          format: date-time
    TicketSilo:
      type: string
      enum:
        - tickets
        - archive
        - trash
        - spam
      default: tickets
      description: >-
        Ticket silo (folder). Please check [ticket
        silos](#section/Common-notions/Ticket-silos-(folders)) section for more
        information
    TicketSpam:
      type: object
      properties:
        status:
          type: boolean
          default: false
        reason:
          type: string
          nullable: true
          enum:
            - licenseBlackList
            - headerAutogenerated
            - headerSpam
            - limitPerHour
            - similarEmail
            - tooManyRecipients
    TicketSource:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - api
        - type: object
          properties:
            type:
              type: string
              enum:
                - email
            mailboxID:
              type: string
              nullable: true
              format: uuid
            from:
              type: string
              nullable: true
        - type: object
          properties:
            type:
              type: string
              enum:
                - external
        - type: object
          properties:
            type:
              type: string
              enum:
                - integration
            integrationType:
              type: string
              enum:
                - livechat
                - openwidget
            external:
              type: boolean
            referenceType:
              type: string
            referenceURL:
              type: string
            referenceID:
              type: string
    TicketEvent:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - message
                deliveryStatus:
                  type: object
                message:
                  type: object
                  properties:
                    isPrivate:
                      type: boolean
                    text:
                      type: string
                    richTextHtml:
                      type: string
                      nullable: true
                    richTextObj:
                      type: array
                      nullable: true
                    stripped:
                      type: boolean
                    replySuggestionIDs:
                      type: array
                      items:
                        type: string
                        format: guid
                    skipPitL:
                      type: boolean
                      description: >-
                        Present only when the message should not be sent to
                        people in the loop.
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - status
                status:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketStatus'
                    old:
                      $ref: '#/components/schemas/TicketStatus'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - teamVisibility
                team:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketBase-properties-teamIDs'
                    old:
                      $ref: '#/components/schemas/TicketBase-properties-teamIDs'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - tags
                tags:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/tagIDs'
                    old:
                      $ref: '#/components/schemas/tagIDs'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - followers
                followers:
                  type: object
                  properties:
                    new:
                      type: array
                      items:
                        type: object
                        properties:
                          ID:
                            type: string
                            format: guid
                            description: The agent ID following the ticket.
                          name:
                            type: string
                            description: The agent name.
                    old:
                      type: array
                      items:
                        type: object
                        properties:
                          ID:
                            type: string
                            format: guid
                            description: The agent ID following the ticket.
                          name:
                            type: string
                            description: The agent name.
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - assignment
                assignment:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketAssignmentResult'
                    old:
                      $ref: '#/components/schemas/TicketAssignmentResult'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - requester
                requester:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketRequesterResult'
                    old:
                      $ref: '#/components/schemas/TicketRequesterResult'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - subject
                subject:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/subject'
                    old:
                      $ref: '#/components/schemas/subject'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - rating
                rating:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketRatingResult'
                    old:
                      $ref: '#/components/schemas/TicketRatingResult'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - ratingRequestSent
                ratingRequest:
                  type: object
                  properties:
                    text:
                      type: string
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - attachments
                attachments:
                  type: object
                  properties:
                    files:
                      type: array
                      items:
                        $ref: '#/components/schemas/schemas-Attachment'
                      description: The attachment list.
                    isPrivate:
                      type: boolean
                      description: Is attachment private.
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - spam
                spam:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketSpam'
                    old:
                      $ref: '#/components/schemas/TicketSpam'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - followUpSent
                message:
                  type: object
                  properties:
                    isPrivate:
                      type: boolean
                    text:
                      type: string
                    richTextHtml:
                      type: string
                      nullable: true
                    richTextObj:
                      type: array
                      nullable: true
                    skipPitL:
                      type: boolean
                      description: >-
                        Present only when the follow-up should not be sent to
                        people in the loop.
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - cc
                cc:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/cc'
                    old:
                      $ref: '#/components/schemas/cc'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - childTickets
                childTickets:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/childTickets'
                    old:
                      $ref: '#/components/schemas/childTickets'
        - allOf:
            - $ref: '#/components/schemas/TicketEventBase'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - priority
                priority:
                  type: object
                  properties:
                    new:
                      $ref: '#/components/schemas/TicketPriority'
                    old:
                      $ref: '#/components/schemas/TicketPriority'
    TicketChildTicket:
      type: object
      description: Merged ticket reference
      properties:
        ID:
          $ref: '#/components/schemas/ID'
        shortID:
          type: string
          description: The child ticket short ID.
        subject:
          type: string
    TicketStatus:
      type: string
      enum:
        - open
        - pending
        - onhold
        - solved
        - closed
      default: open
      description: Ticket status
    TicketPriority:
      type: integer
      enum:
        - -10
        - 0
        - 10
        - 20
      default: 0
      description: |
        | Value | Priority    |
        |-----|--------|
        | -10 | low    |
        | 0   | medium |
        | 10  | high   |
        | 20  | urgent |
    TicketCustomFields:
      type: object
      example:
        order-id: '1234'
      description: Object with custom fields values, where key is custom fields apiKey.
    TicketRating:
      type: string
      enum:
        - good
        - bad
        - neutral
      description: Ticket rating
    TicketEventBase:
      type: object
      properties:
        ID:
          $ref: '#/components/schemas/ID'
        source:
          $ref: '#/components/schemas/TicketSource'
        author:
          $ref: '#/components/schemas/TicketEventAuthor'
        date:
          type: string
          format: date-time
    TicketBase-properties-teamIDs:
      type: array
      uniqueItems: true
      items:
        $ref: '#/components/schemas/ID'
      description: Teams that can access the ticket
    tagIDs:
      type: array
      uniqueItems: true
      items:
        $ref: '#/components/schemas/ID'
      description: List of ticket tags
    subject:
      type: string
      example: Ticket subject
    schemas-Attachment:
      type: object
      properties:
        url:
          type: string
          format: url
          description: The attachment URL.
        cid:
          type: string
          description: The attachment CID for inline use.
        name:
          type: string
          description: The attachment name.
        size:
          type: integer
          description: The attachment size.
        type:
          type: string
          description: The attachment MIME type.
        sha256:
          type: string
          description: The attachment checksum.
        token:
          type: string
          description: The attachment random token.
        removedAt:
          type: string
          format: date-time
          description: The time of attachment deletion request.
        removedBy:
          type: string
          description: The deletion requester identifier.
          format: uuid
    cc:
      type: array
      uniqueItems: true
      items:
        type: object
        properties:
          email:
            type: string
            description: The requester's email.
          name:
            type: string
            description: The requester's name.
            default: Client
        required:
          - email
      description: List of people in the loop
    childTickets:
      type: array
      items:
        $ref: '#/components/schemas/TicketChildTicket'
      description: Merged ticket reference
      uniqueItems: true
    TicketEventAuthor:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - agent
            ID:
              $ref: '#/components/schemas/ID'
            name:
              type: string
        - type: object
          properties:
            type:
              type: string
              enum:
                - rule
            ID:
              $ref: '#/components/schemas/ID'
            name:
              type: string
        - type: object
          properties:
            type:
              type: string
              enum:
                - system
            ID:
              $ref: '#/components/schemas/ID'
        - type: object
          properties:
            type:
              type: string
              enum:
                - client
            name:
              type: string
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    BearerAuth:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````