Contacts
Save an existing R2 object as a contact document
Attaches an already-uploaded R2 object (referenced by storageKey) to the contact as a typed document. Validates documentType against the organization's configured documentTypes.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
contactId*string
Request Body
application/json
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/api/contacts/string/documents" \ -H "Content-Type: application/json" \ -d '{ "storageKey": "org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf", "filename": "id-proof.pdf", "contentType": "application/pdf", "size": 184320, "documentType": "ID Proof", "notes": "Driver license, front + back" }'{ "success": true, "document": { "_id": "64f0a1b2c3d4e5f6a7b8ca40", "storageKey": "org/64f0a1b2c3d4e5f6a7b8c9d3/contact/64f0a1b2c3d4e5f6a7b8c9d0/2026/id-proof.pdf", "filename": "id-proof.pdf", "contentType": "application/pdf", "documentType": "ID Proof" }}