https://sandbox.tavrn.ai is a separate deployment of the Enterprise API v2 for integration work before you have a Tavrn account.
Each host rejects the other host’s keys: a
tavrn_sk_live_ key on the sandbox returns 400 wrong_environment; a tavrn_sk_test_ key on production returns 401 invalid_api_key.
Get a key
- Sign up at sandbox.tavrn.ai/sign-up with a work email (code by email) or a Google work account. Free-mail and disposable addresses are rejected; there is a bot check.
- Answer three questions (company, role, what you want to try) and accept the sandbox terms.
- Copy the key. It is shown once; afterwards the page shows only the last 4 characters. Rotate key issues a new one (the old key keeps working for 10 minutes).
Quickstart
Five calls: create a case, upload a (synthetic) authorization form, open a retrieval request, read it, list its documents. Every call is the production call with the sandbox host and key.201:
invoice (sandbox_provider_invoice.pdf, metadata.provider_fee_amount: 85) and one records document (sandbox_medical_records.pdf, 12 pages, record_types: ["medical_records","billings"]). GET /v2/retrieval-requests/{id}/documents/{document_id}/download returns JSON {"download_url","expires_in"} (presigned, 3600 s); fetch download_url to get the watermarked PDF.
Only the sandbox object on retrieval requests and the X-Tavrn-Sandbox-* headers are sandbox-specific; everything else is the production response shape. The same requests work with the JavaScript and Python snippets in Authentication after swapping the host and key.
Scenarios
A retrieval request follows a scripted lifecycle chosen at creation, in this order of precedence:
The header and notes token accept a scenario plus comma-separated modifiers. The chosen scenario is echoed back in
sandbox.scenario / sandbox.modifiers on every GET /v2/retrieval-requests/{id}.
Common stages and their offsets from creation (real time):
submitted 0:00 → locating_contact 0:45 → contact_found 1:30 → request_sent 2:00 → confirming_receipt 3:00 → acknowledged 4:00. The full stage vocabulary (submitted, locating_contact, contact_found, request_sent, confirming_receipt, acknowledged, invoice_received, action_required, completed, cancelled) and the status values are the production ones documented in the Retrieval guide.
Answer an
action_required stage exactly as in production: POST /v2/retrieval-requests/{id}/action-response with {"message": "..."} returns 200 {"status":"responded", ...} and the lifecycle resumes.
Speed and advance
Fixture facilities and patients
Any facility name is accepted; these six carry a default scenario. All of them are fictional (555 phone numbers, example.com).
Synthetic patients:
Alex Sandbox (1990-01-01), Jordan Sandbox (1985-06-15), Sam Noexist (1900-01-01, always no_records). Never send real patient data to the sandbox.
GET /v2/facilities searches only these fixtures.
Limits
Every authenticated response carries:
X-Tavrn-Sandbox-Notice is added. Production sends none of these headers.
Request cap
After the 500th request every call returns429 with the standard error envelope plus a sandbox object:
403 sandbox_key_locked). sandbox_* and wrong_environment codes exist only on the sandbox; the Errors page lists the production vocabulary.
Coverage
Every operation in the OpenAPI contract is implemented on the sandbox; an operation that is documented but not yet implemented would return501 not_implemented. The only addition is advance above.
Webhooks
Webhooks work as in production: same events, same payloads, sameX-Tavrn-Timestamp / X-Tavrn-Signature-V1 HMAC-SHA256 signature, same POST /v2/webhooks/{id}/test. Differences:
Signature verification code written against the sandbox runs unchanged in production.
Going to production
Production keys are issued to customer organizations: book a demo, and after onboarding an organization admin createstavrn_sk_live_ keys in the Tavrn Platform (Account and API key).
Keep the sandbox after you go live; it stays your test environment.
For AI agents
Sign-up is deliberately human-gated: a work email, a bot check and acceptance of the sandbox terms. An agent cannot create a sandbox on its own. Ask your operator to sign up at sandbox.tavrn.ai/sign-up and hand you thetavrn_sk_test_ key; from there every call on this page is scriptable, and the key page’s Rotate key is the only other step that needs the operator.
Machine-readable entry points:
Production access is a human decision too: the
429 cap body and the Link: rel="help" header point at the demo booking page for your operator.