Skip to main content
GET
Get call request
Requires calls:read. An outbound call on a workflow agent is accepted first and placed afterwards, so POST /calls answers 202 with a request_id rather than a call. This endpoint is how you follow that request until a call exists. It reads a browser call request too (channel: "web"): one you created with POST /call-requests, and one a page created with a Web SDK session’s token — a mint that answered protocol: "call_request", whose call_id is null. That page’s call request answered with a request_id; pass it to your server and read the session here. A rehearsal whose before-call steps failed reads status: "failed" with its error_code, and the dashboard’s own rehearsals of that kind are also written to Call Logs as a preparation_failed call.
preparation_status (pending, running, ready, failed, expired, cancelled, declined) tracks the pre-call step on its own. A preparation that fails or runs out of time does not always fail the request: an agent configured to continue with whatever information is available still places the call, with whatever the preparation did produce. declined is different. It means a before-call step refused the call itself, which is a decision rather than a failure — the call is never dialled, no call record is created, and the failure policy does not apply. The request ends failed with error_code: "before_declined". See Refusing a call before it starts. error_code is set only on a final failed or expired. An expired request is always request_expired. On a failed one the preparation’s own code wins wherever it recorded one — a refusal records before_declined — and where it recorded nothing the value is before_declined for a refusal and request_failed for anything else. A preparation that stopped for a reason of its own (a step’s input could not be built, the steps ran out of time) reads that code instead, in the same lowercase form.

Before-call steps

The read carries preparation_steps: one entry per before-call step the agent’s workflow declares, in the order they are written, for a phone request and a browser request alike — the same array the browser’s own poll reads. Step results are never included.
A refused call names the step whose route refused it:
A step’s status: waiting, inactive, running, pending and unknown are seen while the request is preparing. A finished preparation reads succeeded, failed, blocked, skipped, not_run and cancelled — an inactive step it never reached reads not_run, and a step a cancel overtook reads cancelled, never running — with one exception: one that ended preparation_interrupted leaves the step it was running with the status it had. The array is empty only for the moment between accepting a request and freezing the workflow version it runs. agent_id is the agent the request was made for. call_id is null until a call record exists. workflow_revision_id is the published version of the agent frozen for this request, so a version published later never changes a call already accepted. A request that dies before anything is dialled publishes no call event, because there is no call. It publishes request.failed instead, which a follow-up in the workflow’s After phase can trigger on — the only way to run work for a request that never became a call.

Execution history

When execution history is enabled for your workspace, the request carries the same execution block a call does — the pre-call work, step by step, which is usually what you want when a request is stuck in preparing or ended failed. Page it with execution_limit and execution.history.next_url, and narrow it with execution_phase, execution_kind or execution_status — the same five query parameters as Get call, and the only ones this read takes. Anything else is 400 CALLS_QUERY_INVALID, naming it; a cursor this read did not issue is 422 EXECUTION_CURSOR_INVALID, and one older than the retained history 410 EXECUTION_RETENTION_EXPIRED. Sent without any of the five, the read never fails on the history: one that cannot be read at that moment is left out, and the request comes back without an execution member. It is an investigation view: bounded, retained for a limited window, and projected onto the members CallExecution documents — the API copies those and drops everything else, so delivery-row ids, internal job and journal counters, retention flags and our own diagnostic notes are not in it, and every URL in it points at https://api.goyappr.com. Sequence and revision values are strings so a large journal position survives JavaScript intact.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Query Parameters

execution_limit
integer
default:50

How many execution-history rows one page holds. Only read when the execution block is returned.

Required range: 1 <= x <= 200
execution_cursor
string

The next page of execution history. Do not build it: follow execution.history.next_url (or refresh_url), which carries it with the limit and filters it was issued for. A cursor this read did not issue, or sent with different filters, is 422 EXECUTION_CURSOR_INVALID; one older than the retained history is 410 EXECUTION_RETENTION_EXPIRED.

execution_phase
enum<string>

Only execution-history rows from this phase of the call.

Available options:
before,
during,
after,
platform
execution_kind
enum<string>

Only execution-history rows of this kind.

Available options:
execution,
request,
physical_call,
phase,
action,
attempt,
receipt,
sequence,
control,
producer,
readiness,
legacy_webhook,
dnc_webhook,
lead_stage,
recovery
execution_status
enum<string>

Only execution-history rows in this status - a filter on the rows of execution.history. Not the response member of the same name, which says what execution is on the read (included, omitted, pending or none).

Available options:
waiting,
running,
succeeded,
failed,
pending_external,
unknown,
skipped,
cancelled,
validation_blocked

Response

Current state of the request.

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.