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

# Retry Delivery

> Sends a failed delivery again, once, and answers with the new attempt. Required scope
`tools:update` — the scope that already sends a tool's request on demand
(`POST /tools/{id}/test`).

**What is sent.** The body stored with the delivery — exactly what the original
attempt sent — to where the sender points **now**: its current URL, method, headers
and timeout. Fix the endpoint or the tool's address, then retry. One attempt, no
automatic retries. A retried tool test is still a test (`X-Webhook-Test: true`), and
so is a retry of a delivery made on a dashboard test call.
It carries `X-Webhook-Delivery-Id` with the chain's first delivery id (the same on
every retry of it), `X-Webhook-Retry-Of` with the delivery it re-sends, and
`X-Webhook-Delivery-Attempt` counted across them - a retry of a delivery sent once is
attempt 2, and its `attempt_count` reads 2.
`GET /deliveries/{id}` says beforehand where a retry would go (`retry_target`) and
whether that differs from where the delivery went (`request.destination`); the new
delivery records the address and the tool revision it was sent with.

**Linked, and once.** The retry is a new delivery with `retry_of` set to this one, and
this one's `retried_by` points at it. A delivery is retried at most once — a second
request, even one racing the first, is `409 DELIVERY_ALREADY_RETRIED` and sends
nothing. If the retry fails too, retry the retry.

**Only what failed.** An accepted delivery would be delivered twice, so it is refused
(`409 DELIVERY_NOT_RETRYABLE`) — including a workflow tool's delivery the endpoint
answered with a 2xx the tool could not use — as is one still pending. A sender that is
gone, is not a webhook, or has no usable address is `409 DELIVERY_SENDER_UNAVAILABLE`,
and a delivery whose tool is archived is `404 WORKFLOW_TOOL_ARCHIVED` (the status a test
of an archived tool answers) until the tool is restored (`POST /tools/{id}/restore`).

**Not blindly what nobody knows.** An `unknown` delivery got no answer in time, so the
endpoint may already have acted on it. It is sent again only with
`{"acknowledge_unknown": true}`; without it, `409 DELIVERY_OUTCOME_UNKNOWN` and nothing
is sent. A retry that gets no answer in time reads `unknown` itself.


Send a failed delivery again, once, and get the new attempt back — or one nobody knows landed,
once you have checked. Fix your endpoint (or the
tool's address), then retry the deliveries it refused — no new test, no copy-paste.

A retry goes to where the tool points **now**, which is not always where the delivery went.
Read [Get Delivery](https://docs.goyappr.com/api-reference/deliveries/get.md) first: `request.destination` is where it
went, `retry_target.destination` is where a retry will go, and `retry_target.changed` says
whether they differ.

Required scope: `tools:update` — the scope that already sends a tool's request on demand
([Test Tool](https://docs.goyappr.com/api-reference/tools/test.md)). No new scope, so a key that can test a tool can
retry its deliveries.

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

The body is optional: none, `{}`, or `{"acknowledge_unknown": true}`.

| Field | Type | What it does |
| - | - | - |
| `acknowledge_unknown` | boolean | Send an `unknown` delivery again. Its request got no answer in time, so your endpoint may already have acted on it, and a retry can make it act twice. Without it, an `unknown` delivery answers `409 DELIVERY_OUTCOME_UNKNOWN` and nothing is sent. It changes nothing for a `failed` delivery. |

```bash theme={null}
curl -X POST "https://api.goyappr.com/deliveries/$DELIVERY_ID/retry" \
  -H "Authorization: Bearer $YAPPR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"acknowledge_unknown": true}'
```

`201` with the new delivery, in the shape [Get Delivery](https://docs.goyappr.com/api-reference/deliveries/get.md)
returns (its bodies too only if the key also holds `calls:read`). Its `status` says whether
your endpoint accepted it this time — `unknown` again if it did not answer in time:

```json theme={null}
{
  "kind": "delivery",
  "id": "0b0b0b0b-68ed-44f4-9355-b6ee5c7e02a7",
  "event": "call.ended",
  "status": "delivered",
  "response_status": 200,
  "attempt_count": 2,
  "retry_of": "024a8da9-68ed-44f4-9355-b6ee5c7e02a7",
  "retried_by": null,
  "retryable": false,
  "bodies_withheld": false,
  "destination_path_withheld": false,
  "request": { "destination": "https://crm.example.com/post", "tool_revision_id": "7a8b…", "recorded": true,
    "method": "POST", "header_names": ["Authorization", "Content-Type", "User-Agent", "X-Webhook-Delivery-Attempt",
      "X-Webhook-Delivery-Id", "X-Webhook-Event", "X-Webhook-Retry-Of"], "body": { "patient_name": "n/a" } },
  "response": { "status": 200, "body": "{\"ok\":true}" },
  "retry_target": { "destination": "https://crm.example.com/post", "tool_revision_id": "7a8b…", "changed": false }
}
```

## What is sent

* **The body the delivery stored** — exactly what the original attempt sent, not rebuilt.
* **To where the sender points now** — the tool's current URL, method, headers and timeout
  (or, for an agent not yet on the workflow engine, the agent's webhook). The new delivery
  records that address and the tool revision it was sent with, so the original and the retry
  each say where they went.
* **What this means for your agents.** Editing a tool makes a new revision. A retry uses it
  at once. An agent's step moves to it too, once the change is promoted, when the step
  follows the tool's current revision — the default; a step pinned to an older revision keeps sending there until you change it.
  [List Tool Bindings](https://docs.goyappr.com/api-reference/tools/bindings.md) shows which agents follow and which are
  pinned.
* **Named as a resend.** It carries `X-Webhook-Delivery-Id` with the **first** delivery's id
  (the same on every retry of it), `X-Webhook-Retry-Of` with the one you retried, and
  `X-Webhook-Delivery-Attempt` counted across them: a retry of a delivery sent once is attempt
  `2`, and its `attempt_count` reads `2`. An endpoint that keys on `X-Webhook-Delivery-Id` can
  skip a request it already acted on; the retry's `chain_root_id` is that id.
  [Get Delivery](https://docs.goyappr.com/api-reference/deliveries/get.md#the-headers-every-delivery-carries) lists every
  header, and shows the values the platform sent (`request.platform_headers`).
* **Once.** One attempt, no automatic retries.
* A retried tool test is still a test: it carries `X-Webhook-Test: true` and reads
  `source: "test"` — and so does a retry of anything sent on a dashboard test call.
* **Not for an archived tool.** A delivery whose tool is archived is
  `404 WORKFLOW_TOOL_ARCHIVED` (the status a test of an archived tool answers), and nothing is sent; [restore the tool](https://docs.goyappr.com/api-reference/tools/restore.md)
  first. `tool_archived` on [Get Delivery](https://docs.goyappr.com/api-reference/deliveries/get.md) says so beforehand.

## Linked, and only once

The retry is a new delivery: its `retry_of` is the one you retried, and that one's
`retried_by` now points at it, on [Get Delivery](https://docs.goyappr.com/api-reference/deliveries/get.md) and in the
dashboard. A delivery is retried at most once, so two requests — even two racing each
other — send it once; the second is `409 DELIVERY_ALREADY_RETRIED` with `retried_by` in the
body. If the retry fails too, retry the retry.

## Errors

Every refusal sends nothing.

| Status | Code | When |
| - | - | - |
| 403 | `INSUFFICIENT_SCOPE` | The key lacks `tools:update`. |
| 400 | `DELIVERY_RETRY_INVALID` | The body is not none, `{}` or `{"acknowledge_unknown": true\|false}` — not JSON, not an object, another field, or `acknowledge_unknown` not a boolean. The message names it. |
| 404 | `DELIVERY_NOT_FOUND` | No delivery with that id in this workspace. |
| 409 | `DELIVERY_NOT_RETRYABLE` | It was accepted (sending it again would deliver it twice) — including a workflow tool's delivery your endpoint answered with a 2xx the tool could not use — or it has not settled yet. |
| 409 | `DELIVERY_OUTCOME_UNKNOWN` | It is `unknown`: your endpoint did not answer, so it may already have acted on it. Check there, then send `{"acknowledge_unknown": true}` to send it again anyway. |
| 409 | `DELIVERY_ALREADY_RETRIED` | It was already retried; `retried_by` is that attempt. |
| 409 | `DELIVERY_SENDER_UNAVAILABLE` | Its sender is gone, is not a webhook, or has no usable address. |
| 404 | `WORKFLOW_TOOL_ARCHIVED` | The tool that sent it is archived. Restore it with `POST /tools/{id}/restore`, then retry. Nothing was sent. |
| 503 | `WEBHOOK_DELIVERY_UNAVAILABLE` | The retry could not be recorded; try again in a moment. |

In the dashboard the same retry is **Send again** in a delivery's drawer (Tools → Deliveries),
on any delivery that was not accepted. On one whose outcome is unknown it asks first.


## OpenAPI

````yaml POST /deliveries/{id}/retry
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}/retry:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Deliveries
      summary: Retry a failed delivery
      description: >
        Sends a failed delivery again, once, and answers with the new attempt.
        Required scope

        `tools:update` — the scope that already sends a tool's request on demand

        (`POST /tools/{id}/test`).


        **What is sent.** The body stored with the delivery — exactly what the
        original

        attempt sent — to where the sender points **now**: its current URL,
        method, headers

        and timeout. Fix the endpoint or the tool's address, then retry. One
        attempt, no

        automatic retries. A retried tool test is still a test (`X-Webhook-Test:
        true`), and

        so is a retry of a delivery made on a dashboard test call.

        It carries `X-Webhook-Delivery-Id` with the chain's first delivery id
        (the same on

        every retry of it), `X-Webhook-Retry-Of` with the delivery it re-sends,
        and

        `X-Webhook-Delivery-Attempt` counted across them - a retry of a delivery
        sent once is

        attempt 2, and its `attempt_count` reads 2.

        `GET /deliveries/{id}` says beforehand where a retry would go
        (`retry_target`) and

        whether that differs from where the delivery went
        (`request.destination`); the new

        delivery records the address and the tool revision it was sent with.


        **Linked, and once.** The retry is a new delivery with `retry_of` set to
        this one, and

        this one's `retried_by` points at it. A delivery is retried at most once
        — a second

        request, even one racing the first, is `409 DELIVERY_ALREADY_RETRIED`
        and sends

        nothing. If the retry fails too, retry the retry.


        **Only what failed.** An accepted delivery would be delivered twice, so
        it is refused

        (`409 DELIVERY_NOT_RETRYABLE`) — including a workflow tool's delivery
        the endpoint

        answered with a 2xx the tool could not use — as is one still pending. A
        sender that is

        gone, is not a webhook, or has no usable address is `409
        DELIVERY_SENDER_UNAVAILABLE`,

        and a delivery whose tool is archived is `404 WORKFLOW_TOOL_ARCHIVED`
        (the status a test

        of an archived tool answers) until the tool is restored (`POST
        /tools/{id}/restore`).


        **Not blindly what nobody knows.** An `unknown` delivery got no answer
        in time, so the

        endpoint may already have acted on it. It is sent again only with

        `{"acknowledge_unknown": true}`; without it, `409
        DELIVERY_OUTCOME_UNKNOWN` and nothing

        is sent. A retry that gets no answer in time reads `unknown` itself.
      operationId: retryDelivery
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                acknowledge_unknown:
                  type: boolean
                  description: >
                    Send an `unknown` delivery again, knowing the endpoint may
                    already have acted on it. Changes nothing for a `failed`
                    delivery.
      responses:
        '201':
          description: >
            The retry was sent. The body is the new delivery; its `status` says
            whether the endpoint accepted it this time.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryDetail'
        '400':
          description: >
            `DELIVERY_RETRY_INVALID` — the body is not none, `{}` or
            `{"acknowledge_unknown": true|false}`. Nothing was sent.
          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 lacks `tools:update`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >
            `DELIVERY_NOT_FOUND`, `RESOURCE_ID_INVALID`, or
            `WORKFLOW_TOOL_ARCHIVED` (the tool that sent it is archived; restore
            it first). Nothing was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >
            `DELIVERY_NOT_RETRYABLE` (accepted — a 2xx the tool could not use
            included — or still pending), `DELIVERY_OUTCOME_UNKNOWN` (no answer
            came back; send `acknowledge_unknown: true` to send it again
            anyway), `DELIVERY_ALREADY_RETRIED` (the body carries `retried_by`),
            or `DELIVERY_SENDER_UNAVAILABLE`. Nothing was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '`WEBHOOK_DELIVERY_UNAVAILABLE` — nothing was sent; 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.