Signs this machine in to Extract Insurance. The first call returns a link and a code: show both to the person and ask them to open the link, check the code and approve. Then call sign_in again: it waits for the approval and saves the key (shared with the extract-insurance CLI; it stops after 90 days without use). Already signed in: says as whom.
Parameterswait_seconds
Revokes the saved key and deletes it from this machine. Only when the person asks.
Takes no parameters.
The account, the key in use and the role of the person it acts as.
Takes no parameters.
A job's status, where it is, and its result once done; waits up to wait_seconds for the end. fields and only keep a long result small.
Parametersonlyfieldsjob_idrequiredwait_seconds
get_evidence
Where a value was read
A picture of the part of the page a field was read from, as the app shows it: each reading's place boxed (green; red when its quote wasn't found word for word); for a cell of a table, the rest of its row (blue, dashed) and the column headers. For a disputed field, to show the person what the page says. For a file of several documents, use that document's job_id. Needs the job's document: not after the account's "delete right after reading" (then the quote and page in the result are what there is). PDF, PNG, JPG and HEIC.
Parametersfieldrequiredjob_idrequiredtarget
get_standard_schema
Our standard schema
The fields we read from insurance documents, as a JSON Schema: to pick fields, or to write the person's schema against ours.
Takes no parameters.
save_document
Save the document a job read
The document a job read (for one document of a file, its own pages), saved on this machine, while we keep it: not after the account's "delete right after reading".
Parametersjob_idrequiredsave_torequired
request_one_document
Ask for a cut file to count as one
A file we cut into several documents (each charged) that the person says is one document: asks us to look. Only our approval gives back the fees past the first. Only when the person says so. Without note: where an earlier request stands. If the file was deleted after reading, give file_path to send it again.
Parametersnotejob_idrequiredfile_path
get_review
What needs the person
A job's disputed fields with each reading (value, quote, page, whether the quote was found word for word) and what the person has answered so far. Show them the readings (get_evidence crops the page) and ask which is right; record their answer with record_answer.
Parametersjob_idrequired
record_answer
Record the person's answer
Saves what the person said a field is: one of its readings (reading, from get_review), the value they typed (value), that the document doesn't have it (not_in_document), or that the value as read is right (confirm); clear takes an answer back. Only their own answer, never your pick. A dispute they settle on a form is used on the account's next documents of that form.
Parametersnoteclearfieldrequiredvaluejob_idrequiredconfirmreadingnot_in_document
Accepts every value not answered yet as right (all: also resolved and missing ones); never a disputed field. Only when the person says the rest is right.
Parametersalljob_idrequired
get_reviewed
The reviewed result
The job's result with the person's answers in it.
Parametersjob_idrequired
The person's workflows: id, slug, name, published version, samples.
Takes no parameters.
One workflow: its draft (targets with their schemas and mappings, policy with its gate: which documents get in), versions, samples with their review, settings, and whether the draft differs from the published version.
Parametersworkflowrequired
create_workflow
Create a workflow
A new workflow (a draft). Its target is the person's JSON Schema, else our standard schema. Next: add_sample, then preview_publish and publish_workflow.
Parametersnamerequiredschemaschema_file
Adds a target to the workflow's draft: the person's JSON Schema, or our standard schema (standard: true). Then map it (triage_target, save_draft) and preview_publish.
Parametersnameschemastandardworkflowrequiredschema_file
Adds a document on this machine to a workflow's samples: publishing is checked against them. It uses the account's free documents first, and is read in the background (preview_publish waits for it).
Parametersworkflowrequiredfile_pathrequired
remove_sample
Remove a sample
Takes a document out of the workflow's samples.
Parametersjob_idrequiredworkflowrequired
preview_sample
A sample in the draft's outputs
What one sample gives in each of the draft's targets, as production would send it once published: to check a mapping before preview_publish.
Parametersjob_idrequiredworkflowrequiredwait_seconds
Replaces the workflow's draft: send the draft from get_workflow, edited (name, targets with their mappings, policy: resolve_confidence, gate). The published version is untouched until publish_workflow. Which documents get in: policy.gate = {accept: [one choice], on_mismatch, when_unsure}; leave gate out to let every document in. accept: "insurance" (any insurance document); one kind: "policy" (policies, quotes, binders, endorsements), "submission" (applications, loss runs, schedules), "claims", "certificate" (certificates and evidence of insurance), "billing" (invoices, premium audits); or one type of page: "declarations", "loss_run", "application", "certificate_of_insurance". on_mismatch, for a document that is clearly something else: "reject" (refuse it; default) or "warn" (read it anyway, with a warning). when_unsure: "extract" (read it, with a warning; default) or "reject". A refused document costs only the check and is not an extraction; job status "rejected", result.rejected.reason says why. It filters out documents that don't belong; it is not a security control.
Parametersdraftrequiredworkflowrequired
triage_target
Map a target's fields
For one target of the draft, which of our fields fills each of the person's fields: sure, choose (with candidates), or unknown. Use it to decide the mappings, then save_draft.
Parametersonlyhintstargetrequiredworkflowrequired
preview_publish
What publishing changes
What publishing the draft would change: the mapping, and the values on every sample (values the person confirmed are marked). Show it to the person; its confirmation token is what publish_workflow needs, once they say yes.
Parametersworkflowrequiredwait_seconds
Publishes the draft as the next version: production runs it from now on. Needs the confirmation from preview_publish of this same draft, and the person's yes. To roll back: restore_version, then publish again.
Parametersnoteworkflowrequiredconfirmationrequired
restore_version
Restore a version
Copies an earlier version into the draft (publish it to roll back).
Parametersversionrequiredworkflowrequired
compare_versions
Two versions' mappings
What the mapping changes between two versions, or a version and the draft.
Parameterstorequiredfromrequiredworkflowrequired
update_workflow_settings
Webhook and retention
The workflow's settings, live at once (not versioned): webhook_url (https; null: none), retention_days (how long documents are kept), results_retention_days (how long results are kept), delete_after_read. null: the account's setting. Which documents get in (the gate) is in the draft's policy: save_draft.
Parametersworkflowrequiredwebhook_urlretention_daysdelete_after_readresults_retention_days
test_webhook
Test the webhook
Sends a signed test delivery to the workflow's webhook and says what it answered.
Parametersworkflowrequired
The workflow's production jobs, newest first: status, file, version, cost, and per target what was filled.
Parameterslimitworkflowrequired
list_workflow_keys
Production keys
The workflow's keys (never their tokens).
Parametersworkflowrequired
create_workflow_key
A production key
Makes a key for one workflow (what production uses: it runs that workflow and reads its jobs) and writes it into an env file on this machine, never into the chat. Use an uncommitted file such as .env.local. Returns the key's id and where it went. Code that calls the workflow: POST https://api.extractinsurance.dev/v1/jobs with Authorization: Bearer <key> and the file as the multipart part document (optional part version pins one; default the latest published) → 202 {id}; GET /v1/jobs/{id} until status is no longer queued or running, or let the workflow's webhook receive it; then result.targets.<target id>.value. Read the key from the environment, never write it into the code.
Parametersmodenameenv_varenv_filerequiredworkflowrequired
revoke_workflow_key
Revoke a production key
Stops a workflow key at once: production using it gets 401. Only when the person asks.
Parameterskey_idrequiredworkflowrequired
The month's documents and cost, per workflow, use and key (YYYY-MM; default this month).
Parametersmonth
get_billing
Balance and spend limit
The balance, credit left with its expiry, the monthly spend limit and what's spent, the low-balance alert, automatic top-up, the free documents used.
Takes no parameters.
add_credit_link
Where to add credit
The Account page's billing section, where an owner adds credit and sets the spend limit, the low-balance alert and automatic top-up. A key never changes billing; show the person the link.
Takes no parameters.
update_account_settings
The account's data settings
How long the account keeps documents (retention_days; null: our default), whether each one is deleted right after it's read (delete_after_read), and whether we may use its documents to improve our reading (improve: the person's consent, only when they say so in their own words); the account's name. Owners only; a workflow's own settings are update_workflow_settings. A shorter retention or deleting right after reading also ends page crops for documents read from then on.
Parametersnameimproveretention_daysdelete_after_read
Who did what in the account, newest first, with the key each change was made with (owners).
Parameterslimit
list_tickets
Support tickets
The account's support tickets, newest change first, with where each stands: open (waiting on us), waiting (on the person), closed. Also the account's last runs, to name in open_ticket.
Parametersstatus
get_ticket
A support ticket
A ticket's messages, oldest first (from_us: our answer), and the runs it names.
Parametersticketrequired
open_ticket
Ask us something
Opens a support ticket: a value read wrong, a run that failed, billing. job_ids names the runs it's about (from list_tickets' recent_jobs or get_job). Only when the person asks: show them the message first, in their words. A person on our side answers, by email to whoever opened the ticket and in the app (Account → Support).
Parametersjob_idsmessagerequiredsubjectrequired
answer_ticket
Answer a ticket
Adds the person's answer to a ticket; it waits on us again (a closed one opens again). Only when the person asks: show them the message first, in their words. A person on our side answers, by email to whoever opened the ticket and in the app (Account → Support).
Parametersticketrequiredmessagerequired
close_ticket
Close a ticket
Closes a ticket the person says is settled; answering it later opens it again.
Parametersticketrequired
Any other GET from the Extract Insurance API (described at https://api.extractinsurance.dev/v1/openapi.json), as the person: e.g. /v1/workflows/{id}/versions/2, /v1/jobs/{id}/reviews.
Parameterspathrequired