> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Call Request

> Requires calls:read. Reads one accepted call request for a workflow agent: an outbound one (the `request_id` POST /calls returned) or a browser one (`channel: "web"`, the `request_id` POST /call-requests or the browser's own POST /web-call/call-requests returned). A `call_request` Web SDK session is read back this way: the page hands your server the `request_id` its call request answered with. The request is the record of everything that happens before a call exists; once `call_id` is set, the call itself is read with GET /calls/{id}.


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`](https://docs.goyappr.com/api-reference/calls/request-create), 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.

```bash theme={null}
curl https://api.goyappr.com/call-requests/REQUEST_ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-company-id: COMPANY_ID"
```

| `status` | What it means |
| - | - |
| `scheduled` | Waiting for the workspace's next calling window. `expires_at` is when it is abandoned. |
| `preparing` | Pre-call work is running. |
| `ready` | Pre-call work finished; the call is waiting for a free line. |
| `dispatching` | A line is held and the call is being placed. |
| `dispatched` | The call was placed. Read it with `GET /calls/{id}` using `call_id`. |
| `dispatch_unknown` | Placement has not been confirmed either way. Do not place the call again — poll until it settles. |
| `failed` | Final. `error_code` says which step failed. |
| `expired` | Final. The request outlived `expires_at` before it finished, and no call was placed. A request that already `failed` stays `failed` after `expires_at` passes. |
| `cancelled` | Final. Cancelled before placement. |

`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](https://docs.goyappr.com/api-reference/workflows/save.md).

`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.

| `error_code` | Meaning |
| - | - |
| `step_failed` | A before-call step failed and its failure setting stops the call. `preparation_steps` (below) names the step and what its tool answered. |
| `before_declined` | A before-call step's outcome routed to refusing the call. |
| `preparation_interrupted` | Yappr could not finish running the before-call steps — a fault on our side, not an answer from your steps' tools. It ends the request at once instead of leaving it `preparing`; no step is sent twice. Create a new request. |
| `preparation_unavailable` | Yappr could not run the before-call steps at all — a fault on our side, never an answer from your steps' tools. The request fails within about two minutes instead of waiting out its deadline. Create a new request. An agent set to continue with whatever information is available places the call instead. |
| `artifact_unavailable` | The published version cannot take this call: its `channels` leave out the channel the request came in on (`phone` or `web`), or the version was published through a different deployment than the one placing the call ([Workflow versions](https://docs.goyappr.com/api-reference/workflows/versions.md)). Nothing was dialled. Publish a version that lists the channel. |
| `promotion_stalled` | The agent's latest settings were saved but were still not ready to take calls 30 seconds after the request was due, so the request failed instead of waiting. Create a new request in a moment. |
| `request_expired` | The request outlived `expires_at`. |
| `request_failed` | The request failed and recorded no more specific reason. |

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.

```json theme={null}
"preparation_steps": [
  { "id": "cart", "label": "Check the cart", "status": "failed", "error_code": "downstream_http_error", "http_status": 404 },
  { "id": "book", "label": "Book", "status": "not_run" }
]
```

A refused call names the step whose route refused it:

```json theme={null}
"preparation_steps": [
  { "id": "lookup", "label": "Look up reservation", "status": "failed", "error_code": "downstream_http_error", "http_status": 500, "refused_call": true },
  { "id": "book", "label": "Book", "status": "skipped" }
]
```

| Field | What it holds |
| - | - |
| `id` | The step's id in the workflow. |
| `label` | The step's name, as its author wrote it. |
| `status` | One of the values below. |
| `error_code` | Only on a step that did not succeed: what its tool answered, in Yappr's own codes — `downstream_http_error` (see `http_status`), `http_timeout`, `http_network_error`, `url_resolves_private`, `output_schema_invalid` and the like. Never the response itself. |
| `http_status` | Only on a step whose address answered. A `4xx` other than `408` and `429` answers the same way on every retry until the tool changes. |
| `refused_call` | `true` only on the step whose route refused the call — the request then reads `failed` with `error_code: "before_declined"`. A step refused on a failure keeps its `error_code` and `http_status` ("Look up reservation got HTTP 500, and its route refuses the call"); one refused on its answer reads `succeeded`. Absent on every other step. |

A step's `status`:

| Status | Meaning |
| - | - |
| `waiting` | Not started yet. |
| `inactive` | It runs only if an earlier step's route chooses it, and none has yet. |
| `running` | Its request has been sent, and it is waiting for the answer. |
| `pending` | Its address accepted the request without a final answer (an HTTP `202`, for example). It is settled as `failed` in a moment: a before-call step needs the answer itself. |
| `unknown` | The request may or may not have reached its address (it timed out, or the connection dropped). It is settled as `failed` in a moment, and never sent twice. |
| `succeeded` | It answered, and its answer was usable. |
| `failed` | It answered with an error, or got no answer. |
| `blocked` | It could not be sent, or its answer was not usable. |
| `skipped` | It was not run and never will be: its condition said no, no route chose it, a step it depends on was skipped, or an earlier step stopped the preparation. |
| `not_run` | The preparation ended (it failed, was cancelled or ran out of time) before this step ran. |
| `cancelled` | The request was cancelled while this step was running. Its request may have reached its address; whatever it answered is not used. |

`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](https://docs.goyappr.com/api-reference/calls/get.md#execution-history), 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.


## OpenAPI

````yaml GET /call-requests/{id}
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /call-requests/{id}:
    get:
      tags:
        - Calls
      summary: Get call request
      description: >
        Requires calls:read. Reads one accepted call request for a workflow
        agent: an outbound one (the `request_id` POST /calls returned) or a
        browser one (`channel: "web"`, the `request_id` POST /call-requests or
        the browser's own POST /web-call/call-requests returned). A
        `call_request` Web SDK session is read back this way: the page hands
        your server the `request_id` its call request answered with. The request
        is the record of everything that happens before a call exists; once
        `call_id` is set, the call itself is read with GET /calls/{id}.
      operationId: getCallRequest
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/ExecutionLimit'
        - $ref: '#/components/parameters/ExecutionCursor'
        - $ref: '#/components/parameters/ExecutionPhase'
        - $ref: '#/components/parameters/ExecutionKind'
        - $ref: '#/components/parameters/ExecutionStatus'
      responses:
        '200':
          description: Current state of the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallRequest'
        '400':
          description: >-
            CALLS_QUERY_INVALID — a query parameter other than the five
            execution-history ones, or one of them sent twice or with no value;
            the message names it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            MISSING_KEY, INVALID_KEY or EXPIRED_KEY - the key was not accepted.
            A valid key without the scope this operation needs is 403
            INSUFFICIENT_SCOPE, naming the scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            WORKFLOW_REQUEST_NOT_FOUND — no such request in this workspace. An
            id that is not an id at all is RESOURCE_ID_INVALID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Use GET here; cancellation has its own path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: >-
            EXECUTION_RETENTION_EXPIRED — the `execution_cursor` points at
            history that is no longer retained. Read again without it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            EXECUTION_CURSOR_INVALID — an `execution_cursor` this read did not
            issue or that was sent with other filters, or an `execution_limit`
            or filter value the history does not have. Follow
            `execution.history.next_url` rather than building one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            WORKFLOW_ADMISSION_UNAVAILABLE — temporary; retry the same request.
            EXECUTION_READ_UNAVAILABLE — execution history was asked for and
            could not be read; retry the same request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ExecutionLimit:
      in: query
      name: execution_limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
      description: >-
        How many execution-history rows one page holds. Only read when the
        `execution` block is returned.
    ExecutionCursor:
      in: query
      name: execution_cursor
      required: false
      schema:
        type: string
      description: >
        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`.
    ExecutionPhase:
      in: query
      name: execution_phase
      required: false
      schema:
        type: string
        enum:
          - before
          - during
          - after
          - platform
      description: Only execution-history rows from this phase of the call.
    ExecutionKind:
      in: query
      name: execution_kind
      required: false
      schema:
        type: string
        enum:
          - execution
          - request
          - physical_call
          - phase
          - action
          - attempt
          - receipt
          - sequence
          - control
          - producer
          - readiness
          - legacy_webhook
          - dnc_webhook
          - lead_stage
          - recovery
      description: Only execution-history rows of this kind.
    ExecutionStatus:
      in: query
      name: execution_status
      required: false
      schema:
        type: string
        enum:
          - waiting
          - running
          - succeeded
          - failed
          - pending_external
          - unknown
          - skipped
          - cancelled
          - validation_blocked
      description: >
        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).
  schemas:
    CallRequest:
      type: object
      description: >
        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.
      required:
        - id
        - run_id
        - channel
        - status
        - preparation_status
        - expires_at
      properties:
        id:
          type: string
          format: uuid
        run_id:
          type: string
          format: uuid
          description: Shared lifecycle identity. It does not grant access to call history.
        agent_id:
          type: string
          format: uuid
          description: >-
            The agent the request was made for. On GET /call-requests/{id}, the
            browser's poll and a replayed create.
        channel:
          type: string
          enum:
            - phone
            - web
          description: >
            `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.
        preparation_steps:
          type: array
          description: >
            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.
          items:
            type: object
            required:
              - id
              - label
              - status
            properties:
              id:
                type: string
              label:
                type: string
                description: The author's own name for the step.
              status:
                type: string
                enum:
                  - waiting
                  - inactive
                  - running
                  - pending
                  - unknown
                  - succeeded
                  - failed
                  - blocked
                  - skipped
                  - not_run
                  - cancelled
                description: >
                  waiting (not started yet); inactive (it runs only if an
                  earlier step's route chooses it, and none has yet); running
                  (sent, waiting for the answer); pending (its address accepted
                  the request without a final answer, such as an HTTP 202 -
                  settled as failed in a moment); unknown (the request may or
                  may not have reached its address - a timeout or a dropped
                  connection - settled as failed in a moment, never sent twice);
                  succeeded; failed; blocked (not sent, or its answer was not
                  usable); skipped (its condition said no, no route chose it, a
                  step it depends on was skipped, or an earlier step stopped the
                  preparation); or not_run - the preparation ended (failed,
                  cancelled or ran out of time) before this step ran; or
                  cancelled - the request was cancelled while this step was
                  running, and whatever it answered is not used. 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; a step a cancel overtook
                  reads cancelled, never running), except one that ended
                  preparation_interrupted: the step it was running keeps the
                  status it had.
              error_code:
                type: string
                description: >
                  Only on a step that did not succeed: what its tool answered,
                  in the platform's own codes - `downstream_http_error` (the
                  address answered an HTTP error; see `http_status`),
                  `http_timeout`, `http_network_error`, `url_resolves_private`,
                  `output_schema_invalid` and the like. Never the response
                  itself.
              http_status:
                type: integer
                description: >
                  Only on a step whose address answered: its HTTP status. A 4xx
                  other than 408 and 429 answers the same way on every retry
                  until the tool changes.
              refused_call:
                type: boolean
                description: >
                  true only on the step whose route refused the call (the
                  request reads failed with error_code before_declined). A step
                  refused on a failure keeps its error_code and http_status; one
                  refused on its answer reads succeeded. Absent on every other
                  step.
        status:
          type: string
          enum:
            - preparing
            - scheduled
            - ready
            - dispatching
            - dispatched
            - failed
            - expired
            - cancelled
            - dispatch_unknown
          description: >
            `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.
        preparation_status:
          type: string
          enum:
            - pending
            - running
            - ready
            - failed
            - expired
            - cancelled
            - declined
          description: >
            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.
        workflow_revision_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The published version of the agent frozen for this request.
        call_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Set once a call record exists. Pass it to the call-by-id endpoint.
        expires_at:
          type: string
          format: date-time
          description: >-
            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.
        error_code:
          type:
            - string
            - 'null'
          description: >
            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:
          $ref: '#/components/schemas/CallExecution'
    Error:
      type: object
      required:
        - error
        - code
      description: >
        Every error response - the secret-key API and the browser data plane
        alike - carries a

        human-readable `error` and a stable machine `code`, and a refusal that
        names what is

        wrong with the request carries `issues[]` too. Branch on `code`, never
        on the `error`

        text. A refusal that names nothing more specific carries the code its
        status means:

        `BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the
        secret-key API

        answers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR`
        (402),

        `FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405),
        `CONFLICT` (409),

        `GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),

        `UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR`
        (500),

        `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT`
        (504). Some

        refusals add members of their own beside these (a call request's
        `status`, a workflow's

        `current_version`); the operation says which.
      properties:
        error:
          type: string
          description: The refusal, in one sentence for a person. Its wording may change.
        code:
          type: string
          description: The stable code to branch on.
        issues:
          type: array
          description: >
            Each thing at fault, on a 400 or 422 that names them: every query
            parameter or body field, not just the first. `path` is the
            parameter's name or the field's location.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: >-
                  query_param_unknown, query_param_repeated, query_param_blank,
                  query_param_invalid, field_unknown, field_required,
                  field_invalid, or the route's own word.
              path:
                type: string
              message:
                type: string
    CallExecution:
      type: object
      additionalProperties: false
      description: >
        **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.
      properties:
        version:
          type: string
          const: execution-visibility-v1
        audience:
          type: string
          const: company
          description: >-
            Whose view this is. A company-authorized read is the only one this
            API returns.
        subject:
          type: string
          enum:
            - call
            - tool_test
        run_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Shared lifecycle identity of the request and the call it became.
        request_id:
          type:
            - string
            - 'null'
          format: uuid
        call_id:
          type:
            - string
            - 'null'
          format: uuid
        tool_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Tool tests only.
        test_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Tool tests only.
        workflow_revision_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The published version of the agent this run was frozen on.
        strict:
          type:
            - boolean
            - 'null'
          description: Whether the run was admitted under the agent's strict setting.
        owner:
          type: string
          enum:
            - workflow
            - legacy
          description: >-
            Which authoring model owns the run - `workflow` for a workflow
            agent; `legacy` for a call of an agent that runs no workflow (a
            prompt agent, and every call from before workflows), whose history
            is what the call itself recorded (history.coverage
            legacy_best_effort). Such a call reads execution_status included,
            not none.
        channel:
          type:
            - string
            - 'null'
          enum:
            - phone
            - web
            - null
        direction:
          type:
            - string
            - 'null'
          enum:
            - inbound
            - outbound
            - web
            - null
        refresh_after_ms:
          type:
            - integer
            - 'null'
          description: >-
            How long to wait before asking again while work is still running. On
            GET /calls/{id}, null once the call has settled (summary.is_settled
            true): nothing on it will change.
        supplementary:
          type: string
          enum:
            - complete
            - partial
            - not_loaded
          description: >-
            Whether the conversation-side records beside this block were loaded
            for this response.
        supplementary_errors:
          type: array
          description: >-
            Reason codes for anything the read beside this block could not load.
            Empty when `supplementary` is `complete`.
          items:
            type: string
        links:
          type: object
          additionalProperties: false
          description: >
            Public API URLs for the related records, and the only three link
            members there are. Each one is rewritten onto this API's own base
            before it is published.
          properties:
            request:
              type: string
              format: uri
            call_detail:
              type: string
              format: uri
            tool_test:
              type: string
              format: uri
        summary:
          type: object
          additionalProperties: false
          description: Where the call got to, rolled up.
          properties:
            revision:
              type: string
              description: >-
                Monotonic revision of this snapshot, as a string so a large
                value survives JavaScript.
            as_of:
              type: string
              format: date-time
            run_status:
              type:
                - string
                - 'null'
              enum:
                - accepted
                - materialized
                - cancelled
                - failed
                - completed
                - null
              description: >
                Where the call's run is. `materialized` while its window is open
                - a call's follow-ups can still start until the window closes,
                which is hours after the call is accepted - and `completed` once
                the window has closed and every phase of the run, its post-call
                jobs and its call attempts have ended. A follow-up that failed
                does not make the run `failed`: read that on the follow-up's own
                row. `failed` and `cancelled` mean the call was refused,
                abandoned or cancelled before it ran.
            call_state:
              type: string
            physical_end_observed:
              type:
                - boolean
                - 'null'
              description: >-
                Whether the carrier confirmed the line was down, rather than the
                platform inferring it.
            follow_up_state:
              type: string
              enum:
                - not_started
                - running
                - succeeded
                - failed
                - unknown
                - cancelled
                - unavailable
              description: >-
                On GET /calls/{id}, one word for the call's follow_ups member
                and its trigger timeline rows together: failed, running,
                not_started (follow_ups waiting), cancelled (follow_ups
                skipped), unknown, succeeded - the first that fits. unavailable
                when nothing ran and nothing is explained, and on a call request
                (read the call).
            settlement:
              type: string
              enum:
                - unsettled
                - settled
                - unavailable
            is_settled:
              type:
                - boolean
                - 'null'
              description: >
                On GET /calls/{id}, true (with settlement `settled`) once the
                call has ended, its analysis and cost are final, and nothing of
                its own is still running, waiting or due; a browser session that
                ended before anyone connected reads the same. Stop polling then.
                Null while that cannot be said yet.
            settlement_reasons:
              type: array
              description: Reason codes for an unsettled call.
              items:
                type: string
            counts:
              type: object
              additionalProperties: false
              description: >
                Counts by phase and then by status, for the customer's own work
                only - `invocations` (steps the agent ran) and `attempts` (tries
                those took). Internal platform job and journal counts are not
                included. Phase and status keys are lowercase identifiers and
                the values are whole numbers; a bucket holding no counts is
                omitted rather than sent empty.
              properties:
                invocations:
                  type: object
                  propertyNames:
                    pattern: ^[a-z][a-z_]{0,39}$
                  additionalProperties:
                    type: object
                    propertyNames:
                      pattern: ^[a-z][a-z_]{0,39}$
                    additionalProperties:
                      type: integer
                attempts:
                  type: object
                  propertyNames:
                    pattern: ^[a-z][a-z_]{0,39}$
                  additionalProperties:
                    type: object
                    propertyNames:
                      pattern: ^[a-z][a-z_]{0,39}$
                    additionalProperties:
                      type: integer
            active_work:
              type: array
              description: Work still running or waiting at the moment of this snapshot.
              items:
                type: object
                additionalProperties: false
                properties:
                  id:
                    type: string
                    format: uuid
                  phase:
                    type: string
                    enum:
                      - before
                      - during
                      - after
                      - platform
                  kind:
                    type: string
                  status:
                    type: string
                  reason_code:
                    type:
                      - string
                      - 'null'
                  deadline_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
            active_work_truncated:
              type: boolean
              description: True when more work was running than this list shows.
            latest_problem:
              type:
                - object
                - 'null'
              additionalProperties: false
              description: >-
                The most recent piece of work that failed or was blocked, in the
                same shape as active_work.
              properties:
                id:
                  type: string
                  format: uuid
                phase:
                  type: string
                  enum:
                    - before
                    - during
                    - after
                    - platform
                kind:
                  type: string
                status:
                  type: string
                reason_code:
                  type:
                    - string
                    - 'null'
                deadline_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
            next_deadline_at:
              type:
                - string
                - 'null'
              format: date-time
            artifacts:
              type: array
              description: >-
                Readiness of each thing the call produces - recording,
                transcript, analysis, lead, billing.
              items:
                type: object
                additionalProperties: false
                properties:
                  artifact:
                    type: string
                    enum:
                      - recording
                      - transcript
                      - analysis
                      - lead
                      - billing
                  status:
                    type: string
                    enum:
                      - pending
                      - running
                      - succeeded
                      - empty
                      - skipped
                      - failed
                      - not_expected
                      - unavailable
                  version:
                    type: integer
                  output_revision:
                    type: integer
                  attempts:
                    type: integer
                  deadline_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  reason_code:
                    type:
                      - string
                      - 'null'
                    description: >
                      Why the artifact is not `succeeded`. On `GET /calls/{id}`
                      the `analysis` entry agrees with the call's `analysis`
                      member: a pass that left no summary reads `failed` /
                      `no_summary` here too. A `lead` entry that reads `skipped`
                      names why: `web_call_no_phone` (a browser rehearsal has no
                      caller's number), `transcript_too_short` (fewer than two
                      turns) or `no_phone_number`.
        history:
          type: object
          additionalProperties: false
          description: The page of history you were given, and how to get the next one.
          properties:
            high_water_mark:
              type: string
              description: Furthest journal position this snapshot covers, as a string.
            retained_from_sequence:
              type: string
              description: Earliest position still retained, as a string.
            coverage:
              type: string
              enum:
                - canonical
                - legacy_best_effort
            coverage_started_at:
              type:
                - string
                - 'null'
              format: date-time
            complete:
              type: boolean
              description: >-
                True when this page is the whole history: on GET /calls/{id}, a
                settled call with no next_url and nothing expired.
            gaps:
              type: array
              description: >-
                Why this page may not be the whole history. Empty when complete
                is true.
              items:
                type: string
            retained_until:
              type:
                - string
                - 'null'
              format: date-time
            filters:
              type: object
              additionalProperties: false
              description: The filters this page was read under, echoed back.
              properties:
                phase:
                  type:
                    - string
                    - 'null'
                  enum:
                    - before
                    - during
                    - after
                    - platform
                    - null
                kind:
                  type:
                    - string
                    - 'null'
                status:
                  type:
                    - string
                    - 'null'
            limit:
              type: integer
            next_url:
              type:
                - string
                - 'null'
              format: uri
              description: Next page, on the public API base. Null on the last page.
            refresh_url:
              type: string
              format: uri
              description: This same page again, on the public API base.
        items:
          type: array
          description: >
            The time-ordered rows themselves - one per step, attempt, phase
            boundary or platform event the call produced. `sequence` is a string
            so a large journal position survives JavaScript. `input` and
            `output` are bounded, redacted previews of the customer's own
            evidence, never raw credentials.
          items:
            type: object
            additionalProperties: false
            properties:
              id:
                type: string
                format: uuid
              sequence:
                type: string
                description: >-
                  Journal position, as a string so a large value survives
                  JavaScript.
              phase:
                type: string
                enum:
                  - before
                  - during
                  - after
                  - platform
              kind:
                type: string
              event:
                type: string
              status:
                type:
                  - string
                  - 'null'
              call_id:
                type:
                  - string
                  - 'null'
                format: uuid
              request_id:
                type:
                  - string
                  - 'null'
                format: uuid
              phase_id:
                type:
                  - string
                  - 'null'
                format: uuid
              invocation_id:
                type:
                  - string
                  - 'null'
                format: uuid
              attempt_id:
                type:
                  - string
                  - 'null'
                format: uuid
              receipt_id:
                type:
                  - string
                  - 'null'
                format: uuid
              attempt_number:
                type:
                  - integer
                  - 'null'
              outer_run:
                type:
                  - integer
                  - 'null'
              inner_attempt:
                type:
                  - integer
                  - 'null'
              reason_code:
                type:
                  - string
                  - 'null'
              late:
                type: boolean
                description: >-
                  True when the row arrived after the page it belongs to was
                  already read.
              selected:
                type:
                  - boolean
                  - 'null'
              should_execute:
                type:
                  - boolean
                  - 'null'
              edges_truncated:
                type: boolean
              action:
                type:
                  - object
                  - 'null'
                additionalProperties: false
                description: The step this row is about, where it is one.
                properties:
                  name:
                    type: string
                  type:
                    type: string
                    enum:
                      - http
                      - app
                      - sequence
                      - end_call
                      - transfer
                      - platform
                  binding_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  activation:
                    type:
                      - string
                      - 'null'
                  tool_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  tool_revision_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  schema_version:
                    type:
                      - string
                      - 'null'
                  adapter_version:
                    type:
                      - string
                      - 'null'
                  compatibility_version:
                    type:
                      - string
                      - 'null'
                  connection_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  connection_label:
                    type:
                      - string
                      - 'null'
                  connection_generation:
                    type:
                      - integer
                      - 'null'
              field_errors:
                type: array
                description: Validation failures, by path into the step's own input.
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    path:
                      type: string
                    code:
                      type: string
              edges:
                type: array
                description: >
                  Links to other rows of this same block. Only edges pointing at
                  something you can read here are included - an invocation, a
                  phase, or an artifact.
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    relation:
                      type: string
                      enum:
                        - parent
                        - depends_on
                        - triggered_by
                        - replay_of
                        - receipt_for
                    kind:
                      type: string
                      enum:
                        - invocation
                        - phase
                        - artifact
                    id:
                      type: string
                      format: uuid
              timing:
                type: object
                additionalProperties: false
                properties:
                  occurred_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  recorded_at:
                    type: string
                    format: date-time
                  queued_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  claimed_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  dispatched_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: When the request actually left, never a claim timestamp.
                  completed_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  queue_ms:
                    type:
                      - integer
                      - 'null'
                  validation_ms:
                    type:
                      - integer
                      - 'null'
                  network_ms:
                    type:
                      - integer
                      - 'null'
                  total_ms:
                    type:
                      - integer
                      - 'null'
                  audio_offset_ms:
                    type:
                      - integer
                      - 'null'
                    description: Where in the recording this happened, where that is known.
                  audio_clock_id:
                    type:
                      - string
                      - 'null'
              retry:
                type: object
                additionalProperties: false
                properties:
                  eligibility:
                    type: string
                    enum:
                      - not_eligible
                      - automatic
                      - manual
                      - unknown
                  reason_code:
                    type:
                      - string
                      - 'null'
                  next_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  automatic_recovery_stopped:
                    type: boolean
              input:
                type: object
                additionalProperties: false
                description: Bounded, redacted preview of what went into the step.
                properties:
                  value:
                    description: >-
                      The preview itself - any JSON, exactly as the platform
                      recorded it, or null when there is none.
                  availability:
                    type: string
                    enum:
                      - available
                      - not_applicable
                      - unavailable
                  unavailable_reason:
                    type:
                      - string
                      - 'null'
                  redacted:
                    type: boolean
                  truncated:
                    type: boolean
                  omitted:
                    type: array
                    description: What was left out of the preview, and why.
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        path:
                          type: string
                        reason:
                          type: string
                          enum:
                            - configured_sensitive
                            - credential
                            - private_reference
                            - diagnostic
                            - secret_value
                            - url
                            - depth_limit
                            - byte_limit
                            - node_limit
                            - item_limit
                            - string_limit
                            - unavailable
                  omitted_metadata_truncated:
                    type: boolean
                  expanded:
                    type: boolean
              output:
                type: object
                additionalProperties: false
                description: Bounded, redacted preview of what the step returned.
                properties:
                  value:
                    description: >-
                      The preview itself - any JSON, exactly as the platform
                      recorded it, or null when there is none.
                  availability:
                    type: string
                    enum:
                      - available
                      - not_applicable
                      - unavailable
                  unavailable_reason:
                    type:
                      - string
                      - 'null'
                  redacted:
                    type: boolean
                  truncated:
                    type: boolean
                  omitted:
                    type: array
                    description: What was left out of the preview, and why.
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        path:
                          type: string
                        reason:
                          type: string
                          enum:
                            - configured_sensitive
                            - credential
                            - private_reference
                            - diagnostic
                            - secret_value
                            - url
                            - depth_limit
                            - byte_limit
                            - node_limit
                            - item_limit
                            - string_limit
                            - unavailable
                  omitted_metadata_truncated:
                    type: boolean
                  expanded:
                    type: boolean
              expansion_url:
                type:
                  - string
                  - 'null'
                format: uri
                description: >-
                  This row on its own, with fuller previews. On the public API
                  base.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        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`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.