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

# Download a file of the onboarding form

> Redirects to a signed link of the storage that is valid for 60 seconds and delivers the file as a download with its name. Fetch the link right away, do not store it. Read permission is enough.



## OpenAPI

````yaml /api-reference/openapi.json get /offers/{id}/files/{fileId}
openapi: 3.1.0
info:
  title: HocDoc API
  version: 1.0.0
  description: >-
    API for offers and their timeline. Every key reads. A key with write
    permission also creates offers from templates, sends and withdraws them.


    Send an API key as `Authorization: Bearer <key>`. A key belongs to one
    workspace and only reaches its data. Create keys in the app under
    Einstellungen, Integrationen, with the permission read or read and write.


    Writes act on behalf of the person who created the key: offers count as
    theirs, and their role, the approval rules of the workspace, locked sections
    and the plan apply exactly as in the app. Send `Idempotency-Key` to retry a
    write safely.


    Timestamps are ISO 8601 in UTC with milliseconds. Values outside the years
    0001 to 9999 are clamped to that range.


    Limits: 120 requests per minute per key and 300 requests per minute per IP
    address. Writes: 30 per minute per key and 60 per minute per workspace
    across all of its keys. Request bodies up to 64 KiB. See the `RateLimit-*`
    headers of each response.


    Compatibility: new fields, endpoints and event types may be added at any
    time, so ignore what you do not know. Breaking changes come under a new path
    (`/api/v2`).


    Webhooks: HocDoc can send a signed `POST` request to up to 5 HTTPS endpoints
    per workspace when something happens to an offer or when the status of a
    custom domain changes. Add endpoints in the app under Einstellungen,
    Integrationen. Each endpoint has its own secret (`whsec_…`), shown once.
    Requests are signed following the Standard Webhooks specification, see the
    `webhook-*` headers. A delivery succeeds with any 2xx status within 10
    seconds. Otherwise it is retried, 8 attempts over about a day. After 5
    deliveries in a row that failed for good, the endpoint is paused. Order is
    not guaranteed and an event can arrive more than once: use `webhook-id` to
    ignore duplicates.
servers:
  - url: https://app.hocdoc.com/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspace
    description: The workspace of the API key.
  - name: Offers
    description: Offers and their timeline.
  - name: Webhooks
    description: Requests HocDoc sends to your endpoints.
paths:
  /offers/{id}/files/{fileId}:
    get:
      tags:
        - Offers
      summary: Download a file of the onboarding form
      description: >-
        Redirects to a signed link of the storage that is valid for 60 seconds
        and delivers the file as a download with its name. Fetch the link right
        away, do not store it. Read permission is enough.
      operationId: downloadOfferFile
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the offer.
          schema:
            type: string
            format: uuid
        - name: fileId
          in: path
          required: true
          description: ID of the file, from the list of files.
          schema:
            type: string
            format: uuid
      responses:
        '302':
          description: >-
            Redirect to the file. The link in `Location` is valid for 60
            seconds.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window for this API key.
              required: true
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              required: true
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current window ends.
              required: true
              schema:
                type: integer
            Location:
              description: Signed link of the storage. Valid for a short time only.
              required: true
              schema:
                type: string
                format: uri
        '400':
          description: Query string longer than 1024 characters (`invalid_request`).
          headers:
            RateLimit-Limit:
              description: >-
                Requests allowed per window for this API key. Not sent when the
                query string is too long.
              required: false
              schema:
                type: integer
            RateLimit-Remaining:
              description: >-
                Requests left in the current window. Not sent when the query
                string is too long.
              required: false
              schema:
                type: integer
            RateLimit-Reset:
              description: >-
                Seconds until the current window ends. Not sent when the query
                string is too long.
              required: false
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                query_too_long:
                  value:
                    error:
                      code: invalid_request
                      message: Query string too long.
        '401':
          description: >-
            Missing or invalid API key. The response is the same for a missing,
            malformed, unknown, revoked or expired key.
          headers:
            RateLimit-Limit:
              description: >-
                Requests allowed per window for this API key. Not sent when the
                key is missing or malformed.
              required: false
              schema:
                type: integer
            RateLimit-Remaining:
              description: >-
                Requests left in the current window. Not sent when the key is
                missing or malformed.
              required: false
              schema:
                type: integer
            RateLimit-Reset:
              description: >-
                Seconds until the current window ends. Not sent when the key is
                missing or malformed.
              required: false
              schema:
                type: integer
            WWW-Authenticate:
              description: The authentication scheme the API expects. Always `Bearer`.
              required: true
              schema:
                type: string
                examples:
                  - Bearer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    error:
                      code: unauthorized
                      message: Missing or invalid API key.
        '404':
          description: >-
            Resource not found. The response is the same for an unknown ID, an
            ID of another workspace and an ID in the wrong form.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window for this API key.
              required: true
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              required: true
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current window ends.
              required: true
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  value:
                    error:
                      code: not_found
                      message: Resource not found.
        '405':
          description: >-
            Method not allowed. Sent for `POST`, `PUT`, `PATCH` and `DELETE` on
            this path. No API key is needed and the rate limit headers are not
            sent.
          headers:
            Allow:
              description: The methods this path accepts.
              required: true
              schema:
                type: string
                examples:
                  - GET, HEAD, OPTIONS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                method_not_allowed:
                  value:
                    error:
                      code: method_not_allowed
                      message: Method not allowed.
        '429':
          description: >-
            Too many requests. Either the limit per API key or the limit per IP
            address was reached.
          headers:
            RateLimit-Limit:
              description: >-
                Requests allowed per window for this API key. Not sent when the
                limit per IP address was reached.
              required: false
              schema:
                type: integer
            RateLimit-Remaining:
              description: >-
                Requests left in the current window. Not sent when the limit per
                IP address was reached.
              required: false
              schema:
                type: integer
            RateLimit-Reset:
              description: >-
                Seconds until the current window ends. Not sent when the limit
                per IP address was reached.
              required: false
              schema:
                type: integer
            Retry-After:
              required: true
              description: Seconds to wait before the next request.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rate_limited:
                  value:
                    error:
                      code: rate_limited
                      message: Too many requests.
        '500':
          description: Internal server error.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window for this API key.
              required: true
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests left in the current window.
              required: true
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current window ends.
              required: true
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  value:
                    error:
                      code: internal_error
                      message: Internal server error.
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - not_found
                - invalid_request
                - method_not_allowed
                - rate_limited
                - internal_error
                - forbidden
                - body_too_large
                - unsupported_media_type
                - idempotency_key_reused
                - idempotency_key_in_use
                - invalid_state
                - draft_changed
                - approval_required
                - recipient_required
                - open_placeholders
                - invalid_document
                - invalid_template
                - locked_section
              description: Stable, machine-readable error code.
            message:
              type: string
              description: Human-readable message. May change, do not parse.
            param:
              description: >-
                The query parameter, header or body field that was rejected.
                Body fields as a path, for example `recipient.email`.
              type: string
          required:
            - code
            - message
      required:
        - error
      description: Every error of the API has this shape.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key, for example `hd_live_…`.

````

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