Update a contact document
Updates a document's editable fields (kind, title). Requires a first-party session.
Updates a document's editable fields (kind, title). Requires a first-party session.
Authorization
bearerAuth contacts:updateA gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).
In: header
Scope: contacts:update
Path Parameters
The contact id.
The document id.
Header Parameters
Optional. Send a unique key per logical operation to make retries safe: a retry with the same key replays the stored success for 14 days instead of re-running the write. Reusing a key with a different body returns 400.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Update a contact document's editable fields.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
{ "id": "string", "contact_id": "string", "storage_path": "string", "url": "string", "kind": "agreement", "title": "string", "file_name": "string", "content_type": "string", "byte_size": -9007199254740991, "position": -9007199254740991, "created_at": "string", "updated_at": "string"}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}List contact documents GET
Lists a contact's internal documents (agreements, invoices, shipping paperwork, correspondence). A first-party session gets a short-lived signed download URL for each; an API-key principal gets the rows but no download link (`url` is null).
Mint a signed contact-document upload URL POST
Returns a one-time signed target for uploading a document directly to Storage. The server derives the gallery-scoped object key; the client then uploads the bytes and registers the object via POST /documents. Requires a first-party session.