Documents

Create document upload request

Create an upload request for a document. Returns a signed URL for direct upload to storage.

post/v1/documents

Headers

X-API-Keystring

API key

Request body

documentTypestring required

Type of document

documentSubtypestring

Specific document subtype

fileNamestring required

Original file name

contentTypestring required

MIME type of the file

customerIdstring required

Customer ID the document belongs to

transferIdstring

Transfer ID if document is associated with a transfer

fileHashstring

SHA-256 hash of file content for deduplication. If provided and a duplicate exists, returns the existing document instead of creating a new upload request.

remarksstring

Free-form remarks or notes about the document

Example request

{
  "documentType": "INVOICE",
  "documentSubtype": "GOVERNMENT_ID_FRONT",
  "fileName": "invoice-2026-001.pdf",
  "contentType": "application/pdf",
  "customerId": "cus_abc123",
  "transferId": "txn_xyz789",
  "fileHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "remarks": "Utility bill for the registered office"
}

Response

Upload request created successfully

documentIdstring required

Document ID

uploadUrlstring required

Signed URL for uploading the document

expiresAtstring date-time required

When the upload URL expires

existingDocumentIdstring

If a duplicate was found, returns existing document ID instead

Example response

{
  "documentId": "doc_abc123",
  "uploadUrl": "https://storage.googleapis.com/...",
  "expiresAt": "2026-01-01T12:00:00Z",
  "existingDocumentId": "doc_existing123"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.