REST
POST
/api/v1/end-users/{endUserId}/documentsUpload End User Document
Uploads a document for an end user. Supports identity verification documents, passports, and certificates of incorporation.
Auth:Bearer <api_key>
Tags:BankingSandbox
This endpoint is only available in the Sandbox environment. It will not work in production.
Request
cURL
curl -X POST https://publicapi.sandbox.hercle.financial/api/v1/end-users/{endUserId}/documents \
-H "Authorization: Bearer eyJhb..." \
-H "Content-Type: multipart/form-data" \
-F "type=PASSPORT" \
-F "description=Front page of passport" \
-F "file=@/path/to/document.pdf"Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| endUserId | string | Yes | Unique identifier of the end user (individual or business) Example: 550e8400-e29b-41d4-a716-446655440000 |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer API_KEY Example: Bearer your_api_key_here |
| Content-Type | string | Yes | multipart/form-data Example: multipart/form-data |
Request Body
Schema
| Field | Type | Description | Required |
|---|---|---|---|
type | string | Type of document being uploaded Allowed values: IDENTITY_VERIFICATION | Yes |
description | string | Optional description of the document | No |
file | unknown | Yes |
Example
{
"type": "IDENTITY_VERIFICATION",
"description": "Front page of passport",
"file": "(binary)"
}Response
Success Response Schema
Document successfully uploaded
| Field | Type | Description |
|---|---|---|
requestId | string | Unique request identifier (UUID) |
hercleDocumentId | string | Hercle internal document identifier |
frDocumentId | string | External document identifier from the provider |
frSyncStatus | string | Synchronization status with the provider (e.g., SYNCED) |
Upload Document Response Object
Response containing document identifiers and sync status
| Field | Type | Description |
|---|---|---|
requestId | string | Unique request identifier (UUID) |
hercleDocumentId | string | Hercle internal document identifier |
frDocumentId | string | External document identifier from the provider |
frSyncStatus | string | Synchronization status with the provider (e.g., SYNCED) |
Responses
Document successfully uploaded
200 application/json
{
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"hercleDocumentId": "doc_abc123",
"frDocumentId": "fr_doc_456",
"frSyncStatus": "SYNCED"
}API Tester
Test this endpoint directly against the sandbox environment
Get your API key from Hercle Sandbox
Unique identifier of the end user (individual or business)
https://publicapi.sandbox.hercle.financial/api/v1/end-users/{endUserId}/documents