Skip to main content
POST
Cancel a browser call request (data plane)
The browser data plane: the cancel_url a browser call request answered with, authorized by the request’s start_capability as x-yappr-call-request-key. It stops a request that has not started - when the visitor closes the widget while the steps run, for example - with the same answers as POST /call-requests/{id}/cancel.
The answer is the call request with status: "cancelled". Cancelling is safe to repeat: an already-cancelled request answers 200 again. It is not a hang-up: once the call has started, end it instead. A request that already failed, expired or became a call has nothing left to cancel. It is refused and nothing is written, so its status and error_code keep the reason it ended:

Headers

x-yappr-call-request-key
string
required

Path Parameters

id
string<uuid>
required

Response

State of the request after the cancel. When the cancel ended a started call that had not connected, the request (still dispatched, with its call_id) also carries call_status, ended_by and ended_at.

Lifecycle record for one accepted call on a workflow agent. An outbound phone call returns its identity as request_id from POST /calls; a browser call is created directly with POST /call-requests. Either way this object is what you poll and what you cancel, and the two follow the same states.

id
string<uuid>
required
run_id
string<uuid>
required

Shared lifecycle identity. It does not grant access to call history.

channel
enum<string>
required

phone is dialled by the platform once it is ready. web is started by the caller's own browser with POST /call-requests/{id}/start, because the microphone is there and not here.

Available options:
phone,
web
status
enum<string>
required

scheduled waits for the workspace's next calling window; preparing and ready cover pre-call work; dispatching and dispatched mean the call is being placed or has been placed; dispatch_unknown means placement is still being confirmed and must not be retried blindly; failed, expired and cancelled are final.

Available options:
preparing,
scheduled,
ready,
dispatching,
dispatched,
failed,
expired,
cancelled,
dispatch_unknown
preparation_status
enum<string>
required

Progress of the pre-call step only. A preparation that fails or runs out of time does not always fail the request - an agent configured to continue with whatever is available still calls, with whatever the preparation produced. declined is a decision rather than a failure - a before-call step refused the call, so nothing is dialled, no call record is created, and the failure policy does not apply.

Available options:
pending,
running,
ready,
failed,
expired,
cancelled,
declined
expires_at
string<date-time>
required

After this moment a request that has not finished is abandoned and no call is placed. A request that already failed keeps status failed and its error_code.

agent_id
string<uuid>

The agent the request was made for. On GET /call-requests/{id}, the browser's poll and a replayed create.

preparation_steps
object[]

On GET /call-requests/{id} (either channel) and the browser's poll. One entry per before-call step the workflow declares, in document order, whatever ran - so a waiting caller can be shown what is running, and a server can see which step failed and what its tool answered. Empty only between accepting the request and freezing the workflow version it runs. Step results are never included.

workflow_revision_id
string<uuid> | null

The published version of the agent frozen for this request.

call_id
string<uuid> | null

Set once a call record exists. Pass it to the call-by-id endpoint.

error_code
string | null

Present only when status is failed or expired. An expired request is always request_expired. On a failed one the preparation's own code wins wherever it recorded one - step_failed when a before-call step failed and its failure setting stops the call (preparation_steps names the step and what its tool answered), before_declined for a refusal, preparation_interrupted when the platform could not finish running the steps (a fault on its side, never a tool's answer; no step is sent twice - create a new request), preparation_unavailable when the steps could not be run at all, promotion_stalled when the agent's latest settings were still not ready 30 s after the request was due (retry shortly) - and where it recorded nothing the value is before_declined for a refusal and request_failed for anything else.

execution
object

Execution history — how the platform carried the call out, beside the conversation itself. Returned on GET /calls/{id} and GET /call-requests/{id} when execution history is enabled for the workspace; absent otherwise. Ask for a page of it with the execution_limit and execution_cursor query parameters.

This is an investigation view, not an authority: it is read-only, it is retained for a limited window, and it never carries the platform's own plumbing.

The members below are the whole of this block. They are written down because the API projects onto exactly this list before the response is written: anything else the platform knows about a call — delivery row ids, internal job and journal counts, storage-retention flags, internal hostnames, its own diagnostic notes — is dropped rather than published, and every URL here is rewritten onto the public API base whatever the platform recorded. A field you do not see below will not appear, and a field you do see will not change shape.

call_status
enum<string>

Only when this cancel ended the request's call while it was still connecting.

Available options:
no_answer
ended_by
enum<string>

Only when this cancel ended the call.

Available options:
caller
ended_at
string<date-time>

When this cancel ended the call. Only when it did.