# Get a task document

> The tasks.documents.get operation: GET /api/v1/tasks/{id}/documents/{file} in the REST API and the tasks_documents_get tool in the MCP server.

Returns a document of a task (a receipt uploaded with `tasks.documents.upload`, or another document of its
filing period or registration): its file name, type, size and SHA-256. In the console, documents open from the
task's page; the file itself is served only after this check, and only when its bytes still match the SHA-256.

## At a glance

- **REST:** `GET /api/v1/tasks/{id}/documents/{file}`
- **MCP tool:** `tasks_documents_get`
- **Operation ID:** `tasks.documents.get`
- **Scope:** Organization, or one of its legal entities or brands
- **Permission:** `tasks:read`
- **Risk tier:** `read`
- **Dry run:** Not supported
- **Idempotency:** Not needed (read only)
- **Modes:** Test and live
- **Authentication:** API key with the `tasks:read` scope
- **Since:** M10

## Request

### Path parameters

| Field  | Type        | Description                   |
| ------ | ----------- | ----------------------------- |
| `id`   | `task_…` ID |                               |
| `file` | `file_…` ID | The document's ID (`file_…`). |

### Query parameters

This operation takes no query parameters.

## Response

`200 OK` with a JSON object:

| Field         | Type                 | Description |
| ------------- | -------------------- | ----------- |
| `id`          | `file_…` ID          |             |
| `object`      | `"task_document"`    |             |
| `taskId`      | `task_…` ID          |             |
| `ownerId`     | string               |             |
| `filename`    | string or null       |             |
| `contentType` | string               |             |
| `size`        | integer (at least 0) |             |
| `sha256`      | string               |             |
| `createdAt`   | date-time            |             |

## Examples

### The uploaded portal confirmation

```http
GET /api/v1/tasks/task_01m4ttwd3veh9apbewxheq5xa9/documents/file_01m4ttwd3veh9apbewxheq5xah
Authorization: Bearer or_test_…
```

Response (`200`):

```json
{
  "id": "file_01m4ttwd3veh9apbewxheq5xah",
  "object": "task_document",
  "taskId": "task_01m4ttwd3veh9apbewxheq5xa9",
  "ownerId": "fp_01m4ttwd3veh9apbewxheq5xa7",
  "filename": "oss-q3-confirmation.pdf",
  "contentType": "application/pdf",
  "size": 48213,
  "sha256": "4f1a9c0d7e2b6a3f8c5d1e9b0a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f",
  "createdAt": "2026-10-15T09:25:00.000Z"
}
```

## Errors

| Code                                                                                     | HTTP status | When                                                                                        | What to do                                                                                           |
| ---------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed)   | 400         | `id` or `file` is malformed.                                                                | Fix the fields listed in `details.issues` and send the request again.                                |
| [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found) | 404         | No such task in this organization, entity and mode, or the file isn't one of its documents. | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode. |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied)   | 403         | You can't see compliance tasks here.                                                        | Ask an organization owner or admin for a role or scope that allows this action.                      |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`dry_run_not_supported`](https://ownrecord.io/docs/reference/errors.md#dry_run_not_supported), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
