> ## 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.

# Get a document

> Returns one document with its recipients, plus an `actions` map that says what each recipient is being asked to do.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/documents/{id}
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}:
    get:
      tags:
        - Documents
      summary: Get a document
      description: >-
        Returns one document with its recipients, plus an `actions` map that
        says what each recipient is being asked to do.
      operationId: getDocument
      parameters:
        - name: id
          in: path
          required: true
          description: The document ID.
          schema:
            type: string
      responses:
        '200':
          description: The document.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/Document'
                      - type: object
                        properties:
                          actions:
                            type: object
                            description: >-
                              Recipient ID mapped to what that person is asked
                              to do: `sign` (a signer with signature, initials
                              or stamp boxes), `approve` (an approver) or `fill`
                              (everyone else, such as a signer who only fills in
                              text).
                            additionalProperties:
                              type: string
                              enum:
                                - sign
                                - approve
                                - fill
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PlanRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Document:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        status:
          type: string
          enum:
            - DRAFT
            - SENT
            - VIEWED
            - PARTIALLY_SIGNED
            - COMPLETED
            - DECLINED
            - EXPIRED
            - CANCELLED
        fileName:
          type: string
        pageCount:
          type: integer
        fileSize:
          type: integer
          description: Size in bytes.
        signingOrder:
          type: string
          enum:
            - PARALLEL
            - SEQUENTIAL
        createdAt:
          type: string
          format: date-time
        sentAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
        progress:
          type: object
          description: >-
            How many of the people asked to sign or approve have done so. CC and
            viewer recipients are not counted.
          properties:
            done:
              type: integer
            total:
              type: integer
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/Recipient'
        links:
          type: object
          properties:
            self:
              type: string
              example: /api/v1/documents/doc_123
            download:
              type: string
              example: /api/v1/documents/doc_123/download
    Recipient:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        role:
          type: string
          enum:
            - SIGNER
            - APPROVER
            - CC
            - VIEWER
        status:
          type: string
          enum:
            - PENDING
            - SENT
            - VIEWED
            - SIGNED
            - APPROVED
            - DECLINED
            - BOUNCED
        order:
          type: integer
          description: Position in the signing order.
        sentAt:
          type:
            - string
            - 'null'
          format: date-time
        viewedAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When this person signed or approved.
        declinedAt:
          type:
            - string
            - 'null'
          format: date-time
        declineReason:
          type:
            - string
            - 'null'
    Error:
      type: object
      properties:
        error:
          type: string
          description: A plain-language explanation of what went wrong.
  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.
    NotFound:
      description: No document with that ID in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: No such document.
    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.
  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.