POST
/
documents
Upload a verification document
curl --request POST \
  --url https://api.balansas.com/functions/v1/customer-api/documents \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "endUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fileName": "<string>",
  "fileData": "<string>"
}
'
{
  "data": {
    "storage_path": "a1b2c3.../e5f6.../1716901234567_passport.pdf",
    "fr_document_id": "doc_7h8i9j0k1l2m",
    "status": "uploaded",
    "fr_sync_status": "pending",
    "message": "Document uploaded to storage. Provider sync will be retried."
  }
}

Authorizations

x-api-key
string
header
required

Customer API key. Send as x-api-key: sk_... or Authorization: Bearer sk_.... Write operations also require an X-CSRF-Token header (64-char hex).

Body

application/json
endUserId
string<uuid>
required
documentType
enum<string>
required
Available options:
IDENTITY_VERIFICATION,
identity,
proof_of_address,
other
fileName
string
required
Required string length: 1 - 255
fileData
string
required
mimeType
enum<string>
required
Available options:
application/pdf,
image/jpeg,
image/png

Response

Success

data
object
required