Skip to main content
POST
Dry-run extraction
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"} 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.
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 request

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:
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: 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: 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 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:
A real call records the same member; Get call 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”:
It is present only when some number was a range. A real call records the same member, read back by Get 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 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

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

Body

application/json
transcript
required

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.

reference_time
string

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
object[]

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.

Response

The values the transcript gave up.

agent_id
string<uuid>
transcript_turns
integer

How many non-empty turns were read.

extraction_parameters
object[]

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.

extracted_data
object

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
object

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.

Example:
extracted_data_ranges
object

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.

Example:
reference_date
string<date>

The day the transcript's dates were read from - reference_time, or today.

timezone
string

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.