> ## 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 the original message

> Creates a new presigned link for the original message (.eml), 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}/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}/download-url:
    post:
      tags:
        - Received messages
      summary: Create a download link for the original message
      description: >-
        Creates a new presigned link for the original message (.eml), valid for
        at most an hour and never after the end of the retention period.
        Requires the permission "Read received messages".
      operationId: createMessageDownloadUrl
      parameters:
        - $ref: '#/components/parameters/MessageId'
      responses:
        '200':
          $ref: '#/components/responses/DownloadLink'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: '`message_not_stored`: the message is not in the message store (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'
    NotFound:
      description: >-
        `not_found`: the resource does not exist or is outside the scope of the
        API key.
      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.