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

# Download file via pre-signed URL

> Generate a pre-signed URL to download a file from the store's storage on Cloudflare R2. The endpoint validates that the file exists and belongs to the store using the `x-store-id` header. You may specify the `expires_in` query parameter to control the URL's validity period, up to a maximum of 24 hours.



## OpenAPI

````yaml /api-reference/blink-api.json get /files/{id}/download
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
tags:
  - name: Invoices
    description: Unified merchant of record invoices for products and subscriptions.
  - name: Geo Pricing
    description: Resolve Purchasing Power Parity (PPP) localized pricing.
paths:
  /files/{id}/download:
    get:
      tags:
        - Deliverables
      summary: Download file via pre-signed URL
      description: >-
        Generate a pre-signed URL to download a file from the store's storage on
        Cloudflare R2. The endpoint validates that the file exists and belongs
        to the store using the `x-store-id` header. You may specify the
        `expires_in` query parameter to control the URL's validity period, up to
        a maximum of 24 hours.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ID of the file deliverable.
        - name: expires_in
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Time in seconds for URL to remain valid, maximum 86400 seconds (24
            hours).
      responses:
        '200':
          description: URL to access the file provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDownloadResponse'
      security:
        - storeIdHeader: []
components:
  schemas:
    FileDownloadResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            file_id:
              type: string
            title:
              type: string
            url:
              type: string
            expires_in:
              type: integer
            expires_at:
              type: string
              format: date-time
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````