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

# Create a download link for an attachment

> Creates a new presigned link for an attachment of the parsed content, valid for at most an hour and never after the end of the retention period. Requires the permission "Read received messages".



## OpenAPI

````yaml /api-reference/openapi.yaml post /receiving/messages/{id}/attachments/{attachment}/download-url
openapi: 3.1.0
info:
  title: Talario API
  version: '1.0'
  description: REST API for received messages and webhook deliveries.
servers:
  - url: https://talario.eu/api/v1
security:
  - apiKey: []
tags:
  - name: Received messages
  - name: Webhook deliveries
paths:
  /receiving/messages/{id}/attachments/{attachment}/download-url:
    post:
      tags:
        - Received messages
      summary: Create a download link for an attachment
      description: >-
        Creates a new presigned link for an attachment of the parsed content,
        valid for at most an hour and never after the end of the retention
        period. Requires the permission "Read received messages".
      operationId: createAttachmentDownloadUrl
      parameters:
        - $ref: '#/components/parameters/MessageId'
        - name: attachment
          in: path
          required: true
          description: Attachment ID from the parsed content, for example `part-2`.
          schema:
            type: string
            pattern: ^part-[0-9-]+$
            example: part-2
      responses:
        '200':
          $ref: '#/components/responses/DownloadLink'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            `not_found`: unknown message, or the message has no attachment with
            this ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            `content_not_ready` or `content_failed`: there is no parsed content
            (yet).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          $ref: '#/components/responses/MessageExpired'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    MessageId:
      name: id
      in: path
      required: true
      description: Talario's ID of the received message.
      schema:
        type: string
        format: uuid
  responses:
    DownloadLink:
      description: A new download link.
      headers:
        Cache-Control:
          schema:
            type: string
            example: no-store, private
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DownloadLink'
    Unauthenticated:
      description: '`unauthenticated`: the API key is missing, invalid or revoked.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        `forbidden`: the API key lacks the permission, or the project is
        suspended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MessageExpired:
      description: '`message_expired`: the retention period of the message ended.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: '`too_many_requests`: a rate limit was exceeded.'
      headers:
        Retry-After:
          description: Seconds to wait before the next request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: message_expired
            message:
              type: string
            fields:
              type: object
              description: Invalid fields with their messages; only for `invalid_payload`.
              additionalProperties:
                type: array
                items:
                  type: string
    DownloadLink:
      type: object
      required:
        - url
        - expires_at
      properties:
        url:
          type: string
          format: uri
          description: Presigned link. Needs no authorization; do not log or store it.
        expires_at:
          type: string
          format: date-time
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key of your project, starting with `tlr_api_`.

````

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