Skip to main content
GET
Get lead
Read one lead by its id, with its tags expanded. Required scope: leads:read. Use it to re-read a lead a call touched: every call record that matched a lead carries the lead object inline, so this endpoint is for the follow-up — after a campaign has run, after your own webhook has fired — rather than for rendering a list. The inline lead is the whole object only for a key that holds leads:read too; a key with calls:read alone reads the call’s lead as { "id" }, because the lead record — name, email, memory, tags and collected values — is this endpoint’s to show. That withholds the lead record, not who the call was with. The call itself is the conversation: its transcript, summary and timeline[].text can name the person, from and to carry their phone number, and extracted_data holds what they said. A key with calls:read reads all of it, with or without leads:read.

Response

extracted — what this person’s calls collected

The values the agent was configured to pick out of a conversation, keyed by each parameter’s own name, merged across every call with this person. The most recent call that answered a field wins it; a field that call never covered keeps the answer an earlier call found, so a caller who did not mention their policy number this time does not lose it. It is not a copy of any one call’s extracted_data. A call’s own object, on GET /calls/{id}, carries every parameter the agent was asked to collect — null for the ones that call never covered. Only answers are merged here, so a parameter no call has ever answered is missing from extracted rather than present and empty. It holds at most 100 fields. Past that, every answer the latest call gave is kept, and earlier answers fill the rest in order of their names. It is null until a call collects something, and the values arrive when the call’s analysis does — a minute or two after the call ends, not at the moment it hangs up. Read-only. It is stored under the reserved metadata.extracted key, so it also appears there. Neither POST /leads nor PATCH /leads/{id} can set it, and replacing metadata does not erase it.

extracted_precision — a date given as a month

A date parameter holds a day or nothing. When the latest call that answered one heard a month and no day (“sometime in November”, “באמצע נובמבר”), the field is left out of extracted and named here instead, with the month:
approximate: true is there, as on the call’s extracted_data_precision, when the month was worked out from a length of time ago (“three months ago”, “לפני חודשיים וחצי”) rather than named: it is as near as that length can put it, not a month the person said. It is absent on a month the person named. Ask the person which day. A later call that names the day puts the field back in extracted and removes it from here. null when no call has given a month alone. Read-only, stored under the reserved metadata.extracted_precision key, and protected from POST and PATCH like extracted.

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

Response

Lead

id
string<uuid>
phone_number
string
Example:

"+972501234567"

name
string | null
email
string<email> | null
source
enum<string>

How the lead first appeared.

call — created from a call this workspace took or placed. The most common value by far, and written only by Yappr: a request cannot claim it. api — created through this API. manual — typed into the dashboard. csv_import — arrived in a spreadsheet.

A create may send api, manual or csv_import; any other value is refused rather than silently rewritten.

Available options:
api,
manual,
csv_import,
call
Example:

"api"

tags
object[]
long_term_context
string | null

AI memory for this lead. Injected into the agent's system prompt at call time when lead_memory_enabled is true on the agent.

extracted
object | null

What this lead's calls collected, keyed by the extraction parameter's own name, merged across every call with this person. The most recent call that answered a field wins it; a field that call never covered keeps the answer an earlier one found. Only answers are merged: unlike a call's own extracted_data on GET /calls/{id}, which carries every parameter with null for the ones that call never covered, a parameter no call has answered is absent here. Read-only and written only by the post-call pass: it is stored under the reserved metadata.extracted key, neither a create nor a PATCH can set it, and replacing metadata does not erase it. Null until a call collects something.

extracted_precision
object | null

The date parameters the latest call that answered them gave as a month and no day ("sometime in November"), keyed by parameter name, each {"precision": "month", "month": "YYYY-MM"}, with "approximate": true when the call's own extracted_data_precision has it (a month worked out from a length of time ago, such as "three months ago", rather than named). Such a field is absent from extracted, because a month is not a day; a later call that names the day moves it back to extracted and out of here. Read-only, stored under the reserved metadata.extracted_precision key like extracted, and null when no call has given a month alone. The same member is on the lead inside GET /calls/{id}.

metadata
object
created_at
string<date-time>
updated_at
string<date-time>