---
updatedAt: 2026-06-02T12:53:51.000Z
agentTools:
  projectIndex: https://docs.trustpair.com/llms.txt
---

# Download document attachment

Downloads the file content of a specific document attachment by its ID.

This endpoint allows you to:
- Retrieve the binary content of a document
- Download supporting files attached to overrides or other entities

**Required permissions:**
- `documents_read`

**Note:** This endpoint returns the raw file content, not a JSON response.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "TRUSTPAIR API",
    "version": "v1",
    "description": "The Trustpair API is organized around REST. Our API has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.\n\n# Definitions\nThe following API documentation is divided into different definitions. Switch between definitions using the select located at the top right of the page.\n\n# Authentication\n\nThe Trustpair API uses token to authenticate requests.\n\nThe Bearer authentication token must be provided with the request as a header: `Authorization: Bearer <token>`\n\nAll API requests must be made over `HTTPS`. Calls made over plain `HTTP` will fail.\n\nAPI requests without authentication will also fail.\n\n\n### Error response\n\nReturns a `401 UNAUTHORIZED` code if the provided bearer token is not found.\n\n# Rate limits\nLimits are placed on the number of requests that can be made on the Trustpair API (the currently enforced limit being 100 requests over a 10 seconds periods). These limits help us provide the reliable and scalable API that our customers rely on.\n\nIf the defined limit is exceeded, the API will return an HTTP code `429 Too Many Requests`.\n\n\n# Pagination\n\nThe API returns paginated results for list endpoints. By default, the number of items returned is 10.\n\nTrustpair utilizes cursor-based pagination via the `starting_after` and `ending_before` parameters.\nBoth parameters take an existing object ID value and return objects in reverse chronological order.\nThe `ending_before` parameter returns objects listed before the named object. The `starting_after` parameter returns objects listed after the named object.\nIf both parameters are provided, only `ending_before` is used.\n\n\n| Arguments      | Description                                                         | Required                | Example                                                |\n| -------------  |:-------------:                                                      | -----:                  | ---:                                                   |\n| limit          | A limit on the number of objects to be returned, between 1 and 100. | optional, default is 10 | */?limit=2                                             |\n| starting_after | A cursor for use in pagination                                      | optional                | */?starting_after=c58ac778-67b5-4f98-ba33-a1e9aaf394eb |\n| ending_before  | A cursor for use in pagination                                      | optional                | */?ending_before=c58ac778-67b5-4f98-ba33-a1e9aaf394eb  |\n\n\n# Filters\n\nThe API results can be filtered according to different criteria on every endpoint.\n\nThere is no theoric limit on how many different elements can be submitted in a filter, only that the request header should be kept under 8kb.\n\n| Arguments            | Description                                                                                    | Example                                                                                                       |\n| -------------        |:-------------:                                                                                 | ---------------------------------------:                                                                      |\n| ids                  | Returns selected objects                                                                       | /api/v1/paid_payments?ids=a414df38-f13b-48b6-95f7-f941ca121f28,a414df38-f13b-48b6-95f7-f941ca121f29           |\n| recents              | Returns objects evaluated in the last 24 hours                                                 | /api/v1/company_account_audits/recents                                                                        |\n| recents/?last_update | Returns the objects evaluated from the given date (included) (format: `%d/%m/%Y`)              | /api/v1/payment_checks/recents?last_update='01/01/2021'                                                       |\n| state                | Filters by global state (in `pending`, `favorable`, `unfavorable`, `anomaly` or `unevaluated`) | api/v1/company_account_checks/?state=unfavorable                                                              |\n\n# HTTP Codes\n\nTrustpair uses conventional HTTP response codes to indicate the success or failure of an API request.\n\n| Code                       | Description                                                             |\n| -------------              |:-------------:                                                          |\n| 200 - OK                   | Everything worked as expected                                           |\n| 202 - Accepted             | The request has been accepted and processing has not been completed yet |\n| 401 - Unauthorized         | No valid token was provided                                             |\n| 403 - Forbidden            | The token doesn't have permissions for the request                      |\n| 404 - Not found            | The requested resource doesn't exist                                    |\n| 422 - Unprocessable Entity | The request format was invalid                                          |\n| 429 - Too many requests    | The requests limit is exceeded                                          |\n\n# Webhooks\n\nThe webhook events documentation can be found by selecting `Webhooks - V1` in the [definitions](#definitions) select.\n\n"
  },
  "servers": [
    {
      "url": "https://app-sandbox.trustpair.com/"
    }
  ],
  "paths": {
    "/api/v1/documents/{id}/download": {
      "get": {
        "summary": "Download document attachment",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "description": "Downloads the file content of a specific document attachment by its ID.\n\nThis endpoint allows you to:\n- Retrieve the binary content of a document\n- Download supporting files attached to overrides or other entities\n\n**Required permissions:**\n- `documents_read`\n\n**Note:** This endpoint returns the raw file content, not a JSON response.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "description": "**Unique identifier** of the document to download.\nMust be a valid UUID format.\n",
            "example": "8b71ee0e-525e-4713-9dcc-e749888ff994"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ]
            },
            "required": false,
            "description": "Specifies the preferred language for error messages. Supported languages:\n* `en` - English\n* `fr` - French\n\nIf not provided, the default language will be used.\n",
            "example": "en"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "Default": {
                    "value": {
                      "schema": {
                        "type": "string",
                        "format": "binary"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "With incorrect token",
            "content": {
              "application/json": {
                "examples": {
                  "Default": {
                    "value": {
                      "message": "Bearer token invalid or missing"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Without read permissions",
            "content": {
              "application/json": {
                "examples": {
                  "Default": {
                    "value": {
                      "message": "Access requires permission: 'documents_read'"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Document Not found",
            "content": {
              "application/json": {
                "examples": {
                  "Document Not found": {
                    "value": {
                      "message": "Not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Documents",
      "description": "API endpoints for managing document attachments within your workspace.\nThese endpoints allow you to upload supporting documentation to your workspace, download existing documents, and associate documents with specific entities like cases, audits and checks.\nDocument management is crucial for maintaining evidence and audit trails for business decisions.\n"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```