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

# Download a Signed Document

> Download the signed PDF of one document of an Electronic Signature step, for a KYC or KYB session, with your API key.

Returns the signed PDF of one document, once its signer has signed. You don't need to build the URL: every signed document in the decision carries its path in `signatures[].documents[].signed_file`.

```bash theme={null}
curl -L 'https://verification.didit.me/v3/session/{session_id}/signatures/{node_id}/documents/{document_id}/file/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -o agreement-signed.pdf
```

The PDF holds the document the signer was shown with their field values stamped, the evidence page (unless the step's `signature_evidence_page` is off) and the PAdES signature with its timestamp. Before returning it, Didit checks the stored file against `sha256_signed` and answers `409` with `signature_document_changed` if they differ.

A document that isn't signed yet returns `404` with `signature_not_signed`. After you [delete the session](/sessions-api/delete-session), the route returns `404`.

## Related

* [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature#the-signed-pdf): what the signed PDF contains.
* [Download the signature evidence](/sessions-api/electronic-signature/download-evidence)
* [Validate signatures](/sessions-api/electronic-signature/validate-signatures)


## OpenAPI

````yaml GET /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/:
    get:
      tags:
        - Sessions
      summary: Download a signed document
      description: >-
        Download the signed PDF of one document of an Electronic Signature step.
        Use the `signed_file` path of `signatures[].documents[]` in the
        decision. The PDF holds the document the signer was shown with their
        field values stamped, the evidence page (unless
        `signature_evidence_page` is off) and the PAdES signature with its
        timestamp. Didit checks the file against `sha256_signed` before
        returning it.


        Works for User Verification (KYC) and Business Verification (KYB)
        sessions. Needs `read:sessions`; your API key works. See the [Electronic
        Signature
        report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents).
      operationId: get_v3_session_signature_document_file
      parameters:
        - name: sessionId
          in: path
          required: true
          description: The User Verification (KYC) or Business Verification (KYB) session.
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
        - name: nodeId
          in: path
          required: true
          description: >-
            The Electronic Signature step: `node_id` of the item in
            `signatures[]`.
          schema:
            type: string
            example: feature_signature
        - name: documentId
          in: path
          required: true
          description: '`id` of the document in `signatures[].documents[]`.'
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The signed PDF.
          headers:
            Content-Disposition:
              description: Attachment with the file name.
              schema:
                type: string
                example: attachment; filename="agreement-signed.pdf"
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '403':
          description: >-
            Missing or invalid credentials, or a credential that can't read this
            session. Didit's API-key authentication answers `403`, never `401`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: You do not have permission to perform this action.
        '404':
          description: >-
            No signed document matches: the session, step or document doesn't
            exist, was deleted, or isn't signed yet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Not signed yet:
                  summary: The signer hasn't signed
                  value:
                    code: signature_not_signed
                    detail: signature_not_signed
                Unknown document:
                  summary: No such document in this step
                  value:
                    code: signature_not_found
                    detail: signature_not_found
        '409':
          description: >-
            The stored file no longer matches its recorded SHA-256. Nothing is
            returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
              examples:
                Changed file:
                  summary: Stored file doesn't match its hash
                  value:
                    code: signature_document_changed
                    detail: signature_document_changed
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your application's API key, from Developers -> API keys in the Business
        Console. The primary key has full access. A named key can be scoped:
        none, read or write per resource, limited to some workflows or to
        approved sessions, to a list of IP addresses, and to an expiry date. 401
        means the key is missing, wrong, revoked or expired; 403 means the key
        has no access to this resource or action, or the request came from an
        address outside its IP list; 404 on a session route means the session is
        outside the key's workflows or statuses. A key without media access
        receives image, video and PDF URLs as null, and a key without sessions
        write receives session links and tokens as null. See
        https://docs.didit.me/console/api-keys.

````

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