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

# Get a ticket

> Returns a ticket with all its messages, newest first.



## OpenAPI

````yaml /spec/platform-support.yaml get /v1/tickets/{ticketID}
openapi: 3.0.1
info:
  title: Support & Notifications
  version: 1.0.0
  description: |
    Open and follow support tickets, read your notifications, and choose
    where notifications are delivered (SMS, email or Telegram).

    With `teamID`, these endpoints work on the team's tickets, notifications
    and channels. The description of each endpoint says which permission it
    needs in the team.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Tickets
    description: Open, reply to and close support tickets.
  - name: Attachments
    description: Upload files to attach to tickets, and download them.
  - name: Notifications
    description: Read notifications and set the low-credit alert threshold.
  - name: Notification Channels
    description: Choose which notifications are sent by SMS, email or Telegram.
paths:
  /v1/tickets/{ticketID}:
    get:
      tags:
        - Tickets
      summary: Get a ticket
      description: Returns a ticket with all its messages, newest first.
      operationId: getTicket
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - $ref: '#/components/parameters/TicketID'
      responses:
        '200':
          description: The ticket and its messages.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ticket:
                    allOf:
                      - $ref: '#/components/schemas/TicketSummary'
                      - type: object
                        properties:
                          codeReview:
                            type: boolean
                          user:
                            type: string
                            description: ID of the account that owns the ticket.
                          feedback:
                            type: array
                            description: Your rating of the ticket, if you gave one.
                            items:
                              type: object
                              properties:
                                score:
                                  type: integer
                                comment:
                                  type: string
                  ownerID:
                    type: string
                    nullable: true
                    description: Always `null`.
                  comments:
                    type: array
                    items:
                      $ref: '#/components/schemas/Comment'
              example:
                ticket:
                  _id: '000000000000000000000100'
                  shortID: 12345
                  subject: مشکل در استقرار برنامه
                  status: ANSWERED
                  pendingBy: false
                  category: TECHNICAL
                  codeReview: false
                  user: '000000000000000000000001'
                  subscriptionPlan:
                    _id: '000000000000000000000003'
                    subscriptionPlanID: standard
                  feedback: []
                  created_at: '2026-01-01T08:00:00.000Z'
                  updated_at: '2026-01-01T09:00:00.000Z'
                ownerID: null
                comments:
                  - _id: '000000000000000000000121'
                    body: سلام، لطفاً لاگ‌های برنامه را بررسی کنید.
                    user:
                      fullname: پشتیبان
                      avatar: https://example.com/avatar.png
                    attachments: []
                    created_at: '2026-01-01T09:00:00.000Z'
                  - _id: '000000000000000000000120'
                    body: هنگام استقرار برنامه با خطا مواجه می‌شوم.
                    user:
                      fullname: نام نمونه
                      email: you@example.com
                      avatar: https://example.com/avatar.png
                    attachments:
                      - _id: '000000000000000000000110'
                        name: screenshot.png
                        key: <attachment-key>
                        size: 20480
                    created_at: '2026-01-01T08:00:00.000Z'
        '400':
          $ref: '#/components/responses/InvalidID'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamNotFound'
        '404':
          $ref: '#/components/responses/TicketNotFound'
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000002'
    TicketID:
      name: ticketID
      in: path
      required: true
      description: The ticket's `_id`.
      schema:
        $ref: '#/components/schemas/ObjectID'
  schemas:
    TicketSummary:
      type: object
      properties:
        _id:
          type: string
        shortID:
          type: integer
          description: Short ticket number shown to people.
        subject:
          type: string
        status:
          $ref: '#/components/schemas/TicketStatus'
        pendingBy:
          type: boolean
          description: Whether the ticket is marked as being worked on.
        category:
          $ref: '#/components/schemas/TicketCategory'
        user:
          type: object
          description: The account that owns the ticket.
          properties:
            _id:
              type: string
            fullname:
              type: string
            email:
              type: string
            phone:
              type: string
            teamName:
              type: string
            teamColor:
              type: string
        actor:
          type: object
          description: For team tickets, the person who opened it.
          properties:
            fullname:
              type: string
            email:
              type: string
            avatar:
              type: string
              format: uri
        subscriptionPlan:
          type: object
          description: The subscription plan the account had when the ticket was opened.
          properties:
            _id:
              type: string
            subscriptionPlanID:
              type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Comment:
      type: object
      description: A message on a ticket.
      properties:
        _id:
          type: string
        body:
          type: string
        user:
          type: object
          description: Who wrote the message. For support replies, `email` is omitted.
          properties:
            fullname:
              type: string
            email:
              type: string
            avatar:
              type: string
              format: uri
            teamName:
              type: string
            teamColor:
              type: string
        actor:
          type: object
          description: For team tickets, the person who wrote the message.
          properties:
            fullname:
              type: string
            email:
              type: string
        attachments:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
              name:
                type: string
                description: Original file name.
              key:
                type: string
                description: Use it with `POST /v1/attachments/download`.
              size:
                type: integer
                description: Size in bytes.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    TicketStatus:
      type: string
      description: >-
        `OPEN`: waiting for support. `ANSWERED`: support replied. `PENDING`:
        support is working on it. `UPGRADE_REQUIRED`: support says it needs a
        plan upgrade. `CLOSED`: closed.
      enum:
        - OPEN
        - ANSWERED
        - PENDING
        - UPGRADE_REQUIRED
        - CLOSED
    TicketCategory:
      type: string
      enum:
        - TECHNICAL
        - BILLING
        - MIGRATION
        - REPORT
        - FEEDBACK
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    InvalidID:
      description: An ID in the path, or `teamID`, isn't valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            error: Bad Request
            message: Invalid id
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    TeamNotFound:
      description: You sent a `teamID` for a team you aren't a member of.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            error: Forbidden
            message: Team not found
            data:
              code: team_not_found
    TicketNotFound:
      description: No ticket with this ID on your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            error: Not Found
            message: Not Found
            data: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

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