API Reference
Upload a beneficiary document
/v1/beneficiaries/{beneficiaryId}/documentshttps://trace.mimicr.dev · provider: https://api.sandbox.tracefinance.comUploads a compliance document to the beneficiary identified by the path beneficiaryId. Set holder.type to PAYMENT_INSTRUCTION with the payment instruction ID; the document satisfies that instruction's compliance review. The instruction must belong to the path beneficiary (otherwise 404) and must be a crypto instruction — the only supported document is CUSTODY_ATTESTATION, which proves a crypto wallet's custody arrangement. Uploading against a non-crypto instruction returns 422.
The document may also be supplied inline when the beneficiary is created; this endpoint covers the upload-later case. The document is uploaded as multipart: a JSON body part carrying the document type and holder, plus a binary file part.
Uploading the same document type again replaces the file under review instead of adding a second document: the instruction keeps one document per type, its referenceId stays the same and its version increases. Compliance retains the previous versions, and the review restarts on the new file.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Headers
API version. Omit to use the default version.
"1"Unique key to ensure idempotent request processing. Required on all POST, PUT, and PATCH requests.
Path parameters
UUID of the beneficiary.
Body
multipart/form-dataDescribes a compliance document uploaded for a beneficiary. Sent as the JSON body part of the multipart request; the document file itself is the file part.
Show child attributes
Type of compliance document. Beneficiary document upload supports only CUSTODY_ATTESTATION, which proves a crypto wallet's custody arrangement.
CUSTODY_ATTESTATION"CUSTODY_ATTESTATION"Identifies which entity on the beneficiary the document belongs to. Today only PAYMENT_INSTRUCTION is accepted — the holder is the payment instruction whose compliance review the document satisfies. The object is shaped to carry other holder kinds in the future; only the value below is currently valid.
Show child attributes
PAYMENT_INSTRUCTION"PAYMENT_INSTRUCTION"Identifier of the payment instruction the document belongs to. The instruction must belong to the beneficiary in the path.
"pi-a1b2c3d4-5e6f-7890-abcd-ef1234567890"Custody arrangement for a crypto payment instruction. Optional; when present, all three fields are required. Applies to the CRYPTO rail only. Required (together with the custody attestation document) only when the wallet is not custodied by Trace.
Show child attributes
Purpose of the wallet or its transfers.
"Treasury settlement"Who custodies the wallet.
"Coinbase Custody"Counterparty on the other side of the arrangement.
"Acme VASP Ltd"Document file content.
Responses
204Document uploaded.
400Invalid request or missing multipart fields.
Machine-readable error code.
Human-readable description.
401Missing or invalid authentication token.
Machine-readable error code.
Human-readable description.
404Beneficiary not found, or the holder does not belong to the path beneficiary.
Machine-readable error code.
Human-readable description.
409The instruction's compliance review has not started yet, so there is nothing to attach the document to. Wait for BENEFICIARY_INSTRUCTION_ACTION_REQUIRED, or poll the beneficiary until the instruction's requirements name what to send, and retry.
Machine-readable error code.
Human-readable description.
422Business rule violation.
Machine-readable error code.
Human-readable description.