API Reference
Beneficiaries

Upload a beneficiary document

POST/v1/beneficiaries/{beneficiaryId}/documents
Base URL: https://trace.mimicr.dev · provider: https://api.sandbox.tracefinance.com

Uploads 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

X-Trace-Versionstring

API version. Omit to use the default version.

Example: "1"
X-Idempotency-Keystring<uuid>required

Unique key to ensure idempotent request processing. Required on all POST, PUT, and PATCH requests.

Path parameters

beneficiaryIdstring<uuid>required

UUID of the beneficiary.

Body

multipart/form-data
bodyobjectrequired

Describes 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
documentTypestringrequired

Type of compliance document. Beneficiary document upload supports only CUSTODY_ATTESTATION, which proves a crypto wallet's custody arrangement.

CUSTODY_ATTESTATION
Example: "CUSTODY_ATTESTATION"
holderobjectrequired

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
typestringrequired
PAYMENT_INSTRUCTION
Example: "PAYMENT_INSTRUCTION"
referenceIdstringrequired

Identifier of the payment instruction the document belongs to. The instruction must belong to the beneficiary in the path.

Example: "pi-a1b2c3d4-5e6f-7890-abcd-ef1234567890"
custodyDetailobject

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
purposestringrequired

Purpose of the wallet or its transfers.

Example: "Treasury settlement"
custodystringrequired

Who custodies the wallet.

Example: "Coinbase Custody"
counterpartystringrequired

Counterparty on the other side of the arrangement.

Example: "Acme VASP Ltd"
filestring<binary>required

Document file content.

Responses

204Document uploaded.
400Invalid request or missing multipart fields.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
401Missing or invalid authentication token.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
404Beneficiary not found, or the holder does not belong to the path beneficiary.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
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.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
422Business rule violation.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject