> ## 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 Delivery

> One delivery: the list's row, plus the body that was sent, the sender's method and
header names, and what the endpoint answered — every configured header value, and the
sender's query values, replaced by `[REDACTED]`. Required scope `calls:read` or `tools:read`. Takes no query
parameters.

An id that is not a delivery in this workspace is `404 DELIVERY_NOT_FOUND`, and a
second path segment that is not an id is `404 RESOURCE_ID_INVALID` — never the list.


One delivery, and what it actually sent and got back. This is where you find out *why* a
delivery failed: which name the booking tool sent, and what your CRM said when it answered
`500`.

Required scope: `calls:read` or `tools:read` — either one, as for
[List Deliveries](https://docs.goyappr.com/api-reference/deliveries/list.md). The two bodies carry call data — the caller,
the numbers, what was collected — so they come back to a key that holds `calls:read`; a key
reading with `tools:read` alone gets everything else, `request.body` and `response.body` as
`null`, and `bodies_withheld: true`. Where it was sent is the tool's own address — for a Make
or Zapier hook its path is the credential — so a key that holds neither `tools:read` nor
`tools:update` gets `scheme://host` only, and `destination_path_withheld: true`.

**Personal data.** Both bodies are personal data. A call's delivery carries the caller's and
called numbers and what was collected; on a campaign call, `call.call_variables` also carries
the contact's name and the other columns of their campaign row. Treat a stored delivery body
the way you treat a call transcript.

```bash theme={null}
curl "https://api.goyappr.com/deliveries/$DELIVERY_ID" \
  -H "Authorization: Bearer $YAPPR_API_KEY"
```

```json theme={null}
{
  "kind": "delivery",
  "id": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7",
  "call_id": "9c1d…",
  "tool_id": "8d93…",
  "agent_id": "a1b2…",
  "at": "2026-09-23T12:47:38.812Z",
  "delivered_at": null,
  "event": "call.ended",
  "source": "live",
  "status": "failed",
  "response_status": 500,
  "attempt_count": 1,
  "error_message": "Webhook returned HTTP 500",
  "error_code": "downstream_http_error",
  "tool_name": "notifyCrm",
  "retry_of": null,
  "retried_by": null,
  "chain_root_id": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7",
  "call_request_id": null,
  "retryable": true,
  "tool_archived": false,
  "test_id": null,
  "bodies_withheld": false,
  "destination_path_withheld": false,
  "request": {
    "destination": "https://crm.example.com/status/500",
    "tool_revision_id": "5e6f…",
    "recorded": true,
    "method": "POST",
    "timeout_ms": 10000,
    "revision": 3,
    "header_names": ["Authorization", "Content-Type", "User-Agent", "X-Client", "X-Webhook-Delivery-Attempt", "X-Webhook-Delivery-Id"],
    "platform_headers": {
      "Content-Type": "application/json",
      "User-Agent": "Yappr-Webhooks/1.0",
      "X-Webhook-Delivery-Attempt": "1",
      "X-Webhook-Delivery-Id": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7"
    },
    "body": { "patient_name": "n/a", "slot": "10:30", "call": { "id": "9c1d…" } }
  },
  "response": {
    "status": 500,
    "body": "{\"error\":\"patient_name is required\"}"
  },
  "retry_target": {
    "destination": "https://crm.example.com/post",
    "tool_revision_id": "7a8b…",
    "changed": true
  },
  "exchange": {
    "id": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7",
    "status": "failed",
    "started_at": "2026-09-23T12:47:38.401Z",
    "duration_ms": 411,
    "request": {
      "method": "POST",
      "url": "https://crm.example.com/status/500?source=yappr",
      "target": null,
      "headers": {
        "authorization": "[REDACTED]",
        "content-type": "application/json",
        "user-agent": "Yappr-Webhooks/1.0",
        "x-client": "[REDACTED]",
        "x-webhook-delivery-attempt": "1",
        "x-webhook-delivery-id": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7"
      },
      "body": { "patient_name": "n/a", "slot": "10:30", "call": { "id": "9c1d…" } },
      "body_format": "json", "body_bytes": 73, "truncated": false
    },
    "response": {
      "status": 500,
      "headers": { "content-type": "application/json", "x-request-id": "r-42" },
      "body": { "error": "patient_name is required" },
      "body_format": "json", "body_bytes": 36, "truncated": false,
      "error": "downstream_http_error", "timed_out": false
    },
    "masked": ["request.headers.authorization", "request.headers.x-client"],
    "details_expired": false
  }
}
```

The object is the [List Deliveries](https://docs.goyappr.com/api-reference/deliveries/list.md) row, field for field —
`retry_of` and `retried_by` included — plus:

| Field | What it is |
| - | - |
| `request.destination` | Where it was sent, when it was sent: `scheme://host/path`, without the query string, fragment or any credentials; `scheme://host` when `destination_path_withheld`. `null` for a delivery made before destinations were recorded (then `request.recorded` is `false`). |
| `request.tool_revision_id` | The workflow tool revision that sent it. `null` for a legacy webhook tool, an agent's own webhook, and deliveries made before destinations were recorded. |
| `request.recorded` | `true` when the delivery recorded what it was sent with. When `false` (an older delivery), `method` and `header_names` are the sender's **current** ones. |
| `request.method`, `request.header_names` | The method and the name of every header it was sent with — the platform's own included, from 1 October 2026 ([which](#the-headers-every-delivery-carries)). A configured header's value is never returned. |
| `request.platform_headers` | The values the platform set on this send, by name — they carry no secret, so they are never withheld: `X-Webhook-Delivery-Id`, `X-Webhook-Retry-Of`, `X-Webhook-Delivery-Attempt`, `X-Webhook-Event`, `X-Webhook-Test`, and `User-Agent` and `Content-Type` unless the sender configured its own (then they are the sender's, and withheld like any configured value). Only the headers in `header_names`; `{}` when `request.recorded` is `false`. |
| `request.revision` | The number of the tool revision that sent it (`tool_revision_id`). `null` when that is `null`. A body's `call.version` is the call package's format version (`"1"`), not this number. |
| `chain_root_id` | The first delivery of this delivery's chain — the `X-Webhook-Delivery-Id` it was sent with, and the id to dedupe on. Its own `id` on a first send. |
| `call_request_id` | The [call request](https://docs.goyappr.com/api-reference/calls/request-get.md) a before-call step's request served; `null` on every other delivery. |
| `tool_archived` | `true` when the tool that sent it is archived: it cannot be retried (`404 WORKFLOW_TOOL_ARCHIVED`) until the tool is [restored](https://docs.goyappr.com/api-reference/tools/restore.md). |
| `request.timeout_ms` | How long the endpoint was given to answer: the limit of the tool revision that sent it, 30,000 for an agent's own webhook, a legacy webhook tool's current setting. `null` when it is not known (a workflow tool's delivery made before revisions were recorded). |
| `test_id` | The [tool test](https://docs.goyappr.com/api-reference/tools/test-get.md) that sent it — a test delivery has an id of its own, so this is the way back. `null` for anything else, and for a retry of a test. |
| `request.body` | The body that was sent, as it was stored when it was sent. A retry re-sends exactly this. For a `GET` tool these fields went as query parameters. |
| `retry_target` | Where [Retry Delivery](https://docs.goyappr.com/api-reference/deliveries/retry.md) would send it **now**: `destination` (same form), `tool_revision_id`, and `changed` — `true` when that is not where this delivery went. `null` when the sender is no longer a webhook with an address. |
| `response.status` | The HTTP status your endpoint answered with; `null` when nothing answered. |
| `response.body` | What your endpoint answered, as text (at most 2,000 characters). `null` when nothing was kept — see below. |
| `retryable` | `true` when [Retry Delivery](https://docs.goyappr.com/api-reference/deliveries/retry.md) would send it: a `failed` delivery your endpoint did not accept, or an `unknown` one (sent again only with `{"acknowledge_unknown": true}`), that has not already been retried (`retried_by` is `null`), whose sender is still a webhook with an address, and whose tool is not archived. Never a delivery your endpoint answered with a 2xx, even one that reads `failed` because the tool could not use the answer — it already acted on it. |
| `exchange` | The delivery's full record, from 21 October 2026: the request exactly as it left — the full `url` with its query, every header sent, the `body` — and the answer — `status`, every header, the `body` — with each secret as `[REDACTED]` and named in `masked`. The same record [Get Call](https://docs.goyappr.com/api-reference/calls/get.md) gives each tool call ([what is hidden](https://docs.goyappr.com/api-reference/calls/get.md#what-each-tool-call-sent-and-got-back)). Kept for 90 days, then `details_expired` is `true` and `request` and `response` are `null`. `null` for a delivery made before records began. Its bodies are `null` when `bodies_withheld`, and its `url` is `scheme://host` when `destination_path_withheld`. |
| `bodies_withheld` | `true` when the key lacks `calls:read`, so both bodies are `null`. |
| `destination_path_withheld` | `true` when the key holds neither `tools:read` nor `tools:update`, so both destinations are `scheme://host`. `retry_target.changed` still compares the whole addresses. |

## Header values never leave the platform

Exactly these are withheld from both bodies, as the sender is configured now:

| What | Where it is replaced by `[REDACTED]` |
| - | - |
| Every configured header value — an `Authorization` token, an API key — and a `Bearer` or `Basic` credential without its scheme | Six characters or more: wherever it appears — as a value, inside a longer string or a number, or in a key. Shorter: only where it is a whole JSON string — the whole body, or a string value in it (`"x-version": "1"` reads `"x-version": "[REDACTED]"`). Never inside other text (`"note": "ab 1 ab"` and `"tok": "abcdef123456"` stay whole beside a header `ab`), never a key, never a number (`"count": 1` stays), and never one of the call fields Yappr writes itself: `version`, `phase`, `channel`, `test`, the ids, numbers and times under `call` stay as sent. `call.call_variables` and `call.call_metadata` hold your values and follow the rule. |
| The address's query string, whole, and each of its values of six characters or more | Wherever it appears (`?tok=…` echoed back reads `"tok": "[REDACTED]"`). |
| Query values shorter than six characters | Never — `v=1` stays, and so does every `1` elsewhere in the bodies. |

The four headers the platform sets itself (`Content-Type`, `X-Webhook-Event`, `X-Webhook-Test`,
`X-Webhook-Delivery-Attempt`) carry no secret and are not withheld, even when you configured one
yourself, and neither are the ids and the `User-Agent` the platform sends (`X-Webhook-Delivery-Id`,
`X-Webhook-Retry-Of`) when an answer echoes them — on a retry as on a first send. So an endpoint that echoes the headers it received back to you cannot put a key on
this page, and a short value never defaces the rest of the answer. A
[tool test](https://docs.goyappr.com/api-reference/tools/test-get.md) withholds your configured values from its output by
the same rule. Its output is a shorter preview than this page, so the two can still differ: the
test leaves out a member whose name looks private (`headers`, `token`, `authorization` and the
like) or contains a configured value, where this page shows that key as `[REDACTED]`; it shows
every address as `[REDACTED_URL]`; and it is cut to a bounded size. An address is returned without its query string, which is where
tokens usually travel. What your endpoint wrote in its answer is shown as it came back, apart
from those — if it echoes its own host or path, that is on the page too.

## The headers every delivery carries

Besides the headers you configured, every request in the delivery log carries these, and so
does the request a workflow agent's tool makes during a live call. A header you configured
under one of these names is replaced, except `Content-Type` and `User-Agent`, where yours wins.

| Header | What it says |
| - | - |
| `X-Webhook-Delivery-Id` | The id of the chain's **first** delivery — `chain_root_id` on this page and on every list row. On a first send it is the delivery's own `id`; a [retry](https://docs.goyappr.com/api-reference/deliveries/retry.md) sends the first delivery's id again, so your endpoint can recognise a resend of a request it may already have acted on, and skip it. A `call.dnc_blocked` event the platform sends again on its own repeats its first delivery's id the same way. **Dedupe on this header.** |
| `X-Webhook-Retry-Of` | On a retry only: the delivery it re-sends — the attempt it retried (its `retry_of`), which on a second retry is the first retry, not the chain's first delivery. |
| `X-Webhook-Delivery-Attempt` | Which send of the request this is, counted across retries: `1` on a first send, `2` on a retry of a delivery sent once (its `attempt_count` reads the same). A legacy webhook or a `call.dnc_blocked` event sent again on its own counts up too. |
| `X-Webhook-Event` | The event — `tool.test` for a test. A workflow step's first send leaves it out: `call.phase` in its body says where in the call it ran. Every retry carries it. |
| `X-Webhook-Test` | `true` on a tool test, first send and retry alike, and on a retry of anything sent on a dashboard test call. A workflow step's first send on a test call leaves it out (its row still reads `source: "test"`). |
| `User-Agent` | `Yappr-Webhooks/1.0`, unless the tool sets its own. |
| `Content-Type` | `application/json`, unless you set one yourself. |

`request.header_names` lists every header a delivery was sent with — these and yours — from
1 October 2026; a delivery sent before then lists the ones you configured, and
`request.platform_headers` has the platform's values. A before-call step's request is in the
log (from 2 October 2026), its `id` the `X-Webhook-Delivery-Id` it was sent with. A workflow
agent's tool called during a live call is not in the delivery log, but its request still carries
these, with an `X-Webhook-Delivery-Id` of its own. A webhook tool of a prompt or flow agent, called
during a live call, is the exception: it sends only the headers you configured — no id, no
attempt, and its HTTP client's own `User-Agent` — so do not rely on these headers to recognise
a repeat of one of those requests.

## When the answer was not kept

`response.body` is `""` when your endpoint answered with an empty body. It is `null` when
nothing answered (a timeout, an unreachable address), when the delivery was made before
answers were stored (September 2026), or when a workflow step's endpoint refused it or answered
with a body the tool could not use — the workflow engine keeps the status of those, not their
text. A workflow step or tool test your endpoint accepted keeps what came back (from 27
September 2026), and a retry always keeps the answer, so retrying is also how you read a
refusal.

## Errors

| Status | Code | When |
| - | - | - |
| 400 | `DELIVERIES_QUERY_INVALID` | A query parameter was sent; this read takes none. |
| 403 | `INSUFFICIENT_SCOPE` | The key holds neither `calls:read` nor `tools:read`. |
| 404 | `DELIVERY_NOT_FOUND` | No delivery with that id in this workspace. |
| 404 | `RESOURCE_ID_INVALID` | The segment after `/deliveries/` is not an id. It never falls through to the list. |
| 503 | `WEBHOOK_DELIVERY_UNAVAILABLE` | The request and response could not be read; try again in a moment. |


## OpenAPI

````yaml GET /deliveries/{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:
  /deliveries/{id}:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - Deliveries
      summary: Get one delivery
      description: >
        One delivery: the list's row, plus the body that was sent, the sender's
        method and

        header names, and what the endpoint answered — every configured header
        value, and the

        sender's query values, replaced by `[REDACTED]`. Required scope
        `calls:read` or `tools:read`. Takes no query

        parameters.


        An id that is not a delivery in this workspace is `404
        DELIVERY_NOT_FOUND`, and a

        second path segment that is not an id is `404 RESOURCE_ID_INVALID` —
        never the list.
      operationId: getDelivery
      responses:
        '200':
          description: The delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryDetail'
        '400':
          description: >-
            `DELIVERIES_QUERY_INVALID` — a query parameter was sent; this read
            takes none.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: '`MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `INSUFFICIENT_SCOPE` — the key holds neither `calls:read` nor
            `tools:read`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`DELIVERY_NOT_FOUND` or `RESOURCE_ID_INVALID`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            `WEBHOOK_DELIVERY_UNAVAILABLE` — the request and response could not
            be read; try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DeliveryDetail:
      description: >
        One delivery, as `GET /deliveries/{id}` and `POST
        /deliveries/{id}/retry` return it:

        the list's row, field for field, plus what it sent and what came back,
        its retry

        link, whether it can be retried, where it went and where a retry would
        go now. Every

        configured header value of the sender is replaced by `[REDACTED]` in
        either body

        before it leaves the database, and so are the sender's query string and
        each of its

        values of six characters or more: a value of six characters or more
        wherever it

        appears (as a value, inside a string, or as a key); a shorter header
        value only where

        it is the whole body or a whole JSON string in it. Query values shorter
        than six

        characters are never withheld. An address is returned without its query
        string, fragment or

        credentials.
      allOf:
        - $ref: '#/components/schemas/Delivery'
        - type: object
          required:
            - retryable
            - request
            - response
            - retry_target
            - exchange
            - bodies_withheld
            - destination_path_withheld
          properties:
            exchange:
              type: object
              nullable: true
              description: >
                The delivery's full record (from 21 October 2026): the request
                exactly as it left (the full URL with its query, every header
                sent, the body) and the answer (status, every header, the body),
                each secret `"[REDACTED]"` and named in `masked`, the same
                record `GET /calls/{id}` gives each tool call. The answer's body
                is what the endpoint returned, at most 2,000 characters for a
                webhook delivery. Kept for 90 days, then `details_expired` is
                true and `request` and `response` are null. Null for a delivery
                made before records began. Bodies are null when
                `bodies_withheld`; the URL is `scheme://host` when
                `destination_path_withheld`.
              properties:
                id:
                  type: string
                status:
                  type: string
                  enum:
                    - succeeded
                    - failed
                    - timeout
                    - unreachable
                    - refused
                    - not_sent
                    - unknown
                started_at:
                  type: string
                  format: date-time
                  nullable: true
                duration_ms:
                  type: integer
                  nullable: true
                request:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/ToolExchangeRequest'
                response:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/ToolExchangeResponse'
                masked:
                  type: array
                  items:
                    type: string
                details_expired:
                  type: boolean
            bodies_withheld:
              type: boolean
              description: >
                True when the key does not hold `calls:read`: the two bodies
                carry call data (the caller, the numbers, what was collected),
                so a key reading the log with `tools:read` alone gets
                `request.body` and `response.body` as null.
            destination_path_withheld:
              type: boolean
              description: >
                True when the key holds neither `tools:read` nor `tools:update`:
                an address is the tool's configuration, and for a Make or Zapier
                hook its path is the credential, so `request.destination` and
                `retry_target.destination` are `scheme://host` only.
            test_id:
              type: string
              format: uuid
              nullable: true
              description: >
                The tool test that sent it (`GET /tools/{id}/tests/{test_id}`):
                a test delivery has an id of its own, so this is the way back.
                Null for anything else, and for a retry of a test.
            retryable:
              type: boolean
              description: >
                True when `POST /deliveries/{id}/retry` would send it: it failed
                (and was not answered with a 2xx) or is `unknown` (sent again
                only with `acknowledge_unknown: true`), it has not already been
                retried (`retried_by` is null), its sender is still a webhook
                with an address, and its tool is not archived.
            tool_archived:
              type: boolean
              description: >
                True when the tool that sent it is archived: it cannot be
                retried (`404 WORKFLOW_TOOL_ARCHIVED`) until the tool is
                restored with `POST /tools/{id}/restore`.
            request:
              type: object
              properties:
                destination:
                  type: string
                  nullable: true
                  description: >
                    Where it was sent, when it was sent — `scheme://host/path`,
                    without the query string, fragment or credentials;
                    `scheme://host` when `destination_path_withheld`. Null for a
                    delivery made before destinations were recorded (then
                    `recorded` is false).
                  example: https://crm.example.com/status/500
                tool_revision_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: >
                    The workflow tool revision that sent it. Null for a legacy
                    webhook tool, an agent's own webhook, and deliveries made
                    before destinations were recorded.
                recorded:
                  type: boolean
                  description: >
                    True when the delivery recorded what it was sent with. When
                    false (an older delivery), `method` and `header_names` are
                    the sender's current ones.
                method:
                  type: string
                  nullable: true
                  description: >-
                    The HTTP method it was sent with (the sender's current one
                    when `recorded` is false).
                  example: POST
                timeout_ms:
                  type: integer
                  nullable: true
                  description: >
                    How long the endpoint was given to answer: the limit of the
                    tool revision that sent it, 30000 for an agent's own
                    webhook, a legacy webhook tool's current setting. Null when
                    not known.
                  example: 10000
                header_names:
                  type: array
                  items:
                    type: string
                  description: >
                    The name of every header it was sent with, the platform's
                    own included - `X-Webhook-Delivery-Id`,
                    `X-Webhook-Delivery-Attempt`, `User-Agent`, and where sent
                    `X-Webhook-Event`, `X-Webhook-Test`, `X-Webhook-Retry-Of`,
                    `Content-Type` (from 1 October 2026; an older delivery lists
                    the configured ones, and the sender's current ones when
                    `recorded` is false). A configured header's value is never
                    returned; the platform's own are, in `platform_headers`.
                platform_headers:
                  type: object
                  additionalProperties:
                    type: string
                  description: >
                    The values the platform set on this send, by header name -
                    they carry no secret: `X-Webhook-Delivery-Id` (the chain's
                    first delivery, `chain_root_id` - dedupe on it),
                    `X-Webhook-Retry-Of` (on a retry, the delivery it re-sent),
                    `X-Webhook-Delivery-Attempt`, `X-Webhook-Event`,
                    `X-Webhook-Test`, and `User-Agent` / `Content-Type` unless
                    the sender configured its own. Only the headers in
                    `header_names`; empty when `recorded` is false.
                  example:
                    X-Webhook-Delivery-Id: 024a8da9-68ed-44f4-9355-b6ee5c7e02a7
                    X-Webhook-Delivery-Attempt: '1'
                    User-Agent: Yappr-Webhooks/1.0
                    Content-Type: application/json
                revision:
                  type: integer
                  nullable: true
                  description: >
                    The number of the tool revision that sent it
                    (`tool_revision_id`). Null when that is null. A body's
                    `call.version` is the call package's format version, not
                    this number.
                body:
                  nullable: true
                  description: >
                    The body that was sent, as stored when it was sent. A retry
                    re-sends exactly this. JSON; for a `GET` sender these fields
                    went as query parameters. Null when `bodies_withheld`.
            response:
              type: object
              properties:
                status:
                  type: integer
                  nullable: true
                  description: >-
                    The HTTP status the endpoint answered with; null when
                    nothing answered.
                body:
                  type: string
                  nullable: true
                  description: >
                    What the endpoint answered, as text, at most 2,000
                    characters; `""` for an empty answer. A workflow step or
                    tool test the endpoint accepted keeps what came back (from
                    27 September 2026). Null when nothing was kept: nothing
                    answered, the delivery was made before the answer was stored
                    (September 2026), or a workflow step's endpoint refused it
                    or answered with a body the tool could not use — the
                    workflow engine keeps the status, not that text. A retry
                    always keeps it. Null too when `bodies_withheld`.
            retry_target:
              type: object
              nullable: true
              description: >
                Where `POST /deliveries/{id}/retry` would send it now — the
                sender's current address, which is not always where this
                delivery went. Null when the sender is no longer a webhook with
                an address.
              properties:
                destination:
                  type: string
                  description: >-
                    The sender's current address, in the same form as
                    `request.destination`.
                  example: https://crm.example.com/post
                tool_revision_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    The workflow tool revision a retry would be sent with. Null
                    for a legacy sender.
                changed:
                  type: boolean
                  description: True when that address is not where this delivery went.
    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
    Delivery:
      type: object
      description: >
        One webhook delivery, as `GET /deliveries` lists it and as a call's own
        timeline

        carries it. The two shapes are the same: this object is the timeline's
        `delivery` row

        (which carries the same `id`, `tool_id`, `agent_id`, `retry_of` and
        `retried_by`) plus

        the `call_id` it happened on and the `source` that says whether it was
        real traffic or

        a rehearsal.
      required:
        - kind
        - id
        - call_id
        - tool_id
        - agent_id
        - at
        - event
        - status
        - source
        - retry_of
        - retried_by
      properties:
        kind:
          type: string
          enum:
            - delivery
          description: >
            Always `delivery`. Carried so a reader parsing a call's timeline and
            a reader paging this list can use one branch, not two.
        id:
          type: string
          format: uuid
        call_id:
          type: string
          format: uuid
          nullable: true
          description: The call this delivery was about. Read it with GET /calls/{id}.
        tool_id:
          type: string
          format: uuid
          nullable: true
          description: >
            The tool whose step sent it — the id `?tool_id=` filters on. Null
            for an agent not yet on the workflow engine, which sends in its own
            name (see `agent_id`).
        agent_id:
          type: string
          format: uuid
          nullable: true
          description: >
            The agent: the one that sent it in its own name, or, for a tool's
            step, the agent whose call it happened on — the id `?agent_id=`
            filters on. Null for a tool test, which happens on no call.
        at:
          type: string
          format: date-time
          description: >-
            When the delivery settled — or, on a `pending` row, when it was
            recorded.
        delivered_at:
          type: string
          format: date-time
          nullable: true
          description: >
            When your endpoint accepted it: the same moment as `at` on a
            `delivered` row, and null on a `failed`, `pending` or `unknown` one,
            where nothing is known to have been delivered. Use `at` for the
            row's time.
        retry_of:
          type: string
          format: uuid
          nullable: true
          description: >-
            The delivery this one re-sent, when it is a retry (`POST
            /deliveries/{id}/retry`).
        retried_by:
          type: string
          format: uuid
          nullable: true
          description: >
            The retry that re-sent this delivery, if one was made. A delivery is
            retried at most once, so a failure with `retried_by` set is refused
            `409 DELIVERY_ALREADY_RETRIED` — skip it, and read (or retry) the
            retry instead.
        chain_root_id:
          type: string
          format: uuid
          nullable: true
          description: >
            The first delivery of the chain this row belongs to — the
            `X-Webhook-Delivery-Id` every send of it carried, and the id your
            endpoint should dedupe on. A first send's own `id`; a retry's
            original (however many retries in); for a `call.dnc_blocked` the
            platform sent again on its own, its first delivery. Null only when
            it could not be read (try again).
        call_request_id:
          type: string
          format: uuid
          nullable: true
          description: >
            The call request (`GET /call-requests/{id}`) a before-call step's
            request served (`event` `call.preparing`, from 2 October 2026). Such
            a send happens before the call exists, so its `call_id` is usually
            null. Null on every other delivery.
        event:
          type: string
          description: >
            The event that triggered it, spelled as the trigger authored it;
            `call.preparing` for a before-call step's request. A rehearsal's
            event can carry a `test:` prefix — branch on `source`, not on the
            spelling.
          example: call.answered
        source:
          type: string
          enum:
            - live
            - test
          description: >
            `live` — sent by real traffic: a real call, or a lead event
            (`lead.created`, `lead.updated`), which can belong to no call and
            then has `call_id: null`. `test` — a rehearsal: sent by `POST
            /tools/{id}/test` (a legacy webhook tool's test, or a workflow
            tool's real test with `policy: allowlist`), which happens on no call
            and so has `call_id: null`, or sent on a test call you placed from
            the dashboard (the agent's Test tab or a test dial — the calls `GET
            /calls` reports as `source: "test"`), a before-call step's request
            on one included.
          example: live
        status:
          type: string
          enum:
            - delivered
            - failed
            - pending
            - unknown
          description: >
            `delivered` — your endpoint accepted it. `failed` — it did not,
            after every attempt (it refused, could not be reached, or — for a
            workflow tool — answered 2xx with a body the tool could not use).
            `pending` — it has not settled yet. `unknown` — a workflow tool's
            request, or a retry, got no answer in time: your endpoint may or may
            not have acted on it.
        response_status:
          type: integer
          nullable: true
          description: >-
            The HTTP status your endpoint answered with. Null when nothing
            answered.
          example: 200
        attempt_count:
          type: integer
          nullable: true
          description: >
            How many times the request has been sent, the one that settled it
            included, counted across retries: a retry of a delivery sent once
            reads 2 (from 1 October 2026; a retry recorded before then reads 1).
            The `X-Webhook-Delivery-Attempt` of its last send.
        error_code:
          type: string
          nullable: true
          enum:
            - http_timeout
            - legacy_http_timeout
            - http_network_error
            - downstream_http_error
            - output_schema_invalid
            - invalid_json_response
            - response_too_large
            - url_resolves_private
            - delivery_failed
            - null
          description: >
            Why it did not land, as a code to branch on: `http_timeout` (no
            answer within the limit; the row is `unknown`, so a retry needs
            `acknowledge_unknown`), `legacy_http_timeout` (the same, from an
            agent's own webhook or a legacy webhook tool, which record it
            `failed` and retry it without asking), `http_network_error`
            (unreachable, or the connection dropped before an answer),
            `downstream_http_error` (it answered with an error; see
            `response_status`), `output_schema_invalid` /
            `invalid_json_response` / `response_too_large` (a workflow tool's
            endpoint answered 2xx with something the tool could not use),
            `url_resolves_private`, or `delivery_failed` for anything else. Null
            on a `delivered` or `pending` row. The same codes a tool test and a
            workflow step use.
          example: http_timeout
        error_message:
          type: string
          nullable: true
          description: >
            One sentence, for a person to read, written only when the delivery
            failed — for example "Webhook did not respond within 30 seconds",
            or, for a workflow tool that answered 2xx without its Outputs,
            "Webhook answered HTTP 200, but not with the tool's outputs
            (missing: booking_id)", which names the Output fields (never a
            value). Wording may change; branch on `status` and `error_code`.
        tool_name:
          type: string
          nullable: true
          description: >
            The name you know the sender by — the tool whose step sent it, or,
            for an agent not yet on the workflow engine, the agent itself.
    ToolExchangeRequest:
      type: object
      description: >
        A request exactly as it left: method, the full URL with its query (a
        URL's user and password removed), every header sent and the body, each
        secret replaced by `"[REDACTED]"`.
      properties:
        method:
          type: string
          nullable: true
          example: POST
        url:
          type: string
          nullable: true
          example: >-
            https://crm.example.com/contacts?api_key=[REDACTED]&phone=%2B972501234567
        target:
          type: string
          nullable: true
          description: >-
            When there is no URL to show: a connected app's `App · Action`, or a
            transfer's destination.
        headers:
          type: object
          additionalProperties:
            type: string
          example:
            Authorization: '[REDACTED]'
            Accept: application/json
        body:
          nullable: true
          description: JSON when `body_format` is `json`, else text.
        body_format:
          type: string
          enum:
            - json
            - text
            - empty
            - binary
        body_bytes:
          type: integer
          nullable: true
          description: The full size in bytes, also when it was cut.
        truncated:
          type: boolean
          description: True when `body` is only the first 16 KB.
    ToolExchangeResponse:
      type: object
      description: >
        The answer exactly as it came back: status, every header and the body
        (16 KB at most), each secret replaced by `"[REDACTED]"`.
      properties:
        status:
          type: integer
          nullable: true
          description: Null when nothing answered.
        headers:
          type: object
          additionalProperties:
            type: string
        body:
          nullable: true
        body_format:
          type: string
          enum:
            - json
            - text
            - empty
            - binary
        body_bytes:
          type: integer
          nullable: true
        truncated:
          type: boolean
        error:
          type: string
          nullable: true
          description: >-
            The code for what went wrong (`downstream_http_error`,
            `http_timeout`, `http_network_error`, `url_resolves_private`). Null
            when it worked.
        timed_out:
          type: boolean
  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.