Hercle
REST
POST/api/v1/end-users/{endUserId}/documents

Upload End User Document

Uploads a document for an end user. Supports identity verification documents, passports, and certificates of incorporation.

Auth:Bearer <api_key>
Tags:Banking

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

NameTypeRequiredDescription
endUserIdstringYesUnique identifier of the end user (individual or business)
Example: 550e8400-e29b-41d4-a716-446655440000

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer API_KEY
Example: Bearer your_api_key_here
Content-TypestringYesmultipart/form-data
Example: multipart/form-data

Request Body

Schema

FieldTypeDescriptionRequired
typestring
Type of document being uploaded
Allowed values:
IDENTITY_VERIFICATION
Yes
descriptionstringOptional description of the documentNo
fileunknownYes

Example

{
  "type": "IDENTITY_VERIFICATION",
  "description": "Front page of passport",
  "file": "(binary)"
}

Response

Success Response Schema

FieldTypeDescription
requestIdstringUnique request identifier (UUID)
hercleDocumentIdstringHercle internal document identifier
frDocumentIdstring | nullExternal document identifier from the provider, or null
frSyncStatusstringSynchronization status with the provider (e.g., SYNCED)
errorMessagestring | nullError message when the synchronization failed, or null

Upload Document Response Object

Response containing document identifiers and sync status

FieldTypeDescription
requestIdstringUnique request identifier (UUID)
hercleDocumentIdstringHercle internal document identifier
frDocumentIdstring | nullExternal document identifier from the provider, or null
frSyncStatusstringSynchronization status with the provider (e.g., SYNCED)
errorMessagestring | nullError message when the synchronization failed, or null

Responses

Document successfully uploaded

200 application/json
{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "hercleDocumentId": "doc_abc123",
  "frDocumentId": "fr_doc_456",
  "frSyncStatus": "SYNCED",
  "errorMessage": null
}

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