Error envelope
Every non-2xx response from/v2 is JSON with this shape:
code is stable and safe to match on; message is for humans and may change. param, when present, names the offending field.
Request-Id
Every/v2 response carries a Request-Id header (also error.request_id on errors). Include it in support requests. Send your own Request-Id (printable ASCII, up to 128 characters) and it is echoed back; otherwise one is generated (req_…).
HTTP status codes
Successful requests return
200 (GET/PATCH/DELETE) or 201 (POST that creates a resource).
Error codes
Retryable means the same request may succeed if sent again after theRetry-After header or an exponential backoff.
file_empty
HTTP 400 · retryable: no The uploaded file is empty. Upload a non-empty file and retry.file_not_uploaded
HTTP 400 · retryable: no No file has been uploaded for the givenupload_id. Upload the file to the signed URL first, then retry.
idempotency_key_invalid
HTTP 400 · retryable: no TheIdempotency-Key header is empty, longer than 255 characters or contains control characters. Send an opaque printable key of 1-255 characters (a UUID is recommended) and resend the request.
invalid_api_version
HTTP 400 · retryable: no TheTavrn-Version header is not a registered dated version (malformed, unknown or not yet released). Send a version listed in the changelog as YYYY-MM-DD, or omit the header to use the version pinned to your API key.
invalid_field_value
HTTP 400 · retryable: no A field has the wrong type, format or an unsupported value. Correct the value named inmessage and resend the request.
invalid_request
HTTP 400 · retryable: no A webhook subscription payload is malformed (URL, events, name or limits). Fix the field named inmessage and resend the request.
missing_required_field
HTTP 400 · retryable: no A required field is missing from the request body. Add the field named inmessage and resend the request.
upload_expired
HTTP 400 · retryable: no The signed upload URL expired before the file was uploaded. Request a new signed upload, upload the file again, then retry.validation_error
HTTP 400 · retryable: no The request body or query string failed validation. Fix the field named inmessage and resend the request.
invalid_api_key
HTTP 401 · retryable: no The bearer token is missing, malformed, revoked or expired. SendAuthorization: Bearer tavrn_sk_live_… with an active key.
unauthorized
HTTP 401 · retryable: no The request reached an endpoint without API key authentication. SendAuthorization: Bearer tavrn_sk_live_… with an active key.
forbidden
HTTP 403 · retryable: no The resource exists but belongs to another organization or is not accessible with this key. Check the id and the key’s organization.insufficient_scope
HTTP 403 · retryable: no The API key lacks a scope the endpoint requires. Use a key that has the scope named inmessage.
not_found
HTTP 404 · retryable: no No webhook subscription with that id exists in your organization. Same meaning asresource_not_found. Check the id; GET /v2/webhooks lists your subscriptions.
resource_not_found
HTTP 404 · retryable: no No resource with that id exists in your organization. Check the id; list the collection to find the current ids.conflict
HTTP 409 · retryable: no The action conflicts with the current state of the resource (for example, requestor configuration already exists). Read the current resource and update it instead of creating it.duplicate_case_number
HTTP 409 · retryable: no A case with thiscase_number already exists in your organization. Reuse the existing case or choose another case_number.
duplicate_name
HTTP 409 · retryable: no A webhook subscription with this name already exists. Choose another name or update the existing subscription.duplicate_request_detected
HTTP 409 · retryable: no Duplicate detection found similar open requests (same patient, facility and record types). Inspect the returned matches; reuse the existing request id if it is the same request, otherwise retry withallow_duplicate: true.
idempotency_key_in_use
HTTP 409 · retryable: yes An earlier request with the sameIdempotency-Key is still being processed. Wait for the first request to finish, then retry with the same key to receive its stored response.
limit_exceeded
HTTP 409 · retryable: no Your organization has reached the maximum number of webhook subscriptions. Delete an unused subscription first.support_message_in_progress
HTTP 409 · retryable: yes A support message for this retrieval request is still being processed. Wait for the current message to finish, then retry.webhook_disabled
HTTP 409 · retryable: no Redelivery was requested for a webhook that is disabled. Enable the webhook (PATCH /v2/webhooks/{id} with is_enabled: true), then redeliver.
file_too_large
HTTP 413 · retryable: no The uploaded file exceeds the size limit. Upload a smaller file.payload_too_large
HTTP 413 · retryable: no The JSON request body exceeds 1 MB. Send files through the signed-upload flow, not inline in JSON.idempotency_key_reused_with_different_payload
HTTP 422 · retryable: no TheIdempotency-Key was already used with a different request body or on a different endpoint. Use a new key for a new request; reuse a key only to retry the exact same request.
provider_search_daily_limit
HTTP 429 · retryable: yes Your organization’s daily facility-search budget is used up. Retry after the reset time given inmessage.
rate_limited
HTTP 429 · retryable: yes Too many requests for this API key or organization. Wait for theRetry-After seconds, then retry with exponential backoff.
internal_error
HTTP 500, 502 · retryable: yes Tavrn failed to process the request, or could not verify the request submitter (HTTP 502). Retry with backoff; if it persists, contact support quoting therequest_id.
service_unavailable
HTTP 503 · retryable: yes A dependency is temporarily unavailable (for example, facility search). Wait for theRetry-After seconds, then retry.