> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.rightbrain.ai/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rightbrain.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rightbrain.ai/_mcp/server.

# Get Document Details

GET https://app.rightbrain.ai/api/v1/org/{org_id}/project/{project_id}/document/{document_id}

Retrieve detailed information about a specific document.

Returns:
- Document metadata (title, description, source, strategy, original MIME type)
- Chunk count
- Associated embedding instances

Does not include the actual document content.

Reference: https://docs.rightbrain.ai/api-reference/api-reference/knowledge/documents/get-document

## Authentication

- `Authorization` header (bearer token, required) — API key or access token, sent as `Authorization: Bearer <token>`. The simplest option: create an API key in your dashboard under Settings, then paste it here.

## Servers

- `https://app.rightbrain.ai/api/v1` (Production, default)
- `https://app.rightbrain.ai/api/v1` (Staging API)
- `https://app.rblocal.dev/api/v1` (Local development)

## Request

### Path parameters

- `document_id` (string, required) — The UUID of the document
- `org_id` (string, required) — The unique identifier of the organization.
- `project_id` (string, required) — The unique identifier of the project.

## Response

### 200

Document details retrieved successfully

- `title` (string, required)
- `project_id` (string, required)
- `strategy` (string, required)
- `id` (string, required)
- `chunks` (integer, required)
- `original_mime` (string, required)
- `embedding_instances` (list of ChatDocumentEmbeddingInstance, required, nullable)
- `description` (string, optional, nullable)
- `source` (enum, optional, nullable) — Source types for documents in the system.
  - Allowed values: `upload`, `gdrive`, `onedrive`, `web_scrape`, `notion`, `confluence`, `box`, `dropbox`, `sharepoint`
- `source_meta` (map from string to any, optional, nullable)
- `connection_id` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (MalformedResourceIdentifierErrorPayload, required) — The error payload.

### 403 Forbidden Error

Forbidden - Insufficient permissions for document **Common causes:** - Your role lacks the required permission for this action - The document belongs to a different organization or project - The action requires admin or owner privileges **Resolution:** Contact your organization admin to request appropriate access.

- `GetDocumentRequestForbiddenError`
  - PermissionCheckFailedErrorResponse: PermissionCheckFailedErrorResponse
  - MissingAuthenticationErrorResponse: MissingAuthenticationErrorResponse

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ChatDocumentEmbeddingInstance

- `id` (string, required)
- `chat_document_id` (string, required)
- `is_active` (boolean, required)
- `config` (map from string to any, optional, nullable, default: {})

### MalformedResourceIdentifierErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `MALFORMED_RESOURCE_IDENTIFIER`
- `malformedResourceIdentifierError` (MalformedResourceIdentifierErrorDetails, required) — Metadata detailing more information about the error.

### PermissionCheckFailedErrorResponse

- `detail` (PermissionCheckFailedErrorPayload, required) — The error payload.

### MissingAuthenticationErrorResponse

- `detail` (MissingAuthenticationErrorPayload, required) — The error payload.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### MalformedResourceIdentifierErrorDetails

- `field` (string, required)
- `value` (any, required)
- `expected_format` (string, required)

### PermissionCheckFailedErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `PERMISSION_CHECK_FAILED`
- `permissionCheckFailedError` (PermissionCheckFailedErrorDetails, required) — Metadata detailing more information about the error.

### MissingAuthenticationErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `MISSING_AUTHENTICATION`
- `missingAuthenticationError` (EmptyErrorDetails, required) — Metadata detailing more information about the error.

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

### PermissionCheckFailedErrorDetails

- `permission` (string, required)
- `subject` (IAMObjectErrorDetails, optional, nullable)
- `resource` (IAMObjectErrorDetails, optional, nullable)

### EmptyErrorDetails

### IAMObjectErrorDetails

- `type` (string, required)
- `id` (string, optional, nullable)

## Examples

**Response**

```json
{
  "title": "Driver Safety SOP",
  "project_id": "019a2f10-8b2d-7e43-9c64-1c9d4e7b6f02",
  "strategy": "pdf",
  "id": "019a2f10-b1b6-7e60-95fd-1c9d4e7b6f30",
  "chunks": 42,
  "original_mime": "application/pdf",
  "embedding_instances": [
    {
      "id": "019a2f10-c1d8-7e70-971f-1c9d4e7b6f40",
      "chat_document_id": "019a2f10-b1b6-7e60-95fd-1c9d4e7b6f30",
      "is_active": true,
      "config": {}
    }
  ],
  "description": "Standard operating procedure for pre-trip vehicle checks and incident reporting.",
  "source": "upload",
  "source_meta": {},
  "connection_id": null
}
```

**SDK Code**

```python Documents_getDocument_example
import requests

url = "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Documents_getDocument_example
const url = 'https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Documents_getDocument_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Documents_getDocument_example
require 'uri'
require 'net/http'

url = URI("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Documents_getDocument_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Documents_getDocument_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Documents_getDocument_example
using RestSharp;

var client = new RestClient("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Documents_getDocument_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/document/document_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```