OnLink
API reference

Upload a business document

Stores one document for the customer’s application, as multipart/form-data: documentType as a form field and the file as the part named file. PDF, JPEG or PNG, at most 10 MB, at most 20 per application. Uploading the same documentType again replaces the earlier file (documentType other adds). Sign this request over the digest of the multipart body: take the sha256 of the exact bytes you send, sign it as the body hash and send the same lowercase hex in the X-Body-SHA256 header, so the signature covers the document type and the file. A body that does not hash to the header is refused 401 before anything is read or stored (body_digest_missing, body_digest_malformed or body_digest_mismatch). Limited to 30 requests a minute per partner.

POST
/v1/customers/{id}/kyb/documents

Authorization

partner-key
X-OnLink-Key<token>

In: header

Path Parameters

id*string

Header Parameters

X-Body-SHA256*string

The lowercase hex sha256 of the exact multipart bytes you send (64 characters). Sign the same value as the body hash in the signature: the request signature then covers the document type and the file. Absent: 401 body_digest_missing. Present but not 64 lowercase hex characters: 401 body_digest_malformed. Not the digest of the body received: 401 body_digest_mismatch.

Match^[0-9a-f]{64}$

Request Body

multipart/form-data

The document type as a form field and the file as the part named file.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers/string/kyb/documents" \  -H "X-Body-SHA256: string" \  -F documentType="certificate_of_incorporation" \  -F file="string"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "documentType": "certificate_of_incorporation",  "directorId": "36254c85-3859-4e1b-ba81-159a76808304",  "fileName": "certificate.pdf",  "contentType": "application/pdf",  "sizeBytes": 182044,  "reviewStatus": "pending",  "uploadedAt": "2026-11-18T09:30:00.000Z"}