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

# Get Registry Document

> Get a presigned download URL for a document retrieved from the company registry

Returns a short-lived presigned URL for downloading one document Lissom retrieved from the company registry (currently Companies House). Use the `id` from `registry_documents` on [Get Application](https://docs.lissom.ai/api-reference/get-application.md) or on the [`application.registry_documents_fetched`](https://docs.lissom.ai/webhooks#application-registry-documents-fetched) webhook.

```
GET /api/external/applications/{id}/registry-documents/{docId}
```

## Authentication

Requires an API key with `applications:read` scope. The application must belong to the organization associated with the API key.

```bash theme={null}
Authorization: Bearer klara_{client_id}.{secret}
```

## Path parameters

**id** `string` *required*

UUID of the application.

**docId** `string` *required*

UUID of the registry document.

## Response

Returns `200 OK` with a presigned download URL.

**url** `string`

Presigned S3 URL valid for 60 seconds. Use this to download the file directly.

**file\_name** `string`

File name of the stored filing.

**file\_type** `string`

MIME type of the file (`application/pdf`).

**document\_type** `string`

Filing type. See [Registry document types](https://docs.lissom.ai/api-reference/types.md#registry-document-type).

**filing\_date** `string | null`

Date the document was filed with the registry (`YYYY-MM-DD`).

## Examples

```bash cURL theme={null}
curl "https://app.klara-ai.com/api/external/applications/550e8400.../registry-documents/880e8400..." \
  -H "Authorization: Bearer klara_abc123def456.your-secret-here"

curl -o incorporation.pdf "https://s3.amazonaws.com/..."
```

```javascript Node.js theme={null}
const response = await fetch(
  'https://app.klara-ai.com/api/external/applications/550e8400.../registry-documents/880e8400...',
  {
    headers: {
      'Authorization': 'Bearer klara_abc123def456.your-secret-here'
    }
  }
);

const { url, file_name } = await response.json();

const fileResponse = await fetch(url);
const fileBuffer = await fileResponse.arrayBuffer();
```

```python Python theme={null}
import requests

response = requests.get(
    'https://app.klara-ai.com/api/external/applications/550e8400.../registry-documents/880e8400...',
    headers={'Authorization': 'Bearer klara_abc123def456.your-secret-here'}
)

data = response.json()

file_response = requests.get(data['url'])
with open(data['file_name'], 'wb') as f:
    f.write(file_response.content)
```

**Response:**

```json theme={null}
{
  "url": "https://s3.amazonaws.com/bucket/org-id/applications/app-id/registry/NEWINC-MzI4NjQ5.pdf?X-Amz-...",
  "file_name": "NEWINC-MzI4NjQ5.pdf",
  "file_type": "application/pdf",
  "document_type": "NEWINC",
  "filing_date": "2020-05-01"
}
```

> [!WARNING]
>
> Download URLs expire after **60 seconds**. Download the file immediately, or call this endpoint again for a fresh URL.

## Errors

| Status | Error | Cause |
| - | - | - |
| `401` | `Invalid API key` | API key is invalid, expired, or inactive |
| `401` | `API key missing required scopes: applications:read` | Key lacks the required scope |
| `404` | `Application not found` | Application does not exist or belongs to a different organization |
| `404` | `Document not found` | Document does not exist, belongs to another application, was not retrieved, or the application is not registry-eligible |
| `500` | `Internal server error` | An unexpected error occurred |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.