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

# Open a ticket

> Opens a support ticket with a first message. Upload any files first with `POST /v1/attachments` and pass their IDs in `attachments`.

This endpoint is rate limited. Too many requests return `429`.



## OpenAPI

````yaml /spec/platform-support.yaml post /v1/tickets
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:
    post:
      tags:
        - Tickets
      summary: Open a ticket
      description: >-
        Opens a support ticket with a first message. Upload any files first with
        `POST /v1/attachments` and pass their IDs in `attachments`.


        This endpoint is rate limited. Too many requests return `429`.
      operationId: createTicket
      parameters:
        - $ref: '#/components/parameters/TeamID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - subject
                - body
                - category
                - codeReview
              properties:
                subject:
                  type: string
                  description: At most 9 words.
                body:
                  type: string
                  description: The first message.
                category:
                  $ref: '#/components/schemas/TicketCategory'
                codeReview:
                  type: boolean
                  description: Whether support may look at your code to help.
                attachments:
                  type: array
                  maxItems: 3
                  description: Attachment IDs from `POST /v1/attachments`.
                  items:
                    type: string
                projects:
                  type: array
                  description: IDs (`_id`) of the apps the ticket is about.
                  items:
                    type: string
                databases:
                  type: array
                  description: IDs of the databases the ticket is about.
                  items:
                    type: string
                domains:
                  type: array
                  description: IDs of the domains the ticket is about.
                  items:
                    type: string
                buckets:
                  type: array
                  description: IDs of the object storage buckets the ticket is about.
                  items:
                    type: string
                zones:
                  type: array
                  description: IDs of the DNS zones the ticket is about.
                  items:
                    type: string
                mailServers:
                  type: array
                  description: IDs of the mail servers the ticket is about.
                  items:
                    type: string
                vms:
                  type: array
                  description: IDs of the virtual machines the ticket is about.
                  items:
                    type: string
                ais:
                  type: array
                  description: IDs of the AI workspaces the ticket is about.
                  items:
                    type: string
            example:
              subject: مشکل در استقرار برنامه
              body: هنگام استقرار برنامه با خطا مواجه می‌شوم.
              category: TECHNICAL
              codeReview: false
              projects:
                - '000000000000000000000050'
              attachments:
                - '000000000000000000000110'
      responses:
        '200':
          description: >-
            The ticket was opened. The response can include additional fields
            not listed here.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
              example:
                _id: '000000000000000000000100'
                shortID: 12345
                subject: مشکل در استقرار برنامه
                status: OPEN
                category: TECHNICAL
                codeReview: false
                user: '000000000000000000000001'
                projects:
                  - '000000000000000000000050'
                databases: []
                domains: []
                buckets: []
                zones: []
                mailServers: []
                vms: []
                ais: []
                subscriptionPlan: '000000000000000000000003'
                created_at: '2026-01-01T08:00:00.000Z'
                updated_at: '2026-01-01T08:00:00.000Z'
        '400':
          description: >-
            The body or `teamID` is invalid, or the subject is longer than 9
            words (`subject_too_long`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                error: Bad Request
                message: Subject is too long.
                data:
                  code: subject_too_long
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamNotFound'
        '429':
          description: >-
            Too many tickets in a short time (`too_many_tickets_per_day` or
            `too_many_tickets_per_week`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
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'
  schemas:
    TicketCategory:
      type: string
      enum:
        - TECHNICAL
        - BILLING
        - MIGRATION
        - REPORT
        - FEEDBACK
    Ticket:
      type: object
      properties:
        _id:
          type: string
        shortID:
          type: integer
        subject:
          type: string
        status:
          $ref: '#/components/schemas/TicketStatus'
        category:
          $ref: '#/components/schemas/TicketCategory'
        codeReview:
          type: boolean
        user:
          type: string
          description: ID of the account that owns the ticket.
        actor:
          type: string
          description: For team tickets, ID of the person who opened it.
        projects:
          type: array
          items:
            type: string
        databases:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        buckets:
          type: array
          items:
            type: string
        zones:
          type: array
          items:
            type: string
        mailServers:
          type: array
          items:
            type: string
        vms:
          type: array
          items:
            type: string
        ais:
          type: array
          items:
            type: string
        subscriptionPlan:
          type: string
          description: ID of the account's subscription plan when the ticket was opened.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    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
    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
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    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
  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.