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

# Get Document

> Retrieve a single document's metadata by its ID

```
GET /openapi/memorylake/api/v3/workspaces/{workspaceId}/projects/{projectId}/memories/documents/{documentId}
```

Returns metadata for a single project document. Use this to check whether a recently imported document has finished processing, inspect its token usage, or confirm it exists before performing other operations.

<Note>
  **Permission required:** `project:doc_read`
</Note>

### Path Parameters

<ParamField path="workspaceId" type="string" required>
  Workspace ID that owns the project.
</ParamField>

<ParamField path="projectId" type="string" required>
  Project the document belongs to.
</ParamField>

<ParamField path="documentId" type="string" required>
  Document ID to retrieve.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/api/v3/workspaces/ws-a1b2c3d4e5f6/projects/proj-7g8h9i0j1k2l/memories/documents/doc-3m4n5o6p7q8r' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Document detail">
    <ResponseField name="id" type="string">Document ID.</ResponseField>
    <ResponseField name="name" type="string">File name of the document.</ResponseField>
    <ResponseField name="status" type="string">Processing status: `pending`, `running`, `okay`, or `error`.</ResponseField>
    <ResponseField name="error" type="object|null">Error details when `status` is `error`. `null` otherwise.</ResponseField>

    <ResponseField name="usage" type="object">
      Token usage for processing.

      <Expandable title="Usage">
        <ResponseField name="files_process_tokens" type="integer">Number of tokens consumed to process this document.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="document_type" type="string">Document type: `drive_file`.</ResponseField>
    <ResponseField name="created_at" type="string">ISO 8601 timestamp when the document was imported.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "id": "doc-3m4n5o6p7q8r",
      "name": "quarterly-report.pdf",
      "status": "okay",
      "error": null,
      "usage": {
        "files_process_tokens": 15230
      },
      "document_type": "drive_file",
      "created_at": "2025-03-10T14:22:00Z"
    }
  }
  ```
</ResponseExample>
