Skip to main content
POST
Create a browser call request (data plane)
The browser data plane: the mint’s connection.call_requests_url, which @goyappr/client calls when POST /calls with "type": "web" answers protocol: "call_request" - an agent whose workflow runs steps before it answers, or has follow-ups. It is authorized by the session token as x-yappr-web-token (a shared link’s page sends x-share-token), never your secret key.
The session names the agent, its variables and its metadata, so send {}: set variables and metadata on the mint instead. The request is accepted exactly as POST /call-requests accepts one, and nothing is dialled: the browser polls it and starts it once it reads ready. start_capability is returned once and stored only as a hash. Send it as x-yappr-call-request-key on the read, the cancel and the start; it authorizes this one request and nothing else. Hand request_id to your server to read the request with GET /call-requests/{id} and your secret key.

Asking again

The same token asking again gets the same request: a 200 with the request as it is now, replayed: true, the three URLs and no start_capability - the one that works was returned by the first answer. A token that already created a request gets it back however little time the token has left.

Refusals

The lifecycle refusals of POST /call-requests apply too, such as 409 WORKFLOW_AGENT_INACTIVE.

Headers

x-yappr-web-token
string

The session token from POST /calls {"type":"web"}.

Body

application/json

The session names the agent, its variables and its metadata; a token-authorized request sends {}.

Response

This token already created a request - the request as it is now, replayed true and no start_capability, as POST /call-requests answers a repeated key.

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.

request_id
string<uuid>
required
replayed
enum<boolean>
required
Available options:
true
status_url
string<uri>
required
cancel_url
string<uri>
required
start_url
string<uri>
required
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.

type
enum<string>
Available options:
web
accepted_at
string<date-time> | null