Acknowledge, resolve, or assign a caller request
const url = 'https://api.vocapable.com/v1/caller-requests/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"version":1,"state":"acknowledged","assignee_user_id":"example","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.vocapable.com/v1/caller-requests/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "version": 1, "state": "acknowledged", "assignee_user_id": "example", "note": "example" }'One optimistic-concurrency move: the caller names the version they read.
A version mismatch and an illegal transition are both 409s with distinct codes, so
the portal can tell “refresh and retry” from “someone already resolved this”.
ticket.resolved is appended in this same transaction (append_once on the request
id - resolved is terminal, so once is all there ever is).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”PATCH /v1/caller-requests/{id} - acknowledge, resolve, or (re)assign.
version is mandatory: the caller names the revision they read, and a mismatch is a
409 rather than a silent last-write-wins. state may only move forward -
open → acknowledged → resolved, or open → resolved directly; resolved is terminal (no
reopen in v1, ADR-0037 records the deferral). assignee_user_id uses PATCH
presence semantics: absent means no assignment edit, an explicit null clears it.
Responses
Section titled “Responses”Successful Response
The single-request read, with its full event trail embedded oldest-first.
object
Example
{ "kind": "message", "state": "open", "severity": "critical", "events": [ { "action": "opened" } ]}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}