Skip to main content
PUT
Replace a customer document

Authorizations

X-API-Key
string
header
required

Partner API key. Sandbox keys start with is_test_; production keys start with is_live_. Keys are not interchangeable across environments. Send on every request. Never expose in browser or mobile clients.

Path Parameters

customer_id
string
required

Public customer id returned on create

Example:

"pcus_a1b2c3d4e5f6"

document_id
string
required

Public document id from GET customer or upload response

Required string length: 1 - 64
Example:

"pdoc_a1b2c3d4e5f6"

Body

application/json

Replace bytes for an existing vault document (same id + category).

content_base64
string
required

Base64-encoded file bytes (max ~8 MiB decoded).

Required string length: 1 - 12000000
Example:

"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFI+PmVuZG9iagoyIDAgb2JqCjw8L1R5cGUvUGFnZXMvQ291bnQgMC9LaWRzW10+PmVuZG9iagp4cmVmCjAgMwowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMDA2OCAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgMy9Sb290IDEgMCBSPj4Kc3RhcnR4cmVmCjEyMQolJUVPRgo="

content_type
string | null

MIME type. Required: image/jpeg, image/png, or application/pdf.

Example:

"image/jpeg"

file_name
string | null

Optional original filename for the partner only; not stored in object keys.

Maximum string length: 128
Example:

"utility_bill.pdf"

Response

Document bytes replaced; same document id and category.

status
enum<string>
required
Available options:
success
Example:

"success"

message
string
required
Example:

"Document replaced"

data
PartnerCustomerDocumentUploadData · object
required