# Authenticate and get token Source: https://docs.superdial.com/api-reference/authentication/authenticate-and-get-token /openapi.json get /v1/auth Returns a short-lived bearer token for use in API calls. The API key and API secret are **two distinct values** issued together: the key identifies your account, the secret authenticates the request. # Create a Request Source: https://docs.superdial.com/api-reference/requests/create-a-request /openapi.json post /v1/requests Submit a single request or a batch of requests. For batch, wrap in `{"requests": [...]}`. If `internalId` is supplied on a single request, a duplicate POST with the same `internalId` returns the previously reserved `requestId` rather than creating a new one. # List Requests Source: https://docs.superdial.com/api-reference/requests/list-requests /openapi.json get /v1/requests Retrieve requests filtered by date range or batch ID. # Retrieve a Request Source: https://docs.superdial.com/api-reference/requests/retrieve-a-request /openapi.json get /v1/requests/{requestId} Fetch details for a request by ID. # List schemas Source: https://docs.superdial.com/api-reference/schemas/list-schemas /openapi.json get /v1/schemas Returns the schemas provisioned for your account. Each row carries a `requestType` (e.g. `claim-status`, `vob`) that identifies the kind of extraction the schema performs. Schemas that are no longer accessible for your account are filtered out. # Required inputs for a schema Source: https://docs.superdial.com/api-reference/schemas/required-inputs-for-a-schema /openapi.json get /v1/schemas/{schemaId}/required-inputs Returns the input keys this schema declares: those required to submit a request against it, and those it accepts but does not require. Field names are returned verbatim. Use them as the keys of the `inputs` object on `POST /v1/requests`. Lists are sorted. Neither list constrains `inputs`: additional keys outside both are accepted and passed to the call as context. This is the baseline: if your account is enabled for per-payer required inputs, some payers require additional fields not listed here, reported as `INVALID_INPUTS` on `POST /v1/requests`. # Resolve payer names against a schema's required inputs Source: https://docs.superdial.com/api-reference/schemas/resolve-payer-names-against-a-schemas-required-inputs /openapi.json post /v1/schemas/{schemaId}/required-payer-inputs Given a schema and a batch of payer names, returns the schema's own required/optional inputs **plus** the per-payer required inputs for each name, so you can assemble the complete input set for a specific payer *before* calling `POST /v1/requests`, instead of discovering a payer-specific field from an `INVALID_INPUTS` rejection. The schema-level `requiredInputs`/`optionalInputs` are identical in shape and meaning to [`GET /v1/schemas/{schemaId}/required-inputs`](/api-reference/schemas/required-inputs-for-a-schema); `payers` adds the per-payer detail. The response carries one `payers` entry per `payerNames` entry, in input order, with no de-duplication (positionally aligned 1:1 with the request array). Each entry is either **matched** (`inputPayerName`, `matchedPayerName`, `payerRequiredInputs.fields`) or a per-payer **error** (`inputPayerName`, `errorCode`, `message`). Discriminate on the presence of `errorCode`. A per-payer failure never fails the whole request; whole-request failures use the uniform `{error, message}` envelope. **Opt-in.** Gated on the `enforcePayerRequiredInputs` account feature. When it is off the endpoint returns 403 `PAYER_REQUIRED_INPUTS_DISABLED`. This is the schema-keyed twin of `POST /v1/scripts/{scriptId}/required-payer-inputs`. See the [Per-Payer Required Inputs guide](/guides/payer-required-inputs). # Retrieve a schema Source: https://docs.superdial.com/api-reference/schemas/retrieve-a-schema /openapi.json get /v1/schemas/{schemaId} Returns the detail resource for one schema: its `name`, its `requestType`, and `resultsFields` — every field the schema can produce in `results` on `GET /v1/requests/{requestId}`. Use it to build an ingest mapping and a destination table before you run a request. Inputs are not included; use `GET /v1/schemas/{schemaId}/required-inputs` for what to send. `resultsFields` is sorted by `name`. Each `name` matches the `results` key and the top-level `missingFields` entries exactly. `callSteps[].missingFields` is a different list — it falls back to raw question text for a skipped question that carries no alias — so do not join it against this inventory. **For this schema, the inventory is a superset of any one response.** Most fields on a large schema are gated on another field's answer, so they are absent on any given request. An unanswered field is absent from `results`; it is never `null`. Every column you build from this inventory must be nullable. Map on `name`, treat every field as optional, and ignore keys you do not map. The endpoint does not report which fields are gated. **A chained request can return keys beyond this schema.** A request can open a follow-up leg: a second call against a different schema, visible as an extra `callSteps` entry. That leg's captured values merge into the same top-level `results` under the leg schema's own field names. `resultsFields` covers one schema and does not list them. Read `callSteps[].schemaId` on a completed request, then call this endpoint again for that id. **`allowedValues` is not a closed set.** `CANNOT ANSWER - ` passes through verbatim as a string on any type, including `boolean` and `multiple`, so a strict enum or boolean parse fails on it. Detect it by string prefix. It does not appear in `missingFields`: an explicit non-answer counts as answered. **Version drift.** `resultsFields` describes the schema's current latest version. A request that already ran was pinned to the version that was latest at run time. So an older request's `results` can carry keys this endpoint no longer lists, or omit keys it now lists. Read the endpoint again and diff the field list to find a change. # Migrating from the Calls API Source: https://docs.superdial.com/guides/api-migration Move from the legacy Calls API to the Requests API before the October 1, 2026 sunset. The legacy **Calls API** (`POST /v1/calls`, `scriptId`) is replaced by the **Requests API** (`POST /v1/requests`, `schemaId`). Legacy endpoints sunset on **October 1, 2026**. The dialing capability is the same. What changes is the shape of the integration: a [request](/guides/concepts#request) replaces a call as the unit of work, a [schema](/guides/concepts#schema) replaces a script, and results come back as schema-defined named fields instead of question-indexed answers. Several things you might assume are new already exist in the legacy API: the `GET /v1/auth` token exchange, structured errors, and definition listing. This guide calls those out so you don't rebuild what you already have. > [!WARNING] > > Two changes break silently if you miss them. The dialed number moves from a top-level `to` field > into `inputs.phoneNumber` (see [Submitting work](#3-submitting-work)), and the Requests API needs > its **own** webhook URL, separate from your legacy one (see > [Configure the Request webhook URL](#configure-the-request-webhook-url)). Neither returns an > error when you get it wrong. ## 1. At a glance | Concept | Legacy (Calls API) | New (Requests API) | | - | - | - | | Unit of work | Call | Request (may be fulfilled digitally, by phone, or both) | | Definition object | Script (`scriptId`) | Schema (`schemaId`) | | Submit | `POST /v1/calls` | `POST /v1/requests` | | Fetch one | `GET /v1/calls/{callId}` | `GET /v1/requests/{requestId}` | | List | `GET /v1/calls` | `GET /v1/requests` | | Discover inputs | `GET /v1/scripts/{scriptId}/required-inputs` | `GET /v1/schemas/{schemaId}/required-inputs` | | Discover output fields | no equivalent: you read whatever keys came back | `GET /v1/schemas/{schemaId}` | | List definitions | `GET /v1/scripts` | `GET /v1/schemas` | | Authentication | `GET /v1/auth` | `GET /v1/auth` (same endpoint) | | Dialed number | top-level `to` | `inputs.phoneNumber` | | `inputs` value types | any JSON type where the field has no format rule | strings (or `null`) only | | States | `processing`, `success`, `failure`, `cancelled`, `paused` | `PROCESSING`, `SUCCESS`, `PARTIAL`, `FAILURE` | | Results shape | question-indexed answers (`"0"`, `"0.0"`) | schema-defined named fields (`results.claimStatus`) | | Errors | `error` string plus an `errors` object | structured [`error`](/guides/concepts#error-object) object plus `missingFields` | | Webhook URL | one setting | a separate setting, configured independently | The base host does not change: `https://robodialer-service-api-9nc4t1p9.uc.gateway.dev`. Sandbox and production continue to use separate credentials against that one host. ## 2. Authentication Authentication is **unchanged**. Both APIs use the same `GET /v1/auth` exchange: trade your long-lived key and secret for a short-lived bearer token, then attach that token to every subsequent request. ```bash theme={null} curl "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/auth" \ -H "Robodialer-API-Key: " \ -H "Robodialer-API-Secret: " ``` ```json theme={null} { "token": "" } ``` Pass it as `Authorization: Bearer `. Tokens are valid for one hour. > [!NOTE] > > No change required if you already exchange credentials at `GET /v1/auth` and cache the token > (up to about 55 minutes, refreshing before expiry). Keep your key and secret in a secret store: they are long-lived, > the token is not. See [Production vs Sandbox](/guides/concepts#production-vs-sandbox) for which > key to use when. ## 3. Submitting work Rename `scriptId` to `schemaId`, post to `/v1/requests`, and **move the dialed number into `inputs.phoneNumber`**. `internalId`, `internalTag`, and `webhookUrl` carry over unchanged. ### Legacy: POST /v1/calls ```json theme={null} { "scriptId": "123456", "to": "2125551234", "inputs": { "memberId": "TEST123456789", "payerName": "Sample Insurance Co", "memberDateOfBirth": "1990-01-01" } } ``` ```json theme={null} { "callId": "call_abc123xyz", "batchId": "OEcqR7tYuI2pLm4nBv8k" } ``` ### New: POST /v1/requests ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "phoneNumber": "2125551234", "memberId": "TEST123456789", "payerName": "Sample Insurance Co", "memberDateOfBirth": "1990-01-01" }, "internalId": "crm-ticket-441255", "internalTag": "vob-prod", "webhookUrl": "https://your-app.example.com/webhooks/superdial/requests" } ``` ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "crm-ticket-441255", "payerLookup": { } } ``` > [!WARNING] > > **There is no top-level `to` field on `POST /v1/requests`.** The dialed number is an input: > `inputs.phoneNumber`. A body that sends `to` at the top level is not rejected, because unknown > top-level keys are ignored. Instead the request fails input validation for a missing > `phoneNumber`, or, if your account has payer phone number lookup enabled, it silently dials a > number you did not choose. `to` does still appear in the **response**, where it reports the number > actually dialed. Field mapping: `scriptId` to `schemaId`, `to` to `inputs.phoneNumber`, `callId` to `requestId`, `batchId` to `requestBatchId`. `inputs`, `internalId`, and `internalTag` carry through unchanged. `webhookUrl` remains an optional per-request override. The create response also always carries a `payerLookup` object describing how the payer and number were resolved. See [Creating a Request](/guides/creating-a-request#single-request) for the full field list. ### Input values must be strings `POST /v1/requests` rejects any non-string value in `inputs` before it reads anything else. `POST /v1/calls` has no such check, so a field you have always sent as an array keeps working on the legacy endpoint and fails on **every** request to the new one. Multi-value fields are the usual case. Join them into a comma-delimited string: | Field | Legacy Calls API accepted | Requests API needs | | - | - | - | | `cptCodes` | `["99213", "99214"]` | `"99213,99214"` | | `icd10Codes` | `["E11.9", "I10"]` | `"E11.9,I10"` | The rejection names every offending field, so one response tells you the whole fix: ```json theme={null} { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "invalidInputs": { "cptCodes": "cptCodes must be a string (got list)", "icd10Codes": "icd10Codes must be a string (got list)" } } } ``` > [!WARNING] > > A 400 creates nothing: no request, no batch, no call, nothing in the portal. An integration that > posts and never reads the response body looks like it is submitting work when every submission is > being refused. Log `details.invalidInputs` on the first 400 before you retry. See > [Multi-value inputs](/guides/creating-a-request#multi-value-inputs). ### Other format differences The per-field format rules themselves are shared. Both APIs run the same validator, so the phone, date, dollar-amount, boolean and custom-pattern rules in [Input Validation](/guides/input-validation) behave identically. What differs is the shape of the body and how each API treats absent or placeholder values: | Behaviour | Legacy (Calls API) | New (Requests API) | | - | - | - | | Non-string `inputs` values | No type gate. An array or number is accepted for any field that carries no configured format rule, and stringified downstream. | Rejected up front: `{field} must be a string (got list)`. | | Script default values | Defaults configured on the script fill an input you omit or send empty. | Not applied at validation. An omitted required input is reported in `details.missingInputs`. | | Placeholder values | `"-"`, `"N/A"`, `"n/a"`, `"unknown"` count as empty, so a script default can replace them. | Treated as real values. They pass the empty check and go to the call. With [member-ID validation](/guides/input-validation#member-id-validation) on, `"N/A"` in `memberId` is rejected. | | Agent routing | `agentAssignment: "ai"` and `agentLocation: "us"` or `"any"`, both strings | `aiOnly` and `onshoreOnly`, both JSON booleans. A string `"true"` returns `400 INVALID_REQUEST`. | | `internalId` | Echoed back only. A repeat creates a second call. | Idempotency key. A repeat returns the original `requestId`. | | Unknown top-level keys | Ignored | Ignored. `to` and `requestType` are among them, so neither errors when you leave it in place. | > [!NOTE] > > The placeholder difference is easy to overlook. If your export writes `"N/A"` into an optional > field, the legacy API treated it as blank; the Requests API sends the literal string to the > representative on the call. Send an empty string, or omit the key. ### Batch submission Rename the wrapper key `calls` to `requests`. ```json theme={null} { "requests": [ { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "phoneNumber": "2125551234", "memberId": "TEST111" } }, { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "phoneNumber": "2125551234", "memberId": "TEST222" } } ]} ``` The batch response returns a per-item array, and an item may carry an `error` instead of a `requestId`, so check every element. Note two differences from legacy: the per-item error key is singular `error` (legacy used plural `errors`), and the aggregate status code is not simply 207. A batch returns 200 when every item succeeds, **500 if any item failed with a server error**, 207 for a mix of successes and client errors, and 400 when every item failed with a client error. Treat 500 as "partial results may still be present" rather than "nothing was created". See [Batch](/guides/creating-a-request#batch). ## 4. Discovering inputs and schemas You can enumerate your provisioned schemas programmatically. This is not new capability: the legacy API already exposes `GET /v1/scripts`, which returns your scripts as `[{ "id", "type", "name", "createdAt" }]`. `GET /v1/schemas` is its direct replacement. Map `id` to `schemaId` and `type` to `requestType`. ```bash theme={null} curl "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas" \ -H "Authorization: Bearer " ``` ```json theme={null} { "schemas": [ { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Claim Status (Commercial)", "requestType": "claim-status" }, { "schemaId": "qP2bN8rT6mK1xC3vW9aL", "name": "Verification of Benefits", "requestType": "vob" } ]} ``` ```bash theme={null} curl "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas/fWxzG4nqtpHsJxS5Lm3q/required-inputs" \ -H "Authorization: Bearer " ``` ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "requiredInputs": { "fields": ["payerName", "memberId", "dateOfService", "phoneNumber"] }, "optionalInputs": { "fields": ["memberId2", "internalCaseId"] } } ``` Use this to confirm where the dialed number belongs: `phoneNumber` appears in `requiredInputs.fields`, not as a separate top-level parameter. See [Schemas](/guides/schemas#look-up-required-and-optional-inputs). ## 5. Retrieving results The largest data-model change is the **results shape**. Legacy answers were keyed by question index. New results are named fields defined by your schema, which removes the positional coupling. ### Legacy: GET /v1/calls/ ```json theme={null} { "callId": "a1B2c3D4e5F6g7H8i9J0", "status": "success", "scriptId": "123456", "results": { "0": { "answer": false, "answerType": "boolean", "question": "Is the member active?" }, "1": { "answer": "Yes", "answerType": "boolean", "question": "Is prior auth required?" }, "1.0": { "answer": "PA-90210", "answerType": "alphanumeric" } }, "resultsByAlias": { "priorAuthRequired": { } }, "highLevelOutputs": [ { "alias": "priorAuthRequired", "answer": true } ], "transcript": "...", "recordingDownloadUrl": "https://..." } ``` ### New: GET /v1/requests/ ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "requestType": "claim-status", "state": "SUCCESS", "results": { "claimStatus": "PAID", "paidAmount": "150.00" }, "missingFields": [], "modality": "phone_only", "data_completeness": null, "error": null, "dateCreated": "2026-04-24T15:30:00+00:00", "completedAt": "2026-04-24T15:32:18+00:00", "transcript": "...", "callSummary": "...", "recordingDownloadUrl": "https://..." } ``` > [!NOTE] > > Replace any code that reads `results["0"].answer` or relies on `resultsByAlias` or > `highLevelOutputs` with code that reads named fields from `results` (for example > `results.claimStatus`). To find out which field names to expect, call > [`GET /v1/schemas/{schemaId}`](/api-reference/schemas/retrieve-a-schema). Its `resultsFields` > lists every field the schema can return, so you can write the mapping before you run a request. > See [Schemas → Look up the fields a schema returns](/guides/schemas#look-up-the-fields-a-schema-returns). > [!WARNING] > > If your account has Title Case trace fields turned on for the legacy API, your existing keys do > not carry over. That setting rewrites the keys of `traceResults.traceFields` on `/v1/calls`. It > does not apply to `results` on `/v1/requests`, and the names from > `GET /v1/schemas/{schemaId}` match `results`. Map the new names rather than reusing your Title > Case keys. Two field-naming details worth knowing before you write parsers. `data_completeness` really is snake\_case among camelCase siblings, and today it is either `"minimum"` or `null`. And `to` is omitted from the response entirely when SuperDial resolved the number on your behalf, so treat it as optional rather than always present. See [Single-request vs list response shapes](/guides/concepts#single-request-vs-list-response-shapes). ### States and errors | State | Terminal | Meaning | | - | - | - | | `PROCESSING` | No | Still running. The webhook fires on completion. | | `SUCCESS` | Yes | All required fields captured. `results` fully populated. | | `PARTIAL` | Yes | New. Only after a voicemail or a failed follow-up call. See [Failed and partial requests](/guides/reading-requests#failed-and-partial-requests). | | `FAILURE` | Yes | No usable data. `results` empty, `error` populated. | Legacy was not binary either. Alongside `success` and `failure` it returned `processing`, plus `cancelled` and `paused`. The mapping is `processing` to `PROCESSING`, `success` to `SUCCESS`, `failure` to `FAILURE`. The genuinely new state to start handling is `PARTIAL`. > [!WARNING] > > On `PARTIAL`, `error` is **`null`**. Only `FAILURE` populates the `error` object, so code that > branches on `error` being non-null will treat every partial result as a clean success. Note also that `PROCESSING` is where anything non-terminal lands, including internal error and cancelled states. A request sitting in `PROCESSING` indefinitely is not necessarily still dialing. When a request fails, inspect the structured error: ```json theme={null} { "error": { "errorCategory": "NOT_FOUND", "errorCode": "MEMBER_NOT_FOUND", "errorMessage": "human-readable description" } } ``` Codes you are likely to see early include `MEMBER_NOT_FOUND`, `CLAIM_NOT_FOUND`, `IVR_FAILURE`, `CLAIM_NUMBER_MISSING`, and `MEMBER_ID_INCORRECT`. `errorCategory` is one of exactly two values, `NOT_FOUND` or `SYSTEM_ERROR`. `errorCode` is **open-ended**: new codes are added over time, so treat an unrecognized code as unclassified rather than validating against a fixed list. Missing-input codes follow the `{FIELD}_MISSING` pattern and incorrect-input codes follow `{FIELD}_INCORRECT`, which lets you auto-correct and resubmit (for example re-prompt for a member ID) instead of treating every non-success as a dead end. > [!NOTE] > > Do not **construct** error codes from field names. The mapping is a fixed table, not a string > transform, and several pairs are asymmetric: the provider address field yields > `PROVIDER_FACILITY_LOCATION_MISSING` but `PROVIDER_ADDRESS_INCORRECT`. Match on the codes you > receive, listed in [Concepts](/guides/concepts#errorcode). Legacy already returned structured errors, so this is a reshaping rather than a brand-new concept. A failed legacy call carries both a top-level `error` **string** and an `errors` object: ```json theme={null} { "error": "human-readable failure reason", "errors": { "errorClass": "OTHER", "errorJustification": "...", "errorCitation": "...", "relevantInputKeys": "memberId\npayerName", "correctedPhoneNumber": "..." } } ``` `errorClass` carries values such as `OTHER` and `BAD_NUMBER`. Map `errorClass` to `errorCode` and `errorCategory`, `errorJustification` to `errorMessage`, and `relevantInputKeys` to the new `missingFields`. The type change matters: legacy `error` is a string, new `error` is an object. Code that logs `error` directly will start printing an object. ### Listing `GET /v1/requests` takes `dateFrom` and `dateTo` (`YYYY-MM-DD`), and the legacy `batchId` query parameter is renamed `requestBatchId`. With no date range and no batch ID, the default window is **today only**. The new endpoint also adds pagination, which legacy did not have: pass `pageSize` (default 100, maximum 500) and `pageToken`, and follow `nextPageToken` until it is absent. See [Pagination](/guides/reading-requests#listing-requests). As before, transcripts and recording URLs are returned only when fetching a single request by ID, not in the list. Note that `callSummary` **is** present in list responses, so a summary field appearing in a list is expected rather than a sign you fetched detail. ## 6. Webhooks Webhooks still fire on terminal states. The payload field names change, but the **signature scheme is unchanged**, so your existing verifier keeps working. ### Configure the Request webhook URL > [!WARNING] > > The Requests API has its **own** webhook URL, separate from the legacy Calls API webhook. Setting > one does nothing for the other, and there is no fallback between them. Until you set the Request > webhook URL, terminal requests send **no webhook and no error**: delivery is a silent no-op and > your requests will look like they simply never completed. Set it before you cut production traffic over. In the SuperDial portal, go to **API**, find the **Webhooks** section, and fill in **Request webhook**. Your existing legacy URL appears below it as **Legacy webhook URL (/v1/calls)**, collapsed, and it keeps serving any traffic still going to `POST /v1/calls`. Both can be set at once during a phased cutover. To confirm delivery is working, the same panel shows **Recent deliveries (7 days)**, filterable by Request ID. If you have submitted requests and that list is empty, the URL is not configured correctly. You can also pass `webhookUrl` in the body of `POST /v1/requests` to direct a single request elsewhere. A per-request value wins over the account-level setting, and it is frozen when the request is created: later changes to the account-level URL do not apply to requests already in flight. Full detail in [Webhooks → Configuration](/guides/webhooks#configuration). If neither is set, poll `GET /v1/requests/{requestId}` to get results. ### Payload ```json theme={null} { "callId": "VKW680aBcDeFgHiJkLmN", "status": "success", "batchId": "OEcqR7tYuI2pLm4nBv8k", "internalId": "asd-123" } ``` Legacy above, new below. ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "state": "SUCCESS", "internalId": "your-id", "internalTag": "your-tag" } ``` Rename `callId` to `requestId`, `batchId` to `requestBatchId`, and read `state` instead of `status`, remembering the uppercase values and the new `PARTIAL`. Both payloads echo `internalId` and `internalTag` only when you supplied them. Payloads omit timestamps and results. On receipt, call `GET /v1/requests/{requestId}` to fetch the full record. Dedupe on `requestId` (legacy: `callId`). ### Signature verification Unchanged: HMAC-SHA256 over the raw request body, sent in the `X-Webhook-Signature` header as a bare hex digest. The server sends the body already sorted, so you can HMAC the raw request bytes directly and the same verifier works for both legacy and new webhooks. The signing secret depends on which credentials created the request. Production requests use your account `webhookSecret` if you have set one, otherwise your production API key. **Sandbox requests use your sandbox API key and ignore `webhookSecret` entirely**, which is a common cause of signature failures when testing. Because the server emits the body already sorted (`json.dumps(payload, sort_keys=True)`), re-parsing and re-serializing with `sort_keys=True` yields the same bytes as the raw request. That is why one verifier covers both legacy and new webhooks: you only need to read the renamed fields out of the parsed payload. Worked Python and Node examples are in [Webhooks → Signature verification](/guides/webhooks#signature-verification). ### Delivery and retries Delivery has two layers. On a 5xx or a connection failure we retry inline up to 3 more times (4 attempts total) with 0.5s, 1s, 2s backoff and a 10 second timeout per attempt. If those fail, the delivery is retried later: a request gets up to 3 delivery rounds within 7 days of reaching its terminal state. > [!NOTE] > > Only **400 and 404** stop delivery permanently. Other 4xx responses, including 401 and 403, are > retried across the remaining rounds, because a rotated credential can change the answer. If your > guide or notes say "4xx is terminal", that is not how it behaves. Legacy webhook retry behaviour differs and does not transfer: it allows 3 attempts total, has no inline retry ladder, and applies no send timeout. ## 7. New capabilities worth adopting * **Modality.** [`modality`](/guides/concepts#modality) tells you how a result was obtained: `digital_only`, `phone_only`, `digital_plus_phone`, or `null` when nothing has been dispatched yet. Some requests are now satisfied digitally with no phone call at all. * **Idempotency.** Resubmitting with the same `internalId` returns the previously created `requestId` instead of duplicating work. See [Correlation and idempotency](/guides/creating-a-request#correlation-and-idempotency). * **Partial results.** When a follow-up call fails, `PARTIAL` keeps the answers the first call captured instead of discarding the whole request. ## 8. Migration checklist * [ ] **Set the Request webhook URL** in the portal under API, Webhooks, Request webhook. This is separate from your legacy webhook URL and silently sends nothing until configured. * [ ] Auth is unchanged (`GET /v1/auth`, one-hour token). Reuse your existing token fetch and cache. * [ ] Repoint endpoints: `/v1/calls` to `/v1/requests`, `/v1/calls/{id}` to `/v1/requests/{id}`, `/v1/scripts/...` to `/v1/schemas/...`. * [ ] Rename request fields: `scriptId` to `schemaId`, batch wrapper `calls` to `requests`. * [ ] **Move the dialed number** from top-level `to` into `inputs.phoneNumber`. * [ ] **Convert every array-valued input to a comma-delimited string** (`cptCodes`, `icd10Codes`, and anything else you send as a list). Arrays are rejected on every request. * [ ] Check what your script defaults used to fill in. Defaults are not applied on the Requests API, so send those fields explicitly. * [ ] Replace `"N/A"`, `"-"` and `"unknown"` placeholders with an empty string or an omitted key. * [ ] Swap `agentAssignment` / `agentLocation` strings for the `aiOnly` / `onshoreOnly` booleans. * [ ] Rename response fields: `callId` to `requestId`, `batchId` to `requestBatchId`, and the list query parameter `batchId` to `requestBatchId`. * [ ] Rewrite result parsing: read named fields from `results` instead of question-index keys, `resultsByAlias`, or `highLevelOutputs`. * [ ] Handle `PARTIAL`, where `error` is `null`. * [ ] Re-read errors from the new `error` object. It is an object, not a string, and `errorCode` is open-ended. * [ ] Handle batch status codes 200, 207, 400 and 500, and read the singular per-item `error` key. * [ ] Add pagination to any list polling: `pageSize`, `pageToken`, `nextPageToken`. * [ ] Update your webhook handler for the new field names and `state` values. Signature verification needs no change. Dedupe on `requestId`. * [ ] Validate end to end against [sandbox credentials](/guides/sandbox) before moving production traffic. # Concepts & Glossary Source: https://docs.superdial.com/guides/concepts Definitions for the core terms used throughout the SuperDial API. Definitions for the terms used throughout the API. ## Request A single data-extraction job against a payer. A request consists of a `schemaId` that defines the output fields and `inputs` that supply the values the schema requires. SuperDial fills the schema's fields from one or more channels and returns the structured `results` object on `GET /v1/requests/{requestId}`, for example: ```json theme={null} { "claimStatus": "PAID", "paidAmount": "150.00" } ``` A request has a [state](#state) lifecycle and emits a [webhook](/guides/webhooks) when it reaches a terminal state. ## Schema A definition of the output fields a request should produce, along with which fields are required. Each `requestType` is backed by a schema. Schemas are configured by SuperDial and identified by `schemaId`. When a request runs, SuperDial fills the schema's fields from one or more sources and merges them into the request's `results`. A request reaches the `SUCCESS` [state](#state) when its call effort completes with every required field filled. A request ends in `FAILURE` when its primary call effort fails. `PARTIAL` is rare; see [State](#state). You can discover the schemas provisioned for your account at any time with [`GET /v1/schemas`](/api-reference/schemas/list-schemas), look up the required input keys for a given schema with [`GET /v1/schemas/{schemaId}/required-inputs`](/api-reference/schemas/required-inputs-for-a-schema), and list the fields a schema returns with [`GET /v1/schemas/{schemaId}`](/api-reference/schemas/retrieve-a-schema). ## Request Type The kind of extraction a schema performs, for example, `claim-status` or `vob` (verification of benefits). Each [schema](#schema) is configured for one `requestType`, and the value is server-derived: you don't pass it on `POST /v1/requests`, but it surfaces on `RequestResponse.requestType` and on each row of `GET /v1/schemas`. Discover the request types your account is provisioned for via [`GET /v1/schemas`](/guides/schemas). ## Request Batch A scheduling grouping. Every request belongs to a batch, identified by `requestBatchId`: * Submit `POST /v1/requests` with a single request → a batch of size 1 is created automatically with its own `requestBatchId`. * Submit `POST /v1/requests` with `{ "requests": [...] }` → within that single submission, entries scheduled for the same business day share one `requestBatchId`; entries scheduled for different days each get a distinct `requestBatchId`. Whether the submission lands on one day or spills across several depends on your account's daily call capacity and any work already pending on those days. A batch affects when a request is scheduled to run and how progress is tracked across that day's slice, but every request still has its own `requestId` and gets its own webhook regardless of which batch it belongs to. You can [list all requests under a given `requestBatchId`](/guides/reading-requests#by-batch) with `GET /v1/requests?requestBatchId=...`. For multi-day submissions, iterate over the unique IDs returned in the create response. ## State A request moves through four states. Values are uppercase on the response (`SUCCESS`, not `success`): | State | Terminal? | Meaning | | - | - | - | | `PROCESSING` | No | Still running. Wait for the [webhook](/guides/webhooks). | | `SUCCESS` | Yes | Completed with every required field populated. `results` is full, `error` is `null`. A field the representative couldn't answer holds `CANNOT ANSWER - `; see [Look up the fields a schema returns](/guides/schemas#look-up-the-fields-a-schema-returns). | | `PARTIAL` | Yes | Occurs in only two cases: the call left a voicemail and captured nothing (accounts with leave-a-voicemail), or the first call succeeded but a [follow-up step](/guides/reading-requests#when-a-follow-up-step-fails) failed. A single-call request otherwise ends `SUCCESS` or `FAILURE`. `error` is `null`. | | `FAILURE` | Yes | No required fields were captured. `results` is empty and `error` describes the cause. | A [webhook](/guides/webhooks) fires when the request transitions to `SUCCESS`, `PARTIAL`, or `FAILURE`. ## error object When `state` is `FAILURE`, the response carries a structured `error` object describing what went wrong. On `PROCESSING`, `SUCCESS`, and `PARTIAL`, `error` is `null`. A `PARTIAL` request has no single failure cause. After a failed follow-up step, that step's `callSteps` entry carries its own `error` and `missingFields`. | Field | Type | Description | | - | - | - | | `errorCategory` | enum | Two-bucket category (see below). | | `errorCode` | enum | Machine-readable failure code within the category. See [errorCode](#errorcode) for the full list. | | `errorMessage` | string | Human-readable sentence describing what went wrong. See the note below on wording stability. | > [!NOTE] > > The wording of `errorMessage` may change between releases. Use `errorCode` for programmatic dispatch. `errorCategory` is one of: | Category | Meaning | | - | - | | `NOT_FOUND` | The payer couldn't find what you asked about. | | `SYSTEM_ERROR` | Any other failure: IVR navigation, payer refusal, unreachable, etc. | ## errorCode Machine-readable failure code within `error.errorCategory`. Match on this for parsing and analytics; `errorMessage` carries the human-readable detail. The taxonomy has four groups: a small set of `SYSTEM_ERROR` codes, a handful of `NOT_FOUND` entity codes, and two field-specific `NOT_FOUND` families (`*_MISSING` and `*_INCORRECT`). ### `SYSTEM_ERROR` codes | Code | Triggers | | - | - | | `IVR_FAILURE` | Couldn't navigate the payer's phone system to reach a representative (no rep-routing option, dead-end menus). | | `PAYER_REFUSAL` | Representative refused to provide the information: declined to interact with an automated agent, declined to speak with a third party, or refused the specific query. | | `UNABLE_TO_REACH_HUMAN_IN_TIME` | Couldn't connect to a representative within the per-request retry budget: voicemail-only line, hold time exceeded, repeated long-wait attempts. | | `REQUIRES_OTHER_CHANNEL` | Payer requires the request through portal, fax, email, or another channel SuperDial doesn't currently support. | | `VOICEMAIL_FAILED` | Reached voicemail and could not leave a message. Emitted only for accounts with leave-a-voicemail enabled, and on those accounts only for the scripts it covers. Everywhere else, reaching voicemail reports `UNABLE_TO_REACH_HUMAN_IN_TIME`. | | `MATCHED_PHONE_NUMBER_INCORRECT` | SuperDial dialed a number from a payer-directory match or a SuperDial-agent lookup, and that number turned out to be incorrect. Attributed to SuperDial, not your input. See [Dialing-number errors](#dialing-number-errors). | | `OTHER` | A `SYSTEM_ERROR` that didn't fit a more specific code. Inspect `errorMessage` for detail. | ### `NOT_FOUND` codes: entity The payer couldn't locate the entity the request asked about. | Code | Triggers | | - | - | | `MEMBER_NOT_FOUND` | Member couldn't be located from the supplied identifiers. | | `CLAIM_NOT_FOUND` | Claim couldn't be located. | | `PRIOR_AUTH_NOT_FOUND` | Prior authorization couldn't be located. | | `APPEAL_NOT_FOUND` | Appeal couldn't be located. | ### `NOT_FOUND` codes: missing required input A required input wasn't supplied with the request. Pattern: `{FIELD}_MISSING`. * `CLAIM_NUMBER_MISSING` * `CLAIM_AUTHORIZATION_NUMBER_MISSING` * `CLAIM_CPT_PROCEDURE_CODE_MISSING` * `CLAIM_DATE_OF_SERVICE_MISSING` * `CLAIM_DIAGNOSIS_MISSING` * `CLAIM_EFT_CHECK_NUMBER_MISSING` * `MEMBER_GROUP_MISSING` * `MEMBER_PATIENT_LOCATION_MISSING` * `MEMBER_PATIENT_PHONE_MISSING` * `MEMBER_PAYER_SPECIFIC_PATIENT_ID_MISSING` * `MEMBER_POLICY_NUMBER_MISSING` * `MEMBER_SSN_MISSING` * `PROVIDER_CALLBACK_NUMBER_MISSING` * `PROVIDER_FACILITY_INFO_MISSING` * `PROVIDER_FACILITY_LOCATION_MISSING` * `PROVIDER_FAX_MISSING` * `PROVIDER_OTHER_LICENSING_MISSING` * `PROVIDER_PTAN_MISSING` * `PROVIDER_SPECIALTY_MISSING` ### `NOT_FOUND` codes: incorrect input value An input was supplied but didn't match the payer's records. Pattern: `{FIELD}_INCORRECT`. * `APPLICATION_ID_INCORRECT` * `APPLICATION_SUBMISSION_METHOD_INCORRECT` * `APPLICATION_SUBMITTED_DATE_INCORRECT` * `APPLICATION_SUBMITTED_TO_INCORRECT` * `BEGINNING_DATE_OF_SERVICE_INCORRECT` * `BILLING_PROVIDER_ADDRESS_INCORRECT` * `BILLING_PROVIDER_NAME_INCORRECT` * `BILLING_PROVIDER_NPI_INCORRECT` * `BILLING_PROVIDER_TAX_ID_INCORRECT` * `CALLBACK_NUMBER_INCORRECT` * `CLAIM_CHARGE_AMOUNT_INCORRECT` * `CLAIM_SUBMITTED_DATE_INCORRECT` * `CLEARINGHOUSE_CLAIM_ID_INCORRECT` * `CLEARINGHOUSE_NAME_INCORRECT` * `END_DATE_OF_SERVICE_INCORRECT` * `FACILITY_NPI_INCORRECT` * `FAX_NUMBER_INCORRECT` * `GROUP_NUMBER_INCORRECT` * `INPUT_PHONE_NUMBER_INCORRECT` * `INTERNAL_CLAIM_ID_INCORRECT` * `INTERNAL_ID_INCORRECT` * `INTERNAL_PROVIDER_ID_INCORRECT` * `INTERNAL_TAG_INCORRECT` * `IS_PRIMARY_POLICY_INCORRECT` * `MEDICATION_NAME_INCORRECT` * `MEMBER_ADDRESS_INCORRECT` * `MEMBER_DATE_OF_BIRTH_INCORRECT` * `MEMBER_FIRST_NAME_INCORRECT` * `MEMBER_ID_INCORRECT` * `MEMBER_LAST_NAME_INCORRECT` * `OFFICE_NPI_INCORRECT` * `PATIENT_ADDRESS_INCORRECT` * `PATIENT_DATE_OF_BIRTH_INCORRECT` * `PATIENT_FIRST_NAME_INCORRECT` * `PATIENT_LAST_NAME_INCORRECT` * `PATIENT_PHONE_NUMBER_INCORRECT` * `PATIENT_RELATIONSHIP_TO_MEMBER_INCORRECT` * `PAYER_CLAIM_ID_INCORRECT` * `PAYER_NAME_INCORRECT` * `PHARMACY_NAME_INCORRECT` * `PRACTICE_NPI_INCORRECT` * `PRIOR_AUTH_ID_INCORRECT` * `PROVIDER_SPECIALTY_INCORRECT` * `PROVIDER_TYPE_INCORRECT` * `PTAN_INCORRECT` * `RENDERING_PROVIDER_ADDRESS_INCORRECT` * `RENDERING_PROVIDER_FIRST_NAME_INCORRECT` * `RENDERING_PROVIDER_LAST_NAME_INCORRECT` * `RENDERING_PROVIDER_NPI_INCORRECT` * `RENDERING_PROVIDER_PHONE_NUMBER_INCORRECT` * `RENDERING_PROVIDER_SPECIALTY_INCORRECT` * `REPRESENTATIVE_PHONE_NUMBER_INCORRECT` * `SERVICE_STATE_INCORRECT` * `TAX_ID_INCORRECT` ### Dialing-number errors When a phone call fails because the dialed number was incorrect, the code and category depend on **where that number came from** — so you're not blamed for a number SuperDial chose, and vice-versa: | Dialed number came from | `errorCategory` | `errorCode` | | - | - | - | | SuperDial payer-directory match, or a SuperDial-agent lookup | `SYSTEM_ERROR` | `MATCHED_PHONE_NUMBER_INCORRECT` | | A number a representative referred us to (from an earlier call) | `NOT_FOUND` | `REPRESENTATIVE_PHONE_NUMBER_INCORRECT` | | The number you supplied in `inputs.phoneNumber` (or a configured override) | `NOT_FOUND` | `INPUT_PHONE_NUMBER_INCORRECT` | Numbers SuperDial looked up (a directory match or an agent lookup) are classified as `SYSTEM_ERROR` — the incorrect number is our fault. Numbers you supplied, or that a representative referred us to, are classified as `NOT_FOUND`. > [!NOTE] > > Older calls placed before this attribution shipped, or calls where the number's source wasn't recorded, may still surface the generic `PHONE_NUMBER_INCORRECT` code — under `SYSTEM_ERROR` when SuperDial looked up the number, otherwise `NOT_FOUND`. Handle both the generic and the provenance-specific codes. ### `OTHER` under `NOT_FOUND` When the failure category is `NOT_FOUND` but no specific entity / `*_MISSING` / `*_INCORRECT` code fits. **Stability.** Existing codes won't be renamed. New codes may be introduced: new `*_MISSING` or `*_INCORRECT` codes appear when new schemas reference new fields. When bucketing for analytics, default unknown values to `OTHER` rather than dropping the row. ## Payer The insurance company a request asks about. Identify the payer with `inputs.payerName`. When the schema also requires `inputs.phoneNumber`, that's the number SuperDial will dial. If your account is enabled for **payer phone number lookup** (an opt-in capability, ask your account team), `phoneNumber` becomes optional: supply `inputs.payerName` alone and SuperDial will look up the dialing number for you. See the [Payer Phone Number Lookup guide](/guides/payer-resolution) for what the lookup matches, what inputs shape the result (especially `memberId` for BCBS-family payers), and the failure modes (`PAYER_NOT_FOUND`, `PAYER_LOOKUP_FAILURE`). When lookup is enabled, the `POST /v1/requests` response, and the `GET /v1/requests` reads, carry a `payerLookup` sub-object reporting the payer match and the number that will be dialed (`phoneNumberToUse`, plus `phoneNumberSource`). By default a `phoneNumber` you supply is always dialed as-is; set `useMatchedPayerPhone: true` to have SuperDial dial its matched number instead. See the [Payer Phone Number Lookup guide](/guides/payer-resolution) for the full field reference. If your account is enabled for **per-payer required inputs** (a separate opt-in capability, ask your account team), some payers require additional inputs beyond the schema's fields, so what you must supply can depend on `payerName`. See the [Per-Payer Required Inputs guide](/guides/payer-required-inputs). ## Modality The `modality` field on a `RequestResponse` records how the result was obtained, for billing audit and routing. SuperDial picks the modalities; you don't address them directly. | Value | Meaning | | - | - | | `digital_only` | Only electronic channels (clearinghouses, eligibility APIs) were attempted. No phone call placed. | | `phone_only` | Only a phone call was placed (no electronic attempt). | | `digital_plus_phone` | Both: electronic was attempted first, then a phone call. | | `null` | No modality has been dispatched yet, typical on a `PROCESSING` request that hasn't started running. | The `phone_only` and `digital_plus_phone` values both mean a phone call was placed and is billable at the phone-call rate. `digital_only` means no phone call was placed. Electronic channels are an [optional capability](#optional-capabilities) and depend on payer support. If they aren't enabled for your account, every request reports `phone_only`, and the fields that follow from an electronic result (`data_completeness`, `resultSummary`) stay `null`. ## data\_completeness A coarse completeness tier for digital-only results. Currently the only non-null value is `"minimum"`, which appears when `state` is `SUCCESS` and `modality` is `digital_only`, a hint that a phone-call attempt could have yielded richer data than what the electronic source returned. `null` in every other case. Reserved for future richer tiers (`enhanced`, `complete`). ## Call steps A request usually completes in a single phone call, but it can take more than one: for example, verifying benefits on one call and then checking prior authorization on a separate call. Every call rolls up into the one request: the merged answers land in the top-level `results`, and the request's `state` reflects the whole. On the single-request read, this shows up in related fields. **`callSteps`** summarizes the steps the request worked through, one per step, each naming the schema it ran via `schemaId`, and is present on any completed phone request. On a `SUCCESS` or `PARTIAL` request it's joined by **`contributingCalls`**, which breaks out the individual calls behind those steps (each identified by an opaque `id`, plus that call's transcript and captured fields: *how* it was gathered), and **`resultSources`**, which maps each result field to the call that produced it, and, through that call's step, to the schema behind it. A request grows past a single call in one of two ways: **re-dials of the same effort** (one step, more than one call, distinguished by `numContributingCalls`) or a **follow-up step** (a distinct second effort, e.g. prior authorization after benefits, that appears as a second `callSteps` entry linked back by `triggeredBy`). Follow-up steps run only on accounts where SuperDial has set up follow-up calls. See [Reading Requests → Calls behind a request](/guides/reading-requests#calls-behind-a-request) for a worked example of each. ## Webhook An outbound HTTP POST that SuperDial sends to your endpoint when a request reaches a terminal state. See the [Webhooks guide](/guides/webhooks) for payload, signature verification, and retry behavior. ## dueDate The date a request is scheduled to run, as an ISO-8601 timestamp on the [`RequestResponse`](/api-reference/requests/retrieve-a-request) shape. Set at submission time based on your account's daily call capacity and any work already pending. Use it to give end users a "ready by" estimate when you submit a batch, particularly when a batch overflows your daily capacity and lands across multiple business days. `null` when not set. ## Timestamps `dateCreated`, `completedAt`, and `dueDate` on a request response are ISO-8601 strings with an explicit UTC offset: for example, `"2026-04-24T15:32:18.123456+00:00"`. They are emitted in UTC by the server. [Webhook payloads](/guides/webhooks#payload) do **not** include any timestamps: they only carry `requestId`, `requestBatchId`, `state`, and the optional `internalId`/`internalTag`. To get timing data after a webhook fires, fetch the request via [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) and read `dateCreated`/`completedAt` from the response. `dateFrom` and `dateTo` query parameters on the [list endpoint](/guides/reading-requests#listing-requests) accept `YYYY-MM-DD` and are interpreted as UTC midnight. When omitted, they default to today's UTC window. Pass explicit values if you need a deterministic range. ## internalId An optional correlation ID you supply when [creating a request](/guides/creating-a-request#correlation-and-idempotency). SuperDial echoes it back on reads and webhooks so you can match requests to your own records. Also serves as an idempotency key. See [Idempotency](/guides/creating-a-request#correlation-and-idempotency). ## internalTag An optional opaque string you supply when creating a request. Echoed back on reads and webhooks. Useful for tagging requests (e.g., `"march-batch"`, `"high-priority"`) without polluting your own correlation IDs. ## Optional response fields Some fields on `GET /v1/requests/{requestId}` are **per-account additions** that aren't surfaced by default. If one of these doesn't appear in your responses, the capability isn't turned on for your account. Contact your account team if you'd like any of them enabled. | Field | What it gives you | | - | - | | `callFromNumber` | The outbound caller number (E.164) the call originated from. | | `scriptVersion` | The script version used for the call. | | `isRoboCall` | Whether the winning attempt was handled by the AI agent (`true`) or a human (`false`). | | `callAttempts` | Attempt counts by type: `total`, `robo`, `human`. | | `audit` | Audit metadata. Currently `{ "isHumanAudited": boolean }`. | These fields are additive: a response that omits them has the same shape as one without them enabled. Your parser doesn't need to branch on whether your account has them. ## Optional capabilities Several behaviors described in these docs are **off by default**. If a page describes something your account doesn't do, check this list first. Everything here is enabled by your account team, not through the API. | Capability | What turns on | Where it's documented | | - | - | - | | Payer phone number lookup | Submit with `payerName` and no `phoneNumber`. Enables `useMatchedPayerPhone`. | [Payer Phone Number Lookup](/guides/payer-resolution) | | Per-payer required inputs | Some payers require inputs beyond the schema's baseline. | [Per-Payer Required Inputs](/guides/payer-required-inputs) | | Sandbox credentials | A sandbox key/secret pair for end-to-end testing. | [Sandbox](/guides/sandbox) | | Account-level webhook URL | A default webhook destination for every request. | [Webhooks](/guides/webhooks#configuration) | | Compliance fields | Adds `isRoboCall`, `callAttempts`, `audit`. | [Optional response fields](#optional-response-fields) | | Outbound-number visibility | Adds `callFromNumber`. | [Optional response fields](#optional-response-fields) | | Script-version visibility | Adds `scriptVersion`. | [Optional response fields](#optional-response-fields) | | Leave-a-voicemail | Lets a failure report `VOICEMAIL_FAILED` instead of `UNABLE_TO_REACH_HUMAN_IN_TIME`. | [errorCode](#errorcode) | | Electronic channels | Lets a request finish without a phone call, which produces `modality: "digital_only"`, `data_completeness`, and `resultSummary`. | [Modality](#modality) | Everything else in these docs is on for every account. Pagination, `callSteps`, `contributingCalls`, `resultSources`, and the webhook payload need no configuration. ## resultSummary A prose summary of `results` for a `SUCCESS` or `PARTIAL` request that finished **without a phone call**, on the electronic-only path. A phone-backed request carries `callSummary` instead. `null` in every other case. `resultSummary` is not a per-account setting, but reaching it depends on one. A request only finishes without a phone call when electronic channels are enabled for your account and the payer supports them. If all your traffic is phone-backed, this field is always `null`. Ask your account team whether electronic channels apply to you. ## Single-request vs list response shapes `GET /v1/requests/{requestId}` and `GET /v1/requests` (list) return the same [`RequestResponse`](/api-reference/requests/retrieve-a-request) schema, but the **list endpoint omits the enrichment fields below**, the transcript and recording fields (which can be large) and the per-call breakdown: | Field | Single GET | List GET | | - | - | - | | `transcript` | ✓ | Omitted | | `recordingDownloadUrl` | ✓ | Omitted | | `callSteps` | ✓ | Omitted | | `contributingCalls` | ✓ | Omitted | | `resultSources` | ✓ | Omitted | | `isRoboCall`, `callAttempts`, `audit` | ✓ (when enabled) | Omitted | Other phone-enrichment fields (`to`, `callDuration`, `callSummary`, `callAuditSummary`, `resultSummary`) are included in both endpoints when applicable. `callFromNumber` and `scriptVersion` are on both endpoints too, but only once enabled for your account (see [Optional response fields](#optional-response-fields)). If you need any of the list-omitted fields, fetch the single-request endpoint after locating the `requestId`. ## Production vs Sandbox Accounts can be provisioned with production and/or sandbox API key/secret pairs. Authenticating with a sandbox pair routes the request through SuperDial's sandbox path: validation, idempotency, scheduling, and webhook delivery run identically to production, but phone-backed requests don't dial a real number. Results are LLM-generated against your schema instead. See the [Sandbox guide](/guides/sandbox) for the complete picture, including a recommended test plan. > [!NOTE] > > A webhook is signed with the credentials that created the request: your **sandbox API key** for a sandbox request, and your webhook secret (or production API key) for a production request. See [Webhooks → Signature verification](/guides/webhooks#signature-verification). # Creating a Request Source: https://docs.superdial.com/guides/creating-a-request Submit a single request or a batch of requests with POST /v1/requests. `POST /v1/requests` creates one or more [requests](/guides/concepts#request) and returns their IDs. The body shape varies based on whether you're submitting a single item or a batch. ## Authentication Protected routes require a bearer token, including `POST /v1/requests` and the other `/v1/requests*` endpoints. Get one with `GET /v1/auth` (passing your API key and secret as the `Robodialer-API-Key` and `Robodialer-API-Secret` headers). Pass the returned token as `Authorization: Bearer ` on every subsequent HTTP request. Tokens are valid for **1 hour**. Refresh by calling `GET /v1/auth` again; there's no refresh-token flow. For long-running batches or background workers, fetch a fresh token at the start of each work cycle, or refresh on `401` responses. ```python theme={null} import requests def fetch_token(api_key: str, api_secret: str) -> str: r = requests.get( "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/auth", headers={ "Robodialer-API-Key": api_key, "Robodialer-API-Secret": api_secret, }, ) r.raise_for_status() return r.json()["token"] ``` ## Single request Submit a single request by sending a JSON body with the request's fields directly: ```bash theme={null} curl -X POST https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234", "providerNpi": "1234567890", "dateOfService": "2026-03-15" }, "internalId": "claim_internal_456" }' ``` ### Response ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "claim_internal_456" } ``` If your account is enabled for [**payer phone number lookup**](/guides/payer-resolution) (opt-in: ask your account team), the response carries a `payerLookup` sub-object describing the payer/phone lookup for the request. ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "claim_internal_456", "payerLookup": { "inputPayerName": "Sample Insurance Co", "inputPhoneNumber": null, "matchedPayerName": "Sample Insurance Company, Inc.", "matchedPayerPhone": "8005551234", "phoneNumberToUse": "8005551234", "phoneNumberSource": "superdial" } } ``` `payerLookup` is always present on the response and reports the number that will be dialed (`phoneNumberToUse`) and where it came from (`phoneNumberSource`: `superdial`, `phoneBook`, or `input`). The `matched*` fields are populated only when SuperDial dials its own matched number; if your supplied `phoneNumber` is dialed, they're `null` and `phoneNumberSource` is `"input"`. By default a supplied `phoneNumber` always wins: set [`useMatchedPayerPhone: true`](/guides/payer-resolution#choosing-which-number-to-dial) to dial the matched number instead. The same block is returned on [reads](/guides/reading-requests). See the [Payer Phone Number Lookup guide](/guides/payer-resolution) for the full field reference. The request begins running immediately. Configure a [webhook](/guides/webhooks) to be notified when it reaches a terminal state, then call [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) to fetch the full result. ## Batch Submit multiple requests in one call by wrapping them in `{ "requests": [...] }`. The response returns one entry per submitted request, in the same order. **Each entry carries its own `requestBatchId`, and those IDs may or may not match across the batch.** Within a single submission, entries scheduled for the same business day share a `requestBatchId`; entries scheduled for different days get distinct ones. Whether your batch lands on a single day or spills across multiple days depends on your account's daily call capacity and any work already pending from prior submissions on those days. Always read each entry's `requestBatchId` from the response. Don't assume they match. ```bash theme={null} curl -X POST https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "requests": [ { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234" }, "internalId": "claim_001" }, { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST987654321", "phoneNumber": "2125551234" }, "internalId": "claim_002" } ] }' ``` ### Batch response A batch responds with one entry per request, in the same order as the input. Each entry is either a success body or the uniform `{error, message, [details]}` envelope: ```json theme={null} { "requests": [ { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "claim_001" }, { "error": "INVALID_REQUEST", "message": "schemaId is required" } ] } ``` The HTTP status code reflects the aggregate outcome: | Status code | Meaning | | - | - | | `200` | All entries in the batch were created successfully. | | `207` | Mixed: at least one entry succeeded and at least one failed with a **client-side (4xx)** error. Inspect each entry. | | `400` | Either the top-level request body was invalid (e.g., `requests` was empty), OR every entry in the batch failed with a client-side error. | | `500` | An internal failure occurred during batch processing. Body is **either** the top-level `{error: "INTERNAL_ERROR", message: "..."}` envelope (the common case) **or** `{"requests": [...]}` with per-entry envelopes. Check for the `requests` key to tell them apart, and treat each entry independently. | > [!TIP] > > Batches don't have to be all-or-nothing. We recommend treating each entry independently: successful entries are real, persisted requests, even if other entries in the same batch failed. > [!NOTE] > > To list every request under a given `requestBatchId` later, for example to track progress on one day's slice of a large batch, use [`GET /v1/requests?requestBatchId=...`](/guides/reading-requests#by-batch). For a multi-day batch, iterate over the unique IDs returned in the create response. ## Required fields Every request body must include: | Field | Description | | - | - | | `schemaId` | The [schema](/guides/concepts#schema) that defines the output fields. Discover yours via [`GET /v1/schemas`](/guides/schemas). | | `inputs` | A JSON object of `{ key: value }` pairs. **All values must be strings**, including fields that hold several values: see [Multi-value inputs](#multi-value-inputs). The keys are schema-specific: discover required and optional ones via [`GET /v1/schemas/{schemaId}/required-inputs`](/guides/schemas#look-up-required-and-optional-inputs). Typical examples include `payerName`, `memberId`, `phoneNumber`, `providerNpi`, `dateOfService`. Those two lists are the baseline, not a limit: you can also send [extra keys of your own](#extra-inputs). | `requestType` is **server-derived** from the schema: you'll see the canonical value on the `RequestResponse` returned by `GET /v1/requests/{requestId}`. You can still send a `requestType` field on the POST body if existing client code does; it's silently ignored. Required `inputs.{key}` fields are validated when the request is created: if any are missing or fail format checks, the request is rejected with HTTP 400 and the uniform `INVALID_INPUTS` error envelope: ```json theme={null} { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "missingInputs": ["memberId", "providerNpi"], "invalidInputs": { "dateOfService": "must be YYYY-MM-DD" } } } ``` `details` is only present on this `INVALID_INPUTS` path; other 400 errors carry just `error` + `message`. Discover the required `inputs` per schema with [`GET /v1/schemas/{schemaId}/required-inputs`](/api-reference/schemas/required-inputs-for-a-schema), or ask your account team. See the [API Reference for `POST /v1/requests`](/api-reference/requests/create-a-request) for the full request body schema. > [!NOTE] > > If your account is enabled for [**per-payer required inputs**](/guides/payer-required-inputs) (opt-in: ask your account team), some payers require additional inputs beyond the schema's fields, depending on `payerName`. A missing one is reported here in `details.missingInputs` like any other. Add it and retry. ## Multi-value inputs Send a field that holds several values as **one comma-delimited string**, not a JSON array. Every value in `inputs` must be a string, and the type check runs before anything else, so an array is rejected on arrival. ```json theme={null} // Correct { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "cptCodes": "99213,99214", "icd10Codes": "E11.9,I10" } } ``` ```json theme={null} // Rejected: HTTP 400 { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "cptCodes": ["99213", "99214"], "icd10Codes": ["E11.9", "I10"] } } ``` ```json theme={null} // The 400 names every offending field { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "invalidInputs": { "cptCodes": "cptCodes must be a string (got list)", "icd10Codes": "icd10Codes must be a string (got list)" } } } ``` Nothing validates the separator: the string is handed to the voice agent as you sent it, and a comma-delimited list reads naturally on the call. A space after each comma is fine. The same rule covers any field you use this way, `cptCodes` and `icd10Codes` being the common ones. > [!WARNING] > > **Moving from the legacy Calls API?** This is the difference most likely to catch you. `POST /v1/calls` accepts an array for a field like `cptCodes`; `POST /v1/requests` does not. A mapping that has worked for months against `/v1/calls` will fail on **every** request here, and because a 400 creates nothing, no request appears in the portal to tell you so. See [Migrating from the Calls API](/guides/api-migration#input-values-must-be-strings). ## Optional fields | Field | Description | | - | - | | `webhookUrl` | Per-request [webhook](/guides/webhooks) URL override. Wins over the account default for this one request. | | `useMatchedPayerPhone` | Boolean (default `false`). When `true` and [payer phone number lookup](/guides/payer-resolution) is enabled, dial SuperDial's matched payer number even if you supplied `phoneNumber`, falling back to your number when no match is found. Ignored when lookup is off. Goes here at the top level of the request, not inside `inputs` — see [where to put the flag](/guides/payer-resolution#where-to-put-the-flag). | | `internalId` | **Optional** correlation ID, and also the request's idempotency key. Echoed on all reads and webhooks. If you supply one it must be **unique per request** (see below). If you omit it, SuperDial generates one for you. | | `internalTag` | Opaque tag echoed on reads and webhooks (e.g. `"march-batch"`). | | `aiOnly` | Boolean. When `true`, any phone call this request makes is handled only by our automated voice agent, never a human agent. Leaving it `false` adds no restriction: it doesn't force human-agent handling. Defaults to `false`. | | `onshoreOnly` | Boolean. When `true`, all phone handling for this request is restricted to US-based agents. Leaving it `false` adds no restriction. Defaults to `false`. | ## Extra inputs **The keys of `inputs` aren't limited to the ones your schema declares.** Any additional key you send is accepted, stored with the request, echoed back on every read and webhook, and given to the voice agent as context on any phone call the request makes. Nothing rejects a key just because [`GET /v1/schemas/{schemaId}/required-inputs`](/guides/schemas#look-up-required-and-optional-inputs) didn't list it. Use this for context that helps the call but that the schema never asked to collect: why the claim was denied last time, a deadline the representative should hear about, which department has already turned you away. ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234", "providerNpi": "1234567890", "dateOfService": "2026-03-15", // extra keys, in neither requiredInputs nor optionalInputs "priorDenialReason": "CO-197 no authorization on file", "appealDeadline": "2026-04-01" }, "internalId": "claim_internal_456" } ``` ### Rules that still apply An extra key is not a way around validation. The same checks run on it as on a schema field: | Rule | Detail | | - | - | | Values must be strings | Each value is a string or `null`, exactly as for schema fields. A nested object or array is rejected with `INVALID_INPUTS` and a `details.invalidInputs` entry such as `priorDenialReason must be a string (got dict)`. Flatten the value, or put several values in one comma-delimited string: see [Multi-value inputs](#multi-value-inputs). | | The universal content rules | The [scientific-notation and curly-brace rules](/guides/input-validation#universal-value-rules) apply to every non-empty value, extra keys included. | An extra key is never reported in `details.missingInputs`, because nothing requires it. Leave it out on some requests and send it on others, as you like. ### What extra inputs don't do Extra inputs are context, not instructions. They don't add questions to the call: the agent won't ask a payer about a key you invented, and the key won't come back in the request's `results`. What gets asked, and what gets returned, are both fixed by the [schema](/guides/concepts#schema). If you need the agent to *ask* something new, the schema itself has to change. Talk to your account team. > [!WARNING] > > **Two rules change what the agent actually sees.** A key whose name contains `internal` (case-insensitive) is withheld from the agent entirely, so an `internalNote` is stored and echoed back but never reaches the call; for data you only want correlated, use the top-level `internalId` and `internalTag` instead. And values are reformatted so they can be spoken aloud: keys whose name contains `name`, `date`, or `address` get title-casing, underscores as spaces, or a long-form spoken date, and **any value of more than two words is title-cased whatever its key is called.** The `priorDenialReason` above reaches the agent as `Co-197 No Authorization On File`. Keep an extra value short if its capitalization matters, and don't name an extra key `...Name` unless it holds a person's or organization's name. > [!NOTE] > > **Send what helps the call, not your whole record.** Every extra key is put in front of the agent on every turn of the conversation, so a long tail of irrelevant identifiers gives it more chances to offer a representative something beside the point. Two or three well-chosen fields beat twenty. ## Correlation and idempotency `internalId` is **optional** and serves two purposes: 1. **Correlation**: when you supply one, it's echoed back on every read and every webhook for that request, so you can tie SuperDial results to your own records. 2. **Idempotency**: `internalId` *is* the idempotency key. A `POST /v1/requests` that reuses an `internalId` you've sent before does **not** create a new request; it returns the originally created `requestId` (and the original `payerLookup`, if any). > [!WARNING] > > Because `internalId` is the idempotency key, **a new `internalId` must be different on every distinct request you want to place.** Reusing one is not an error and produces no warning: it silently returns the original request instead of starting new work. Use a value that's naturally unique per request (a UUID, or your own primary key), not a constant or a reused batch label. **You don't have to send one.** `internalId` is optional. If you omit it, SuperDial generates and maintains its own unique idempotency key server-side, so retries are still de-duplicated for you. Supply your own only when you want to correlate results back to records on your end; otherwise leave it off and let SuperDial manage it. ```json theme={null} // First call POST /v1/requests { "internalId": "claim_001", ... } → 200 { "requestId": "8bF7xK2mP9qR4sT6uV0w", ... } // Retry with the SAME internalId: no new request is created POST /v1/requests { "internalId": "claim_001", ... } → 200 { "requestId": "8bF7xK2mP9qR4sT6uV0w", ... } // same ID, no duplicate // Omit internalId entirely: SuperDial generates its own key POST /v1/requests { ... } // no internalId → 200 { "requestId": "aC3hN5jD8eL1fM2gK6Yo", ... } // new request every call ``` `internalId`-based idempotency applies on a **per-request** basis. In batch submissions, each entry with an `internalId` is independently deduped: a duplicate entry returns the previously created `requestId` and `requestBatchId` rather than creating a new request. There is no batch-level idempotency key, only per-entry. ## What happens after creation The request immediately begins running through one or more [modalities](/guides/concepts#modality) (electronic systems and/or phone calls). Completion time varies: electronic-only requests can finish quickly; phone-backed requests depend on payer responsiveness and hold times. Configure a [webhook](/guides/webhooks) to be notified the moment a request finishes, then call [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) to fetch the full result. ## Error handling Every non-2xx response from `/v1/requests` returns the same envelope: ```json theme={null} { "error": "MACHINE_CODE", "message": "Human-readable description.", "details": { /* optional, only on INVALID_INPUTS */ } } ``` Switch on `error` for programmatic dispatch; surface `message` to humans. | HTTP code | `error` code | Meaning | What to do | | - | - | - | - | | `400` | `INVALID_REQUEST` | Body wasn't a JSON object, a required field is missing (`schemaId`, `inputs`), the batch `requests` array is empty, or scheduling capacity is exceeded. The validator's specific reason is in `message`. | Fix the body and retry | | `400` | `INVALID_INPUTS` | Input validation failed. `details.missingInputs` lists field names that weren't supplied; `details.invalidInputs` maps field name to the reason it was rejected. With [per-payer required inputs](/guides/payer-required-inputs) enabled, some payers add inputs that can appear here too. | Fix the inputs and retry | | `400` | `PAYER_NOT_FOUND` | Payer phone number lookup path: the supplied `payerName` did not match any known payer. Only fires when [lookup is enabled for your account](/guides/payer-resolution), `payerName` is set, and `phoneNumber` is not. | Confirm spelling, try a more canonical payer name, or supply `phoneNumber` directly to skip the lookup | | `401` | (gateway envelope) | Bearer token missing, malformed, or expired. Returns the gateway's `{code, message}` shape, not the envelope above. | Fetch a fresh token via `GET /v1/auth` | | `404` | `SCHEMA_NOT_FOUND` | `schemaId` doesn't exist for your account, or has been retired. On a batch, schema-not-found surfaces per-entry as `INVALID_REQUEST` with `"Schema not found"` in `message`. Read `message` to distinguish 4xx causes when an entry has no status code. | Discover valid `schemaId` values with [`GET /v1/schemas`](/api-reference/schemas/list-schemas) | | `404` | `ACCOUNT_NOT_FOUND` | The API key resolves to an account that no longer exists. Rare: wrong-API-key cases hit `INVALID_API_KEY` at `/v1/auth` first. | Contact support | | `500` | `INTERNAL_ERROR` | Unexpected server failure. **Single-item POST:** body is the envelope above. **Batch:** body can take either shape: the top-level `INTERNAL_ERROR` envelope (most common) or `{"requests": [...]}` with per-entry envelopes (server-error entries surface here as `INVALID_REQUEST` rather than `INTERNAL_ERROR`). Check for the `requests` key to tell the two shapes apart. | Retry once; escalate if persistent | | `500` | `PAYER_LOOKUP_FAILURE` | Payer phone number lookup path: the supplied `payerName` matched a payer but our database has no phone number on file, or the lookup hit a transient infra failure. Only fires when [lookup is enabled for your account](/guides/payer-resolution). | Retry with backoff, or supply `phoneNumber` directly to skip the lookup | For batch submissions, **each failed entry inside the `requests` array carries the same envelope shape** as a top-level error, so you can use the same error handler everywhere. # Input Validation Source: https://docs.superdial.com/guides/input-validation The per-field rules applied to inputs when you create a request, and the errors they produce. When you submit `POST /v1/requests`, every value in `inputs` is validated **synchronously, before the request is created**. If anything fails, the request is rejected with HTTP `400` and the uniform `INVALID_INPUTS` envelope. Nothing is queued and no call is placed. Fix the inputs and resubmit. This page documents exactly which rules run. For the request body shape and the broader error taxonomy, see [Creating a Request](/guides/creating-a-request); to discover which keys a schema needs, see [Schemas](/guides/schemas#look-up-required-and-optional-inputs). ## The error shape All input failures collapse into a single response: ```json theme={null} { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "missingInputs": ["memberId", "providerNpi"], "invalidInputs": { "dateOfService": "dateOfService is invalid" } } } ``` Validation produces two independent buckets, and a single request can populate both: | Bucket | Type | Meaning | | - | - | - | | `details.missingInputs` | array of field names | A **required** input was absent, `null`, or empty/whitespace-only. | | `details.invalidInputs` | object, `field → reason` | A **supplied** value failed a format rule. The value maps to a human-readable reason. | > [!NOTE] > > A field only lands in `missingInputs` if it's required for your schema and you didn't supply a usable value. A field lands in `invalidInputs` only when you *did* supply a non-empty value that broke a rule. Optional fields you leave out are never flagged; optional fields you *do* send are format-checked just like required ones. The same holds for [extra keys](/guides/creating-a-request#extra-inputs) your schema doesn't declare at all: they're accepted, they can never be reported as missing, and their values are checked by the rules below. ## Required vs. empty A required input is considered **missing** when its value is `null`, absent, or a string that is empty or only whitespace after trimming. Which keys are required is schema-specific. Fetch them from [`GET /v1/schemas/{schemaId}/required-inputs`](/guides/schemas#look-up-required-and-optional-inputs). Two account features (below) can add more required keys at request time. Note that which keys are *required* is schema-specific, but which keys are *accepted* isn't restricted: you can also send [extra keys](/guides/creating-a-request#extra-inputs) beyond the schema's two lists. ## Universal value rules These checks run on **every** value you supply, regardless of the field's type and regardless of whether your schema declares the key. The type gate runs on any value; the other two run on any non-empty value: | Rule | Rejected when | Reason returned | | - | - | - | | Must be a string | The value is anything other than a string or `null`: a number, a boolean, a nested object, or an array. This is the first gate to run, before any format rule. | `{field} must be a string (got list)` | | No scientific notation | Value matches `^-?\d+\.\d+[eE][-+]?\d+$` (e.g. `1.23e-05`), usually a spreadsheet mangling a long ID or amount | `{field} is scientific notation` | | No curly braces | Value contains `{` or `}`, usually an unrendered template placeholder like `{memberId}` | `{field} contains invalid characters (curly braces)` | > [!NOTE] > > **A field that holds several values is still one string.** Send `"99213,99214"`, not > `["99213", "99214"]`; an array fails the first rule above on every request. See > [Multi-value inputs](/guides/creating-a-request#multi-value-inputs). > [!WARNING] > > Scientific-notation failures almost always come from Excel/CSV exports that auto-convert long numeric member IDs or claim amounts. Format the offending column as text before exporting. ## Per-field type rules Each input key has a type configured by SuperDial. When a value is supplied, it's checked against the rule for its type. Fields whose key contains `phonenumber` (case-insensitive, e.g. `phoneNumber`) get the phone check on top of their type. | Field type | Rule | Reason returned | | - | - | - | | **Phone** (any key containing `phonenumber`) | Must be a valid U.S. phone number. The value is first sanitized: spaces, `()`, `-`, `+`, and a leading `1` are stripped, and the first number is taken if several are separated by a comma, a semicolon, or an `x` extension marker. | `{field} is not a valid U.S. phone number` | | **Date** (e.g. `memberDateOfBirth`, `patientDateOfBirth`, `beginningDateOfService`) | Must be an unambiguously parseable calendar date. | `{field} is invalid` | | **Dollar amount** | Must match `^-?\d+(?:\.\d{1,2})?$`: an integer or up to two decimal places, optional leading minus. No `$`, commas, or thousands separators. Send it as a string (`"150.00"`), not a JSON number. | `{field} is invalid` | | **Boolean** | Must be one of `"true"`, `"false"`, `"1"`, `"0"`, `"yes"`, `"no"`, `"y"`, `"n"` (case-insensitive). Send the **string** form: a JSON `true` is refused by the string rule above before the boolean rule runs. | `{field} is invalid` | | **String** | Always valid as a plain string, unless the field carries a custom pattern (see below). | `{field} is invalid: {custom message}` | > [!NOTE] > > **Dates:** any value the parser can read unambiguously is accepted, but to be safe and explicit, send ISO `YYYY-MM-DD`. Ambiguous values (e.g. `01/02/03`) may resolve to a date you didn't intend. Some string fields carry a **custom regex** and a tailored error message configured by SuperDial. When present, the value must match the pattern, and the failure reason is the field's custom message rather than the generic `{field} is invalid`. The rules currently configured: | Field(s) | Must be | Pattern | Reason returned | | - | - | - | - | | `ptan` | 5 to 10 alphanumeric characters | `^[A-Za-z0-9]{5,10}$` | `PTAN must be 5 to 10 alphanumeric characters.` | | `billingProviderNpi`, `facilityNpi`, `officeNpi`, `renderingProviderNpi`, `practiceNPI` | Exactly 10 digits | `^\d{10}$` | `Must contain exactly 10 digits.` | | `billingProviderTaxId`, `groupTaxId`, `practiceTaxId`, `renderingProviderTaxId` | 9 digits, hyphens allowed | `^(?:\d-?){9}$` | `Must contain exactly 9 digits and may include hyphens.` | | `memberFirstName`, `memberLastName`, `patientFirstName`, `patientLastName` | Only letters, spaces, hyphens, commas, periods, apostrophes | `^[A-Za-z ,.'-]+$` | `Only letters, spaces, hyphens, commas, periods, and apostrophes are allowed.` | | `memberId` | Alphanumeric, spaces, and hyphens only | `^[a-zA-Z0-9 -]+$` | `memberId is invalid` | > [!NOTE] > > **A field SuperDial has not configured carries no type and no pattern**, so only the universal > rules above apply to it. `cptCodes` and `icd10Codes` are in that group today: they must be > strings, but nothing checks the separator, the number of codes, or the shape of each code. > [!NOTE] > > A few fields (e.g. `billingProviderNpi`, `memberId`) don't carry a custom message, so their failures fall back to the generic `{field} is invalid`. The `memberId` character rule above always runs on a supplied value; the richer, payer-aware **Member ID validation** below is a separate, feature-gated layer. ## Member ID validation > [!NOTE] > > **Off by default.** These `memberId` rules run only when your account has `enforceMemberIdValidation` enabled. Ask your account team. With the feature off, `memberId` is treated as an ordinary string and only the universal rules apply. When enabled, `memberId` is checked against one of two rule sets, chosen by the `payerName` you send. Failures surface as `invalidInputs.memberId`. The validator picks the **BCBS** rules when `payerName` (spaces removed, lowercased) contains `bcbs`, `bluecross`, or `blueshield`; otherwise it applies the **generic** rules. Only the first failing rule is reported. ### BCBS payers | Rule | Requirement | Example rejection | | - | - | - | | Alphanumeric only | `^[A-Z0-9]+$`: no spaces, hyphens, or punctuation | `memberId 'XYZ-123' contains invalid characters. BCBS member IDs must be alphanumeric only…` | | No test/placeholder markers | Must not contain `NULL`, `TEST`, or `ABCD` | `memberId 'TESTID123' contains a known test/placeholder pattern ('TEST')…` | | Minimum length | At least **9** characters (Federal IDs are R + 8 digits; commercial are typically 11+) | `memberId 'ABC123' is too short to be a BCBS member ID (got 6 characters, minimum is 9)…` | | Federal-ID shape | A 9-character ID starting with `R` must be `R` + 8 **digits** | `memberId 'R12345ABC' has the BCBS Federal length… but contains non-digit characters after the R.` | | Commercial alpha prefix | A non-Federal, non-Medicare ID must begin with a 3-character BlueCard prefix: `^[A-Z][A-Z2-9][A-Z]` (letter, letter-or-digit 2–9, letter). **Additionally account-gated** (enabled only for specific accounts on top of `enforceMemberIdValidation`). | `memberId 'X1CF…' does not start with a valid BCBS plan prefix… must begin with a 3-character alpha prefix (letter, letter-or-digit 2-9, letter), e.g. 'TBG' or 'XCF'.` | ### Non-BCBS payers | Rule | Requirement | Example rejection | | - | - | - | | Not a placeholder | Must not be exactly `NA`, `N/A`, or `NONE` (case-insensitive) | `memberId 'N/A' is a known placeholder value. Submit the patient's actual member ID.` | | Minimum length | At least **4** characters | `memberId 'X1' is too short (got 2 characters, minimum is 4)…` | | No test/placeholder markers | Must not contain `NULL`, `TEST`, or `ABCD` | `memberId 'NULL' contains a known test/placeholder pattern ('NULL')…` | ## Per-payer required inputs > [!NOTE] > > **Off by default.** This runs only when your account has `enforcePayerRequiredInputs` enabled, and it ramps independently of member-ID validation. When enabled and the payer is matched (see [Payer Phone Number Lookup](/guides/payer-resolution)), the matched payer can require additional input keys beyond your schema's base set for that request type. Any such keys you don't supply are added to `details.missingInputs`, exactly like schema-required fields. The set is payer- and request-type-specific; the cleanest way to avoid surprises is to send every field returned by the schema's [required-inputs endpoint](/guides/schemas#look-up-required-and-optional-inputs) plus any payer-specific fields your account team has called out. ## Worked example A request that gets several things wrong at once: ```json theme={null} // Request { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Anthem BCBS", "memberId": "ABC", "phoneNumber": "555-12", "claimChargeAmount": "1.2e3", "dateOfService": "2026-03-15" } } ``` ```json theme={null} // 400 response { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "missingInputs": ["providerNpi"], "invalidInputs": { "memberId": "memberId 'ABC' is too short to be a BCBS member ID (got 3 characters, minimum is 9). BCBS Federal IDs are 9 chars (R + 8 digits); commercial IDs are typically 11+.", "phoneNumber": "phoneNumber is not a valid U.S. phone number", "claimChargeAmount": "claimChargeAmount is scientific notation" } } } ``` `dateOfService` passed and `providerNpi` was simply absent (and required), so it shows up under `missingInputs` while the rest are format failures under `invalidInputs`. Read both buckets. A single resubmission should fix everything at once. # Per-Payer Required Inputs Source: https://docs.superdial.com/guides/payer-required-inputs Some payers require additional inputs on POST /v1/requests. Some payers ask for more information than the schema requires of every request. When this capability is enabled for your account, a request for one of those payers must include the payer's additional inputs on top of the schema's required fields. > [!NOTE] > > This is an opt-in capability. Ask your account team to enable it. When it's off, a request's required inputs are exactly the fields returned by [`GET /v1/schemas/{schemaId}/required-inputs`](/guides/schemas#look-up-required-and-optional-inputs). ## What changes Which inputs are required can depend on the payer you name in `inputs.payerName`. A field that's optional for one payer may be required for another, so the schema's required-input list is the baseline, not always the complete list for a specific payer. ## How to handle it If a request is missing an input a payer requires, `POST /v1/requests` returns `INVALID_INPUTS` with the field listed in `details.missingInputs`, the same response as any other missing required input: ```json theme={null} { "error": "INVALID_INPUTS", "message": "Required inputs are missing or invalid.", "details": { "missingInputs": ["claimNumber"] } } ``` * **Add whatever appears in `details.missingInputs` and retry.** That list tells you exactly what the request still needs. * **Send every input you have.** Populating the optional fields from the [schema lookup](/guides/schemas#look-up-required-and-optional-inputs), not just the required ones, avoids most payer-specific rejections. * **Ask your account team** which payers have additional requirements if you'd like to supply them up front. ## Look up per-payer required inputs up front To avoid the reject-and-retry loop entirely, resolve the payers you're about to submit *before* creating requests with [`POST /v1/schemas/{schemaId}/required-payer-inputs`](/api-reference/schemas/resolve-payer-names-against-a-schemas-required-inputs). Post a batch of payer names and get back the extra inputs each payer requires on top of the schema baseline: ```bash theme={null} curl -X POST \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"payerNames": ["Sample Insurance Co", "Unknown Payer"]}' \ https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas/fWxzG4nqtpHsJxS5Lm3q/required-payer-inputs ``` ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "requiredInputs": { "fields": ["memberId", "payerName", "phoneNumber"] }, "optionalInputs": { "fields": ["cptCode"] }, "payers": [ { "inputPayerName": "Sample Insurance Co", "matchedPayerName": "Sample Insurance Company, Inc.", "payerRequiredInputs": { "fields": ["claimNumber"] } }, { "inputPayerName": "Unknown Payer", "errorCode": "PAYER_NOT_FOUND", "message": "No canonical payer matched 'Unknown Payer'." } ] } ``` * The top-level `requiredInputs`/`optionalInputs` are the same schema baseline you get from [`GET /v1/schemas/{schemaId}/required-inputs`](/guides/schemas#look-up-required-and-optional-inputs). * `payerRequiredInputs.fields` lists **only the additional inputs that payer requires** beyond the baseline, not the full set. Union it with `requiredInputs.fields` to get everything a request for that payer needs. In the example, `Sample Insurance Company, Inc.` needs `claimNumber` on top of the schema's `memberId`, `payerName`, and `phoneNumber`. * Each `payers` entry lines up 1:1 with the names you sent, in order. A matched entry carries `payerRequiredInputs`; an unmatched entry carries an `errorCode` (`INVALID_PAYER_NAME`, `PAYER_NOT_FOUND`, or `PAYER_LOOKUP_FAILURE`) instead. Check for `errorCode` to tell them apart. * A payer that fails to resolve doesn't fail the whole call: only that entry reports an error. > [!NOTE] > > Same opt-in as above. When the capability is off, this endpoint returns `403 PAYER_REQUIRED_INPUTS_DISABLED`. # Payer Phone Number Lookup Source: https://docs.superdial.com/guides/payer-resolution How payerName resolves to a phone number on POST /v1/requests. Payer phone number lookup is an opt-in capability your account team enables. When it's on, you can submit a request with a `payerName` but no `phoneNumber`, and SuperDial will look up the dialing number for you. When it's off, every request must supply `phoneNumber` directly. > [!NOTE] > > Lookup is **off by default**. Ask your account team if you'd like it turned on. Without it, the rest of this page doesn't apply; `phoneNumber` stays in `requiredInputs.fields` and you supply it on every request. ## How it works With lookup enabled on your account: | What you send in `inputs` | What happens | | - | - | | `payerName` only | SuperDial looks up the dialing number and dials it. The matched payer and number come back under `payerLookup` (`phoneNumberSource: "superdial"`). | | `payerName` + `phoneNumber` | Your number is dialed as-is. Lookup still runs to identify the payer, but your number wins (`phoneNumberSource: "input"`). | | `payerName` + `phoneNumber` + [`useMatchedPayerPhone: true`](#choosing-which-number-to-dial) | SuperDial dials its **matched** number instead of yours, falling back to your number if no match is found. | | Neither | No lookup. | > [!NOTE] > > `payerLookup` is now returned on **every** created request (and on reads), not only when you omit `phoneNumber`. When no payer number is dialed, its `matched*` fields are `null` and `phoneNumberToUse` echoes the number you supplied. ## Choosing which number to dial By default, a `phoneNumber` you supply is always dialed as-is: SuperDial never overrides a number you provided. Set **`useMatchedPayerPhone: true`** on the request body (a top-level field, alongside `schemaId` and `inputs`) to tell SuperDial to dial its own matched payer number instead, even when you supplied one: * **Match found:** SuperDial dials the matched number. `payerLookup.phoneNumberToUse` is the matched number and `phoneNumberSource` is `"superdial"` (SuperDial's payer directory) or `"phoneBook"` (a per-client override configured for your account). * **No match:** SuperDial falls back to the number you supplied and dials it as-is (no error). `phoneNumberSource` is `"input"`. `useMatchedPayerPhone` requires payer phone number lookup to be enabled on your account; it's ignored otherwise. ### Where to put the flag `useMatchedPayerPhone` is a **sibling of `schemaId` and `inputs`** — not a field inside `inputs`. Putting it inside `inputs` has no effect. ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234", "providerNpi": "1234567890", "dateOfService": "2026-03-15" }, "useMatchedPayerPhone": true, "internalId": "claim_internal_456" } ``` > [!WARNING] > > Don't nest it under `inputs`. This is **wrong** and SuperDial will dial your supplied `2125551234` as-is: > > ```json theme={null} > { > "schemaId": "fWxzG4nqtpHsJxS5Lm3q", > "inputs": { > "payerName": "Sample Insurance Co", > "phoneNumber": "2125551234", > "useMatchedPayerPhone": true > } > } > ``` As a full call: ```bash theme={null} curl -X POST https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234" }, "useMatchedPayerPhone": true, "internalId": "claim_internal_456" }' ``` With a match found, the response reports the matched number as the one that will be dialed — your `2125551234` is echoed back under `inputPhoneNumber` but not used: ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "claim_internal_456", "payerLookup": { "inputPayerName": "Sample Insurance Co", "inputPhoneNumber": "2125551234", "matchedPayerName": "Sample Insurance Company, Inc.", "matchedPayerPhone": "8005551234", "phoneNumberToUse": "8005551234", "phoneNumberSource": "superdial" } } ``` In a [batch](/guides/creating-a-request#batch), the flag goes **inside each request entry** — it is not a batch-level setting, so set it on every entry you want it to apply to: ```json theme={null} { "requests": [ { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234" }, "useMatchedPayerPhone": true, "internalId": "claim_001" }, { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST987654321", "phoneNumber": "2125551234" }, "internalId": "claim_002" } ] } ``` Here `claim_001` dials SuperDial's matched number (falling back to `2125551234` if there's no match), while `claim_002` dials `2125551234` as-is. > [!NOTE] > > You only need `useMatchedPayerPhone` when you're **also** sending `phoneNumber`. If you omit `phoneNumber` entirely, SuperDial already dials its matched number and the flag changes nothing. ## The response `payerLookup` is a six-field block, always present on the `POST /v1/requests` response (and on [reads](/guides/reading-requests)). When SuperDial dials a matched payer number, it looks like this: ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "internalId": "claim_internal_456", "payerLookup": { "inputPayerName": "Sample Insurance Co", "inputPhoneNumber": null, "matchedPayerName": "Sample Insurance Company, Inc.", "matchedPayerPhone": "8005551234", "phoneNumberToUse": "8005551234", "phoneNumberSource": "superdial" } } ``` | Field | Meaning | | - | - | | `inputPayerName` | The `payerName` you sent. `null` if you sent none. | | `inputPhoneNumber` | The `phoneNumber` you sent, before any lookup. `null` if you sent none. | | `matchedPayerName` | The canonical payer SuperDial matched. Populated **only when the matched payer's number was dialed**; otherwise `null`. | | `matchedPayerPhone` | The matched payer's phone. Populated only when it was dialed; otherwise `null`. | | `phoneNumberToUse` | The number that will actually be dialed. `null` when nothing is dialable. | | `phoneNumberSource` | Where `phoneNumberToUse` came from: `"superdial"` (SuperDial's payer directory), `"phoneBook"` (a per-client override), or `"input"` (the number you supplied). `null` when nothing is dialable. | The `matched*` fields are populated **only when SuperDial dials its own matched number**: when you omit `phoneNumber`, or when you set `useMatchedPayerPhone: true` and a match is found. If your supplied number is dialed instead, `matchedPayerName` / `matchedPayerPhone` are `null`, `phoneNumberToUse` echoes your number, and `phoneNumberSource` is `"input"`: ```json theme={null} { "payerLookup": { "inputPayerName": "Sample Insurance Co", "inputPhoneNumber": "2125551234", "matchedPayerName": null, "matchedPayerPhone": null, "phoneNumberToUse": "2125551234", "phoneNumberSource": "input" } } ``` The same `payerLookup` block appears on the [read endpoints](/guides/reading-requests) (`GET /v1/requests` and `GET /v1/requests/{requestId}`), so you can read the lookup back later rather than capturing it from the POST response. > [!NOTE] > > **`phoneNumberToUse` is the field to read for the dialed number.** The separate `to` field on a read is present only when the number was one you supplied, that is when `phoneNumberSource` is `"input"`. When SuperDial dialed a number from its own directory (`"superdial"` or `"phoneBook"`), `to` is omitted, and so is the per-call `contributingCalls[].to`. `phoneNumberToUse` is populated in every case and is available as soon as the request is created, before any call completes. ## Tips * **Include `memberId` for Blue Cross Blue Shield (BCBS) lookups.** It affects which regional plan gets dialed. * **You don't need an exact-string match.** Common variants and acronyms (e.g. `"BCBS"`, `"BCBSMA"`, `"Blue Cross Blue Shield"`) all work. * **Supply `phoneNumber` to dial a specific number.** By default a supplied number is dialed as-is, regardless of what lookup would pick. To have SuperDial dial its matched number instead while still supplying your own as a fallback, set [`useMatchedPayerPhone: true`](#choosing-which-number-to-dial). ## When lookup fails | HTTP | `error` code | What to do | | - | - | - | | `400` | `PAYER_NOT_FOUND` | The name didn't match any payer. Try a more canonical spelling, or supply `phoneNumber` directly. | | `500` | `PAYER_LOOKUP_FAILURE` | We matched a payer but couldn't get a phone number, or a temporary lookup error. Retry with backoff, or supply `phoneNumber` directly. | The `message` field describes what went wrong. # Reading Requests Source: https://docs.superdial.com/guides/reading-requests Fetch a single request by ID, or list requests filtered by date or batch. Once you've [created a request](/guides/creating-a-request), there are two ways to read it back: * `GET /v1/requests/{requestId}`: fetch one request * `GET /v1/requests`: list requests, filtered by date range or batch Both return the same per-request [`RequestResponse`](/api-reference/requests/retrieve-a-request) shape, except the list endpoint omits several enrichment fields that can be large. See [Concepts → Single-request vs list response shapes](/guides/concepts#single-request-vs-list-response-shapes). ## Single request Fetch a specific request by its `requestId`: ```bash theme={null} curl -H "Authorization: Bearer " \ https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests/8bF7xK2mP9qR4sT6uV0w ``` > [!NOTE] > > **Read-after-write lag:** for a few seconds after a successful `POST /v1/requests`, a `GET /v1/requests/{requestId}` for the just-created ID can return `404 REQUEST_NOT_FOUND` even though the POST succeeded. If you poll, tolerate 404s for the first few seconds after create. The [webhook flow](/guides/webhooks) sidesteps this entirely: by the time the webhook fires, the request is readable. ### Response ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "requestType": "claim-status", "state": "SUCCESS", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234", "providerNpi": "1234567890", "dateOfService": "2026-03-15" }, "results": { "claimStatus": "PAID", "paidAmount": "150.00", "checkNumber": "CHK998877", "paidDate": "2026-04-10" }, "missingFields": [], "dateCreated": "2026-04-24T15:30:00.123456+00:00", "completedAt": "2026-04-24T15:32:18.987654+00:00", "dueDate": "2026-04-25T23:00:00+00:00", "internalId": "claim_internal_456", "internalTag": "march-batch", "modality": "phone_only", "data_completeness": null, "error": null, "payerLookup": { "inputPayerName": "Sample Insurance Co", "inputPhoneNumber": "2125551234", "matchedPayerName": null, "matchedPayerPhone": null, "phoneNumberToUse": "2125551234", "phoneNumberSource": "input" }, "to": "+12125551234", "callDuration": "00:08:42", "callSummary": "Verified claim status as PAID. Check #CHK998877 issued on 2026-04-10 for $150.00." } ``` `inputs` echoes the request back exactly as you submitted it, including any [extra keys](/guides/creating-a-request#extra-inputs) your schema doesn't declare. The shape of `results` is schema-specific: keys correspond to the fields defined by the request's [schema](/guides/concepts#schema). Call [`GET /v1/schemas/{schemaId}`](/api-reference/schemas/retrieve-a-schema) to list every field a schema can return, before you run a request. An unanswered field is absent from `results`; it is never `null`, so treat every mapped field as optional. Phone-call enrichment fields (`transcript`, `recordingDownloadUrl`, `callDuration`, `callSummary`, etc.) appear only when the request was fulfilled by a phone call, and always describe the request's first call (its last attempt, if that call itself needed more than one try). If a later, separate call also contributed to the request (see below), these top-level fields don't reflect it. `to` echoes the dialed number once a phone call has completed, but only when the number was one you supplied. When SuperDial dialed a number from its own payer directory, `to` is omitted; read `payerLookup.phoneNumberToUse` instead, which is populated either way. The `payerLookup` block mirrors the [create response](/guides/creating-a-request): a six-field object (`inputPayerName`, `inputPhoneNumber`, `matchedPayerName`, `matchedPayerPhone`, `phoneNumberToUse`, `phoneNumberSource`) returned whenever [payer phone number lookup](/guides/payer-resolution) is enabled for your account. `phoneNumberToUse` / `phoneNumberSource` report the number dialed and its origin; the `matched*` fields are populated only when SuperDial dialed its own matched number (otherwise `null`, with `phoneNumberSource: "input"`). Requests fulfilled by a phone call also carry a `callSteps` summary on the single-request read (`GET /v1/requests/{requestId}`), and a successful or partial one adds a `contributingCalls` breakdown and a `resultSources` map. See [Calls behind a request](#calls-behind-a-request) below for the full, per-call view. See the [API Reference](/api-reference/requests/retrieve-a-request) for the complete field list. ### Failed and partial requests A request that runs as a single call ends in `SUCCESS` or `FAILURE`. On `FAILURE`, `results` is always `{}`, even if the call captured some answers before it failed, and `error` says why: ```json theme={null} { "requestId": "nQ4rW8sT1vY3zE5xC2bV", "state": "FAILURE", "results": {}, "missingFields": [], "error": { "errorCategory": "NOT_FOUND", "errorCode": "MEMBER_NOT_FOUND", "errorMessage": "Member could not be located" }, ... } ``` Branch on `errorCode`, not `errorMessage`; the message wording can change between releases. `NOT_FOUND` codes usually mean an input needs correcting before you resubmit. `SYSTEM_ERROR` codes describe what went wrong on the call itself (for example, `UNABLE_TO_REACH_HUMAN_IN_TIME`). See [errorCode](/guides/concepts#errorcode) for every code. `PARTIAL` occurs in only two cases, both tied to optional account features: * **Leave-a-voicemail**: the call reached voicemail, left a message, and captured no fields. `results` is empty and `error` is `null`. * **Follow-up calls**: the first call succeeded but a follow-up step failed. See [When a follow-up step fails](#when-a-follow-up-step-fails). If your account uses neither, you will only see `SUCCESS` and `FAILURE`. ### Errors All non-2xx responses use the uniform `{error, message, [details]}` envelope. | HTTP code | `error` code | Meaning | | - | - | - | | `200` | None | Request found | | `401` | (gateway envelope) | Missing or invalid bearer token | | `404` | `REQUEST_NOT_FOUND` | The request ID doesn't exist for your account | | `404` | `ACCOUNT_NOT_FOUND` | The API key resolves to an account that no longer exists. Contact support. | | `500` | `INTERNAL_ERROR` | Unexpected server failure | ## Listing requests `GET /v1/requests` returns multiple requests, filtered by query parameters: ```bash theme={null} curl -H "Authorization: Bearer " \ "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests?dateFrom=2026-04-20&dateTo=2026-04-25" ``` The parameters and their defaults are described in the table below; see the [API Reference for `GET /v1/requests`](/api-reference/requests/list-requests) for the full request schema and per-language code samples. ### Response ```json theme={null} { "requests": [ { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "state": "SUCCESS", "results": { "claimStatus": "PAID", "paidAmount": "150.00" }, "modality": "phone_only", "error": null, ... }, { "requestId": "aC3hN5jD8eL1fM2gK6Yo", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "state": "PROCESSING", "results": {}, "modality": null, "error": null, ... } ] } ``` Each entry follows the [`RequestResponse`](/api-reference/requests/retrieve-a-request) schema. Sorted by `dateCreated` descending (most recent first). > [!NOTE] > > The list endpoint **omits `transcript` and `recordingDownloadUrl`, along with the per-call `callSteps`, `contributingCalls`, and `resultSources`**. When you need any of these, fetch the single-request endpoint with the `requestId` from the list. See [Concepts → Single-request vs list response shapes](/guides/concepts#single-request-vs-list-response-shapes) for the full breakdown. ### Query parameters | Parameter | Format | Default | Notes | | - | - | - | - | | `dateFrom` | `YYYY-MM-DD` | Today, midnight | Inclusive | | `dateTo` | `YYYY-MM-DD` | Tomorrow, midnight | **Exclusive** | | `requestBatchId` | string | None | Bypasses the date defaults: return all requests in the batch regardless of when they were created | | `pageSize` | integer, 1 to 500 | None | Turns on pagination. Omit to return every matching request in one response | | `pageToken` | string | None | Cursor from the previous response's `nextPageToken` | When `requestBatchId` is provided, `dateFrom` and `dateTo` are ignored. When `requestBatchId` is not provided, `dateFrom` and `dateTo` default to today's window. ### Pagination Pagination is opt-in. Without `pageSize`, the endpoint returns every matching request in a single response, which is the historical behavior. Pass `pageSize` to page through a large result set. The response then holds at most that many requests, plus a `nextPageToken` when more remain: ```json theme={null} { "requests": [ /* up to pageSize entries */ ], "nextPageToken": "Cg9yZXF1ZXN0XzEyMzQ1Ng" } ``` Pass that value back as `pageToken` to fetch the next page. Repeat until the response has no `nextPageToken`. Keep every other filter unchanged across pages, or the cursor won't line up with the result set. ```python theme={null} def all_requests(token, **filters): params = {**filters, "pageSize": 200} out = [] while True: r = requests.get( "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests", params=params, headers={"Authorization": f"Bearer {token}"}, ) r.raise_for_status() body = r.json() out.extend(body["requests"]) token_next = body.get("nextPageToken") if not token_next: return out params["pageToken"] = token_next ``` Two rules to know: * `pageSize` must be an integer from 1 to 500. Anything else returns `400 INVALID_REQUEST`. * A `pageToken` sent without `pageSize` applies the default page size of 100. ### By batch Pass `requestBatchId` as a query parameter to fetch every request under a given batch, regardless of their individual `state`, useful for tracking progress. ```python theme={null} def batch_progress(token, batch_id): r = requests.get( f"https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/requests", params={"requestBatchId": batch_id}, headers={"Authorization": f"Bearer {token}"}, ) items = r.json()["requests"] by_state = {} for item in items: by_state.setdefault(item["state"], 0) by_state[item["state"]] += 1 return by_state # {"SUCCESS": 4, "PARTIAL": 1, "FAILURE": 1, "PROCESSING": 2} ``` > [!NOTE] > > If your original `POST /v1/requests` batch was split across multiple `requestBatchId` values (see [Creating a Request → Batch](/guides/creating-a-request#batch)), iterate the unique `requestBatchId`s found in the create response and call this once per ID. ### Errors All non-2xx responses use the uniform `{error, message, [details]}` envelope. | HTTP code | `error` code | Meaning | | - | - | - | | `200` | None | List returned (may be empty) | | `400` | `INVALID_REQUEST` | `dateFrom` or `dateTo` wasn't a valid `YYYY-MM-DD` date, `pageSize` was outside 1 to 500, or `pageToken` was malformed. Read `message` to tell them apart | | `401` | (gateway envelope) | Missing or invalid bearer token | | `404` | `ACCOUNT_NOT_FOUND` | The API key resolves to an account that no longer exists. Contact support. | | `500` | `INTERNAL_ERROR` | Unexpected server failure | ## Reading after a webhook The recommended end-to-end pattern is: 1. [Create a request](/guides/creating-a-request) with `internalId` so you can correlate. 2. Receive the [webhook](/guides/webhooks) when the request reaches a terminal state. 3. Call `GET /v1/requests/{requestId}` to fetch the full result. The webhook payload is intentionally compact (`requestId`, `requestBatchId`, `state`, optional `internalId`/`internalTag`). It tells you *that* the request is done; the GET fetches the actual `results`, `missingFields`, `modality`, and the [`error`](/guides/concepts#error-object) object on `FAILURE`. ## Calls behind a request A request usually completes in a single phone call, but it can take more than one. Every call rolls up into the one request: the merged answers land in the top-level `results`, and `state` reflects the request as a whole. When more than one call is involved, the single top-level `transcript` / `callDuration` / `callSummary` / `recordingDownloadUrl` fields still only describe the first call (see above). The three fields below are how you see every call that contributed: * **`callSteps`: the steps, one entry per step.** A step is a distinct calling effort, usually one schema (for example, verifying benefits, then checking prior authorization). Each step names the schema it ran via `schemaId` (plus a human-readable `name`) and reports its own `state` and how many required fields it captured (`fieldsCaptured` of `fieldsRequired`, with any `missingFields`). A simple request has one step; the same schema can appear in more than one step; they'll share `schemaId` but each still gets its own unique `key`. A single step can involve more than one call (a redial). `numContributingCalls` says how many. A step opened off an earlier one carries `triggeredBy` (the earlier step's `key`); the request's first step has `triggeredBy: null`. This is the *summary*: **what** was gathered, and **which schema** gathered it. * **`contributingCalls`: the individual phone calls behind those steps, one entry per call.** Each has an opaque `id` uniquely identifying that call, handy for your own logging, or for referencing a specific call in a support request, but not something you can parse or decode. Alongside it, each entry carries that call's own transcript, recording, duration, summary, and captured fields, a `call` sequence number (`1`, `2`, …, in the order calls were placed), and a `callStep` linking it to its step in `callSteps`. Because a step can involve more than one call, there can be more entries here than in `callSteps`. A call also carries `to` when it dialed a *different* number than the request's original call. This is the *detail*: **how** it was gathered, call by call. * **`resultSources`: the map between them.** For each field in `results` that came from a phone call, it gives the `call` number that produced it, so you can trace any answer all the way back: the `call` number identifies the exact `contributingCalls` entry, its `callStep` names the exact step in `callSteps`, and that step's `schemaId` tells you the exact schema the answer came from. Not every field in `results` is guaranteed an entry here. In short: `callSteps` outlines the steps (and the schema behind each), `contributingCalls` lists the calls inside them, and `resultSources` ties each answer to a call. `callSteps` is present on any completed request that involved a phone call, including `PARTIAL` and `FAILURE`. `contributingCalls` and `resultSources` are added on a `SUCCESS` or `PARTIAL` request, alongside `callSteps` (a single-call request included, which simply shows one step and one call). All are omitted for digital-only results and aren't returned by the list endpoint. There are two ways a request grows past a single call, and they show up differently across these fields: * **Re-dials of the same effort**: one step, more than one call. * **Follow-up steps**: more than one step, each with its own call(s), linked by `triggeredBy`. ### One step, more than one call (re-dials) When SuperDial has to call the same line more than once to finish a single effort (a disconnect mid-call, or a callback to pick up where it left off), all of those calls belong to **one** step. `callSteps` still has a single entry, with `numContributingCalls` reflecting the count; the calls each get their own `contributingCalls` entry sharing that step's `callStep` key; and `resultSources` points each field at whichever call actually produced it. ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "state": "SUCCESS", "results": { "planActive": "YES", "copay": "30.00" }, "callSteps": [ { "key": "verification-of-benefits", "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Verification of Benefits", "state": "SUCCESS", "fieldsRequired": 2, "fieldsCaptured": 2, "missingFields": [], "numContributingCalls": 2, "triggeredBy": null } ], "contributingCalls": [ { "id": "9nQ4vT7xB2mK5pR8sL0w", "call": 1, "callStep": "verification-of-benefits", "callDuration": "00:03:41", "callSummary": "Reached a rep and confirmed the plan is active; call dropped before copay.", "fieldsCaptured": ["planActive"] }, { "id": "3kW8yH2nR5tL9pM4vB0x", "call": 2, "callStep": "verification-of-benefits", "callDuration": "00:04:05", "callSummary": "Called the line back and obtained the $30 copay.", "fieldsCaptured": ["copay"] } ], "resultSources": { "planActive": 1, "copay": 2 } } ``` One step, two calls. `numContributingCalls` is `2`, both `contributingCalls` share `callStep: "verification-of-benefits"`, and `resultSources` shows the split: `planActive` came from call 1, `copay` from the redial (call 2). To trace `copay` back to its source: `resultSources.copay` is `2` → `contributingCalls[1]` (the entry with `call: 2`, `id: "3kW8yH2nR5tL9pM4vB0x"`) → its `callStep` is `"verification-of-benefits"` → that `callSteps` entry's `schemaId` (`fWxzG4nqtpHsJxS5Lm3q`) is the schema that defined and captured it. ### More than one step (follow-up) > [!NOTE] > > Follow-up steps run only on accounts where SuperDial has set up follow-up calls. Most accounts do not use them. When completing a request requires a distinct second effort (most commonly verifying benefits and then checking prior authorization on a separate call, often to a different line), that second effort is a **new step**. `callSteps` gains a second entry whose `triggeredBy` names the step it was opened off; the calls behind each step are tagged with the matching `callStep`; and `resultSources` maps each field across both steps. ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "state": "SUCCESS", "results": { "planActive": "YES", "copay": "30.00", "priorAuthRequired": "YES", "priorAuthNumber": "PA556677" }, "callSteps": [ { "key": "verification-of-benefits", "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Verification of Benefits", "state": "SUCCESS", "fieldsRequired": 2, "fieldsCaptured": 2, "missingFields": [], "numContributingCalls": 1, "triggeredBy": null }, { "key": "prior-authorization", "schemaId": "qP2bN8rT6mK1xC3vW9aL", "name": "Prior Authorization", "state": "SUCCESS", "fieldsRequired": 2, "fieldsCaptured": 2, "missingFields": [], "numContributingCalls": 1, "triggeredBy": "verification-of-benefits" } ], "contributingCalls": [ { "id": "9nQ4vT7xB2mK5pR8sL0w", "call": 1, "callStep": "verification-of-benefits", "callDuration": "00:06:12", "callSummary": "Confirmed plan active; copay $30.", "fieldsCaptured": ["planActive", "copay"] }, { "id": "3kW8yH2nR5tL9pM4vB0x", "call": 2, "callStep": "prior-authorization", "to": "+18005559090", "callDuration": "00:04:48", "callSummary": "Prior authorization required; auth #PA556677 on file.", "fieldsCaptured": ["priorAuthRequired", "priorAuthNumber"] } ], "resultSources": { "planActive": 1, "copay": 1, "priorAuthRequired": 2, "priorAuthNumber": 2 } } ``` Two steps, one call each. `callSteps` shows *what* each step gathered, *which schema* gathered it (`schemaId`), and how it fared. The prior-authorization step's `triggeredBy` points back at the benefits step that opened it. `contributingCalls` shows the actual calls, call 1 for benefits, call 2 for prior authorization (which dialed a different line, so it carries `to`), each identified by its own opaque `id` and also carrying that call's full `transcript`, `recordingDownloadUrl`, and its own `results` (trimmed here for brevity). `resultSources` maps every answer to the call that produced it: `planActive` and `copay` came from call 1, `priorAuthRequired` and `priorAuthNumber` from call 2. Tracing `priorAuthNumber`: `resultSources.priorAuthNumber` is `2` → `contributingCalls[1]` (`id: "3kW8yH2nR5tL9pM4vB0x"`, `callStep: "prior-authorization"`) → the `prior-authorization` `callSteps` entry → its `schemaId` (`qP2bN8rT6mK1xC3vW9aL`), a different schema than the one that produced `planActive`. ### When a follow-up step fails If the first call succeeds but a follow-up step fails, the request ends `PARTIAL`. Here the benefits call answered both its fields, and the prior-authorization follow-up couldn't reach a representative: ```json theme={null} { "requestId": "kT9bR2mP6nE3yV1xD7Aq", "state": "PARTIAL", "results": { "planActive": "YES", "copay": "30.00" }, "missingFields": [], "error": null, "callSteps": [ { "key": "verification-of-benefits", "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Verification of Benefits", "state": "SUCCESS", "fieldsRequired": 2, "fieldsCaptured": 2, "missingFields": [], "numContributingCalls": 1, "triggeredBy": null }, { "key": "prior-authorization", "schemaId": "qP2bN8rT6mK1xC3vW9aL", "name": "Prior Authorization", "state": "FAILURE", "fieldsRequired": 2, "fieldsCaptured": 0, "missingFields": ["priorAuthRequired", "priorAuthNumber"], "numContributingCalls": 1, "triggeredBy": "verification-of-benefits", "error": { "errorCategory": "SYSTEM_ERROR", "errorCode": "UNABLE_TO_REACH_HUMAN_IN_TIME", "errorMessage": "Could not connect to a human representative" } } ], ... } ``` `results` holds only what the successful steps captured. The top-level `error` is `null`, and the top-level `missingFields` covers only the first step, so it is often empty. To see what the request is missing, read `callSteps`: the failed step carries its own `missingFields` and an `error` object explaining why. # Sandbox Source: https://docs.superdial.com/guides/sandbox Test your integration end-to-end without placing real phone calls. The sandbox lets you exercise the full SuperDial request lifecycle (submit, idempotency, batch scheduling, webhook delivery, signature verification) without placing real phone calls. ## What's a sandbox key Accounts can be provisioned with a sandbox API key/secret pair distinct from any production credentials. Use the sandbox pair when fetching tokens via [`GET /v1/auth`](/guides/creating-a-request#authentication); every request authenticated with the sandbox token is treated as a sandbox request automatically. There is no per-request flag. Ask your account team to provision sandbox credentials if you don't already have them. ## What runs the same as production A sandbox request goes through the **identical** request-creation flow as a production request: * Validation of `schemaId` and `inputs` * Schema lookup against the schemas provisioned for your account * Required-input checks: missing or malformed inputs produce the same `INVALID_INPUTS` 400 envelope (`{"error": "INVALID_INPUTS", "message": "...", "details": {"missingInputs": [...], "invalidInputs": {...}}}`) * `internalId` idempotency dedup * Batch grouping and due-date scheduling against your account's daily call capacity * A real `requestId` and `requestBatchId` you can read back with `GET /v1/requests/{requestId}` and the list endpoint, just like a production request * Webhook delivery to your configured URL * Response shapes and HTTP status codes: every error code documented in [Creating a Request](/guides/creating-a-request#error-handling) reproduces when using sandbox Use sandbox to verify error handling, retry logic, idempotency, and webhook ingestion before production traffic. ## What's different when using sandbox For requests that would normally place a phone call to a payer: * **No phone call is dialed.** A call record is still written for traceability, but it never reaches a real outbound phone line. * **Results are LLM-generated against your schema.** SuperDial uses an LLM to produce realistic mock values for every field defined by your `schemaId`, then feeds those through the same callback path a real call would use. * **Transcript, recording, and call summary are placeholders.** When you fetch the request via [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request), you'll see: * `transcript`: a fixed placeholder line, not a transcript of any real conversation. * `callSummary`: a fixed placeholder sentence. * `callAuditSummary`: a fixed placeholder sentence. * `recordingDownloadUrl`: a signed URL pointing at a placeholder MP3. * **The request webhook fires as normal.** Configure your webhook URL the same way you would for production traffic, and verify the signature with your **sandbox API key** (see [Webhooks → Signature verification](/guides/webhooks#signature-verification)). ## Sandbox webhooks Sandbox webhooks fire the same way production webhooks do, to the same URL, with the same payload shape: ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "state": "SUCCESS", "internalId": "claim_internal_456", "internalTag": "march-batch" } ``` > [!WARNING] > > Sandbox webhooks are signed with your **sandbox API key**, not with your production key or your webhook secret. Pass the sandbox key to [the verification routine](/guides/webhooks#signature-verification) for any request created with sandbox credentials. If you set a webhook secret on the portal, it applies to production deliveries only. After receiving a sandbox webhook, follow the same pattern as production: call [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) to fetch the full payload (`results`, plus the placeholder transcript/summary/recording fields). ## A typical sandbox test plan 1. **Happy path.** POST a single, valid request → assert 200 with `requestId` → wait for webhook → GET the request → assert `state: "SUCCESS"` with LLM-generated mock values populating `results`. 2. **Validation failures.** POST with missing `schemaId`, an `inputs` field that isn't an object, missing schema-required inputs, and bad input formats. Confirm your client surfaces the `INVALID_REQUEST` and `INVALID_INPUTS` envelopes correctly. 3. **Idempotency.** POST the same `internalId` twice. Confirm the second response returns the same `requestId` rather than creating a duplicate. 4. **Batch.** POST `{"requests": [valid, invalid]}`. Confirm you get HTTP 207 with a per-entry success body and a per-entry `{error, message}` envelope, and that your batching/retry logic handles both entries independently. 5. **Webhook signature.** Verify the HMAC-SHA256 signature on the incoming webhook body using your **sandbox** API key. Every request-side code path runs identically to production, so a passing run of this plan exercises the same logic real traffic will hit. ## Limits Sandbox requests count against your account's daily call capacity for scheduling purposes. If your sandbox account is provisioned with a non-zero limit, batch due-date scheduling can return the same `INVALID_REQUEST` 400 you'd see in production when capacity runs out (e.g. `"Could not schedule all rows within 365 days: N of M rows could not be placed"`). Coordinate with your account team if you need a higher sandbox throughput for load testing. Sandbox `requestId` and `requestBatchId` values use the same 20-character format as production. Sandbox and live traffic are partitioned: * **Batches never mix.** A sandbox request lands on a sandbox-only batch, so a `requestBatchId` holds either sandbox requests or live requests, never both. * **Idempotency is scoped per mode.** `internalId` dedup is keyed by mode, so replaying one of your real record IDs through a sandbox key does not block the later live request that carries the same `internalId`. # Schemas Source: https://docs.superdial.com/guides/schemas Discover the schemas provisioned for your account, the input keys each one requires, and the fields each one returns. A [**schema**](/guides/concepts#schema) defines the structured output fields a request returns and which inputs are required to submit one. Pass its `schemaId` on `POST /v1/requests` to invoke it. These endpoints make integration self-service. Read the schemas your account is provisioned for. Read the fields a schema returns. Read the input keys a schema needs. | Endpoint | Purpose | | - | - | | [`GET /v1/schemas`](/api-reference/schemas/list-schemas) | List the schemas owned by the account associated with your API key. | | [`GET /v1/schemas/{schemaId}`](/api-reference/schemas/retrieve-a-schema) | Return one schema's detail: its name, its request type, and every field it can return in `results`. | | [`GET /v1/schemas/{schemaId}/required-inputs`](/api-reference/schemas/required-inputs-for-a-schema) | Return the input keys required to submit a request against a given schema. | | [`POST /v1/schemas/{schemaId}/required-payer-inputs`](/api-reference/schemas/resolve-payer-names-against-a-schemas-required-inputs) | Resolve a batch of payer names to their per-payer required inputs (opt-in: see [Per-Payer Required Inputs](/guides/payer-required-inputs)). | Every endpoint here uses the same bearer-token authentication as the rest of the API. All non-2xx responses use the uniform `{error, message, [details]}` envelope (see [Errors](#errors)). ## List your schemas ```bash theme={null} curl -H "Authorization: Bearer " \ https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas ``` ### Response ```json theme={null} { "schemas": [ { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Claim Status (Commercial)", "requestType": "claim-status" }, { "schemaId": "qP2bN8rT6mK1xC3vW9aL", "name": "Verification of Benefits", "requestType": "vob" } ] } ``` | Field | Type | Notes | | - | - | - | | `schemaId` | string | Pass to [`POST /v1/requests`](/guides/creating-a-request) as `schemaId`. | | `name` | string | Human-readable label. Falls back to the `schemaId` when no name is set. | | `requestType` | string | The kind of extraction this schema produces (e.g. `claim-status`, `vob`). Server-derived. Useful for filtering the list, but you don't pass it on `POST /v1/requests`. It surfaces on `RequestResponse.requestType` after the request runs. | Schemas that are no longer accessible for your account are filtered out of this list. ## Look up the fields a schema returns `GET /v1/schemas/{schemaId}` returns one schema's detail. The part you build against is `resultsFields`: every field the schema can produce in `results` on [`GET /v1/requests/{requestId}`](/guides/reading-requests). Read it to build your ingest mapping and your destination table before you run a request. ```bash theme={null} curl -H "Authorization: Bearer " \ https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas/fWxzG4nqtpHsJxS5Lm3q ``` ### Response ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "name": "Claim Status (Commercial)", "requestType": "claim-status", "resultsFields": [ { "name": "checkNumber", "label": "Check Number", "description": "What is the check number?", "type": "alphanumeric" }, { "name": "claimReceived", "label": "Claim Received", "description": "Did the payer receive the claim?", "type": "boolean" }, { "name": "claimStatus", "label": "Claim Status", "description": "What is the status of the claim?", "type": "multiple", "allowedValues": ["PAID", "DENIED", "PENDING"] }, { "name": "paidAmount", "label": "Paid Amount", "description": "What amount was paid on the claim?", "type": "dollar" }, { "name": "paidDate", "label": "Paid Date", "description": "On what date was the claim paid?", "type": "date" } ] } ``` `name` and `requestType` are the same values [`GET /v1/schemas`](#list-your-schemas) returns for this schema. Inputs are not included here; use the [required-inputs endpoint](#look-up-required-and-optional-inputs) for what to send. Each entry in `resultsFields` carries: | Field | Type | Notes | | - | - | - | | `name` | string | The `results` key for this field. Also the value that appears in the top-level `missingFields`. Always present. | | `label` | string | Display name. Falls back to `name` when the schema sets none. Always present. | | `description` | string | What the field captures, usually the question the agent asks. Can hold literal `{placeholder}` tokens; those are input *names*, never values. Omitted when empty. | | `type` | string | Declared value type. See [Value types](#value-types) below. Omitted when the schema declares none. | | `allowedValues` | array of strings | The declared choices, on `multiple` fields. Omitted when the schema declares none. | An optional key is omitted, never `null`. Entries are sorted by `name`. The list is never empty: a schema with no readable fields returns `500`. `name` matches the top-level `missingFields` exactly. Do not join it against `callSteps[].missingFields`: that list falls back to raw question text for a skipped question that carries no alias. The endpoint does not report whether a field is required. Even a field the schema always asks for goes missing when the payer will not give it up, so requiredness is not a property you can build a `NOT NULL` column on. Read `missingFields` on a completed request to see what that run did not capture. > [!NOTE] > > **Every column you build from this inventory must be nullable.** For this schema the inventory is a superset of any one response. Most fields on a large schema are gated on another field's answer, so they are absent on any given request. An unanswered field is absent from `results`; it is never `null`. Map on `name`, treat every field as optional, and ignore keys you do not map. The endpoint does not report which fields are gated. ### Value types | `type` | Wire shape | | - | - | | `boolean` | JSON `true` or `false` | | `date` | ISO `yyyy-mm-dd` string | | `dollar` | Bare-numeric string **or** JSON number. Accept both. No `$` and no thousands separator. | | `number` | Bare-numeric string **or** JSON number. Accept both. | | `percentage` | Bare-numeric string **or** JSON number. Accept both. | | `multiple` | String, one of `allowedValues` | | `text` | String | | `alphanumeric` | String | | `address` | String | | `phoneNumber` | String | | `faxNumber` | String | Those eleven are the full vocabulary. A schema can still declare a type outside the list. That type is returned as-is, so treat an unrecognised `type` as an opaque string. > [!WARNING] > > **`allowedValues` is not a closed set.** The value `CANNOT ANSWER - ` passes through verbatim as a string on any type, including `boolean` and `multiple`. A strict enum parse or boolean parse fails on it. Detect it by string prefix. It does not appear in `missingFields`: an explicit non-answer counts as answered. > [!NOTE] > > **A chained request can return keys beyond this schema.** A request can open a follow-up leg: a second call against a different schema, listed as an extra entry in [`callSteps`](/guides/reading-requests#calls-behind-a-request). That leg's captured values merge into the same top-level `results`, under the leg schema's own field names. `resultsFields` covers one schema and does not list them. Read `callSteps[].schemaId` on a completed request, then call this endpoint again for that ID. `resultsFields` describes the schema's current latest version. A request that already ran was pinned to the version that was latest at run time. So an older request's `results` can carry keys this endpoint no longer lists, or omit keys it now lists. Read the endpoint again and diff the field list to find a change. ## Look up required and optional inputs Once you have a `schemaId`, fetch the input keys it accepts. The response carries two sorted, disjoint lists: `requiredInputs.fields` (must be supplied or you get `INVALID_INPUTS`) and `optionalInputs.fields` (accepted but not required, useful for "build a request" forms that want to show every key the schema declares). Both lists describe what this schema declares; neither is a limit on what `inputs` accepts. ```bash theme={null} curl -H "Authorization: Bearer " \ https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/schemas/fWxzG4nqtpHsJxS5Lm3q/required-inputs ``` ### Response ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "requiredInputs": { "fields": [ "beginningDateOfService", "billingProviderName", "billingProviderTaxId", "claimChargeAmount", "memberId", "patientDateOfBirth", "patientFirstName", "patientLastName", "payerName", "phoneNumber", "renderingProviderName", "renderingProviderNpi" ] }, "optionalInputs": { "fields": [ "memberId2" ] } } ``` Field-name keys are returned verbatim: spell them in `inputs` on `POST /v1/requests` exactly as they come back here. If SuperDial updates the schema, call this endpoint again (or refresh your cache) before relying on a fixed list in code. > [!NOTE] > > If your account is enabled for [payer phone number lookup](/guides/payer-resolution), `phoneNumber` moves out of `requiredInputs.fields` and into `optionalInputs.fields` for this endpoint, because you can omit it and let SuperDial fill it in from `payerName`. With lookup off (the default), `phoneNumber` stays required. > [!NOTE] > > If your account is enabled for [per-payer required inputs](/guides/payer-required-inputs), some payers require additional inputs that aren't listed here. Treat this list as the baseline; a request for one of those payers may need more. > [!NOTE] > > This endpoint reports what the schema declares, not everything `POST /v1/requests` will take. You can send [extra keys](/guides/creating-a-request#extra-inputs) that appear in neither list, to give the call context the schema never asked to collect. ## End-to-end discovery flow ```python theme={null} import requests BASE = "https://robodialer-service-api-9nc4t1p9.uc.gateway.dev" def list_schemas(token): r = requests.get(f"{BASE}/v1/schemas", headers={"Authorization": f"Bearer {token}"}) r.raise_for_status() return r.json()["schemas"] def schema_inputs(token, schema_id): r = requests.get( f"{BASE}/v1/schemas/{schema_id}/required-inputs", headers={"Authorization": f"Bearer {token}"}, ) r.raise_for_status() body = r.json() return body["requiredInputs"]["fields"], body["optionalInputs"]["fields"] def schema_results_fields(token, schema_id): r = requests.get( f"{BASE}/v1/schemas/{schema_id}", headers={"Authorization": f"Bearer {token}"}, ) r.raise_for_status() return r.json()["resultsFields"] # Use it schemas = list_schemas(token) schema = next(s for s in schemas if s["requestType"] == "claim-status") required, optional = schema_inputs(token, schema["schemaId"]) print("required:", required) # ['beginningDateOfService', 'billingProviderName', ..., 'phoneNumber'] print("optional:", optional) # ['memberId2'] returned = schema_results_fields(token, schema["schemaId"]) print("returns:", [f["name"] for f in returned]) # ['checkNumber', 'claimReceived', 'claimStatus', 'paidAmount', 'paidDate'] ``` After this you have both sides of the schema. To submit, pass the `schemaId` and populate every key in `required` inside the `inputs` object. You can add the `optional` keys, and [extra keys of your own](/guides/creating-a-request#extra-inputs), on top of that. To ingest, map those field names onto your own columns, every one of them nullable. The `requestType` is server-derived; you'll see it on the response. ## Errors Every non-2xx response uses the uniform envelope: ```json theme={null} { "error": "MACHINE_CODE", "message": "Human-readable description.", "details": { /* optional, only on INVALID_INPUTS */ } } ``` | HTTP code | `error` code | When | | - | - | - | | `400` | `INVALID_REQUEST` | The `schemaId` path parameter was empty, contained `/`, started with `_` or `.`, or exceeded 1500 characters. Applies to every endpoint that takes a `schemaId` in the path. | | `401` | (gateway envelope) | Bearer token missing, malformed, or expired. The gateway uses `{code, message}`, not the envelope above. | | `404` | `SCHEMA_NOT_FOUND` | No schema with that ID exists for your account, or it has been retired and is no longer accessible. | | `404` | `ACCOUNT_NOT_FOUND` | The API key resolves to an account that no longer exists. Contact support. | | `500` | `INTERNAL_ERROR` | Unexpected server failure. Also returned by `GET /v1/schemas/{schemaId}` when the schema's stored version record is unreadable or carries no fields: an empty `resultsFields` is never returned as a `200`. Retry once; escalate if persistent. | ### Example error responses ```json theme={null} // 400: invalid schemaId path parameter { "error": "INVALID_REQUEST", "message": "The provided schemaId is invalid." } ``` ```json theme={null} // 404: schema not found, or has been retired { "error": "SCHEMA_NOT_FOUND", "message": "No schema with that ID exists for your account." } ``` ```json theme={null} // 404: API key doesn't resolve to a provisioned account { "error": "ACCOUNT_NOT_FOUND", "message": "No account is associated with this API key. Contact support if you believe this is an error." } ``` ```json theme={null} // 500: unexpected server failure { "error": "INTERNAL_ERROR", "message": "An internal error occurred. Please try again or contact support if the problem persists." } ``` For the full response and parameter schemas, see the [API Reference → Schemas](/api-reference/schemas/list-schemas). # Webhooks Source: https://docs.superdial.com/guides/webhooks Receive request results when they reach a terminal state. When a [request](/guides/concepts#request) reaches a terminal state, SuperDial sends an HTTP POST to your webhook endpoint with the result. Webhooks are the recommended way to consume request results. ## When webhooks fire A webhook is sent once per request, when its [state](/guides/concepts#state) becomes one of: | State | Meaning | | - | - | | `SUCCESS` | The request completed and produced a full result. Read the structured output from the request's `results` field via [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request). | | `PARTIAL` | Occurs in only two cases: the call left a voicemail and captured nothing (accounts with leave-a-voicemail), or the first call succeeded but a [follow-up step](/guides/reading-requests#when-a-follow-up-step-fails) failed. A single-call request otherwise ends `SUCCESS` or `FAILURE`. `error` is `null`. See [Failed and partial requests](/guides/reading-requests#failed-and-partial-requests). | | `FAILURE` | The request captured nothing usable. The full GET returns `results` empty and the [`error`](/guides/concepts#error-object) object describing the cause. | No webhook is sent while a request is still `PROCESSING`. ## Configuration You can set your webhook endpoint in two places: ### Account default Set your account-level **Request webhook** URL in the SuperDial portal: go to **API**, find the **Webhooks** section, and fill in **Request webhook**. Once configured, this becomes the default for every request you create. No per-request `webhookUrl` field needed. > [!WARNING] > > The Requests API uses a **different** webhook URL from the legacy Calls API. In the same Webhooks section, your legacy URL appears separately as **Legacy webhook URL (/v1/calls)**. Setting one does nothing for the other, and there is no fallback between them. If you are moving from `POST /v1/calls` to `POST /v1/requests`, set the Request webhook URL before you cut traffic over, or your requests will complete and deliver nothing. To confirm delivery is working, the same panel shows **Recent deliveries (7 days)**, filterable by Request ID. If you have submitted requests and that list is empty, the URL is not set correctly. ### Per-request override Pass a `webhookUrl` field in the body of `POST /v1/requests` to direct a single request to a different URL. The per-request value always wins over the account default. ```json theme={null} { "schemaId": "fWxzG4nqtpHsJxS5Lm3q", "inputs": { "payerName": "Sample Insurance Co", "memberId": "TEST123456789", "phoneNumber": "2125551234" }, "webhookUrl": "https://your-app.example.com/webhooks/superdial/requests" } ``` > [!WARNING] > > If neither is configured, **no webhook is sent and no error is raised**. Delivery is a silent no-op: requests reach a terminal state normally, and nothing tells you the results went nowhere. Poll `GET /v1/requests/{requestId}` for results until a URL is set. ## Payload ```json theme={null} { "requestId": "8bF7xK2mP9qR4sT6uV0w", "requestBatchId": "pH9kJ2lM4nB6vC8xZ7Qr", "state": "SUCCESS", "internalId": "claim_internal_456", "internalTag": "march-batch" } ``` | Field | Type | Always present? | Notes | | - | - | - | - | | `requestId` | string | Yes | The request's ID. Use it to fetch the full result via `GET /v1/requests/{requestId}`. | | `requestBatchId` | string | Yes | The batch this request belongs to. | | `state` | string | Yes | One of `SUCCESS`, `PARTIAL`, or `FAILURE` (uppercase). | | `internalId` | string | Only if supplied at create time | Echoed from your input. When you didn't supply one, the **key is absent from the JSON object entirely**: not `null`, not empty string. | | `internalTag` | string | Only if supplied at create time | Echoed from your input. When you didn't supply one, the **key is absent from the JSON object entirely**: not `null`, not empty string. | The webhook body is intentionally compact. To get the full result (`results`, `missingFields`, `modality`, `data_completeness`, and the [`error`](/guides/concepts#error-object) object on non-`SUCCESS`), call `GET /v1/requests/{requestId}` after receiving the webhook. > [!NOTE] > > By the time you receive the webhook, the request is fully readable. For phone-backed requests, the call enrichment fields (`transcript`, `recordingDownloadUrl`, `callDuration`, `callSummary`) are available on the `GET /v1/requests/{requestId}` response. ## Signature verification Every webhook delivery includes an `X-Webhook-Signature` header. Verify it on every delivery. Without verification, anyone who learns your endpoint URL can forge events. The signature is HMAC-SHA256 of the raw request body. The **signing secret** depends on which credentials created the request: | Request created with | Signing secret | | - | - | | Production credentials | Your **webhook secret** if you've set one up on the portal, otherwise your **production API key**. | | Sandbox credentials | Your **sandbox API key**. A webhook secret does not apply to sandbox deliveries. | Compute the HMAC over the raw body bytes exactly as received: do not parse and re-serialize the JSON, since that changes the byte sequence and breaks the signature. The header value is the **bare 64-character lowercase hex digest**, with no `sha256=` prefix or other framing. Example: ```http theme={null} X-Webhook-Signature: 3f5b2a1c8d9e4f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a ``` ### Python ```python theme={null} import hmac import hashlib def verify_webhook_signature(raw_body: bytes, signature_header: str, signing_secret: str) -> bool: expected = hmac.new( signing_secret.encode("utf-8"), raw_body, hashlib.sha256, ).hexdigest() return hmac.compare_digest(expected, signature_header) ``` ### Node.js ```javascript theme={null} import crypto from "node:crypto"; function verifyWebhookSignature(rawBody, signatureHeader, signingSecret) { const expected = crypto .createHmac("sha256", signingSecret) .update(rawBody) .digest("hex"); return crypto.timingSafeEqual( Buffer.from(expected, "hex"), Buffer.from(signatureHeader, "hex"), ); } ``` Both samples use a constant-time comparator (`hmac.compare_digest` / `crypto.timingSafeEqual`); use the equivalent in your language rather than `==` to avoid timing-attack risk. The signature doesn't include a timestamp, so it can't be used to detect replays on its own. Use `requestId` as a dedup key (see [Idempotency](#idempotency) below). ## Delivery and retries We send the webhook when the request reaches a terminal state. Delivery has two layers. **Inline retries.** On a **5xx response or connection failure** we retry up to **3 more times** (4 attempts total) with exponential backoff (0.5s → 1s → 2s). Each attempt times out after 10 seconds. **Later retries.** If all four inline attempts fail, we try the delivery again later. A request gets up to **3 delivery rounds** in total, within 7 days of reaching its terminal state. How we treat each response: | Response | Behavior | | - | - | | `400`, `404` | Delivery stops for good. No inline retry, no later round. Your endpoint read the payload and rejected it, so re-posting cannot succeed. | | `401`, `403` | Retried across the remaining rounds. A rotated key or a fixed subscription can change the answer. | | Other `4xx` | Retried across the remaining rounds. | | `5xx`, connection failure | Inline retries, then the later rounds. | Once all three rounds are used, the failure is recorded and no further attempts are made. Fall back to polling [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) to recover. For high-reliability ingestion: * Ack with 2xx as soon as you've durably enqueued the event for processing. * Track the `requestId`s you've submitted on your side. Any request whose terminal outcome you haven't received within the expected window should trigger a fallback poll. ## Idempotency In rare cases the same `requestId` may arrive more than once. Always treat `requestId` as a dedup key: ```python theme={null} if already_processed(payload["requestId"]): return 200 # idempotent ack ``` If you also passed `internalId` when creating the request, you have two layers of dedup keys. Pick whichever fits your system. ## Recommended response Return **HTTP 200** as quickly as possible. Don't do synchronous work that could exceed our **10-second timeout**. Push processing to a background job and ack immediately. 5xx responses and connection failures trigger automatic retries. A `400` or `404` stops delivery permanently (see [Delivery and retries](#delivery-and-retries) above). If all retries are exhausted, fall back to polling `GET /v1/requests/{requestId}` to recover. After acking, call `GET /v1/requests/{requestId}` to fetch the full payload (`results`, `missingFields`, `modality`, and the [`error`](/guides/concepts#error-object) object on `FAILURE`). # SuperDial API Source: https://docs.superdial.com/introduction Submit requests and retrieve results programmatically. `POST /v1/requests` submits a [**request**](/guides/concepts#request) by specifying a `schemaId` and `inputs`. A schema defines both the inputs it requires and the fields you'll get back in `results`. `GET /v1/requests/{requestId}` returns the structured result. Discover the schemas provisioned for your account with [`GET /v1/schemas`](/guides/schemas). > [!NOTE] > > Looking for the legacy SuperDial docs? They're still available at [superdial.readme.io](https://superdial.readme.io/). > [!WARNING] > > Still calling `POST /v1/calls`? The legacy Calls API sunsets on **October 1, 2026**. See [Migrating from the Calls API](/guides/api-migration) for the field-by-field mapping and the migration checklist. ## Authentication Every endpoint other than `GET /v1/auth` requires a bearer token. Exchange your API key and secret at `GET /v1/auth` for a short-lived token, then pass it as `Authorization: Bearer ` on every subsequent call (`POST`/`GET /v1/requests`, `GET /v1/requests/{requestId}`, `GET /v1/schemas`, `GET /v1/schemas/{schemaId}`, `GET /v1/schemas/{schemaId}/required-inputs`). See [Concepts → Production vs Sandbox](/guides/concepts#production-vs-sandbox) for which key to use when. ## Quickstart The end-to-end flow has four steps: **1. Authenticate** Exchange your API key and secret for a 1-hour bearer token at [`GET /v1/auth`](/guides/creating-a-request#authentication). **2. Submit a request** [`POST /v1/requests`](/guides/creating-a-request) with `schemaId` and `inputs`. Optionally pass `internalId` for correlation and idempotency. **3. Wait for completion** SuperDial fires a [webhook](/guides/webhooks) to your configured URL when the request reaches a terminal state (`SUCCESS`, `PARTIAL`, or `FAILURE`). **4. Fetch the result** [`GET /v1/requests/{requestId}`](/guides/reading-requests#single-request) returns the structured `results`. When a phone call was placed, the response also includes the call transcript, recording URL, and summary. Test the full flow without placing real phone calls using the [Sandbox](/guides/sandbox). ## Where to start > **[Concepts & Glossary](/guides/concepts)** > > Definitions for request, schema, payer, state, error object, modality, and other terms used throughout the API. > **[Sandbox](/guides/sandbox)** > > Test your integration end-to-end without placing real phone calls. What's identical to production, what's mocked. > **[Creating a Request](/guides/creating-a-request)** > > How to submit a single request or a batch with `POST /v1/requests`. Required fields, idempotency, batch semantics. > **[Reading Requests](/guides/reading-requests)** > > Fetch a request by ID, list requests by date, or pull all requests in a batch. > **[Webhooks](/guides/webhooks)** > > Receive request results when they reach a terminal state. Payload shape, signature verification, retry behavior. > **[Schemas](/guides/schemas)** > > Discover the schemas provisioned for your account and the input keys each one requires, so you can submit requests without checking with your account team first. > **[Payer Phone Number Lookup](/guides/payer-resolution)** > > How `payerName` resolves to a canonical payer record and dialing phone number: when it runs, what shapes the answer, and how to handle each failure mode. ## API Reference The **API Reference** tab has the full endpoint specifications, request/response shapes, and every error code with examples.