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

# Dry-run Extraction

> Requires agents:read. Reads a transcript you supply for the values this agent collects, and returns them. It places no call, writes no call row, and changes nothing about the agent - a browser session minted with POST /calls {"type":"web"} writes nothing until a browser connects it, so an integration with no browser had no way to prove its extraction parameters work before a real caller met them. The transcript is read the way a finished call's is - the same instructions to the model, the same model and settings, the same coercion a real call's extracted_data goes through, and the same day to count dates from (reference_time standing in for the call's start) - so what comes back is what the agent will collect from that conversation. It costs a model call.


Read a transcript you supply for the values this agent collects, and get them
back. Nothing is called, nothing is written, and the agent is unchanged.
Required scope: `agents:read`.

This is the assertable half of a rehearsal. A browser session minted with
[`POST /calls {"type":"web"}`](https://docs.goyappr.com/api-reference/calls/create) is a call from the
moment the mint answers, but it has no conversation until a browser connects
it, so an integration with no browser had no `extracted_data` to check and no
way to prove its extraction parameters work before a real caller met them. A dry run gives you one, in CI, from a
conversation you wrote.

```bash theme={null}
curl -X POST "$YAPPR_API_URL/agents/$AGENT_ID/extraction/dry-run" \
  --header "Authorization: Bearer $YAPPR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "transcript": [
      { "role": "agent", "text": "Hi, how many seats do you need?" },
      { "role": "user", "text": "About 12, and yes please book a demo. We could start next month." }
    ],
    "reference_time": "2026-09-23"
  }'
```

```json theme={null}
{
  "agent_id": "ea76e25f-e3d1-4ca0-a17f-c1935cfb8281",
  "transcript_turns": 2,
  "extraction_parameters": [
    { "name": "seats", "type": "number" },
    { "name": "wants_demo", "type": "yes_no" },
    { "name": "start_date", "type": "date" }
  ],
  "extracted_data": { "seats": 12, "wants_demo": true, "start_date": null },
  "extracted_data_precision": {
    "start_date": { "precision": "month", "month": "2026-10" }
  },
  "reference_date": "2026-09-23",
  "timezone": "Asia/Jerusalem"
}
```

`start_date` is `null` because "next month" names a month and no day;
`extracted_data_precision` says which month. `reference_date` and `timezone`
are the day the dates were read from and the zone it was read in
([below](#the-answer)).

## The request

| Field | Meaning |
| - | - |
| `transcript` | **Required.** Either an array of `{"role","text"}` turns — the shape [Get call](https://docs.goyappr.com/api-reference/calls/get.md) returns — or the conversation as text, one turn per line, each line opening with its speaker and a colon. `role` is `agent`, `user` or `voicemail`; anything else reads as the caller. At most 400 turns and 40,000 characters. |
| `reference_time` | Optional. The day the conversation happened on, which its dates are read from — "tomorrow", "next Sunday", "the first of November". Either a plain `"YYYY-MM-DD"`, taken as that day, or a timestamp with its zone such as `"2026-09-23T12:44:00+03:00"`, read in your workspace's time zone the way a real call's start is. Left out, it is today. A timestamp with no zone is `400 EXTRACTION_DRY_RUN_INVALID`: it names a different day depending on where it is read. |
| `extraction_parameters` | Optional. A set to try **instead of** the agent's own, so you can see what a parameter would collect before saving it with [`PATCH /agents/{id}`](https://docs.goyappr.com/api-reference/agents/update). Held to exactly what PATCH accepts: `name`, `description` and an optional `type` of `text`, `number`, `yes_no` or `date`. Anything PATCH refuses — a missing `name` or `description`, `"type": "bool"` — is `400 EXTRACTION_DRY_RUN_INVALID` with the message PATCH gives, naming the entry. |

Any other field is `400 EXTRACTION_DRY_RUN_INVALID`.

### A transcript as text

Text is split into turns by the speaker each line opens with, so an answer is
read against the question the agent asked on the line above it:

```text theme={null}
Agent: How many years of experience do you have?
User: About two and a half.
סוכן: מתי תוכל להתחיל?
מתקשר: בראשון בנובמבר.
```

| The line opens with | It is |
| - | - |
| `Agent:`, `סוכן:` | the agent |
| `User:`, `Caller:`, `Customer:`, `משתמש:`, `מתקשר:`, `לקוח:` | the caller |
| `Voicemail:`, `תא קולי:` | a voicemail greeting |

The speaker is matched without regard to case. Blank lines are skipped. A line
that opens with anything else — including a continuation of the line above — is
`400 EXTRACTION_DRY_RUN_TRANSCRIPT_UNLABELLED`, naming the line, rather than
being guessed into someone's turn. To send text without speakers, send it as
turns instead.

## The answer

The transcript is read the way a finished call's is: the same instructions to
the model, the same model and settings, the same reading of its answer, and
the same day to count dates from, with `reference_time` standing in for the
call's start. What comes back is what the agent will collect from that
conversation.

`extracted_data` is keyed by your parameters and by nothing else: a key the
model invented is dropped, and a parameter it left out is still a key, with
`null`. **`null` means the conversation never said it**, which is a different
answer from a value you did not ask for — that key is simply absent.

Each value is read as the kind its parameter declared, by the same coercion a
real call's `extracted_data` goes through:

| Kind | Said | Comes back |
| - | - | - |
| `number` | "About 12 seats" | `12` — an approximate answer is its number |
| `number` | "About two and a half", "בערך שנתיים וחצי" / "שנה וחצי" / "half a year" | `2.5` / `1.5` / `0.5` — a half is kept |
| `number` | "3-4", "three or four", "שלוש או ארבע", "בין שש לשבע" | `3.5` / `6.5` — a range is its middle, and `extracted_data_ranges` gives its two ends ([below](#a-range)) |
| `yes_no` | "Yes, please" | `true` |
| `date` | "the first of November" | `YYYY-MM-DD`, or `null` when the caller named a month and no day (below) |

`extraction_parameters` is echoed with the kind each one was read as. A `type`
you send must be `text`, `number`, `yes_no` or `date`; anything else is `400
EXTRACTION_DRY_RUN_INVALID`, as it is on `PATCH /agents/{id}`. A parameter
saved on the agent with no `type` - from before types existed - is read as
`text`, and echoed as `text`.

A `date` is resolved exactly as a real call's is, from `reference_time`
instead of the call's start, and held to the caller's own words:

* A day and month with no year is the next time it comes round, and "tomorrow"
  and "next Sunday" are counted from that day.
* Something the caller says already happened is counted back, never forward,
  whichever verb says so: "it ended in June", "נגמרה ביוני", "I arrived on the
  5th of March", "נכנסתי ב-5 במרץ", "הגעתי לארץ ביוני", "עליתי באוגוסט". A date
  after a past verb that is the day of something still to come stays ahead: "I
  got a letter for my hearing on the 12th of November", "קיבלתי זימון לדיון ב-12
  בנובמבר", "קיבלתי אשרה חדשה שנגמרת בנובמבר", "my hearing was rescheduled for
  the 5th of March". "My visa has run out on the 5th of October" already
  happened. In one answer each date keeps its own tense: "נכנסתי בשלושה במרץ, והאשרה פגה בעשרים באוגוסט"
  said on 23 September 2026 is `2026-03-03` and `2026-08-20`, and "I arrived
  back in March, and my hearing is on the first of March" is March 2026 and
  `2027-03-01`.
* Which day a letter, message or call names — the day of the event it is about,
  or its own — is the reader's judgement from the caller's words, and the
  answer says which as `role` in `extracted_data_precision`: `event` (the day
  of the thing itself, ahead or gone as the caller tells it) or `message` (the
  day it was sent or received, which has passed). "I got a letter about my
  knee replacement on the 3rd of December", "I got a form for my surgery on the
  3rd of December", "I got a text about my MRI asking me to come on the 3rd of
  December" and "קיבלתי הודעה על בדיקת התוצאות ב-3 בדצמבר" are `event`,
  `2026-12-03`; "I got a letter about my lease on the 5th of March" is
  `message`, `2026-03-05`. The day a payment or refund falls due, results are
  ready or a lease or approval ends is that thing's own, not the message's: a
  day the letter, message or call says is still to come stays ahead whatever
  the reader answered ("I got an email that my payment is due on the 5th of
  March", "I got a text saying my results are ready on the 5th of March",
  "קיבלתי הודעה שהתשלום יורד ב-5 במרץ" are `2027-03-05`, and a `message`
  answer for such a day is not returned), while "my payment was received on"
  stays the letter's. When the reader cannot say, or the caller's own words
  settle it the other way (a letter about a flight or a surgery is that event's
  day; a letter answering an appeal or a claim, or about a surgery's approval or
  cost, is the letter's), the rule that follows decides from the words alone and
  no `role` is returned. The day of an event that a letter, message or
  call told the caller about is that event's: a date after the notice ("a letter", "a text", "a call", "a
  referral", "מכתב", "הודעה", "זימון", "הפניה") and "about", "for", "of",
  "regarding", "על" or "לגבי" — or the event's own ל or ש — belongs to the
  event. An event is a medical procedure or service — a surgery, a test, a
  scan, a treatment, an angiography, a vaccine, chemo, a follow-up, "הצנתור",
  "החיסון", "ההקרנה", or one named like a procedure ("a colposcopy", "an
  appendectomy", "an angioplasty", "קולפוסקופיה") — or a hearing, an
  appointment, an interview or a flight. Anything else a letter, message,
  email or call is about — a lease, an allowance, an appeal, an order, a
  visa, "my son", "הגמלה", "הערעור" — is the day the message came. After a
  notice that calls the caller to something — a summons, an invitation, a
  referral, an appointment or a reminder ("זימון", "הזמנה", "הפניה", "תור",
  "תזכורת"), or a letter that gives a date for it — whatever it calls them to
  is the event, and so is a noun a ש dates directly ("קיבלתי מכתב שהערעור ב-3
  בדצמבר"). The noun that heads the phrase decides, for an event too — the
  last one before the date in English ("my heart catheterization" is the
  procedure, "my surgery approval", "my treatment plan", "my test kit" are
  things of it), the first after "על" in Hebrew ("על הוויזה החדשה שלי" is
  about the visa, "על אישור הניתוח", "על תוכנית הטיפול" about the approval
  and the plan). A head that sets the event's day keeps it the event's ("my
  surgery date", "על מועד הניתוח", "על תור לבדיקה"), whoever owns it or
  however it is described ("על התור שלי לבדיקה", "על מועד חדש לניתוח", "על
  המועד של הניתוח"), and so does a verb that says when the event is ("my
  surgery happening on", "taking place on", "my MRI booked on"); any other
  word in -ing names a thing ("my surgery waiting list", "my treatment
  running costs"). What was received of the
  event — "my MRI results", "תוצאות הבדיקה", a report, a copy, a payment — and
  what was received, paid or submitted on a day already happened. Said on 23
  September 2026:

  | The caller said | Stored |
  | - | - |
  | "I got a letter about my surgery on the 12th of November" | `2026-11-12` |
  | "I got a letter about my left knee replacement on the 3rd of December", "I got a form for my surgery on the 3rd of December", "I got a letter about my stent on the 3rd of December", "קיבלתי הודעה על בדיקת התוצאות ב-3 בדצמבר" | `2026-12-03`, `role: "event"` |
  | "קיבלתי מכתב על הניתוח ב-12 בנובמבר" | `2026-11-12` |
  | "I got a text about my MRI on the 12th of November" | `2026-11-12` |
  | "קיבלתי הפניה לבדיקה ב-3 בדצמבר" | `2026-12-03` |
  | "קיבלתי מכתב שהניתוח שלי ב-12 בנובמבר" | `2026-11-12` |
  | "I got a letter about my angiography on the 3rd of December", "קיבלתי מכתב על הצנתור ב-3 בדצמבר", "קיבלתי זימון להקרנה ב-3 בדצמבר" | `2026-12-03` |
  | "I got a message about my MRI results on the 5th of March", "קיבלתי הודעה על תוצאות הבדיקה ב-5 במרץ" | `2026-03-05` — the day the results came |
  | "I got an email that my payment is due on the 5th of March", "I got a letter that my lease ends on the 5th of March", "קיבלתי הודעה שהתשלום יורד ב-5 במרץ" | `2027-03-05` — the day the letter says is still to come |
  | "I got a letter about my visa on the 5th of March", "I got an email about my order on the 5th of March" | `2026-03-05` — the day the letter came |
  | "I got a letter about my lease on the 5th of March", "קיבלתי מכתב מביטוח לאומי על הגמלה ב-5 במרץ", "קיבלתי מכתב על הערעור ב-5 במרץ" | `2026-03-05` — the day the letter came |
  | "I got a letter about my surgery approval on the 5th of March", "I got a letter about my surgery waiting list on the 5th of March", "קיבלתי מכתב על אישור הניתוח ב-5 במרץ", "קיבלתי מכתב על תוכנית הטיפול ב-5 במרץ" | `2026-03-05` — the day the letter came: the approval, the waiting list and the plan head the phrase |
  | "I got a letter about my surgery happening on the 12th of November", "קיבלתי הודעה על התור שלי לבדיקה ב-12 בנובמבר", "קיבלתי מכתב על המועד של הניתוח ב-12 בנובמבר" | `2026-11-12` — the appointment and the verb set the event's day |
  | "I got a summons for my appeal on the 3rd of December", "קיבלתי זימון לערעור ב-3 בדצמבר", "קיבלתי תזכורת על הערעור ב-3 בדצמבר" | `2026-12-03` — a summons or reminder calls the caller to it |
  | "I had surgery on the 12th of November", "עברתי ניתוח ב-12 בנובמבר", "הייתי בבדיקה ב-3 בדצמבר" | `2025-11-12`, `2025-11-12`, `2025-12-03` — had, gone through or attended, so it already happened |
  | "I received the results of my MRI on the 5th of March", "קיבלתי את התוצאות של הבדיקה ב-5 במרץ" | `2026-03-05` — the day the results came |
  | "I received a copy of my contract on the 5th of March", "הגשתי בקשה לויזה ב-5 במרץ", "שילמתי על הטיפול ב-5 במרץ" | `2026-03-05` |

  A `date` parameter whose description is about something still to come
  ("The date of the caller's upcoming appointment", "התאריך של הניתוח
  המתוכנן", "התור הקרוב") is never counted back. Say "last" or "הקודם" in the
  description of one that is about the past.
* A length of time ago in months or years is that month, marked approximate,
  not a day: "a month ago", "לפני חודשיים וחצי" and "two and a half years ago"
  are `null` with `{"precision": "month", "month": …, "approximate": true}`,
  the month that length back — on 23 September 2026 `2026-08`, `2026-07` and
  `2024-03`. "Last month" names the month, so it is not marked. Days and weeks ("a week ago") are a day. A range
  of lengths is its middle: "six to seven weeks ago" is 45½ days back
  (`2026-08-08`), "בין שש לשבע חודשים" six and a half months back
  (`2026-03`, approximate) — whichever end the model counted from.
* A year the caller said is kept.
* A weekday with a day of the month that falls on another weekday ("next
  Tuesday the 14th" when the 14th is a Wednesday) is the day of the month
  stated, `2026-10-14`, and its precision entry says so with
  `"ambiguity": ["weekday_mismatch"]`.

The table on [Get call](https://docs.goyappr.com/api-reference/calls/get.md#what-the-agent-picked-out-of-the-call)
has every case. The answer carries `reference_date` and `timezone`, the day that was
used and the zone it was read in, so a result can be checked against them, and
`extracted_data_precision`, one entry per `date` parameter saying whether the
caller gave a `day`, only a `month` (with the month, and `approximate: true`
when it was worked out from a length of time ago), or neither (`unknown`), with
the reader's `role` for the day when it gave one.
"Sometime in November, I don't know which day yet" is a month, not the 1st:

```json theme={null}
{
  "transcript_turns": 2,
  "extracted_data": { "start_date": "2026-11-01", "interview_date": null },
  "extracted_data_precision": {
    "start_date": { "precision": "day", "month": "2026-11", "role": "event" },
    "interview_date": { "precision": "month", "month": "2026-11", "role": "event" }
  },
  "reference_date": "2026-09-23",
  "timezone": "Asia/Jerusalem"
}
```

A real call records the same member; [Get call](https://docs.goyappr.com/api-reference/calls/get.md#how-precise-a-date-was)
explains how to read it.

### A range

A `number` the caller gave as a range is stored as its middle, and
`extracted_data_ranges` gives the two ends, so a 6.5 that was "between six and
seven" can be told from one that was "six and a half":

```json theme={null}
{
  "extracted_data": { "pain_level": 6.5 },
  "extracted_data_ranges": { "pain_level": { "low": 6, "high": 7 } }
}
```

It is present only when some number was a range. A real call records the same
member, read back by [Get call](https://docs.goyappr.com/api-reference/calls/get.md#what-the-agent-picked-out-of-the-call).

**Set your workspace's time zone.** Dates are read on the workspace's clock
(Settings → Timezone). A workspace left on UTC reads a call made in Israel after
midnight as the day before: at 00:50 on 25 September in Tel Aviv it is still
the 24th in UTC, so "tomorrow" is stored as the 25th, not the 26th. The same
holds for a `reference_time` sent as a timestamp; a plain `"YYYY-MM-DD"` is
taken as that day whatever the zone.

## What a dry run is not

* It does **not** rehearse the conversation. It reads one you supply; it never
  decides what the agent would have said.
* It writes no call, so it does not appear in
  [`GET /calls`](https://docs.goyappr.com/api-reference/calls/list) and cannot be read back later. Keep
  the answer if you need it.
* It reads the agent's extraction parameters as they are **saved on the agent**
  right now, not as they were in any published version.
* It costs a model call, and it needs `agents:read`: a key without it is
  refused with `403 INSUFFICIENT_SCOPE` before the model is called.

## Errors

| HTTP | Code | When |
| - | - | - |
| `400` | `EXTRACTION_DRY_RUN_INVALID` | No `transcript`, an empty one, a turn with no `text`, a transcript over the size limits, an `extraction_parameters` entry PATCH would refuse, an empty `extraction_parameters`, a `reference_time` that is neither a date nor a timestamp with its zone, or a field this endpoint does not take. The message names it. |
| `400` | `EXTRACTION_DRY_RUN_TRANSCRIPT_UNLABELLED` | A `transcript` sent as text has a line that does not open with one of the speakers above. The message gives the line number. |
| `403` | `INSUFFICIENT_SCOPE` | The key has no `agents:read`. Nothing was read and no model was called. |
| `403` | `AGENT_OUTSIDE_KEY_SCOPE` | The key is limited to some agents and this is not one of them. The answer is the same whether the agent exists or not. |
| `404` | `AGENT_NOT_FOUND` | No such agent in this workspace, or it is archived. |
| `404` | `RESOURCE_ID_INVALID` | The agent id in the path is not an id at all. Use an `id` exactly as [List agents](https://docs.goyappr.com/api-reference/agents/list.md) returned it. |
| `404` | `ROUTE_NOT_FOUND` | A path under `/agents/{id}/extraction/` other than `dry-run`. Nothing was read. |
| `405` | `METHOD_NOT_ALLOWED` | Any method but `POST`. The `Allow` header says `POST`. Nothing was read or changed. |
| `422` | `EXTRACTION_NOT_CONFIGURED` | The agent has no extraction parameters and the request sent none either, so there is nothing to read the transcript for. A bad entry in the `extraction_parameters` you *did* send is `400`, not this. |
| `503` | `EXTRACTION_DRY_RUN_UNAVAILABLE` | The reader could not be reached. Nothing was read and nothing was changed — send the same request again. |


## OpenAPI

````yaml POST /agents/{id}/extraction/dry-run
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:
  /agents/{id}/extraction/dry-run:
    parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Agents
      summary: Dry-run extraction
      description: >
        Requires agents:read. Reads a transcript you supply for the values this
        agent collects, and returns them. It places no call, writes no call row,
        and changes nothing about the agent - a browser session minted with POST
        /calls {"type":"web"} writes nothing until a browser connects it, so an
        integration with no browser had no way to prove its extraction
        parameters work before a real caller met them. The transcript is read
        the way a finished call's is - the same instructions to the model, the
        same model and settings, the same coercion a real call's extracted_data
        goes through, and the same day to count dates from (reference_time
        standing in for the call's start) - so what comes back is what the agent
        will collect from that conversation. It costs a model call.
      operationId: dryRunAgentExtraction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - transcript
              properties:
                transcript:
                  description: >
                    The conversation to read - either an array of
                    {"role","text"} turns, the shape GET /calls/{id} returns, or
                    text with one turn per line, each line opening with its
                    speaker and a colon (Agent, User, Caller, Customer,
                    Voicemail, סוכן, משתמש, מתקשר, לקוח or תא קולי, any case); a
                    line that does not is refused with
                    EXTRACTION_DRY_RUN_TRANSCRIPT_UNLABELLED. In the array, role
                    is agent, user or voicemail; anything else reads as the
                    caller. At most 400 turns and 40000 characters.
                  oneOf:
                    - type: string
                    - type: array
                      maxItems: 400
                      items:
                        type: object
                        required:
                          - text
                        properties:
                          role:
                            type: string
                            enum:
                              - agent
                              - user
                              - voicemail
                          text:
                            type: string
                reference_time:
                  type: string
                  description: >
                    The day the conversation happened on, which its dates
                    ("tomorrow", "next Sunday", "the first of November") are
                    read from - a plain YYYY-MM-DD taken as that day, or a
                    timestamp with its zone, read in the workspace's time zone
                    as a real call's start is. Left out, it is today. A
                    timestamp with no zone is refused.
                  example: '2026-09-23T12:44:00+03:00'
                extraction_parameters:
                  type: array
                  description: >
                    A set to try instead of the agent's own, so a parameter can
                    be seen working before it is saved with PATCH /agents/{id}.
                    Held to exactly what PATCH accepts - an entry PATCH refuses,
                    such as "type": "bool", is refused here with PATCH's
                    message. Leave it out to use the agent's.
                  items:
                    type: object
                    required:
                      - name
                      - description
                    properties:
                      name:
                        type: string
                      description:
                        type: string
                      type:
                        type: string
                        enum:
                          - text
                          - number
                          - yes_no
                          - date
      responses:
        '200':
          description: The values the transcript gave up.
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_id:
                    type: string
                    format: uuid
                  transcript_turns:
                    type: integer
                    description: How many non-empty turns were read.
                  extraction_parameters:
                    type: array
                    description: >
                      The parameters that were read for, each with the kind it
                      was read as. A type sent in extraction_parameters must be
                      one of the four (anything else is 400); a parameter saved
                      on the agent with no type is read, and echoed, as text.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - text
                            - number
                            - yes_no
                            - date
                  extracted_data:
                    type: object
                    description: >
                      Keyed by your parameters and by nothing else - a key the
                      model invented is dropped, and a parameter it left out is
                      still a key, with null. null means the conversation never
                      said it, which is different from a key that is absent
                      because you never asked for it. A number is one number -
                      "about 12" is 12, a half is kept ("two and a half" is
                      2.5), a range is its middle ("3-4" is 3.5). A date is a
                      YYYY-MM-DD day or null - a month with no day is null, and
                      extracted_data_precision says it was a month.
                  extracted_data_precision:
                    type: object
                    description: >
                      One entry per date parameter, saying how precisely the
                      caller gave it: day, month or unknown, with the reader's
                      role for the day (event or message) when it gave one.
                      Present only when a date parameter was read for.
                    additionalProperties:
                      $ref: '#/components/schemas/ExtractedDatePrecision'
                    example:
                      interview_date:
                        precision: month
                        month: 2026-11
                      arrival_date:
                        precision: month
                        month: 2024-03
                        approximate: true
                      surgery_date:
                        precision: day
                        month: 2026-12
                        role: event
                  extracted_data_ranges:
                    type: object
                    description: >
                      One entry per number parameter whose answer is the middle
                      of a range the caller gave, with the range's two ends.
                      Present only when there is one.
                    additionalProperties:
                      $ref: '#/components/schemas/ExtractedNumberRange'
                    example:
                      pain_level:
                        low: 6
                        high: 7
                  reference_date:
                    type: string
                    format: date
                    description: >-
                      The day the transcript's dates were read from -
                      reference_time, or today.
                  timezone:
                    type: string
                    description: >
                      The IANA zone reference_date is in - the workspace's, or
                      UTC when it has none. A workspace left on UTC reads a call
                      made in Israel after midnight as the day before.
        '400':
          description: >
            `EXTRACTION_DRY_RUN_INVALID` - no transcript, an empty one, a turn
            with no text, a transcript over the size limits, an
            extraction_parameters entry PATCH /agents/{id} would refuse (in
            PATCH's words), a reference_time that is neither a date nor a
            timestamp with its zone, or a field this endpoint does not take. The
            message names it. `EXTRACTION_DRY_RUN_TRANSCRIPT_UNLABELLED` - a
            transcript sent as text has a line that does not open with a
            speaker; the message gives the line number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >
            `INSUFFICIENT_SCOPE` - the key has no agents:read.
            `AGENT_OUTSIDE_KEY_SCOPE` - the key is limited to some agents and
            this is not one of them; the same answer whether it exists or not.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `AGENT_NOT_FOUND` - no such agent in this workspace, or it is
            archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: >-
            `METHOD_NOT_ALLOWED` - any method but POST; the Allow header says
            POST. Nothing was read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >
            `EXTRACTION_NOT_CONFIGURED` - the agent has no extraction parameters
            and the request sent no extraction_parameters either, so there is
            nothing to read the transcript for. A malformed entry in
            extraction_parameters is 400 EXTRACTION_DRY_RUN_INVALID instead: it
            is a fact about the request, not about the agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >
            `EXTRACTION_DRY_RUN_UNAVAILABLE` - the reader could not be reached.
            Nothing was read and nothing was changed; send the same request
            again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ExtractedDatePrecision:
      type: object
      description: >
        How precisely a caller gave one date parameter's answer. day - they
        named a day, and extracted_data holds it. month - they named a month and
        no day ("sometime in November", "mid-November", "next month");
        extracted_data holds null, because a month is not a day and storing its
        1st would be a guess, and month says which month. unknown - nothing that
        is a day or a month ("after the holidays"), or nothing at all. A date
        the caller said already happened is counted back ("I arrived on the 5th
        of March", "נכנסתי ביוני"); a date after a past verb that is the day of
        something still to come stays ahead ("I got a letter for my hearing on
        the 12th of November"), and so does the day of an event that a letter,
        message or call told the caller about ("I got a letter about my surgery
        on the 12th of November", "קיבלתי מכתב על הניתוח ב-12 בנובמבר"); the day
        results, a copy or an application were received stays past ("I received
        the results of my MRI on the 5th of March"). Which day a letter names -
        the event's or its own - is the reader's judgement, returned as role
        (below), and it decides the direction of a day or month said with no
        year. A date parameter whose description is about something upcoming
        ("upcoming appointment", "הניתוח המתוכנן") is never counted back.
      required:
        - precision
        - month
      properties:
        precision:
          type: string
          enum:
            - day
            - month
            - unknown
        month:
          type: string
          nullable: true
          description: >-
            The year and month of the day or month named, as YYYY-MM; null when
            precision is unknown.
          example: 2026-11
        approximate:
          type: boolean
          enum:
            - true
          description: >
            Present, and true, only on a month worked out from a length of time
            ago in months or years ("a month ago", "three months ago", "לפני
            חודשיים וחצי", "two and a half years ago") - that length back from
            the call's month, as near as it can put it; a range of lengths ("six
            to seven months ago") is its middle. Absent on a month the caller
            named ("last month").
        role:
          type: string
          enum:
            - event
            - message
          description: >
            What the day belongs to, as the reader judged it from the caller's
            words. event - the day of the thing itself: a surgery, test,
            hearing, appointment, flight, arrival or expiry, and the day a
            payment or refund falls due, results are ready or a lease or
            approval ends ("I got a letter about my knee replacement on the 3rd
            of December" is the knee replacement's day, 2026-12-03 for a call in
            September 2026, and "I got an email that my payment is due on the
            5th of March" is 2027-03-05; an event the caller had stays in the
            past). message - the day a letter, message, call, form or notice was
            sent or received, or a result, approval, refund or payment was
            already received or paid, which has passed ("I got a letter about my
            lease on the 5th of March" is 2026-03-05). Absent when the reader
            could not say, when the caller's own words settle it the other way
            (a letter about a flight or a surgery is that event's day; a letter
            answering an appeal or a claim, or about a surgery's approval or
            cost, is the letter's), and on calls analysed before it was
            recorded; the date is then read from the caller's words alone.
          example: event
        ambiguity:
          type: array
          items:
            type: string
            enum:
              - weekday_mismatch
          description: >
            Present only when the caller's own words disagreed about the day and
            one reading was kept. weekday_mismatch - they gave a weekday with a
            day of the month that falls on another weekday ("next Tuesday the
            14th" when the 14th is a Wednesday, "ביום שלישי ה-14"): the day of
            the month they stated is kept (2026-10-14), not the weekday. Confirm
            the day before booking it.
          example:
            - weekday_mismatch
    ExtractedNumberRange:
      type: object
      description: >
        A number parameter's answer that was the middle of a range the caller
        gave ("between six and seven", "בין שש לשבע", "3-4"): extracted_data
        holds the middle (6.5), and this the two ends.
      required:
        - low
        - high
      properties:
        low:
          type: number
          example: 6
        high:
          type: number
          example: 7
    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
  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.