---
title: Download an Accreditation File
slug: download-an-accreditation-file
icon: {"apiMethod":"GET"}
createdAt: 2026-09-14T11:31:19.507Z
---

:::ApiMethodV2
```json
{
  "name": "Download an Accreditation File",
  "method": "GET",
  "url": " https://equidefi.io/api/v1/investments/{investmentId}/accreditation-documents/{documentId}",
  "description": "Downloads a single accreditation document as a file.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "H_8nNCSHTULa2b9h7b9K-",
        "language": "javascript",
        "code": "import { writeFile } from \"node:fs/promises\";\n\nconst response = await fetch(\n  \"https://equidefi.io/api/v1/investments/{investmentId}/accreditation-documents/{documentId}\",\n  {\n    method: \"GET\",\n    headers: {\n      Authorization: `Bearer ${process.env.EQUIDEFI_API_KEY}`,\n    },\n  }\n);\n\n// Filename comes from the Content-Disposition header\nconst filename =\n  response.headers.get(\"content-disposition\")?.match(/filename=\"(.+)\"/)?.[1] ??\n  \"document\";\n\nconst buffer = Buffer.from(await response.arrayBuffer());\nawait writeFile(filename, buffer);",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "H_8nNCSHTULa2b9h7b9K-"
  },
  "results": {
    "languages": [
      {
        "id": "t2qX9NBtLrZwns1cMMBQY",
        "language": "200",
        "code": "",
        "customLabel": ""
      },
      {
        "id": "7E7TibLyCIdQVH_EiedHW",
        "language": "404",
        "code": "{ \"errors\": [\"Document not found\"] }",
        "customLabel": ""
      },
      {
        "id": "RmmYyVkUuYr0U5zaZqdVg",
        "language": "403",
        "code": "{ \"errors\": [\"Forbidden\"] }"
      },
      {
        "id": "_fDnJrycZ9nZS4OJ3tuFZ",
        "language": "401",
        "code": "{ \"errors\": [\"Unauthorized\"] }"
      }
    ],
    "selectedLanguageId": "t2qX9NBtLrZwns1cMMBQY"
  },
  "request": {
    "pathParameters": [
      {
        "name": "investmentId",
        "kind": "required",
        "type": "string",
        "description": "UUID of the investment that owns the document.",
        "": "required"
      },
      {
        "name": "documentId",
        "kind": "required",
        "type": "string",
        "description": "accreditation-file id, or \"verification_report\" / \"proof_of_address\".",
        "": "required"
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "download-an-accreditation-file",
  "legacyHash": "EHfDFLOx9LYbUIZ1YkYWd"
}
```
:::

