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

# Download a document PDF

> Downloads a PDF for the document: the sealed signed copy, the original upload, or the certificate of completion. Every download is recorded in the document's audit trail as made by your API key.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/documents/{id}/download
openapi: 3.1.0
info:
  title: Suresign API
  version: 1.0.0
  description: >-
    Read the documents in your Suresign workspace and download their PDFs.
    Available on the Pro and Business plans.
servers:
  - url: https://suresign.si
    description: Suresign
security:
  - bearerAuth: []
tags:
  - name: Workspace
    description: Check which workspace a key opens.
  - name: Documents
    description: List, read and download documents.
paths:
  /api/v1/documents/{id}/download:
    get:
      tags:
        - Documents
      summary: Download a document PDF
      description: >-
        Downloads a PDF for the document: the sealed signed copy, the original
        upload, or the certificate of completion. Every download is recorded in
        the document's audit trail as made by your API key.
      operationId: downloadDocument
      parameters:
        - name: id
          in: path
          required: true
          description: The document ID.
          schema:
            type: string
        - name: type
          in: query
          required: false
          description: >-
            Which file to download. Defaults to `signed` when the document is
            complete, otherwise `original`.
          schema:
            type: string
            enum:
              - signed
              - original
              - certificate
      responses:
        '200':
          description: The PDF file.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            No such document, or the file is not available yet (for example, no
            signed file or certificate until the document is complete).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: No signed file yet. The document is not complete.
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Unauthorized:
      description: The key is missing, malformed, revoked or unknown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: That key is not valid.
    PlanRequired:
      description: >-
        The key is valid, but the workspace's plan does not include the API. The
        key is kept and works again once the workspace is on Pro or Business.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              details:
                type: object
                properties:
                  code:
                    type: string
                    example: plan_limit
                  upgrade:
                    type:
                      - string
                      - 'null'
                    example: pro
                  href:
                    type: string
                    description: Where to upgrade.
    Forbidden:
      description: The workspace is suspended, so its API keys are refused.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: This workspace is suspended, so its API keys are refused.
    RateLimited:
      description: More than 300 requests in a minute with this key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded. Try again in 12 seconds.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: A plain-language explanation of what went wrong.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace API key, which starts with `dtd_`. Send it as
        `Authorization: Bearer dtd_...`.

````

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