> ## 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 an attachment download link

> Returns a temporary download link for an attachment. Use the attachment's `key` from `GET /v1/tickets/{ticketID}`. The link is valid for 12 hours.



## OpenAPI

````yaml /spec/platform-support.yaml post /v1/attachments/download
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/attachments/download:
    post:
      tags:
        - Attachments
      summary: Get an attachment download link
      description: >-
        Returns a temporary download link for an attachment. Use the
        attachment's `key` from `GET /v1/tickets/{ticketID}`. The link is valid
        for 12 hours.
      operationId: getAttachmentDownloadLink
      parameters:
        - $ref: '#/components/parameters/TeamID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - key
              properties:
                key:
                  type: string
            example:
              key: <attachment-key>
      responses:
        '200':
          description: The download link.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
              example:
                url: >-
                  https://files.example.com/<attachment-key>?signature=<signature>
        '400':
          $ref: '#/components/responses/ValidationOrTeamIDError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamNotFound'
        '404':
          description: No attachment with this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                error: Not Found
                message: Not Found
                data: null
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'
  responses:
    ValidationOrTeamIDError:
      description: >-
        The body or a parameter is invalid (`message` says which), or `teamID`
        isn't a valid ID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            validation:
              summary: Invalid body
              value:
                statusCode: 400
                error: Bad Request
                message: '"body" is required'
            invalidTeamID:
              summary: Invalid team ID
              value:
                statusCode: 400
                error: Bad Request
                message: Invalid team ID.
                data: null
    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
  schemas:
    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.
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  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.