{"openapi":"3.1.0","info":{"title":"Dial REST API","version":"1.0.0","description":"The Dial REST API lets you provision phone numbers, send SMS, place AI voice calls, and consume your account's event stream. Every request is authenticated with a `sk_live_` API key sent as a Bearer token.\n\nThe API is versioned in the URL path (`/v1`). Breaking changes ship under a new version; anything deprecated in `/v1` keeps working for at least 6 months and is announced with `Deprecation` and `Sunset` response headers. See https://docs.getdial.ai/documentation/reference/versioning."},"paths":{"/api/v1/auth/signup":{"post":{"operationId":"authentication_signup","summary":"Request a sign-up code","description":"Sends a one-time code to the given email and returns a `verificationId` to complete sign-up. No authentication required. While new signups are paused, a new email is refused with `403` unless it carries a valid `coupon`.","tags":["authentication"],"responses":{"200":{"description":"Code sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_signup_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"Invalid request, or the coupon code isn't valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"New signups are paused and the email carries no valid coupon, or the coupon isn't active right now. The `error` message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This email already used the coupon.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The address to send the code to. Addresses that reach the same mailbox are treated as one account: a `+tag` is dropped from the local part, dots are ignored in a `gmail.com` local part, and `googlemail.com` is read as `gmail.com`. So `dev.user+dial@gmail.com` signs in to the account owned by `devuser@gmail.com` rather than creating a second one, and the account is created under that canonical address."},"coupon":{"type":"string","description":"An event coupon code (case-insensitive). On a new email it is checked before anything else: a valid code gets the signup past a signup pause, and its credit is added to the account when the account is created (at `verify-number`), once per email. A code that isn't valid, isn't active, or was already used by this email refuses the signup and no code is sent. Ignored when the email already has an account (signing in)."}},"required":["email"]}}}}}},"/api/v1/auth/verify":{"post":{"operationId":"authentication_verifySignup","summary":"Verify a sign-up code","description":"Verifies the one-time code for a `verificationId`. This endpoint has **two\npossible outcomes**, and you must branch on the response body:\n\n- **Signing in to an existing account** — the account and API key are\n  returned immediately. **The API key is returned only once — store it\n  immediately.**\n- **Registering a new account** — the email is now verified, but an account\n  is *not* created yet. The response carries a `registrationId` instead.\n  Registering requires a verified phone number: continue with\n  [Register a phone number](#operation/registerNumber), then\n  [Verify a phone number](#operation/verifyNumber), which creates the\n  account and returns the same shape as the sign-in outcome.\n\nIn short: **if the response contains `registrationId`, the flow is not\nfinished.** A new number's inbound voice-agent prompt is always the default\nat creation; change it afterwards with\n[Update a phone number](#operation/updateNumber).\n","tags":["authentication"],"responses":{"200":{"description":"Verified. Either the account (sign-in) or a `registrationId` (registration still needs a verified phone number).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_verifySignup_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts. Wait before retrying. During registration this also covers the cap on verification codes sent to a single phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"verificationId":{"type":"string"},"code":{"type":"string","description":"The 6-digit code from the email."}},"required":["verificationId","code"]}}}}}},"/api/v1/auth/register-number":{"post":{"operationId":"authentication_registerNumber","summary":"Register a phone number","description":"Sends a one-time code by SMS to the phone number that will own the new\naccount. Call this with the `registrationId` returned by\n[Verify a sign-up code](#operation/verifySignup).\n\nThe number must be a valid phone number in E.164 form, and it must not\nalready be registered to another account — **a verified number is bound to\none account permanently.** A Dial number cannot be used to register a Dial\naccount.\n\nCalling this again with the same number re-sends the code. Calling it with\na different number replaces the pending one, so a mistyped number is\nrecoverable until it is verified.\n","tags":["authentication"],"responses":{"200":{"description":"Code sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_registerNumber_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current state. During registration this means the registration is unknown or already complete, its email is not verified yet, no phone number has been registered against it, or the phone number is already registered to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts. Wait before retrying. During registration this also covers the cap on verification codes sent to a single phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"registrationId":{"type":"string","description":"From the verify-sign-up response."},"phoneNumber":{"type":"string","description":"The owner's phone number, E.164 preferred."}},"required":["registrationId","phoneNumber"]}}}}}},"/api/v1/auth/verify-number":{"post":{"operationId":"authentication_verifyNumber","summary":"Verify a phone number","description":"Submits the SMS code from [Register a phone number](#operation/registerNumber).\nOn success the account is created, an API key is issued, and a first phone\nnumber is provisioned — the response is identical to the sign-in outcome of\n[Verify a sign-up code](#operation/verifySignup). **The API key is returned\nonly once — store it immediately.**\n\nIf provisioning fails you receive a `502` and may retry this call with the\nsame `registrationId`; the phone number stays verified, so no new code is\nneeded.\n\nNote that `phoneNumber` in the response is the **Dial** number provisioned\nfor the account, not the number you just verified.\n","tags":["authentication"],"responses":{"200":{"description":"Verified, account created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatedAccount"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The code is wrong, expired, or already used. Request a new one with [Register a phone number](#operation/registerNumber).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current state. During registration this means the registration is unknown or already complete, its email is not verified yet, no phone number has been registered against it, or the phone number is already registered to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts. Wait before retrying. During registration this also covers the cap on verification codes sent to a single phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"registrationId":{"type":"string"},"code":{"type":"string","description":"The 6-digit code from the SMS."}},"required":["registrationId","code"]}}}}}},"/api/v1/account":{"get":{"operationId":"account_getAccount","summary":"Get the current account","tags":["account"],"responses":{"200":{"description":"The authenticated account and its API keys (key values are previewed, not full).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"account_deleteAccount","summary":"Delete the current account","description":"Permanently deletes the account and releases every phone number. This cannot be undone.","tags":["account"],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account_deleteAccount_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"account_updateAccount","summary":"Update the current account","tags":["account"],"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxCallDurationSeconds":{"type":["integer","null"],"minimum":60,"maximum":3600,"description":"Account-wide default cap on call length, in seconds, for every inbound and outbound call on the account. The effective cap on a call is the first one set in priority order — the per-call cap, then the number's cap, then this account cap — falling back to the global default when none is set. A higher-priority level overrides a lower one (it can raise or lower the limit), so this account cap applies only when neither the call nor the number sets one. Must be between 60 and 3600 seconds (1 minute to 1 hour); a value outside that range returns 400. Send null to clear it (falls back to the global default). Free accounts — accounts that have never added credit and never subscribed — are capped at 300 seconds (5 minutes), reported as `limits.maxCallDurationSeconds` on the account: a higher value sent here returns 400, and a cap inherited from another level is clamped to 300. When a cap is active, Dial warns ~30–40 seconds before the hard cut so the agent can wrap up naturally (managed and LLM self-hosted: an injected spoken prompt; audio self-hosted: a `duration_warning` protocol frame)."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/account/api-keys/{id}/rotate":{"post":{"operationId":"account_rotateApiKey","summary":"Rotate an API key","description":"Replaces the secret of an API key with a newly generated one. The old value stops working immediately; there is no grace period, so update every place that uses the key right after rotating it. The key keeps its `id`, `label`, and role, and signing in afterwards returns the new value.\nThe new key is returned once, in `apiKey`. Store it: later reads only show a `preview`.\nOwner keys can rotate any owner key on the account. A member key can rotate only that member's own key. Find a key's `id` with [Get the current account](#operation/getAccount); the key making the request is marked `current: true`.","tags":["account"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The key was rotated. `apiKey` holds the new value and is shown only here.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatedApiKey"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key belongs to someone else on the account (a member rotating another person's key, or an owner rotating a member's key; remove the member instead).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/usage":{"get":{"operationId":"usage_getUsage","summary":"Get account usage","description":"Activity analytics for the account over a selected window, derived from real message and call records: headline metrics with per-day spark series and deltas, a daily activity series, voice-call duration stats, the most active numbers, and fixed-window breakdown totals. Calls an allow list declined (`terminationType` `blocked`) are not counted anywhere here.\n","tags":["usage"],"parameters":[{"name":"days","in":"query","description":"The analytics window. One of 7, 30, or 90. Defaults to 30; any other value falls back to 30.","required":false,"schema":{"$ref":"#/components/schemas/ApiV1UsageGetParametersDays","default":30}}],"responses":{"200":{"description":"Usage analytics for the selected window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing":{"get":{"operationId":"billing_getBilling","summary":"Get billing status","description":"Returns the account's credit-wallet balance, the current subscription (if any), each phone number's billing mode (PAYG or FIXED), and recent usage.","tags":["billing"],"responses":{"200":{"description":"Billing status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/checkout/credits":{"post":{"operationId":"billing_createCreditsCheckout","summary":"Start a credit top-up checkout","description":"Returns an embedded Stripe Checkout `clientSecret` for a pay-as-you-go credit top-up (amount entered by the customer in Checkout). The wallet is credited when the resulting invoice is paid. The customer may optionally save the card for future use; the first saved card becomes the default payment method automatically. Rejected with `409` while a subscription is active — subscription accounts don't draw on the wallet. Not available during impersonation.","tags":["billing"],"responses":{"200":{"description":"Embedded Checkout client secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_createCreditsCheckout_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A subscription is active, so credit top-ups are disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","format":"uri","description":"Where Checkout returns after completion. Defaults to the dashboard billing page."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/checkout/subscription":{"post":{"operationId":"billing_createSubscriptionCheckout","summary":"Start a subscription checkout","description":"Returns an embedded Stripe Checkout `clientSecret` to subscribe the account for the given `interval`. Quantity is set server-side to the account's current phone-number count (one unit per number) — Dial doesn't subscribe a subset. Coverage begins when the invoice is paid. Not available during impersonation.\n\nAccounts holding an iMessage number can't subscribe — iMessage is pay-as-you-go only, so the request is rejected with `403`. Release the iMessage number first.","tags":["billing"],"responses":{"200":{"description":"Embedded Checkout client secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_createSubscriptionCheckout_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account holds an iMessage number, which is pay-as-you-go only and can't be covered by a subscription. Release it before subscribing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/ApiV1BillingCheckoutSubscriptionPostRequestBodyContentApplicationJsonSchemaInterval"},"returnUrl":{"type":"string","format":"uri","description":"Where Checkout returns after completion. Defaults to the dashboard billing page."}},"required":["interval"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/subscription/cancel":{"post":{"operationId":"billing_cancelSubscription","summary":"Cancel the subscription at period end","description":"Schedules the subscription to cancel at the end of the current period. Coverage already paid for stays until `periodEnd`, then the account reverts to pay-as-you-go (no refund or proration). Reversible with Resume before the period ends. Not available during impersonation.","tags":["billing"],"responses":{"200":{"description":"Cancellation scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_cancelSubscription_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No active subscription to cancel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/subscription/resume":{"post":{"operationId":"billing_resumeSubscription","summary":"Resume a subscription scheduled to cancel","description":"Clears a scheduled cancellation (the inverse of Cancel), so the subscription renews normally at `periodEnd`. Only meaningful while `cancelAtPeriodEnd` is true. Not available during impersonation.","tags":["billing"],"responses":{"200":{"description":"Cancellation cleared; the subscription will renew.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_resumeSubscription_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No active subscription to resume.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/subscription/change":{"post":{"operationId":"billing_changeSubscriptionInterval","summary":"Change the subscription billing interval","description":"Switches the subscription billing interval (e.g. upgrade monthly → annual). Prorated and invoiced immediately; the new-period entitlement lands when that invoice is paid. Clears any scheduled cancellation. No-op if already on the target interval. Not available during impersonation.","tags":["billing"],"responses":{"200":{"description":"Interval change applied (or already on the target interval).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_changeSubscriptionInterval_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/ApiV1BillingSubscriptionChangePostRequestBodyContentApplicationJsonSchemaInterval"},"promotionCode":{"type":"string","description":"Optional customer-facing promotion code (e.g. `LAUNCH20`) to apply to the subscription. Resolved to its Stripe promotion code and handed to Stripe, which validates it and applies the discount per the underlying coupon's own scope and duration. An invalid, expired, or inapplicable code is rejected with `400`. Preview the discounted amount first with Preview a subscription change."},"prorationDate":{"type":"integer","description":"Optional Unix timestamp (seconds) from a prior preview's `prorationDate`. When supplied, the proration is calculated as of that instant so the charged amount matches the previewed quote exactly. Omit to prorate as of now."}},"required":["interval"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/subscription/preview":{"post":{"operationId":"billing_previewSubscriptionChange","summary":"Preview a subscription change","description":"Computes the prorated amount that a subscription change would invoice **today**, without making any change or charge. Use it to show the customer what they'll pay before confirming an interval switch, a number addition, or a coupon application. The amounts come straight from Stripe's invoice preview — the same engine that bills the actual change.\n\nProvide the target state: `interval` and/or `quantity` (each defaults to the subscription's current value when omitted), and an optional `promotionCode`. An invalid, expired, or inapplicable code is rejected with `400`. Requires an active subscription.","tags":["billing"],"responses":{"200":{"description":"The previewed charge for the proposed change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_previewSubscriptionChange_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interval":{"$ref":"#/components/schemas/ApiV1BillingSubscriptionPreviewPostRequestBodyContentApplicationJsonSchemaInterval","description":"Target billing interval. Defaults to the current interval."},"quantity":{"type":"integer","minimum":1,"description":"Target number count (one unit per phone number). Defaults to the current quantity."},"promotionCode":{"type":"string","description":"Optional customer-facing promotion code; the preview reflects the discount it produces."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/payment-methods/setup":{"post":{"operationId":"billing_createPaymentMethodSetup","summary":"Start a checkout to save a card","description":"Returns an embedded Stripe Checkout `clientSecret` in setup mode. The customer enters card details in Checkout; on completion the card is saved to the account's Stripe customer for top-ups and subscription billing, and appears in `paymentMethods` on GET /api/v1/billing. Not available during impersonation.","tags":["billing"],"responses":{"200":{"description":"Embedded Checkout client secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_createPaymentMethodSetup_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","format":"uri","description":"Where Checkout returns after completion. Defaults to the dashboard billing page."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/payment-methods/{id}":{"delete":{"operationId":"billing_removePaymentMethod","summary":"Remove a saved card","description":"Detaches a saved card from the account's Stripe customer. If it was the default and other cards remain, the next card on file becomes the default. Not available during impersonation.","tags":["billing"],"parameters":[{"name":"id","in":"path","description":"Stripe PaymentMethod id (pm_…).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Card removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_removePaymentMethod_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such card on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/payment-methods/{id}/default":{"post":{"operationId":"billing_setDefaultPaymentMethod","summary":"Set the default card","description":"Makes a saved card the account's default payment method for invoices (top-ups) and subscription renewals. Not available during impersonation.","tags":["billing"],"parameters":[{"name":"id","in":"path","description":"Stripe PaymentMethod id (pm_…).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Default updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_setDefaultPaymentMethod_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such card on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/invoices/{invoiceId}":{"get":{"operationId":"billing_getInvoice","summary":"Download an invoice","description":"Returns the Stripe-hosted invoice links for one of the account's invoices — Stripe is the source of truth for invoices. Use the `invoiceId` from a deposit or the subscription in GET /api/v1/billing. `invoicePdf` is a direct PDF download; `hostedInvoiceUrl` is Stripe's hosted invoice page. Returns 404 if the invoice doesn't belong to the account.","tags":["billing"],"parameters":[{"name":"invoiceId","in":"path","description":"Stripe invoice id (in_…), as returned in GET /api/v1/billing.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stripe-hosted invoice links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_getInvoice_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such invoice on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/billing/activity":{"get":{"operationId":"billing_listBillingActivity","summary":"List billing activity","description":"The unified billing activity ledger — usage (calls, SMS, number ownership), wallet credits, and subscription payments — merged newest-first and cursor-paginated. Each item has a `type` that selects which fields are present. Pagination is Stripe-style: pass `limit` (max page size) and `starting_after` set to the `occurredAt` of the last item you received to fetch the next page (only items strictly older are returned). `hasMore` indicates whether further pages exist.","tags":["billing"],"parameters":[{"name":"filter","in":"query","description":"Scope the feed: `all`, `usage` only, or `payment-credits` (subscription payments + wallet credits).","required":false,"schema":{"$ref":"#/components/schemas/ApiV1BillingActivityGetParametersFilter","default":"all"}},{"name":"limit","in":"query","description":"Max items per page (clamped to 1–100).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"Exclusive cursor — an exact ISO timestamp (the `occurredAt` of the last item from the previous page). Only items strictly older are returned.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"One page of activity, newest-first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_listBillingActivity_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"Invalid `limit` or `starting_after`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/numbers":{"get":{"operationId":"phoneNumbers_listNumbers","summary":"List phone numbers","tags":["phoneNumbers"],"responses":{"200":{"description":"All phone numbers on the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_listNumbers_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"phoneNumbers_provisionNumber","summary":"Provision a phone number","description":"Provisions a new phone number. `inboundInstruction` is optional — it becomes the new number's inbound voice-agent prompt, and a default greeting is used if you omit it. Not idempotent — there is no idempotency key, so retrying a failed request can provision an additional number. Confirm via List phone numbers before retrying.\n\n**Billing.** Pay-as-you-go accounts are charged the first ownership month from their credit balance immediately, and the request is rejected with `402` when the balance can't cover it. On a **flat-rate subscription** the number is added to the subscription instead — the quantity goes up by one and Stripe invoices the prorated difference. The one exception: a subscription always bills at least one number, so if you hold **no** numbers (you released them all) the first number you provision back adds **no charge** — the quantity is already there. Either way the new number is covered by the subscription the moment this call returns.\n\nInclude `imessage` in `capabilities` to provision an iMessage number. iMessage provisioning is **asynchronous**: the response is `202` with the number in `setupStatus: provisioning`. Wait for the `number.status_changed` event to report a terminal `status` (`ready`, or `degraded` when a channel failed) before sending from it or calling from it — polling List phone numbers works too, but the event tells you the moment it happens, and its `capabilities` say which channels made it. iMessage numbers are available on **pay-as-you-go only** — an account on a flat-rate subscription is rejected with `403`; switch to pay-as-you-go to add one.\n\n`explicitProgrammaticConsent` is **required** on every provisioning request (standard and iMessage): a short, human-readable attestation that the account holder has explicitly consented to provisioning this number programmatically (e.g. `\"User modal confirmation\"`). Requests without it are rejected with `400`.","tags":["phoneNumbers"],"responses":{"201":{"description":"Number provisioned (synchronous — SMS/call numbers).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_provisionNumber_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"202":{"description":"iMessage number accepted and provisioning. The returned number has `setupStatus: provisioning`; poll the URL in `Location` or wait for the `number.status_changed` event to report a terminal `status` (`ready`, or `degraded` when a channel failed).","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Location":{"description":"The number's absolute URL, `https://api.getdial.ai/v1/numbers/{id}`, to poll for its status.","schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_provisionNumber_Response_201"}}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient Dial credit. The number is pay-as-you-go and the account's credit balance is at or below zero. Add credit or start a subscription. (error code `insufficient_credit`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"iMessage numbers aren't available for this account — either the account isn't eligible for iMessage yet, or it's on a flat-rate subscription (iMessage is pay-as-you-go only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No US numbers are available to provision for this request — typically the requested `areaCode` has no numbers left (`code: not_found`). Nothing was purchased or charged; retry with a different area code, or omit `areaCode` to get any available US number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`whatsapp_unavailable` — \"WhatsApp numbers are temporarily unavailable. Please try again shortly.\" Only for a request with `whatsapp: true`: no WhatsApp number is available right now. Nothing was bought or charged, so retrying is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"explicitProgrammaticConsent":{"type":"string","minLength":1,"maxLength":2000,"description":"Required. A short, human-readable attestation that the account holder explicitly consented to provisioning this number programmatically. Stored on the number for the provisioning audit trail. Example values: `\"User modal confirmation\"` (from the dashboard) or your own consent record reference."},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaCapabilitiesItems"},"default":["sms","call"],"description":"What the number should be able to do. Two combinations are accepted: `[\"sms\", \"call\"]` (the default) for a standard SMS/call number, or `[\"sms\", \"call\", \"imessage\"]` for an iMessage number (provisioned asynchronously — see the note above). `areaCode` and `promotionCode` are ignored for iMessage numbers."},"callingEnabled":{"type":"boolean","default":true,"description":"Whether calling is switched on for the new number. Defaults to `true`. Pass `false` to provision a messaging-only line: inbound calls are not connected and Place a call from it is refused, with no window in which the line answers calls. Changeable later with Update a phone number."},"whatsapp":{"type":"boolean","default":false,"description":"Also connect WhatsApp to the new line. Valid **only** with `capabilities: [\"sms\", \"call\", \"imessage\"]` — WhatsApp rides on an iMessage line, so there is no standard-number combination (any other combination is rejected with `400`).\n\nWhatsApp is in beta and enabled per account: without access this field is rejected with `404`, because to such an account the capability does not exist. Contact support to request it.\n\nThe number arrives with WhatsApp already set up and warmed: `whatsapp.status` is `ready` in this response, and no WhatsApp `number.status_changed` follows it. `setupStatus` is unaffected and behaves as for any iMessage number. `areaCode` is not honored for WhatsApp numbers.\n\nWhen no WhatsApp number is available right now, the request is refused with `503` `whatsapp_unavailable`: nothing was bought or charged, so retrying is safe. See WhatsApp lines."},"inboundInstruction":{"type":"string","description":"System prompt for the AI voice agent on inbound calls to this number. Optional — a default greeting is used if omitted. Update later with Update a phone number."},"inboundVoiceGender":{"$ref":"#/components/schemas/ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaInboundVoiceGender","description":"Voice gender for the AI agent on inbound calls to this number. Optional — when omitted, the voice is female (the default for every language). Pass `male` to override. Update later with Update a phone number."},"inboundLanguage":{"type":"string","description":"BCP-47 language tag for the AI voice agent on inbound calls to this number. Optional — when omitted, Dial detects the language from the caller's country prefix on each call and the agent handles both that language and `en-US`. Pass an explicit tag to pin every inbound call to a single language. Update later with Update a phone number."},"areaCode":{"type":"string","description":"Preferred US area code. Optional — when omitted, any available US number is provisioned. Only US numbers can be provisioned at this time. If no numbers are available in the requested area code, the request fails with `404` and nothing is charged; retry with a different area code or omit it."},"promotionCode":{"type":"string","description":"Optional customer-facing promotion code (e.g. `LAUNCH20`). Only applies to **subscription** accounts, where adding a number bumps the subscription quantity and bills a prorated amount — the code is handed to Stripe and discounts that charge per the underlying coupon's own scope and duration. Ignored for pay-as-you-go accounts. An invalid, expired, or inapplicable code is rejected with `400`. Still applied to the subscription when the purchase raises no charge at all (the free first number described above), so it discounts the following invoices instead."}},"required":["explicitProgrammaticConsent"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/numbers/{id}":{"get":{"operationId":"phoneNumbers_getNumber","summary":"Get a phone number","description":"Returns the number with its most recent messages and calls.","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The phone number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_getNumber_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"phoneNumbers_releaseNumber","summary":"Release a phone number","description":"Release a number — standard SMS/call or iMessage. Immediate and irreversible.\n\nOn a **flat-rate subscription**, releasing a number lowers the subscription quantity by one and Stripe prorates the change — but the quantity never falls below **one number**. Releasing your last number therefore leaves the subscription active at the single-number rate rather than cancelling it, and the next number you provision is free (see Provision a phone number). To stop paying entirely, cancel the subscription with Cancel the subscription at period end.\n\nReleasing a number also releases every number it replaced (see `replaces`). A replaced number can't be released on its own.","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Released.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`number_replaced` — this number was replaced by another (see `replacedBy`); release that number instead. Nothing was released.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"phoneNumbers_updateNumber","summary":"Update a phone number","description":"Update a number's properties. Send any subset of the fields below —\nat least one is required; omitted fields are left unchanged.\nA new `inboundInstruction` takes effect on the next inbound call;\nin-progress calls are unaffected.\n\n**One display identity for every channel.** `channel` — `imessage`,\n`whatsapp`, or `both` — together with `name` and/or an avatar photo sets\nthe same identity on the channel(s) it names, in a single request. Use\n`both` when the number should look the same everywhere.\n\n**Each channel succeeds or fails on its own.** When a request updates\nthe iMessage and WhatsApp profiles together — `channel: \"both\"`, or\nper-channel fields for both channels — a value one channel rejects (a\nname over WhatsApp's 25-character limit, a transparent or non-square\nphoto, a number whose WhatsApp line isn't connected) fails only that\nchannel. The other channel is still updated, the rest of the request\nis saved, and the response is `200` with `profileResults` giving each\ntargeted channel's outcome — `updated`, or `failed` with the reason.\nOnly when **every** channel the\nrequest targeted fails is the request rejected: the response carries\nthe first failing channel's status and message (iMessage before\nWhatsApp), `profileResults` lists every channel's outcome, and nothing\nis changed. Retry just the failed channel once its cause is fixed.\n\n`name` is one string. WhatsApp stores it verbatim; iMessage has no\nsingle-name field, so it is **split on the first space** — `\"Ana Lee\"`\nbecomes first name `\"Ana\"` and last name `\"Lee\"`, `\"Ana Maria de Souza\"`\nbecomes `\"Ana\"` and `\"Maria de Souza\"`, and a single word leaves the last\nname cleared. `name` requires `channel`, and `channel` cannot be combined\nwith the per-channel fields below — a request carrying both is rejected\nwith `400`.\n\n**iMessage display identity.** To give the channels *different*\nidentities, omit `channel` and use the per-channel fields. On numbers\nwith the `imessage` capability, `firstName`, `lastName`, and an avatar\nphoto set the identity shown beside the number's messages in recipients'\nMessages apps. Sending any of these fields for a number without the\n`imessage` capability is rejected with `400`.\n\n**The avatar photo** is set either by uploading a file (the `avatar`\npart, `multipart/form-data` only) or by passing a publicly reachable\nimage URL (`avatarUrl`, JSON or multipart) that Dial downloads\nserver-side. Accepted types: jpeg, png, gif, webp; max 5 MB. A square\nimage of 512×512 or larger is recommended — it is shown as a circle.\nDial mirrors the photo into its own storage and serves it from the\nstable public URL returned as `avatarUrl`. The photo can be\n**replaced but not removed** — `avatarUrl: null` is rejected with\n`400`. Identity changes can take a few minutes to propagate to\nrecipients' devices.\n\n**WhatsApp display identity.** On WhatsApp-ready numbers, `whatsappName`\nand a `whatsappAvatar`/`whatsappAvatarUrl` set the display name and photo\nshown to WhatsApp recipients. The name is 1–25 characters and cannot\ncontain the reserved verification marks (✔, ✅, ☑); the avatar must be a\nsquare jpeg or png between 192×192 and 640×640 (Dial validates the\ndimensions and does not resize). WhatsApp photos can't be transparent,\nso a png with any transparent pixel is rejected with `400` — flatten it\nonto a background first. These fields apply only to\nWhatsApp-ready numbers — rejected with `400` otherwise, including while\n`whatsapp.status` is still `provisioning` or `warming_up`. Unlike the\niMessage identity, the request **blocks until WhatsApp confirms** the\nchange; if the WhatsApp line can't be driven, the call returns `503`.\nThese statuses are for a request that updates only the WhatsApp\nprofile — alongside an iMessage update that succeeds, the same\nfailure is reported as `failed` in `profileResults.whatsapp` on a\n`200` instead.\n","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated. When the request touched a display profile, `profileResults` gives each targeted channel's outcome. A channel that `failed` was left unchanged, while the other channel and the rest of the request were still saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_updateNumber_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"Invalid request — or every display profile the request targeted was rejected (for example the only channel targeted, or both, were not available on the number). Nothing was changed. When display profiles were the cause, `profileResults` lists each channel's outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large — the avatar exceeds the 5 MB limit.","content":{"application/json":{"schema":{"description":"Any type"}}}},"502":{"description":"Every display profile the request targeted failed, and the first one couldn't be completed upstream — nothing was changed. Safe to retry. `profileResults` lists each channel's outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateError"}}}},"503":{"description":"Every display profile the request targeted failed, and the first failing channel was WhatsApp, whose line couldn't be driven to apply the change — nothing was changed. Safe to retry. `profileResults` lists each channel's outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"inboundInstruction":{"type":"string","description":"New inbound voice-agent system prompt for this number."},"inboundVoiceGender":{"$ref":"#/components/schemas/ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaInboundVoiceGender","description":"Voice gender for the AI agent on inbound calls to this number. Send null to clear it (the voice reverts to the default, female). Takes effect on the next inbound call."},"inboundLanguage":{"type":["string","null"],"description":"BCP-47 language tag for the AI voice agent on inbound calls to this number. Send null to clear it — the language is then detected from the caller's country prefix on each call, with the agent handling both that language and `en-US`. Takes effect on the next inbound call."},"nickname":{"type":["string","null"],"description":"Human-readable label for the number. Trimmed; at most 100 characters. Send null or an empty string to clear it."},"channel":{"$ref":"#/components/schemas/ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaChannel","description":"Which display profile(s) `name` and `avatarUrl` are written to. `both` writes one identity to the iMessage and WhatsApp profiles; each channel succeeds or fails on its own, and a channel's outcome is reported in `profileResults`. Cannot be combined with `firstName`, `lastName`, `whatsappName`, or `whatsappAvatar`/`whatsappAvatarUrl` — rejected with `400`."},"name":{"type":"string","minLength":1,"description":"Display name to set on the channel(s) named by `channel`, which is required alongside it. WhatsApp stores it verbatim (1–25 characters); iMessage splits it on the first space into its first/last name pair."},"firstName":{"type":["string","null"],"description":"iMessage display first name shown beside this number's messages in recipients' Messages apps. Trimmed; at most 30 characters. Send null or an empty string to clear it. Only valid on numbers with the `imessage` capability — rejected with `400` otherwise. Cannot be combined with `channel`."},"lastName":{"type":["string","null"],"description":"iMessage display last name. Trimmed; at most 30 characters. Send null or an empty string to clear it. Only valid on numbers with the `imessage` capability — rejected with `400` otherwise."},"avatarUrl":{"type":"string","format":"uri","description":"Publicly reachable http(s) URL of an image to set as the number's iMessage avatar photo. Dial downloads it server-side, mirrors it into its own storage, and serves it from the `avatarUrl` returned on the number. The photo can be replaced but not removed — null is rejected with `400`.\nWithout `channel` this is the iMessage avatar: jpeg, png, gif, or webp, max 5 MB, and only valid on numbers with the `imessage` capability. With `channel` it is applied to the channel(s) named there. WhatsApp's rules are stricter — a square jpeg or png between 192×192 and 640×640, with no transparent pixels — so a photo that misses them fails only the WhatsApp channel (`failed` in `profileResults.whatsapp`) while iMessage still takes it."},"whatsappName":{"type":"string","description":"WhatsApp display name for this number's WhatsApp line, shown to recipients as the sender name. Trimmed; 1–25 characters. Cannot be cleared, and cannot contain the reserved verification marks (✔, ✅, ☑). Only valid on WhatsApp-ready numbers — rejected with `400` otherwise. The request blocks until WhatsApp applies the change; a failure returns `503`."},"whatsappAvatarUrl":{"type":"string","format":"uri","description":"Publicly reachable http(s) URL of an image to set as the number's WhatsApp avatar. Dial downloads it server-side, mirrors it into its own storage, and serves it from the `whatsappAvatarUrl` returned on the number. jpeg or png; the image must be square, between 192×192 and 640×640 — any other dimensions are rejected with `400` (Dial does not resize). A png with any transparent pixel is also rejected with `400`. Only valid on WhatsApp-ready numbers."},"maxCallDurationSeconds":{"type":["integer","null"],"minimum":60,"maximum":3600,"description":"Cap on the length of calls on this number, in seconds, for both inbound calls to the number and outbound calls placed from it. The effective cap on a call is the first one set in priority order — the per-call cap, then this number cap, then the account cap — falling back to the global default. This number cap overrides the account cap (raising or lowering the limit) but is itself overridden by a per-call cap. Must be between 60 and 3600 seconds (1 minute to 1 hour); a value outside that range returns 400. Send null to clear it (falls back to the account cap or global default). Free accounts — accounts that have never added credit and never subscribed — are capped at 300 seconds (5 minutes), reported as `limits.maxCallDurationSeconds` on the account: a higher value sent here returns 400, and a cap inherited from another level is clamped to 300. When a cap is active, Dial automatically injects a warning to the agent ~40 seconds before the hard cut, prompting it to wrap up naturally."},"callingEnabled":{"type":"boolean","description":"Switch calling on or off for this number, in both directions. `false` stops inbound calls from being connected and makes Place a call from this number return `409 calling_disabled`; messaging is unaffected. Takes effect on the next call — a call already in progress is not terminated. `capabilities` does not change."},"forwardTo":{"type":["string","null"],"description":"Forward every inbound call to this number to another phone number, in E.164 (for example your own business line). While it is set, an inbound call is not answered by the AI voice agent: it rings straight through to `forwardTo`, and the caller is connected when that phone answers. Must be a valid E.164 number other than this number itself, or `400`. Send `null` (or an empty string) to stop forwarding, so the AI voice agent answers again. Takes effect on the next call. Has no effect while `callingEnabled` is `false` — the call is still not connected."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/10dlc/brands":{"get":{"operationId":"phoneNumbers_listTenDlcBrands","summary":"List 10DLC brands","description":"Lists the account's business 10DLC brands that are either **reusable** (they\nhave an approved registration, so a new campaign can be registered under\nthem with `brandId`) or carry a campaign a number can be added to with\n`campaignId`. The `reusable` field on each brand says which.\n\nA brand is the business identity carriers vet; a campaign is one messaging\nuse case beneath it. One brand can carry several campaigns, so a second use\ncase — say event reminders alongside order confirmations — is a new campaign\non the brand you already have, not a second registration of the same\nbusiness. Reusing the brand keeps its approval and its vetting score, and\nskips the wait for both.\n\nTwo conditions decide what a brand can be used for, and both come from the\ncarrier registry rather than from Dial:\n\n- **The brand is approved.** The registry refuses a new campaign filed\n  against a brand it hasn't approved yet, so such a brand has `reusable:\n  false` — it is listed only if it has a campaign you can add numbers to.\n- **The brand is a business.** A sole proprietor brand covers exactly one use\n  case and one number, so it can never carry a second campaign.\n\nAn account with nothing to reuse gets an empty list — that's a successful\nanswer, not a `404`.\n","tags":["phoneNumbers"],"responses":{"200":{"description":"Business brands you can register a new campaign under (`reusable`) or add numbers to (`campaigns`), newest approval first; brands with no approval yet come last.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_listTenDlcBrands_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/numbers/{id}/10dlc":{"get":{"operationId":"phoneNumbers_getTenDlcRegistration","summary":"Get 10DLC registration","description":"Returns this number's 10DLC registration: the brand (who is registering) and the campaign (what they send), exactly as submitted.\nA number's registration status is also available — without the submitted details — as the `tenDlc` object on the phone number itself.","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_getTenDlcRegistration_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"10DLC registration isn't available here. Either it doesn't apply to this number — it isn't US, or it has the `imessage` capability (error code `tendlc_not_applicable`) — or the account isn't pay-as-you-go and has no existing registration for the number (error code `tendlc_not_available`). The `tenDlc` object on the phone number is null in both cases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No registration has been submitted for this number, or the number doesn't exist on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"phoneNumbers_submitTenDlcRegistration","summary":"Submit 10DLC registration","description":"Register a US number for 10DLC — the carrier registration required before\na number can send SMS or MMS to US phone numbers.\n\nUS carriers **block** outbound SMS and MMS sent from an unregistered\n10-digit number to a US phone number. Registering this number lifts that\nblock. Inbound texts, voice calls in either direction, and messaging to\nnumbers outside the US are unaffected.\n\n**Eligibility.** The number must be US, have the `sms` capability, and\nnot have the `imessage` capability (iMessage numbers send over Apple\nMessages for Business, not carrier SMS). 10DLC registration is currently\noffered on pay-as-you-go accounts only. An ineligible number returns\n`403` — read the `tenDlc` object on the number to know in advance.\n\n**Fee.** A one-time **$25.00** per number, taken from the account's credit\nbalance when the submission is accepted. A balance below the fee returns\n`402`. **Resubmitting after a rejection is free** — the number is charged\nat most once, ever.\n\n**What happens next.** The submission lands in `in_review` while Dial\nchecks the details, moves to `with_carrier` once filed with the carrier\nregistry, and finishes as `approved` or `rejected`. Carriers usually\ndecide within 3–5 business days. Dial emails the account owner on approval\nand on rejection; a rejection carries a `reason` explaining exactly what\nto change before resubmitting.\n\n**Body.** Two parts mirroring what the carrier registry registers: a\n**brand** (who is registering) and a **campaign** (what they send). A\nnumber is registered by joining the campaign. Send them as\n`application/json`, or — to attach an opt-in screenshot — as\n`multipart/form-data` with a `data` text part holding that same JSON\nobject plus one `optInImage` file part.\n\n### Brand — both kinds\n\nEvery field is required.\n\n| Key | Description |\n|---|---|\n| `brandName` | The registered business or DBA name; for a sole proprietor, the name they trade under. Carriers reject an account id or an email address here. |\n| `firstName`, `lastName` | The person responsible for the registration. |\n| `email` | Contact email. |\n| `phone` | Mobile number in E.164. For a sole proprietor this receives a verification SMS — reply `YES` within 24 hours. **It may not be a Dial number**: carriers won't verify a number issued by a messaging provider, so use a mobile the person answers directly. |\n| `street`, `city`, `zip` | The address on the registration. Validated against public records, so a typo is a rejection. |\n| `country` | ISO 3166-1 alpha-2. **Sole proprietor: `US` or `CA` only** — that programme is US/Canada-only. A business may be registered from any country the registry accepts; a non-US brand needs its own country's tax ID and may draw extra vetting. Defaults to `US`. |\n| `state` | State or province of the registered address — required whatever the country. The two-letter code for the US and Canada (`CA`, `ON`); the region name elsewhere. |\n\n### Brand — `business` only\n\n| Key | Description |\n|---|---|\n| `businessType` | Legal form. One of `Co-operative`, `Corporation`, `Limited Liability Corporation`, `Non-profit Corporation`, `Partnership`. A sole proprietorship is not a business brand — register as `sole_proprietor` instead. |\n| `businessIndustry` | Industry code, e.g. `PROFESSIONAL_SERVICES`. See the enum. |\n| `registrationIdType` | The kind of registration number. One of `EIN`, `DUNS`, `CBN`, `CN`, `ACN`, `CIN`, `VAT`, `VATRN`, `RN`, `Other`. |\n| `registrationNumber` | The number itself — in the US, the EIN. |\n| `websiteUrl` | Full `https://` URL. Reviewers check that it matches the brand. |\n| `jobPosition` | One of `Director`, `GM`, `VP`, `CEO`, `CFO`, `General Counsel`, `Other`. |\n| `businessTitle` | The actual job title, free text, e.g. `Head of Support`. |\n| `businessRegionsOfOperation` | Where the business operates. One of `USA_AND_CANADA`, `AFRICA`, `ASIA`, `EUROPE`, `LATIN_AMERICA`. Defaults to `USA_AND_CANADA`. |\n| `companyType` | One of `private`, `public`, `non-profit`, `government`. Defaults to `private`. |\n| `stockExchange`, `stockTicker` | **Required when `companyType` is `public`**, ignored otherwise. Carriers check both against public sources, so they must match. |\n\n### Campaign — both kinds\n\n| Key | Description |\n|---|---|\n| `description` | Who is messaged and why. 40–4096 characters. Reviewers weigh this heavily; a single word is rejected. |\n| `messageFlow` | How people opt in, naming every method used. 40–1920 characters (room above that is reserved for compliance material Dial appends when filing). |\n| `optInImage` | Optional screenshot of the opt-in step as customers see it — the consent checkbox, form, or settings screen the `messageFlow` describes. Reviewers approve much faster when they can see the consent screen. Sent as the `optInImage` file part of a `multipart/form-data` request (max 2 MB; JPEG, PNG, WebP, or GIF). On a resubmission, leaving it out keeps the stored screenshot; sending `\"optInImage\": null` inside `campaign` removes it. |\n| `samples` | Two to five sample messages, each 20–1024 characters. Each must name the brand and carry an opt-out instruction. If only one message text will ever be sent, repeat it. |\n| `containsUrls`, `containsPhones` | Booleans — whether messages will contain links or phone numbers. Optional; default false. |\n| `privacyPolicyUrl`, `termsUrl` | Full `https://` URLs — carriers require both on every campaign. **Required for a `business`**, and reviewers check they sit on the `websiteUrl` you registered. Optional for a sole proprietor: omit them and Dial publishes a privacy notice and terms page for the brand, built from this submission, and registers those. Supplying your own always wins. |\n\n### Campaign — `business` only\n\n| Key | Description |\n|---|---|\n| `useCase` | What the campaign is for, e.g. `CUSTOMER_CARE`. Optional; defaults to `MIXED`. A sole proprietor campaign is always `SOLE_PROPRIETOR` and takes no value here. |\n\n### Campaign — `sole_proprietor` only\n\n| Key | Description |\n|---|---|\n| `acceptPublishedNotice` | Boolean. **Required when you send neither `privacyPolicyUrl` nor `termsUrl`** — it authorises Dial to publish a privacy notice and terms page for your brand, built from this submission and naming you as the operator, and to register those URLs with carriers. Send your own two URLs instead and this field is ignored. Sending neither the URLs nor `true` here is a `400` — `tendlc_validation_failed`, keyed on `acceptPublishedNotice` — because carriers require the two pages and one of you has to provide them. |\n","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Submitted, and the fee charged unless this was a free resubmission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_submitTenDlcRegistration_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The body failed validation. For field-level problems the error code is `tendlc_validation_failed` and `error` is an object mapping each offending field key to a human-readable message. Keys are the flat field names, not the `brand.` / `campaign.` paths, so a form can highlight them directly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's credit balance is below the $25.00 registration fee. Add credit and submit again. (error code `insufficient_credit`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"10DLC registration isn't available here. Either it doesn't apply to this number — it isn't US, or it has the `imessage` capability (error code `tendlc_not_applicable`) — or the account isn't pay-as-you-go and has no existing registration for the number (error code `tendlc_not_available`). The `tenDlc` object on the phone number is null in both cases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This number already has a registration that is in review, filed with the carrier registry, or approved. Only a rejected registration can be resubmitted. (error code `tendlc_already_registered`.)\nWith `campaignId`: `tendlc_campaign_not_joinable` — the campaign is rejected, belongs to a sole proprietor, or isn't on your account; `tendlc_campaign_full` — the campaign already has 400 numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/ApiV1NumbersId10DlcPostRequestBodyContentApplicationJsonSchemaKind","description":"Who is registering. A sole proprietor operates under their own name and has no EIN — lower throughput, quicker to approve. A business is a registered company with an EIN.\n\n**Required unless `brandId` is set**, which supplies it."},"brand":{"$ref":"#/components/schemas/TenDlcBrand","description":"Who is registering, as the carrier registry records it. **Required unless `brandId` is set**, which names a brand that is already registered."},"campaign":{"$ref":"#/components/schemas/TenDlcCampaign"},"brandId":{"type":"string","description":"Register this campaign under a brand you already had approved, instead of registering a new one. List the eligible ones with `GET /api/v1/10dlc/brands`.\n\nWith `brandId`, `kind` and `brand` are not required and are ignored if sent: the brand's details are whatever the carrier registry already approved, and this submission cannot change them. Only the campaign is registered — so the brand keeps its vetting score and its approval, and neither is paid for or waited on again.\n\nBusiness brands only. A sole proprietor brand covers exactly one use case, so it can never take a second campaign — reusing one returns `403`."},"campaignId":{"type":"string","description":"Add this number to an existing campaign (from `GET /api/v1/10dlc/brands`) instead of registering a new one. No fee. Can't be combined with `brandId`, `kind`, `brand` or `campaign`."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/numbers/{id}/whatsapp":{"post":{"operationId":"phoneNumbers_addWhatsappToNumber","summary":"Connect WhatsApp to a number","description":"Connects WhatsApp to an iMessage number you already hold. Unlike\n`whatsapp: true` on Provision a phone number, which hands you a number\nwhose WhatsApp is already set up and warmed, this registers WhatsApp on\nyour own number and then warms it before it can send.\n\nWhatsApp is in beta and enabled **per account**. Without access this\nendpoint answers `404`, not `403`: to such an account the capability\ndoes not exist, which is also what the dashboard shows. Contact support\nto request access.\n\nAsynchronous. The response carries the number as List phone numbers\nreports it, with `whatsapp.status` at `provisioning`. It then moves to\n`warming_up` once registered — the number warms up before its first\nuse, which takes about 6 hours — and to `ready` after that; each move is announced by `number.status_changed`.\nWait for `ready` before sending on the channel. On an iMessage number,\n`call` settles in the same event that moves WhatsApp to `warming_up`.\nProgress and failure are independent of the number's own `setupStatus`\n— see WhatsApp lines.\n","tags":["phoneNumbers"],"parameters":[{"name":"id","in":"path","description":"The phone number's ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"WhatsApp setup started. The number, with its `whatsapp` track attached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phone_numbers_addWhatsappToNumber_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The number can't take WhatsApp, or already has it. One of:\n\n- \"WhatsApp is only available on an iMessage number.\"\n- \"WhatsApp is already set up on this number.\"\n- \"This number's WhatsApp setup failed. Retry it from the number's card rather than adding it again.\"\n- \"This number's WhatsApp registration has been ended and cannot be restarted.\"\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not permitted during impersonation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such number on this account — or WhatsApp is not enabled for this account, in which case the endpoint itself does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"\"WhatsApp setup is temporarily unavailable. Please try again shortly.\" No capacity to run the setup right now; the number is unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messages":{"get":{"operationId":"messages_listMessages","summary":"List messages","description":"Returns up to 100 of the most recent messages on the account's numbers.\n\n**Searching.** `search` matches the message body, case-insensitively,\nanywhere in the text — it is a substring match, not a word search, so\n`voice` matches \"invoiced\". It searches your whole history, not just the\n100 messages an unfiltered call returns, and then returns the 100 most\nrecent matches. It combines with every other filter.\n\nA message whose content was cleared by data retention has an empty body\nand so matches nothing; the same is true of a media-only message, which\nis matched by neither its attachment's name nor its content.\n","tags":["messages"],"parameters":[{"name":"search","in":"query","description":"Case-insensitive substring match on the message body. Whitespace-only values are ignored, as though the parameter were absent.","required":false,"schema":{"type":"string"}},{"name":"contact","in":"query","description":"One conversation: messages exchanged with this number, in both directions, across every line on the account. Group messages are never included — a group message is addressed to the group, and matching it against the participant who sent it would file their whole group into a private thread. Use `groupId` for those.","required":false,"schema":{"type":"string"}},{"name":"numberId","in":"query","description":"Filter to a single phone number. A replaced number's ID filters to the number that replaced it, whose history includes the replaced number's.","required":false,"schema":{"type":"string"}},{"name":"groupId","in":"query","description":"Filter to a single group conversation (see List groups). Combines with the other filters. A group ID that isn't on your account returns an empty list rather than an error.","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiV1MessagesGetParametersDirection"}},{"name":"since","in":"query","description":"Only messages created after this timestamp.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Messages, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Messages_listMessages_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"messages_sendMessage","summary":"Send a message","description":"Sends a message from one of your Dial numbers.\n\n**The number determines the channel, except on a line that carries two.**\nA standard number sends SMS/MMS. An iMessage number sends iMessage,\nautomatically falling back to RCS/SMS when the recipient can't receive\niMessage. A line with WhatsApp connected carries both rails on one\nnumber, and that is the one case where you say which you mean — see\n`channel` below. For standard numbers, `status` tracks delivery\n(`sent` → `delivered`/`undelivered`/`failed`, with a `statusError`\nreason on failure); iMessage sends report `status: \"unknown\"`.\n\n**Destination.** Provide exactly one of `to` (a phone number) or\n`groupId` (a group conversation). Sending both — or neither — is\nrejected with `400` (\"Provide exactly one of `to` or `groupId`.\"). A\n`groupId` that isn't on your account is `400` (\"No such group on this\naccount.\"), and a group paired with a `channel` it isn't on is `400`\n(\"This group is on a different channel than the one you named.\") —\nleave `channel` out and the group supplies it. See Group conversations\nfor what a group send does differently.\n\n**Media.** Attach media as public URLs (`mediaUrls`, JSON or multipart) or\nas uploaded `media` file parts (multipart only):\n- Standard numbers: up to **10** items combined, **5 MB** each.\n- iMessage numbers: **at most one** attachment (URL or file).\n- WhatsApp numbers: **at most one** attachment (URL or file); a `body`\n  may accompany it only when the attachment is an image or video.\n\n`body` is optional when media is attached — a media-only message sends\njust the attachment (its `body` is recorded as an empty string). A request\nwith neither a non-empty `body` nor media is rejected with `400`.\n\n**Content size (standard numbers).** A standard-number message is validated\nagainst the carrier's content-size limits before it is sent, and one that\nexceeds them is rejected with `400` (\"Content size exceeds carrier limit.\")\nrather than sent.\n\nThe `body` limit depends on the characters used. Plain text allows **1530\ncharacters**, but a single character outside the basic SMS alphabet — an\nem dash, a curly quote, an emoji, any non-Latin script — switches the whole\nmessage to a wider encoding and lowers the limit to **670 characters**.\nAttached media may total at most **5 MB**.\n\nEven within these limits an individual carrier may still refuse an\noversized message at delivery — that surfaces as a failed `status` with\nthe same `statusError` reason.\n\n**Voice messages (iMessage numbers).** When the attachment is a single\naudio file, it is delivered as a native voice message. If a `body` is\nalso present, the recipient receives two messages — the text, then the\nvoice message — but the API still returns (and records) a single Message.\nIf the recipient can't receive voice messages (no iMessage/RCS), the\naudio is delivered as a link over SMS instead. Set `forceAudioFile: true`\nto always send audio as a regular file attachment in one message.\n`forceAudioFile` has no effect on standard numbers, non-audio media, or\nmulti-attachment sends — audio attached to a standard number's message is\nalways MMS media.\n\n**Polls (iMessage numbers).** Send a poll instead of text by giving\n`poll` — a `title` (1–300 characters) and 2 to 10 `options`, each\nnon-empty and unique. `poll` is JSON-only and is exclusive with\n`body`, media, and `forceAudioFile` (`400`, \"Provide either `poll` or\n`body`/media, not both.\"). Polls are supported only from iMessage\nnumbers, one-to-one or into an iMessage `groupId`; a standard number,\na WhatsApp send, or a WhatsApp group is rejected with `400` (\"Polls are\nonly supported on iMessage numbers.\"). Polls have no RCS/SMS\nrendering, so a recipient without iMessage is rejected with `400`\n(\"This recipient can't receive polls — polls need iMessage.\"). The\ncreated message's `body` is the title and its `poll.options` carry the\nDial-issued option ids; votes arrive as `message.received` events (see\n`pollVote`) and the message's `poll.options[].votes` is the current\ntally. A poll cannot be replied to, reacted to, or unsent.\n\nSupported types: images (jpeg, png, gif, webp, bmp), audio (mp3, m4a, ogg,\nwav, amr), video (mp4, 3gpp), pdf, vCard, and iCalendar; any other type is\nrejected with `400` (HEIC and SVG are not supported). Dial mirrors every\nattachment into its own storage and serves it from a stable public URL\n(see Get public media); the message's `media` array carries those URLs.\nFor standard numbers, true MMS delivery is supported only for US and Canada\n— to other destinations the carrier delivers an SMS with a link to the\nmedia.\n\n**Destination limits** (standard numbers): accounts on a **subscription**\ncan send only to **US** numbers — any other destination is rejected with\n`400`. Pay-as-you-go accounts can send to any supported destination (a\ndestination with no SMS price tier is rejected with `400`).\n\n**Choosing the from-number.** Provide exactly one of `fromNumber` (a\nflexible reference: phone-number ID, one of your numbers in E.164\nformat, or a nickname) or the legacy `fromNumberId` (ID only). Sending\nboth — or neither — is rejected with `400`.\n\n**On a `groupId` send the from-number is optional**, because the group\nalready belongs to one of your lines and Dial sends from that one.\nSupplying one anyway is allowed and must agree: a from-number naming a\ndifferent line is rejected with `400` rather than silently overridden.\n\n**WhatsApp (`channel: \"whatsapp\"`).** Sends text and a **single** media\nattachment. More than one attachment (across `media` and `mediaUrls`) is\nrejected with `400`. A `body` may accompany media **only** when the\nattachment is an image or video — a body alongside audio or a document is\nrejected with `400`. A lone audio attachment is delivered as a **voice\nnote** by default; set `forceAudioFile: true` to deliver it as a regular\naudio file instead. Supported attachment types match the rest of this\nendpoint (images, audio, video, PDF, vCard, iCalendar); a vCard is\ndelivered as a document, not a native contact card. Inbound WhatsApp\nattachments are unaffected and arrive as normal media. A WhatsApp send\nreturns `status: \"unknown\"` (`deliveryState: \"unconfirmed\"`) and firms up\nas receipts arrive; unlike SMS, WhatsApp reports reads, so\n`readState`/`readAt` are meaningful. A WhatsApp line sends one message at\na time: a second send while the first is in flight is refused rather than\nqueued.\n\n**WhatsApp text sends type first.** Before a WhatsApp text message goes\nout, the recipient (or the group) sees \"typing…\" for about 200-250 ms per\ncharacter, up to about 30 seconds however long the message is, and\nthen the message arrives, as it would from a person. The request returns\nonce the message is sent, so it takes that much longer: about 7 seconds\nfor a 30-character message. A send with an attachment doesn't type.\n\nNot idempotent — there is no idempotency key, so retrying a failed request\ncan send a duplicate message. On an ambiguous failure, confirm via List\nmessages before re-sending.\n","tags":["messages"],"responses":{"201":{"description":"Message queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Messages_sendMessage_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient Dial credit. The number is pay-as-you-go and the account's credit balance is at or below zero. Add credit or start a subscription. (error code `insufficient_credit`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"WhatsApp has limited this number's access, so it can't start a new conversation with this recipient yet. Nothing was sent. Replies to people who have messaged the number still go through, and retrying right away fails the same way. (error code `whatsapp_limited`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"WhatsApp is temporarily offline on this number while Dial reconnects it (its `whatsapp.status` is `offline`). Nothing was sent. Wait for the `Retry-After` interval, or for the `number.status_changed` event that moves it back to `ready`, then send again. (error code `whatsapp_offline`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large — the media exceeds the 10-item / 5 MB-per-file limits.","content":{"application/json":{"schema":{"description":"Any type"}}}},"429":{"description":"The recipient is rate-limited. New contacts on iMessage numbers can only receive a limited number of messages until they reply; once they respond, the limit lifts. Some numbers also carry a monthly SMS sending allowance; once it is spent, SMS from that number is refused with \"This number has reached its SMS sending limit for this month.\" until the next month. (error code `rate_limited`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"Recipient phone number in E.164 format. Provide exactly one of `to` or `groupId`."},"groupId":{"type":"string","description":"ID of a group conversation on your account (see List groups), instead of a `to` number. The sending line comes from the group."},"channel":{"$ref":"#/components/schemas/ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaChannel","description":"Which rail to send on, for a line that carries more than one. Omit to use the number's own default — a standard number sends SMS, an iMessage number sends iMessage — so existing requests need no change.\n\n`sms` sends a carrier text from a number without iMessage; on a standard number it is the same as omitting `channel`. `whatsapp` requires a line whose WhatsApp channel is `ready` (otherwise `400`, \"WhatsApp isn't connected on this number.\"). `imessage` requires an iMessage-capable number; on a standard SMS/call number it is rejected with `400` rather than delivered as an SMS. Redundant on a `groupId` send, which is always WhatsApp."},"fromNumber":{"type":"string","description":"The Dial number to send from, referenced flexibly: a phone-number ID, one of your numbers in E.164 format, or a number's nickname. A nickname shared by more than one of your numbers is rejected with `400`. A replaced number's ID sends from the number that replaced it (see `replacedBy`); its E.164 no longer works and returns `404`. Provide exactly one of `fromNumber` or `fromNumberId`."},"fromNumberId":{"type":"string","description":"ID of the Dial number to send from (see List phone numbers). Legacy alternative to `fromNumber` — provide exactly one of the two."},"body":{"type":"string","description":"Message text. Optional when media is attached; a request with neither a non-empty body nor media is rejected with `400`."},"forceAudioFile":{"type":"boolean","default":false,"description":"Send a lone audio attachment as a regular file attachment instead of a voice message — an iMessage voice message on iMessage numbers, a WhatsApp voice note on WhatsApp numbers. No effect on standard numbers or non-audio media."},"poll":{"$ref":"#/components/schemas/ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaPoll","description":"Send a poll instead of text (iMessage numbers only). Exclusive with `body`, `mediaUrls`, and `forceAudioFile`. Not accepted on multipart requests."},"mediaUrls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Publicly reachable http(s) URLs of media to attach. Dial downloads each one server-side and re-hosts it; the source URL is preserved on the media item as `originalUrl`. iMessage numbers accept at most one item."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/messages/{messageId}/reply":{"post":{"operationId":"messages_replyToMessage","summary":"Reply to a message","description":"Sends a threaded reply or a reaction targeted at an existing message.\n\n**The sender is derived from the target message.** The reply goes out\nfrom the Dial number the target message belongs to, to the other party\nof that message — there is no `to` or `fromNumberId`. A reply always\nstays in the conversation the target message is part of.\n\nThe request carries **exactly one** of:\n\n- `body` — a text reply. On iMessage numbers it is delivered as a\n  native threaded reply (quoting the target message) when the recipient\n  supports threads, and as a regular message otherwise. On WhatsApp\n  numbers it is delivered as a native quoted reply (the target message\n  is quoted above the reply). On standard numbers it is delivered as a\n  regular SMS.\n- `reaction` — a reaction to the target message: one of the six\n  reaction names (`love`, `like`, `dislike`, `laugh`, `emphasize`,\n  `question`) or a **single emoji** (one visible symbol — skin-tone and\n  multi-person emoji count as one; anything else is rejected with\n  `400`). On iMessage numbers the reaction is delivered natively (a\n  Tapback). When the recipient can only receive SMS — including\n  everything sent from standard numbers — an **emoji** reaction is\n  delivered as a regular message whose body is the emoji, and a\n  reaction **name** is rejected with `400` (names have no SMS\n  rendering; send an emoji instead). On **WhatsApp** numbers the\n  reaction is delivered natively too, and a reaction **name** is mapped\n  to its emoji — 👍 `like`, ❤️ `love`, 👎 `dislike`, 😂 `laugh`,\n  ‼️ `emphasize`, ❓ `question` — so both a name and a single emoji\n  react natively.\n\n**Targets.** Any message on the account can be targeted, with one\ncurrent restriction: on iMessage numbers the target must be an\n**inbound** message — replying to your own sent messages isn't\nsupported on those numbers yet. Standard and WhatsApp numbers accept\ntargets in both directions. On **WhatsApp** numbers the target may be a\n**group** message — the reply or reaction is then delivered to the\ngroup; on other channels a group message cannot be the target and is\nrejected with `400`. A **reaction cannot itself be the target** — replying\nor reacting to a reaction is rejected with `400`.\nA **poll** cannot be the target either (\"A poll can't be replied to\nor reacted to.\"), nor can a **poll vote** (\"A poll vote can't be\nreplied to or reacted to.\") — both `400`.\n\n**A `body` reply on an iMessage number also needs a threadable\ntarget.** A threaded reply attaches to the target by the message id its\nchannel carries, and only messages delivered over iMessage or RCS carry\none. A target that arrived over **SMS** — the fallback used when the\nother party has neither — has nothing to attach to, so a `body` reply\nto it is rejected with `400`. Send a new message instead\n(`POST /api/v1/messages`): the same conversation takes it over SMS, it\njust isn't quoted on the recipient's device. A `reaction` on such a\ntarget is unaffected and follows the reaction rules above (an emoji is\ndelivered as a regular message; a reaction name is rejected with\n`400`).\n\n**On WhatsApp numbers both forms are native**, one-to-one or in a\ngroup: a `reaction` lands on the target message itself, and a `body`\nis a quoted reply. A reply carries text only — to send media, send a\nnew message in the same conversation (`POST /api/v1/messages`).\n\nThe created message is recorded like any outbound message and billed\nthe same as Send a message. Its `replyToId` points at the target\nmessage; `reaction` carries the reaction string when one was sent (a\nreaction delivered natively has an empty `body`; one delivered as a\nregular message carries the emoji in `body` too).\n\nNot idempotent — retrying a failed request can send a duplicate reply.\nOn an ambiguous failure, confirm via List messages before re-sending.\n","tags":["messages"],"parameters":[{"name":"messageId","in":"path","description":"ID of the message to reply or react to (see List messages).","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Reply queued. The created message, with `replyToId` set to the target message's ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Messages_replyToMessage_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient Dial credit. The number is pay-as-you-go and the account's credit balance is at or below zero. Add credit or start a subscription. (error code `insufficient_credit`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"WhatsApp has limited this number's access, so it can't start a new conversation with this recipient yet. Nothing was sent. Replies to people who have messaged the number still go through, and retrying right away fails the same way. (error code `whatsapp_limited`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"WhatsApp is temporarily offline on this number while Dial reconnects it (its `whatsapp.status` is `offline`). Nothing was sent. Wait for the `Retry-After` interval, or for the `number.status_changed` event that moves it back to `ready`, then send again. (error code `whatsapp_offline`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The recipient is rate-limited. New contacts on iMessage numbers can only receive a limited number of messages until they reply; once they respond, the limit lifts. Some numbers also carry a monthly SMS sending allowance; once it is spent, SMS from that number is refused with \"This number has reached its SMS sending limit for this month.\" until the next month. (error code `rate_limited`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Reply text. Exactly one of `body` and `reaction` is required. On a standard number the same content-size limit as Send a message applies (1530 characters, or 670 if the text uses characters outside the basic SMS alphabet); a longer reply is rejected with `400`."},"reaction":{"type":"string","description":"Reaction to send: `love`, `like`, `dislike`, `laugh`, `emphasize`, `question`, or a single emoji. Exactly one of `body` and `reaction` is required."}}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/typing":{"post":{"operationId":"messages_sendTyping","summary":"Set a typing indicator","description":"Starts or stops a typing indicator shown to the recipient, as if someone\nwere composing a message from your number.\n\n**iMessage numbers show it; standard (SMS) numbers ignore it.** SMS has\nno typing concept, so for a standard from-number the request succeeds and\ndoes nothing — the response is identical either way, letting you call\nthis unconditionally before a send.\n\n**Groups.** Address a group with `groupId` instead of `toNumber`, exactly\nas on Send a message — every member of the group sees the indicator. It\nworks on WhatsApp and iMessage groups alike; the group ID is\nchannel-neutral, so the same field addresses either.\n\nThe indicator is fire-and-forget: nothing is persisted and no event is\nemitted. Delivering a message or reaction from the same number\n**clears the indicator natively** on the recipient's device — platform\nbehavior, not Dial's; start again after a send if you're still\ncomposing. Dial itself never clears it: send `value: false` when you\nstop composing without sending. (A stale indicator may also clear on\nits own device-side.) Free of charge.\n","tags":["messages"],"responses":{"200":{"description":"Indicator set (or silently ignored for a from-number without typing support).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Messages_sendTyping_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"WhatsApp has limited this number's access, so it can't start a new conversation with this recipient yet. Nothing was sent. Replies to people who have messaged the number still go through, and retrying right away fails the same way. (error code `whatsapp_limited`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"WhatsApp is temporarily offline on this number while Dial reconnects it (its `whatsapp.status` is `offline`). Nothing was sent. Wait for the `Retry-After` interval, or for the `number.status_changed` event that moves it back to `ready`, then send again. (error code `whatsapp_offline`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`channel: \"whatsapp\"` only — the WhatsApp channel could not be driven for this line right now. Retry.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toNumber":{"type":"string","description":"Recipient phone number in E.164 format. Provide exactly one of `toNumber` or `groupId`."},"groupId":{"type":"string","description":"ID of a group conversation on your account (see List groups), instead of a `toNumber`. The line the indicator appears from comes from the group. Provide exactly one of `toNumber` or `groupId`."},"value":{"type":"boolean","description":"`true` shows the typing indicator; `false` clears it."},"fromNumber":{"type":"string","description":"The Dial number the indicator appears from, referenced flexibly: a phone-number ID, one of your numbers in E.164 format, or a number's nickname. A nickname shared by more than one of your numbers is rejected with `400`; a ref that matches none of your numbers returns `404`. A replaced number's ID acts on the number that replaced it; its E.164 no longer works and returns `404`.\n\n**Required with `toNumber`, optional with `groupId`** — the group already belongs to one of your lines and Dial uses that one. Supplying it anyway is allowed and must agree: a from-number naming a different line is rejected with `400` rather than silently overridden."},"channel":{"$ref":"#/components/schemas/ApiV1TypingPostRequestBodyContentApplicationJsonSchemaChannel","description":"Which rail to show the indicator on, for a line that carries more than one. Mirrors `channel` on Send a message: omit to use the number's own default. SMS has no typing concept, so `sms` succeeds without showing anything.\n\n`whatsapp` requires a line whose WhatsApp channel is `ready`, and returns `503` when the channel can't be driven right now (rather than reporting a \"typing…\" that never appeared). `imessage` on a number with no iMessage rail is rejected with `400`.\n\nOmit `channel` on a `groupId` request: a group belongs to exactly one channel, so the group already names the rail, and a `channel` naming a different one is rejected with `400`."}},"required":["value"]}}}},"security":[{"bearerAuth":[]}]}},"/public-media/{file}":{"get":{"operationId":"messages_getPublicMedia","summary":"Get public media","description":"Serves a message media attachment. No authentication required — the unguessable media ID in the path is the access token, mirroring how carriers serve MMS media. Usually responds with a `302` redirect to short-lived object storage; while a just-received attachment is still being mirrored, the body is streamed directly instead. URLs are stable and do not expire.","tags":["messages"],"parameters":[{"name":"file","in":"path","description":"The media filename, `<mediaId>.<ext>` — exactly as given in a message's `media[].url`. The extension is cosmetic; lookup is by ID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Media bytes, streamed (only while mirroring is in flight).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Messages_getPublicMedia_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/groups":{"get":{"operationId":"groups_listGroups","summary":"List groups","description":"The group conversations your lines belong to.\n\nA group is a conversation that isn't a phone number, so Dial gives it an\nID of its own; you address it with `groupId` on Send a message and\nfilter for it on List messages. Groups exist on WhatsApp lines and\niMessage numbers, and each one reports which of the two it is on in\n`channel` — the channel's own rules then apply to anything sent into\nit.\n\n**`name` may be `null`, which is not an error.** Participants rename\ngroups, so Dial stores no copy of the subject — it is read live from the\nline that holds the conversation. A line that can't answer in time\nyields `name: null` for its groups rather than failing the request, so\none unreachable line never hides another line's groups.\n\nYour line must be a member: Dial can send into a group your number was\nadded to, or one it created with Create a group, but cannot join one or\naccept an invite link.\n\nThere is no join event — a group your line was just added to shows up as\na new entry here.\n","tags":["groups"],"responses":{"200":{"description":"Groups, oldest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Groups_listGroups_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"groups_createGroup","summary":"Create a group","description":"Creates a new WhatsApp group from one of your lines, with the people you\nname in it. The line that creates the group is its admin.\n\n**The group is ready to use as soon as this returns.** Dial records it\nbefore responding, so its `id` works as `groupId` on Send a message\nstraight away, and it appears in List groups. There is no event for a\ngroup you created — the response is the confirmation.\n\n**Not everyone you name is always added.** WhatsApp lets people choose\nwho may add them to groups, so a participant can be refused while the\ngroup is still created with everyone else. Those participants come back\nin `notAdded` and are not in the group; `reason: \"privacy_restricted\"`\nmeans their settings only allow their contacts to add them. Dial does\nnot retry them or send them an invite.\n\nThe group gets WhatsApp's ordinary new-group settings: every member may\nsend messages and edit the group's info. One group per request; there is\nno description, picture, or invite link.\n\n**A `504` does not mean the group wasn't created.** When the line\ndoesn't confirm the group in time, the group may still exist. Check List\ngroups before trying again — a blind retry can create a duplicate group.\n","tags":["groups"],"responses":{"201":{"description":"Group created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Groups_createGroup_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request failed validation — a missing or invalid `name` or `participants`, both `fromNumber` and `fromNumberId`, or the line's own number among `participants` — or the number can't create groups (\"This number can't create groups.\"): it isn't a WhatsApp-ready line.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"\"This line has created too many groups recently. Try again later.\" WhatsApp is limiting how often this line can create groups; nothing was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"\"WhatsApp refused to create the group.\" Nothing was created; retrying the same request is unlikely to succeed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"\"The group wasn't confirmed in time. Check List groups before trying again.\" The group may exist — check List groups before retrying, or you may create a duplicate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/ApiV1GroupsPostRequestBodyContentApplicationJsonSchemaChannel","default":"whatsapp","description":"The channel to create the group on. Only `whatsapp` today; any other value is rejected with `400`. Optional — omitted, it defaults to `whatsapp`."},"fromNumber":{"type":"string","description":"The line that creates the group, in E.164 format, or its nickname. It becomes the group's admin. Provide at most one of `fromNumber` or `fromNumberId`; with neither, your primary number creates the group."},"fromNumberId":{"type":"string","description":"ID of the Dial number that creates the group (see List phone numbers). Alternative to `fromNumber` — provide at most one of the two."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The group's name (its subject), as members see it."},"participants":{"type":"array","items":{"type":"string"},"description":"The people to add, as E.164 numbers. Duplicates are ignored. The creating line's own number is rejected with `400` — the line is in the group already, as its admin."}},"required":["name","participants"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/calls":{"get":{"operationId":"calls_listCalls","summary":"List calls","description":"Returns up to 100 of the most recent calls on the account's numbers.","tags":["calls"],"parameters":[{"name":"contact","in":"query","description":"One conversation: calls exchanged with this number, in both directions, across every line on the account.","required":false,"schema":{"type":"string"}},{"name":"numberId","in":"query","description":"Filter to a single phone number. A replaced number's ID filters to the number that replaced it, whose history includes the replaced number's.","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiV1CallsGetParametersDirection"}},{"name":"since","in":"query","description":"Only calls created after this timestamp.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Calls, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calls_listCalls_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"calls_makeCall","summary":"Place an AI voice call","description":"Places an outbound voice call handled by an AI voice agent using the supplied instruction. Supports idempotent retries via the optional `Idempotency-Key` header: replaying the same key returns the original call (`200`) instead of dialing again, and a duplicate that arrives while the original is still processing waits for it. A non-2xx response guarantees no live call: if the call already fired when the failure happened, Dial cancels it before responding. Without the header the request is not idempotent — retrying can place a duplicate call; on an ambiguous failure, confirm via List calls before retrying. Choose the from-number with exactly one of `fromNumber` (phone-number ID, one of your numbers in E.164 format, or a nickname) or the legacy `fromNumberId` (ID only) — both, or neither, is rejected with `400`.","tags":["calls"],"parameters":[{"name":"Idempotency-Key","in":"header","description":"A unique client-generated key (e.g. a UUID) identifying this call attempt. Reuse the same key when retrying a failed or ambiguous request: if the original attempt placed the call, the retry returns that call with `200` instead of placing a second one. Keys are scoped to your account.","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"A call with this `Idempotency-Key` was already placed — returns the original call instead of dialing again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calls_makeCall_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient Dial credit. The number is pay-as-you-go and the account's credit balance is at or below zero. Add credit or start a subscription. (error code `insufficient_credit`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`unsupported_region` — the destination (`to`) is in a region this call can't reach: either a country Dial can't call, or a destination outside the US from one of the WhatsApp lines that can only call US numbers. Standard numbers, including US `+1` numbers, call international destinations with nothing to enable. Nothing was dialed and nothing was billed. Retrying unchanged keeps failing; place the call from a standard number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Either `calling_disabled` — calling is switched off for the from-number (`callingEnabled` is `false`), so no call was placed; switch it back on with Update a phone number — or `idempotency_conflict`, meaning the original request with this `Idempotency-Key` is still processing and didn't finish within the wait window (retry with the same key shortly). Branch on `code` to tell them apart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Concurrent-call limit reached. A free account — one that has never added credit and never subscribed — can have at most 2 calls in progress at once, inbound and outbound combined. Wait for a call to end, or add credit / start a subscription to lift the limit permanently. Separately, some numbers carry one call at a time: a call from such a number while it is already on a call is refused the same way — wait for that call to end, or call from a different number. (error code `call_limit_reached`.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"Recipient phone number in E.164 format."},"fromNumber":{"type":"string","description":"The Dial number to call from, referenced flexibly: a phone-number ID, one of your numbers in E.164 format, or a number's nickname. A nickname shared by more than one of your numbers is rejected with `400`. A replaced number's ID calls from the number that replaced it (see `replacedBy`); its E.164 no longer works and returns `404`. Provide exactly one of `fromNumber` or `fromNumberId`."},"fromNumberId":{"type":"string","description":"ID of the Dial number to call from. Legacy alternative to `fromNumber` — provide exactly one of the two."},"outboundInstruction":{"type":"string","description":"System prompt for the AI voice agent during the call."},"language":{"type":"string","description":"BCP-47 language tag for the voice agent. Optional — when omitted, Dial detects the language from the destination number's country prefix and the agent handles both that language and `en-US`. Pass an explicit tag to pin the call to a single language."},"maxCallDurationSeconds":{"type":"integer","minimum":60,"maximum":3600,"description":"Optional per-call cap on this call's length, in seconds. Highest priority: when set it is the effective cap, overriding the number and account caps (it can raise or lower the limit). Must be between 60 and 3600 seconds (1 minute to 1 hour); a value outside that range returns 400. Omit to fall back to the number cap, then the account cap, then the global default. Free accounts — accounts that have never added credit and never subscribed — are capped at 300 seconds (5 minutes), reported as `limits.maxCallDurationSeconds` on the account: a higher value sent here returns 400, and a cap inherited from the number or account is clamped to 300. When a cap is active, Dial automatically injects a warning to the agent ~40 seconds before the hard cut, prompting it to wrap up naturally."},"voiceGender":{"$ref":"#/components/schemas/ApiV1CallsPostRequestBodyContentApplicationJsonSchemaVoiceGender","description":"Gender of the AI voice agent for this call. Optional — when omitted, the voice is female (the default for every language). Pass `male` or `female` to choose explicitly; the choice also tells the agent how to refer to itself in gendered languages."},"transferTo":{"type":"string","description":"Forward-to number in E.164 format. Optional — when set, the agent waits for a real human (riding out hold music and IVR menus) and then cold-transfers the call to this number. Must differ from both `to` and the call's from number. When the hand-off occurs, the call's `transferredAt` is stamped."}},"required":["to","outboundInstruction"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/calls/{id}":{"get":{"operationId":"calls_getCall","summary":"Get a call","description":"Returns a single call, including its status, duration, and, once available, its transcript both as flat text (`transcript`) and as timed turns (`transcriptTurns`).","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calls_getCall_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/calls/{id}/stop":{"post":{"operationId":"calls_stopCall","summary":"Stop a call","description":"Ends a call that hasn't finished yet, inbound or outbound. Takes no\nrequest body.\n\nWhat happens depends on how far the call has got:\n\n- **`Queued` or `Ringing`** — the call is cancelled before anyone\n  answers. It never connects, nothing is charged, and it ends with\n  `terminationType: \"canceled\"`.\n- **`In-Progress`** — the call is hung up. It ends with\n  `terminationType: \"completed\"`, and its `status.label` reads\n  `Completed (Cancelled)`.\n\nIf the callee answers in the instant before the stop takes effect, the\ncall is hung up rather than cancelled, so it ends as `completed` and is\nbilled for the seconds it was connected.\n\n**The call isn't over when this returns.** The response carries the\ncall with `status.cancelRequested` and `status.cancelPending` set to\n`true`; `status.state` still shows the state the call was in. The call\nreaches `Terminated` a moment later, which emits\n[`call.status_changed`](/api-reference/events/call-status-changed) and\n[`call.ended`](/api-reference/events/call-ended) with `canceled: true`.\nWait on `call.ended` to know it's done.\n\nOnce the call has ended, stopping it returns `400`.\n\nWith [Self-Hosted](/documentation/platform/self-hosted), Dial opens the\nsocket to your server only once an outbound call is answered, so\nstopping a `Queued` or `Ringing` call means your server is never\ncontacted.\n","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The stop was accepted. The returned call has `status.cancelPending: true` until it reaches `Terminated`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calls_stopCall_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The call has already ended (`Terminated`), so there is nothing to stop.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The call couldn't be ended this time. It may still be live — retry the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/contacts":{"get":{"operationId":"contacts_listContacts","summary":"List contacts","description":"Every phone number your lines have exchanged a message or a call with,\nnewest activity first.\n\nA contact is derived, not stored — there is no address book to add\nanyone to. Dial reads your message and call history and reports one row\nper counterparty, so a number appears here the moment it first texts or\ncalls one of your lines, or one of your lines first reaches it, and\nnever needs to be created or deleted. Calls an allow list declined\n(`terminationType` `blocked`) don't count: a blocked caller never becomes\na contact or a contact's latest interaction.\n\n**Counts span every line on the account.** Two of your numbers talking\nto the same person is one contact with the totals added together, not\ntwo rows — the contact is the person, not the pairing. Pass `numberId`\nto see one line's contacts instead: the list narrows to the numbers that\nline has talked to, and each contact's counts and latest interaction\ncover that line only.\n\n**Group conversations are not contacts.** A group message is addressed\nto the group rather than to a person, so it is counted under neither the\ngroup nor the participant who sent it. List groups is where those live.\n\n**Pagination** is Stripe-style and matches List billing activity: pass\n`limit` for the page size and `starting_after` set to the `lastAt` of\nthe last contact you received to fetch the next page (only contacts\nwhose activity is strictly older are returned). `hasMore` tells you\nwhether to ask again. Most accounts get everything in one call.\n","tags":["contacts"],"parameters":[{"name":"numberId","in":"query","description":"Filter to the contacts of a single phone number on your account. Counts and the latest interaction are then that line's alone. A number ID that isn't on your account returns an empty list rather than an error. A replaced number's ID filters to the number that replaced it.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max contacts per page (clamped to 1-1000).","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"starting_after","in":"query","description":"Exclusive cursor — an exact ISO timestamp (the `lastAt` of the last contact from the previous page). Only contacts with strictly older activity are returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"minInbound","in":"query","description":"Only contacts who have sent your lines at least this many one-to-one messages (their `inboundMessageCount`). For example `minInbound=3` keeps contacts with more than two inbound messages. Applied before pagination, so every page is filtered.","required":false,"schema":{"type":"integer","minimum":0}},{"name":"minOutbound","in":"query","description":"Only contacts your lines have sent at least this many one-to-one messages (their `outboundMessageCount`). Combines with `minInbound`: a contact must meet both.","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"One page of contacts, newest activity first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contacts_listContacts_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"Invalid `limit`, `starting_after`, `minInbound` or `minOutbound`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/contacts/{number}":{"put":{"operationId":"contacts_setContactName","summary":"Set a contact name","description":"Gives a contact a name, shown as the contact's `name` in List contacts.\nThe name belongs to the account, so it applies on every line.\n\nContacts are derived from history, but a name does not need one: you\ncan name a number before your lines have ever talked to it, and the\nname appears once they do. Send `name: null` (or an empty string) to\nremove it.\n","tags":["contacts"],"parameters":[{"name":"number","in":"path","description":"The contact's number in E.164, URL-encoded (`%2B14155550123`).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The contact's number and its name after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contacts_setContactName_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":100,"description":"The contact's name, up to 100 characters after trimming surrounding whitespace. null or an empty string removes it."}},"required":["name"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/lookup":{"get":{"operationId":"lookup_number","summary":"Look up what a number supports","description":"Ask what a phone number can receive, before you send to it. Works on any\nnumber in the world — it doesn't have to be one of your Dial numbers, and\nyou don't have to have messaged it before.\n\n`supports` describes **the number you asked about**, not your own line.\nEach key is a channel, and the value says whether that number can be\nreached there. Today the keys are `imessage` and `whatsapp`; further\nchannels arrive as further keys, so read the ones you care about by name\nrather than assuming the whole set.\n\n**The answer is point-in-time, not a property of the number.** `true`\nmeans the number is reachable on that channel as of this request —\nsomeone who changes device or turns the service off stops being\nreachable, and the same number can answer differently next week. Treat it\nas a strong signal for picking a channel, not as a promise that a later\nsend lands.\n\n**A lookup that fails is never reported as a verdict.** If Dial can't\ncomplete a check — on either channel — the whole request fails with a\n`502`, and a rate-limited request fails with a `429`. So `false` always\nmeans \"we asked, and the number isn't reachable there\" — never \"we\ncouldn't find out\".\n","tags":["lookup"],"parameters":[{"name":"number","in":"query","description":"The number to look up, in E.164 — `+14155550123`. Spaces, dashes and parentheses are accepted and stripped; the normalized form comes back as `number`. It must be a valid phone number for its country code; anything else is a `400`, and no channel is asked.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"What the number supports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup_number_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"`number` is missing, or isn't a valid phone number (for example too short or too long for its country code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many lookups on this account: over its daily allowance (10 a day before the account first adds credit or subscribes, 500 a day after), or a short burst or hourly cap. `Retry-After` says how long to wait. Nothing is implied about the number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"A check couldn't be completed, on either channel. Nothing is implied about the number either way — ask again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/events/wait":{"post":{"operationId":"events_waitForEvent","summary":"Wait for an event","description":"Long-polls until the next event of `eventType` arrives on the account\n(optionally matching `filters`/`regexFilters`), or until `timeout` seconds\nelapse. Useful for one-shot waits such as receiving an inbound SMS code.\nFor a continuous stream, use Open an event stream instead.\n","tags":["events"],"responses":{"200":{"description":"The matching event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events_waitForEvent_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"No matching event arrived within the timeout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"type":"string","description":"Event type to wait for."},"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Exact-match on top-level event fields."},"regexFilters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Regex-match on top-level event fields."},"timeout":{"type":"integer","minimum":1,"maximum":60,"default":30,"description":"Max seconds to wait."}},"required":["eventType"]}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/listen/subscribe":{"post":{"operationId":"events_subscribeToEvents","summary":"Open an event stream","description":"Mints a short-lived, account-scoped subscription token for the live event\nstream. The SDKs call this for you behind `new_events_connection()`; the CLI\nuses it for the `listen` daemon. Re-mint before `ttlSeconds` elapses to keep\nthe stream open.\n\nDelivery is presence-based, not at-least-once: events that occur while you are\ndisconnected are replayed only if you reconnect within 2 minutes. For guaranteed\nat-least-once delivery, webhooks and destinations are coming soon.\n","tags":["events"],"responses":{"200":{"description":"Subscription credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeToken"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The event stream is not configured on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/policies":{"get":{"operationId":"policies_listPolicies","summary":"List policies","description":"Every policy on the account, newest first. Each item carries `entryCount` and omits `entries`; fetch a single policy to read its callers.","tags":["policies"],"responses":{"200":{"description":"The account's policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_listPolicies_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"policies_createPolicy","summary":"Create a policy","description":"Create an allow list for inbound calls. With `scope: \"account\"` it covers every number on the account, including numbers added later, except numbers that have an allow list of their own. With `scope: \"numbers\"` it covers the numbers in `numberIds` and replaces the account-wide list on them. An account has at most one account-wide list, and a number can be on at most one list of its own.\n\nAn enabled list with no entries declines every inbound call on the numbers it covers.","tags":["policies"],"responses":{"201":{"description":"The created policy, with its entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_createPolicy_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The policy would break one of the allow-list rules. Either the account already has an account-wide allow list (error code `account_policy_exists`), or a number in `numberIds` is already on another allow list of its own (error code `number_policy_conflict`). The message names the policy that holds it; edit or delete that one first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/policies/{id}":{"get":{"operationId":"policies_getPolicy","summary":"Get a policy","tags":["policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The policy, with its entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_getPolicy_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"policies_deletePolicy","summary":"Delete a policy","description":"Numbers it covered fall back to the account-wide list, if there is one, or stop screening calls. Blocked calls it recorded keep their `blockedByPolicyId`.","tags":["policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"policies_updatePolicy","summary":"Update a policy","description":"Change any subset of a policy's fields. `entries`, when present, replaces the whole list of allowed callers; to add or remove a few, use Add policy entries and Remove policy entries instead. Changes apply to the next inbound call, never to one already in progress.","tags":["policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated policy, with its entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_updatePolicy_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The policy would break one of the allow-list rules. Either the account already has an account-wide allow list (error code `account_policy_exists`), or a number in `numberIds` is already on another allow list of its own (error code `number_policy_conflict`). The message names the policy that holds it; edit or delete that one first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolicyRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/policies/{id}/entries":{"post":{"operationId":"policies_addPolicyEntries","summary":"Add policy entries","description":"Add callers to an allow list without resending the whole list. A number already on the list keeps its place; its label is updated when one is given.","tags":["policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated policy, with its entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_addPolicyEntries_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPolicyEntriesRequest"}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"policies_removePolicyEntries","summary":"Remove policy entries","description":"Remove callers from an allow list. Numbers that aren't on the list are ignored.","tags":["policies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated policy, with its entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policies_removePolicyEntries_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePolicyEntriesRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/webhooks":{"get":{"operationId":"webhooks_listWebhooks","summary":"List webhook subscriptions","tags":["webhooks"],"responses":{"200":{"description":"The account's webhook subscriptions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_listWebhooks_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"webhooks_createWebhook","summary":"Create a webhook subscription","tags":["webhooks"],"responses":{"201":{"description":"The created subscription. The full signing secret is included once here.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_createWebhook_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/webhooks/{id}":{"get":{"operationId":"webhooks_getWebhook","summary":"Get a webhook subscription","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_getWebhook_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"webhooks_deleteWebhook","summary":"Delete a webhook subscription","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"patch":{"operationId":"webhooks_updateWebhook","summary":"Update a webhook subscription","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated subscription. The signing secret is unchanged and returned masked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_updateWebhook_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/webhooks/{id}/secret":{"get":{"operationId":"webhooks_revealWebhookSecret","summary":"Reveal the signing secret","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The decrypted signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_revealWebhookSecret_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/webhooks/{id}/ping":{"post":{"operationId":"webhooks_fireWebhookPing","summary":"Fire a webhook.ping event at this subscription","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Ping enqueued for delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_fireWebhookPing_Response_202"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/context-mcps":{"get":{"operationId":"contextMcp_listContextMcps","summary":"List Context MCP connections","tags":["contextMcp"],"responses":{"200":{"description":"The account's Context MCP connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Context_MCP_listContextMcps_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"contextMcp_createContextMcp","summary":"Connect a Context MCP server","description":"Registers an MCP server and wires its tools into the account's voice agent. Dial probes the server's URL to determine how it authenticates:\n\n- **Unauthenticated or static** — the connection is wired immediately\n  and returned with `status: \"connected\"`.\n\n- **OAuth 2.1–protected** — the response includes an `authorizationUrl`\n  and `status: \"pending_auth\"`. Open that URL in a browser to grant\n  consent; Dial completes the connection on the OAuth callback and then\n  manages token refresh for you. The server's authorization server must\n  support Dynamic Client Registration (RFC 7591).\n\n\nIf the server is unreachable, or responds to the probe with a server error (HTTP 5xx), the request is rejected with `400` and a message naming the status Dial observed — the fault is on your server, so fix it and try again.","tags":["contextMcp"],"responses":{"201":{"description":"The created connection. For OAuth servers, `authorizationUrl` is present and the connection stays `pending_auth` until consent completes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Context_MCP_createContextMcp_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContextMcpRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/context-mcps/{id}":{"get":{"operationId":"contextMcp_getContextMcp","summary":"Get a Context MCP connection","tags":["contextMcp"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Context_MCP_getContextMcp_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"operationId":"contextMcp_deleteContextMcp","summary":"Disconnect a Context MCP server","description":"Unwires the MCP's tools from the agent and stops token refresh.","tags":["contextMcp"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Disconnected.","content":{"application/json":{"schema":{"type":"object","properties":{}}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/self-hosted":{"get":{"operationId":"selfHosted_getSelfHosted","summary":"Get Self-Hosted configuration","description":"Returns the account's Self-Hosted configuration. The signing secret is never returned here — only a masked preview (`secretMasked`). Use `GET /api/v1/self-hosted/secret` to copy the full value.","tags":["selfHosted"],"responses":{"200":{"description":"The Self-Hosted configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHostedConfig"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"selfHosted_applySelfHostedAction","summary":"Apply a Self-Hosted state transition","description":"Applies **one** Self-Hosted state transition, discriminated by `action`: `save` a mode's config (no on/off or active-mode change), `activate` a mode (enable Self-Hosted and route calls through it — enable or switch), `disable`, or `request_access`. Each mode (`llm`/`audio`) has its own independent config.\n\n`save` and `activate` require `access: \"granted\"` and return **403** otherwise; `disable` and `request_access` never do, so an account whose access was withdrawn can still switch Self-Hosted off.\n\nThe signing secret for a mode is minted the first time you `save` a `wsUrl` for it. Retrieve it from `GET /api/v1/self-hosted/secret?mode=…` and set up your server's `X-Dial-Signature` verification *before* you `activate` (activating routes your calls at the server immediately). Returns the full configuration after the change.","tags":["selfHosted"],"responses":{"200":{"description":"The full configuration after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHostedConfig"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Self-Hosted isn't approved for this account. Submit a `request_access` action; `access` on the response body says where the request stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHostedAction"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/self-hosted/secret":{"get":{"operationId":"selfHosted_revealSelfHostedSecret","summary":"Reveal the Self-Hosted signing secret","description":"Returns the full HMAC signing secret for copying. Each mode has its own secret, minted when you first set that mode's `wsUrl`. Use `mode` to pick which; defaults to the active mode.","tags":["selfHosted"],"parameters":[{"name":"mode","in":"query","description":"Which mode's secret to reveal. Defaults to the active mode.","required":false,"schema":{"$ref":"#/components/schemas/ApiV1SelfHostedSecretGetParametersMode"}}],"responses":{"200":{"description":"The signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Self-Hosted_revealSelfHostedSecret_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/members":{"get":{"operationId":"members_listMembers","summary":"List account members","description":"Returns everyone with access to this account. The owner is always the first entry and has `role: \"owner\"` with a `null` id — the owner is the account's own email address, not a revocable membership. Invited people appear with `role: \"member\"` and are `pending` until they accept.","tags":["members"],"responses":{"200":{"description":"Everyone with access to the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_listMembers_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"operationId":"members_inviteMember","summary":"Invite a member","description":"Emails an invitation link to `email`. The invite is locked to that address: accepting it requires a verification code sent to that inbox, so holding the link alone grants nothing. The invite expires after 7 days; inviting an address that already has a pending invite re-sends it and refreshes the expiry.","tags":["members"],"responses":{"201":{"description":"The pending membership. An invitation email has been sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_inviteMember_Response_201"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The address failed validation — not a valid email, a disposable domain, the account owner's own address, or already an active member of this account. The last two are judged by mailbox, not by spelling: an address that differs from the owner's — or from an existing member's — only by a `+tag`, by dots in a `gmail.com` local part, or by `googlemail.com` vs `gmail.com` is the same person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/members/{id}":{"delete":{"operationId":"members_removeMember","summary":"Remove a member","description":"Revokes a membership and deletes that member's API key, ending their access immediately. Works on both pending invites and active members. The owner cannot be removed.","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The member was removed.","content":{"application/json":{"schema":{"type":"object","properties":{}}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested resource was not found on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/members/invites/{token}":{"get":{"operationId":"members_getMemberInvite","summary":"Look up an invitation","description":"Resolves an invitation token so the join page can show who invited whom. Unauthenticated — the token is the credential. Returns only the invited address, the inviter's address, and the expiry; nothing else about the account is exposed.","tags":["members"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_getMemberInvite_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"404":{"description":"The token is unknown, already accepted, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/members/invites/{token}/accept":{"post":{"operationId":"members_acceptMemberInvite","summary":"Accept an invitation","description":"Completes an invitation and returns the new member's API key. Requires a verification code issued by Create an account for the *invited* address — a code issued for any other address is rejected. Unauthenticated: the token plus the emailed code are the credentials. No new account is created and no phone number is provisioned; the caller joins the inviting account.","tags":["members"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The invitation was accepted. The API key is shown once — store it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_acceptMemberInvite_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The verification code is invalid, expired, already used, or was issued for a different address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The token is unknown, already accepted, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptMemberInviteRequest"}}}}}},"/api/v1/memberships":{"get":{"operationId":"members_listMemberships","summary":"List accounts you can access","description":"Returns every account the authenticated identity can reach — the account it owns, if any, plus every account it has been invited to and accepted. Use it to offer an account switcher. Most identities have exactly one entry.","tags":["members"],"responses":{"200":{"description":"The accessible accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_listMemberships_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}},"/api/v1/memberships/{accountId}/key":{"post":{"operationId":"members_getMembershipKey","summary":"Get your API key for another account","description":"Returns the authenticated identity's own API key for `accountId`, so a client can switch which account it is acting on. Only accounts listed by List accounts you can access are permitted; the key returned always belongs to the calling identity, never to another person.","tags":["members"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The caller's API key for that account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members_getMembershipKey_Response_200"}}},"headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The identity has no access to that account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"bearerAuth":[]}]}}},"tags":[{"name":"authentication","description":"Create an account and obtain an API key."},{"name":"account","description":"Inspect or delete the authenticated account."},{"name":"usage","description":"Account usage counters."},{"name":"billing","description":"Wallet balance, subscription, and per-number billing mode. Each phone number is either pay-as-you-go (PAYG — billed against the account's credit wallet) or covered by a subscription (FIXED)."},{"name":"phoneNumbers","description":"Provision and manage the phone numbers on your account."},{"name":"messages","description":"Send SMS and list message history."},{"name":"groups","description":"Group conversations your lines are in, on WhatsApp lines and iMessage numbers. Send into one with `groupId` on Send a message."},{"name":"calls","description":"Place AI voice calls and list call history."},{"name":"contacts","description":"Every phone number your lines have exchanged a message or a call with, with per-contact counts and the most recent interaction."},{"name":"lookup","description":"Ask what any phone number in the world can receive, before you send to it."},{"name":"events","description":"Wait for a single event, or open a live event stream."},{"name":"policies","description":"Rules that decide which inbound calls reach your numbers. Today the one policy type is an allow list for inbound calls: only callers on the list ring through, and every other inbound call is declined before it connects. A policy covers either every number on the account or a set of numbers you choose. See [Allow only known callers](/documentation/platform/allow-lists)."},{"name":"webhooks","description":"Register HTTPS endpoints that receive signed, retried event deliveries."},{"name":"contextMcp","description":"Attach your own MCP server as a tool source for your account's AI voice agent. Dial handles the OAuth 2.1 authorization and token refresh on your behalf when the server is protected."},{"name":"selfHosted","description":"Bring your own LLM and inference. Point Dial at a WebSocket server you host and it drives all of your calls through your model instead of the managed agent."},{"name":"members","description":"Invite teammates to share an account. Every member gets their own API key scoped to the same account, so they see the same phone numbers, messages, and calls, and their usage is billed to the account's wallet. Only the account owner can delete the account; members can do everything else."}],"servers":[{"url":"https://api.getdial.ai","description":"Dial REST API"}],"components":{"schemas":{"ApiV1AuthSignupPostResponsesContentApplicationJsonSchemaCoupon":{"type":"object","properties":{"code":{"type":"string"},"amountCents":{"type":"integer","description":"The credit the account gets when it is created, in USD cents."},"expiresAt":{"type":"string","format":"date-time","description":"When whatever is left of the credit is taken back."}},"description":"Present when a `coupon` was given and accepted for a new account.","title":"ApiV1AuthSignupPostResponsesContentApplicationJsonSchemaCoupon"},"Authentication_signup_Response_200":{"type":"object","properties":{"verificationId":{"type":"string"},"coupon":{"$ref":"#/components/schemas/ApiV1AuthSignupPostResponsesContentApplicationJsonSchemaCoupon","description":"Present when a `coupon` was given and accepted for a new account."}},"title":"Authentication_signup_Response_200"},"ErrorError":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"description":"Any type"}}],"description":"An error message, or a validation-error object for 400 responses.","title":"ErrorError"},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorError","description":"An error message, or a validation-error object for 400 responses."}},"title":"Error"},"AuthenticatedAccount":{"type":"object","properties":{"apiKey":{"type":["string","null"],"description":"Your API key. Shown once, when the account is created."},"accountId":{"type":"string"},"created":{"type":"boolean","description":"True when this call created the account."},"phoneNumber":{"type":["string","null"],"description":"The Dial number provisioned for the account, if any. This is not the phone number used to register."},"phoneNumberId":{"type":["string","null"]},"message":{"type":"string"}},"description":"A completed sign-in or registration. Returned by both [Verify a sign-up code](#operation/verifySignup) (when signing in) and [Verify a phone number](#operation/verifyNumber) (when registering).","title":"AuthenticatedAccount"},"PendingPhoneRegistration":{"type":"object","properties":{"registrationId":{"type":"string","description":"Identifies this registration for the phone-verification calls."}},"required":["registrationId"],"description":"The email is verified but no account exists yet, because registering requires a verified phone number. Continue with [Register a phone number](#operation/registerNumber).","title":"PendingPhoneRegistration"},"Authentication_verifySignup_Response_200":{"oneOf":[{"$ref":"#/components/schemas/AuthenticatedAccount"},{"$ref":"#/components/schemas/PendingPhoneRegistration"}],"title":"Authentication_verifySignup_Response_200"},"ApiV1AuthRegisterNumberPostResponsesContentApplicationJsonSchemaStatus":{"type":"string","enum":["pending"],"title":"ApiV1AuthRegisterNumberPostResponsesContentApplicationJsonSchemaStatus"},"Authentication_registerNumber_Response_200":{"type":"object","properties":{"registrationId":{"type":"string"},"phoneNumber":{"type":"string","description":"The number in canonical E.164 form."},"status":{"$ref":"#/components/schemas/ApiV1AuthRegisterNumberPostResponsesContentApplicationJsonSchemaStatus"}},"title":"Authentication_registerNumber_Response_200"},"AccountRole":{"type":"string","enum":["owner","member"],"description":"The calling API key's role in this account. `member` keys can do everything except delete the account.","title":"AccountRole"},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]},"preview":{"type":"string","description":"First characters of the key, for identification."},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time","description":"When the key last authenticated a request, or null if never used."},"current":{"type":"boolean","description":"True for the key that made this request. Use it to find your own key's `id` before [rotating it](#operation/rotateApiKey)."}},"title":"ApiKey"},"AccountLimits":{"type":"object","properties":{"maxCallDurationSeconds":{"type":"integer","description":"Hard cap on the length of every call, in seconds. Overrides any per-call, per-number, or account cap. A higher value sent to Place a call, Update a phone number, or Update the current account returns 400; a cap inherited from another level is clamped to this value instead."},"maxConcurrentCalls":{"type":"integer","description":"Maximum number of calls in progress at once, inbound and outbound combined. An outbound call over the limit is rejected with 429 (`call_limit_reached`); an inbound call over the limit is declined."}},"required":["maxCallDurationSeconds","maxConcurrentCalls"],"description":"Guardrails applied to a free account — one that has never added credit and never subscribed. Null once the account has paid: both limits lift permanently on the first top-up or subscription. Read this instead of hardcoding the values, which can change.","title":"AccountLimits"},"Account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email","description":"The account owner's address. This identifies the account and is the same for every member — it is not the caller's own address."},"role":{"$ref":"#/components/schemas/AccountRole","description":"The calling API key's role in this account. `member` keys can do everything except delete the account."},"callerEmail":{"type":"string","format":"email","description":"The caller's own address, as opposed to `email` above (the owner's). The two are identical for an owner key."},"createdAt":{"type":"string","format":"date-time"},"apiKeys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"maxCallDurationSeconds":{"type":["integer","null"],"description":"Call-length cap in seconds; the effective cap on a call is the first one set in priority order — per-call, then number, then account — falling back to the global default. A higher-priority level overrides a lower one. Null means this level sets no cap. Free accounts (never added credit, never subscribed) are additionally capped by `limits.maxCallDurationSeconds` regardless of any configured cap."},"limits":{"oneOf":[{"$ref":"#/components/schemas/AccountLimits"},{"type":"null"}],"description":"Guardrails applied to a free account — one that has never added credit and never subscribed. Null once the account has paid: both limits lift permanently on the first top-up or subscription. Read this instead of hardcoding the values, which can change."}},"title":"Account"},"Account_deleteAccount_Response_200":{"type":"object","properties":{"deleted":{"type":"boolean"}},"title":"Account_deleteAccount_Response_200"},"RotatedApiKey":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":["string","null"]},"apiKey":{"type":"string","description":"The new key value. Returned only in this response; store it now."},"preview":{"type":"string","description":"First characters of the new key, as later reads will show it."},"createdAt":{"type":"string","format":"date-time","description":"When the key was first created. Rotation does not change it."},"rotatedAt":{"type":"string","format":"date-time","description":"When this rotation happened."}},"required":["id","apiKey","preview","createdAt","rotatedAt"],"title":"RotatedApiKey"},"ApiV1UsageGetParametersDays":{"type":"string","enum":["7","30","90"],"title":"ApiV1UsageGetParametersDays"},"UsageStat":{"type":"object","properties":{"value":{"type":"integer","description":"Total for the selected window."},"deltaPct":{"type":["string","null"],"title":"float","description":"Percent change vs the previous equal window, or null when that window had no activity."},"spark":{"type":"array","items":{"type":"integer"},"description":"Per-day values across the selected window, oldest first."}},"title":"UsageStat"},"UsageStats":{"type":"object","properties":{"messages":{"$ref":"#/components/schemas/UsageStat"},"calls":{"$ref":"#/components/schemas/UsageStat"},"minutes":{"$ref":"#/components/schemas/UsageStat"}},"description":"Headline metrics for the selected window — each with a per-day spark series and percent change vs the previous equal window.\n","title":"UsageStats"},"UsageSeriesItems":{"type":"object","properties":{"date":{"type":"string","format":"date"},"messages":{"type":"integer"},"calls":{"type":"integer"}},"title":"UsageSeriesItems"},"UsageCallDurationHistogramItems":{"type":"object","properties":{"label":{"type":"string"},"count":{"type":"integer"},"pct":{"type":"string","title":"float","description":"Fraction of the sample (0–1)."}},"title":"UsageCallDurationHistogramItems"},"UsageCallDuration":{"type":"object","properties":{"sampleSize":{"type":"integer","description":"Number of connected calls in the window."},"medianSec":{"type":"integer"},"p95Sec":{"type":"integer"},"longestSec":{"type":"integer"},"histogram":{"type":"array","items":{"$ref":"#/components/schemas/UsageCallDurationHistogramItems"},"description":"Duration distribution across fixed buckets."}},"description":"Voice-call talk-time stats for connected calls (duration > 0) in the window.","title":"UsageCallDuration"},"UsageTopNumbersItems":{"type":"object","properties":{"number":{"type":"string"},"nickname":{"type":["string","null"],"description":"User-set label for the number, or null. The dashboard falls back to the number's creation age when absent."},"createdAt":{"type":"string","format":"date-time"},"count":{"type":"integer"}},"title":"UsageTopNumbersItems"},"UsageBreakdownRow":{"type":"object","properties":{"d7":{"type":"integer","description":"Last 7 days."},"d30":{"type":"integer","description":"Last 30 days."},"all":{"type":"integer","description":"All time."}},"description":"Totals for a metric over fixed windows.","title":"UsageBreakdownRow"},"UsageBreakdown":{"type":"object","properties":{"messages":{"$ref":"#/components/schemas/UsageBreakdownRow"},"calls":{"$ref":"#/components/schemas/UsageBreakdownRow"},"minutes":{"$ref":"#/components/schemas/UsageBreakdownRow"}},"description":"Fixed-window totals (last 7 days, last 30 days, all time).","title":"UsageBreakdown"},"UsageTotals":{"type":"object","properties":{"messages":{"type":"integer"},"calls":{"type":"integer"},"numbers":{"type":"integer"}},"description":"All-time totals.","title":"UsageTotals"},"PeriodVoiceLeaf":{"type":"object","properties":{"calls":{"type":"integer"},"minutes":{"type":"integer"}},"title":"PeriodVoiceLeaf"},"PeriodVoiceGeo":{"type":"object","properties":{"domestic":{"$ref":"#/components/schemas/PeriodVoiceLeaf"},"intl":{"$ref":"#/components/schemas/PeriodVoiceLeaf"}},"title":"PeriodVoiceGeo"},"PeriodBreakdownVoice":{"type":"object","properties":{"outbound":{"$ref":"#/components/schemas/PeriodVoiceGeo"},"inbound":{"$ref":"#/components/schemas/PeriodVoiceGeo"}},"title":"PeriodBreakdownVoice"},"PeriodMessageLeaf":{"type":"object","properties":{"count":{"type":"integer"}},"title":"PeriodMessageLeaf"},"PeriodMessageGeo":{"type":"object","properties":{"domestic":{"$ref":"#/components/schemas/PeriodMessageLeaf"},"intl":{"$ref":"#/components/schemas/PeriodMessageLeaf"}},"title":"PeriodMessageGeo"},"PeriodBreakdownMessages":{"type":"object","properties":{"outbound":{"$ref":"#/components/schemas/PeriodMessageGeo"},"inbound":{"$ref":"#/components/schemas/PeriodMessageGeo"}},"title":"PeriodBreakdownMessages"},"PeriodBreakdown":{"type":"object","properties":{"voice":{"$ref":"#/components/schemas/PeriodBreakdownVoice"},"messages":{"$ref":"#/components/schemas/PeriodBreakdownMessages"}},"description":"Period usage split by direction (outbound/inbound) and geography (domestic/international).","title":"PeriodBreakdown"},"CurrentPeriodNumbersItems":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"nickname":{"type":["string","null"],"description":"User-set label for the number, or null. The dashboard falls back to the number's creation age when absent."},"createdAt":{"type":"string","format":"date-time"},"breakdown":{"$ref":"#/components/schemas/PeriodBreakdown"}},"title":"CurrentPeriodNumbersItems"},"CurrentPeriod":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Period start (inclusive)."},"end":{"type":"string","format":"date-time","description":"Period end (exclusive); the period renews on this date."},"daysTotal":{"type":"integer"},"daysElapsed":{"type":"integer"},"daysLeft":{"type":"integer"},"all":{"$ref":"#/components/schemas/PeriodBreakdown"},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/CurrentPeriodNumbersItems"},"description":"Per-number breakdown, sorted by total period activity descending."}},"description":"Usage for the current period — a monthly cycle anchored to the account's creation date (jumps of one month from `createdAt`; stands in until billing and pricing are defined). Independent of the `days` window. Split per number (plus an `all` aggregate) by direction and domestic/international.\n","title":"CurrentPeriod"},"Usage":{"type":"object","properties":{"periodDays":{"type":"integer","description":"The selected window in days (7, 30, or 90)."},"stats":{"$ref":"#/components/schemas/UsageStats","description":"Headline metrics for the selected window — each with a per-day spark series and percent change vs the previous equal window.\n"},"series":{"type":"array","items":{"$ref":"#/components/schemas/UsageSeriesItems"},"description":"One entry per calendar day in the selected window (UTC), oldest first."},"callDuration":{"$ref":"#/components/schemas/UsageCallDuration","description":"Voice-call talk-time stats for connected calls (duration > 0) in the window."},"topNumbers":{"type":"array","items":{"$ref":"#/components/schemas/UsageTopNumbersItems"},"description":"Account numbers ranked by total activity (messages + calls) in the window, descending (up to 6)."},"breakdown":{"$ref":"#/components/schemas/UsageBreakdown","description":"Fixed-window totals (last 7 days, last 30 days, all time)."},"totals":{"$ref":"#/components/schemas/UsageTotals","description":"All-time totals."},"currentPeriod":{"$ref":"#/components/schemas/CurrentPeriod"}},"description":"Activity analytics for the selected window (`days`) plus fixed-window breakdown totals. All figures are derived from real message and call records.\n","title":"Usage"},"BillingSubscriptionInterval":{"type":"string","enum":["monthly","annual"],"title":"BillingSubscriptionInterval"},"BillingSubscription":{"type":"object","properties":{"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"quantity":{"type":"integer","minimum":0,"description":"How many of your phone numbers this subscription covers (one unit each). `0` while you hold none — the subscription stays active and still bills for **one** number (its minimum), so the amount charged is `max(quantity, 1)` × the unit price, and the next number you provision is free."},"interval":{"$ref":"#/components/schemas/BillingSubscriptionInterval"},"cancelAtPeriodEnd":{"type":"boolean","description":"True when the subscription is scheduled to cancel at periodEnd (coverage stays until then, then the account reverts to PAYG). Read live from Stripe, the source of truth."}},"description":"The current subscription, or null when the account is pay-as-you-go.","title":"BillingSubscription"},"BillingNumbersItemsMode":{"type":"string","enum":["PAYG","FIXED"],"description":"PAYG bills the wallet; FIXED is covered by a subscription.","title":"BillingNumbersItemsMode"},"BillingNumbersItems":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"nickname":{"type":["string","null"],"description":"User-assigned label for the number, or null if unset."},"mode":{"$ref":"#/components/schemas/BillingNumbersItemsMode","description":"PAYG bills the wallet; FIXED is covered by a subscription."}},"title":"BillingNumbersItems"},"BillingDepositsItemsKind":{"type":"string","enum":["card","welcome","manual"],"description":"`card` — paid Stripe top-up; `welcome` — automatic signup credit; `manual` — internal grant by the Dial team.","title":"BillingDepositsItemsKind"},"BillingDepositsItems":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"amountCents":{"type":"integer","description":"Amount credited, in USD cents (positive)."},"kind":{"$ref":"#/components/schemas/BillingDepositsItemsKind","description":"`card` — paid Stripe top-up; `welcome` — automatic signup credit; `manual` — internal grant by the Dial team."},"invoiceId":{"type":["string","null"],"description":"Stripe invoice id backing this deposit (only `card` top-ups have one; null otherwise). Pass it to Download an invoice to get the Stripe-hosted invoice and PDF."}},"title":"BillingDepositsItems"},"BillingCouponsItems":{"type":"object","properties":{"code":{"type":"string"},"amountCents":{"type":"integer","description":"Credit the coupon added, in USD cents."},"redeemedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When whatever is left of the coupon's credit is taken back."}},"title":"BillingCouponsItems"},"BillingPricing":{"type":"object","properties":{"monthlyCents":{"type":"integer","description":"Per-number price billed monthly."},"annualCents":{"type":"integer","description":"Per-number price billed annually."}},"description":"Per-number subscription unit prices (USD cents), read from Stripe (the source of truth). Stripe is a dependency of this endpoint.","title":"BillingPricing"},"BillingPaymentMethodsItems":{"type":"object","properties":{"id":{"type":"string","description":"Stripe PaymentMethod id (pm_…)."},"type":{"type":"string","description":"Stripe PaymentMethod type: card, link, …"},"brand":{"type":"string","description":"Card brand (visa, mastercard, amex, …); empty for non-card methods."},"last4":{"type":"string","description":"Card last four; empty for non-card methods."},"expMonth":{"type":"integer","description":"Card expiry month; 0 for non-card methods."},"expYear":{"type":"integer","description":"Card expiry year; 0 for non-card methods."},"email":{"type":["string","null"],"description":"Identifying email for account-style methods (e.g. Link); null otherwise."},"isDefault":{"type":"boolean","description":"True for the customer's default payment method (invoices + subscription renewals)."}},"title":"BillingPaymentMethodsItems"},"Billing":{"type":"object","properties":{"balanceCents":{"type":"integer","description":"Credit-wallet balance in USD cents. May be negative."},"numbersReleaseAt":{"type":["string","null"],"format":"date-time","description":"When all of the account's numbers will be released for non-payment, or null when nothing is at risk. Non-null only for a pay-as-you-go account whose balance is negative: it's the end of the 30-day grace period (measured from when the balance first went negative). Topping the balance back to zero or above clears it. Subscription-covered accounts are never at risk, so this is always null for them."},"subscription":{"oneOf":[{"$ref":"#/components/schemas/BillingSubscription"},{"type":"null"}],"description":"The current subscription, or null when the account is pay-as-you-go."},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/BillingNumbersItems"}},"deposits":{"type":"array","items":{"$ref":"#/components/schemas/BillingDepositsItems"},"description":"Recent credits added to the wallet, most recent first."},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/BillingCouponsItems"},"description":"Coupon codes this account redeemed, most recent first. Empty when none."},"pricing":{"$ref":"#/components/schemas/BillingPricing","description":"Per-number subscription unit prices (USD cents), read from Stripe (the source of truth). Stripe is a dependency of this endpoint."},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/BillingPaymentMethodsItems"},"description":"Saved payment methods on the account's Stripe customer (all reusable types — card, Link, …), used for top-ups and subscription billing. Empty until one is added. Read live from Stripe, with the default first."}},"description":"Account billing status (GET /api/v1/billing).","title":"Billing"},"Billing_createCreditsCheckout_Response_200":{"type":"object","properties":{"clientSecret":{"type":"string"}},"title":"Billing_createCreditsCheckout_Response_200"},"ApiV1BillingCheckoutSubscriptionPostRequestBodyContentApplicationJsonSchemaInterval":{"type":"string","enum":["monthly","annual"],"title":"ApiV1BillingCheckoutSubscriptionPostRequestBodyContentApplicationJsonSchemaInterval"},"Billing_createSubscriptionCheckout_Response_200":{"type":"object","properties":{"clientSecret":{"type":"string"}},"title":"Billing_createSubscriptionCheckout_Response_200"},"Billing_cancelSubscription_Response_200":{"type":"object","properties":{"canceledAtPeriodEnd":{"type":"boolean"},"cancelAt":{"type":["integer","null"],"description":"Unix timestamp (seconds) the subscription ends."}},"title":"Billing_cancelSubscription_Response_200"},"Billing_resumeSubscription_Response_200":{"type":"object","properties":{"resumed":{"type":"boolean"}},"title":"Billing_resumeSubscription_Response_200"},"ApiV1BillingSubscriptionChangePostRequestBodyContentApplicationJsonSchemaInterval":{"type":"string","enum":["monthly","annual"],"title":"ApiV1BillingSubscriptionChangePostRequestBodyContentApplicationJsonSchemaInterval"},"ApiV1BillingSubscriptionChangePostResponsesContentApplicationJsonSchemaInterval":{"type":"string","enum":["monthly","annual"],"title":"ApiV1BillingSubscriptionChangePostResponsesContentApplicationJsonSchemaInterval"},"Billing_changeSubscriptionInterval_Response_200":{"type":"object","properties":{"changed":{"type":"boolean","description":"False when already on the target interval."},"interval":{"$ref":"#/components/schemas/ApiV1BillingSubscriptionChangePostResponsesContentApplicationJsonSchemaInterval"}},"title":"Billing_changeSubscriptionInterval_Response_200"},"ApiV1BillingSubscriptionPreviewPostRequestBodyContentApplicationJsonSchemaInterval":{"type":"string","enum":["monthly","annual"],"description":"Target billing interval. Defaults to the current interval.","title":"ApiV1BillingSubscriptionPreviewPostRequestBodyContentApplicationJsonSchemaInterval"},"ApiV1BillingSubscriptionPreviewPostResponsesContentApplicationJsonSchemaLinesItems":{"type":"object","properties":{"description":{"type":"string"},"amountCents":{"type":"integer"}},"title":"ApiV1BillingSubscriptionPreviewPostResponsesContentApplicationJsonSchemaLinesItems"},"Billing_previewSubscriptionChange_Response_200":{"type":"object","properties":{"amountDueCents":{"type":"integer","description":"Amount that would be charged today, in USD cents (prorations and discounts included)."},"currency":{"type":"string"},"prorationDate":{"type":"integer","description":"Unix timestamp (seconds) the proration was calculated as of. Pass it back as `prorationDate` to the change endpoint to charge exactly this quoted amount."},"discountCents":{"type":"integer","description":"Total discount applied by the coupon, in USD cents (0 when no coupon or no effect)."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ApiV1BillingSubscriptionPreviewPostResponsesContentApplicationJsonSchemaLinesItems"},"description":"The invoice preview line items (proration credits appear as negatives)."}},"title":"Billing_previewSubscriptionChange_Response_200"},"Billing_createPaymentMethodSetup_Response_200":{"type":"object","properties":{"clientSecret":{"type":"string"}},"title":"Billing_createPaymentMethodSetup_Response_200"},"Billing_removePaymentMethod_Response_200":{"type":"object","properties":{"removed":{"type":"boolean"}},"title":"Billing_removePaymentMethod_Response_200"},"Billing_setDefaultPaymentMethod_Response_200":{"type":"object","properties":{"default":{"type":"boolean"}},"title":"Billing_setDefaultPaymentMethod_Response_200"},"Billing_getInvoice_Response_200":{"type":"object","properties":{"hostedInvoiceUrl":{"type":["string","null"],"description":"Stripe-hosted invoice page (has a download button), or null."},"invoicePdf":{"type":["string","null"],"description":"Direct link to the invoice PDF, or null."}},"title":"Billing_getInvoice_Response_200"},"ApiV1BillingActivityGetParametersFilter":{"type":"string","enum":["all","usage","payment-credits"],"default":"all","title":"ApiV1BillingActivityGetParametersFilter"},"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType":{"type":"string","enum":["usage","credit","payment"],"title":"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType"},"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution":{"type":"string","enum":["wallet","entitlement"],"title":"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution"},"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind":{"type":"string","enum":["card","welcome","manual"],"description":"Credit rows only.","title":"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind"},"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType"},"occurredAt":{"type":"string","format":"date-time"},"balanceAfterCents":{"type":"integer","description":"Credit-wallet balance in USD cents immediately after this row — a running balance; the newest item equals the current wallet balance. Rows that don't move the wallet carry the balance as of their moment."},"amountCents":{"type":"integer","description":"Credits/payments: amount; usage: see totalCents."},"totalCents":{"type":"integer","description":"Usage rows only — billed amount in USD cents."},"fareName":{"type":"string"},"number":{"type":["string","null"]},"billedQuantity":{"type":"integer"},"attribution":{"$ref":"#/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution"},"phoneNumberId":{"type":"string"},"callId":{"type":["string","null"]},"messageId":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind","description":"Credit rows only."},"invoiceId":{"type":["string","null"],"description":"Stripe invoice id (credit/payment rows); pass to Download an invoice."},"reason":{"type":"string","description":"Payment rows only — Stripe billing reason."}},"description":"An activity item. `type` selects the shape: `usage` (fareName, number, billedQuantity, totalCents, attribution, phoneNumberId, callId, messageId); `credit` (amountCents, kind, invoiceId); `payment` (amountCents, invoiceId, reason). Every item also carries `balanceAfterCents`.","title":"ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems"},"Billing_listBillingActivity_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems"}},"hasMore":{"type":"boolean","description":"True when more items exist older than the last one returned."}},"title":"Billing_listBillingActivity_Response_200"},"PhoneNumberCapabilitiesItems":{"type":"string","enum":["sms","call","imessage","whatsapp"],"title":"PhoneNumberCapabilitiesItems"},"InboundCallPolicyScope":{"type":"string","enum":["account","numbers"],"description":"`numbers` when the list is set on this number; `account` when the account-wide list covers it.","title":"InboundCallPolicyScope"},"InboundCallPolicy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"$ref":"#/components/schemas/InboundCallPolicyScope","description":"`numbers` when the list is set on this number; `account` when the account-wide list covers it."}},"description":"The allow list screening inbound calls on this number right now, or `null` when every caller rings through. It is the number's own enabled list if it has one, otherwise the account's enabled account-wide list. Always `null` on numbers that can't take calls.","title":"InboundCallPolicy"},"PhoneNumberSetupStatus":{"type":"string","enum":["provisioning","ready","failed"],"description":"Whether the number is ready to use. An SMS/call number is always `ready`. An `imessage` number is `provisioning` while it's being set up and only becomes usable for sending or calling once `ready` (`failed` on a setup error). Every change to this field emits a `number.status_changed` event — wait for that rather than polling. That event reports per-capability statuses rather than this single field, so it can also tell you about the WhatsApp channel, which settles independently of this one.","title":"PhoneNumberSetupStatus"},"PhoneNumberInboundVoiceGender":{"type":"string","enum":["male","female"],"description":"Voice gender the AI agent uses on inbound calls to this number. Null when unset — the voice then uses the default, female. Set and cleared with Update a phone number.","title":"PhoneNumberInboundVoiceGender"},"PhoneNumberReplacesItems":{"type":"object","properties":{"id":{"type":"string","description":"The replaced number's id."},"number":{"type":"string","description":"The replaced E.164."},"replacedAt":{"type":"string","format":"date-time","description":"When the number was replaced."}},"required":["id","number","replacedAt"],"title":"PhoneNumberReplacesItems"},"PhoneNumberReplacedBy":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"}},"required":["id","number"],"description":"The number this one was replaced by, or null for a live number. A replaced number can't be used directly: requests that name it by `id` act on `replacedBy`, its E.164 no longer works, and it is released together with that number.","title":"PhoneNumberReplacedBy"},"PhoneNumberWhatsappStatus":{"type":"string","enum":["provisioning","warming_up","ready","failed","banned","paused","offline"],"description":"Where WhatsApp setup stands for this line. Sending with `channel: \"whatsapp\"` is rejected until `ready`, again once `banned`, and while `paused` or `offline`.\n\n`warming_up` appears only after Connect WhatsApp to a number: the line is registered and is warming up before its first use, which takes about 6 hours. It is still in progress — the number-level `status` stays `unsettled` — and it ends at `ready`, or at `failed` if the warm-up cannot finish. A number provisioned with `whatsapp: true` never passes through it: it arrives already `ready`. `whatsapp` joins the number's `capabilities` only once this is `ready`.\n\n`failed` and `banned` are different endings. `failed` means setup never completed, and `retryAvailableAt` may tell you when to try again. `banned` means WhatsApp withdrew a line that **was** working: it is permanent, no retry helps, and the only route back is registering WhatsApp on the number afresh. The number's other channels are unaffected and keep working.\n\n`paused` is temporary: Dial has paused WhatsApp sending on this line, and sends are refused with `503 whatsapp_unavailable` until it resumes. It only ever follows `ready`, there is nothing to retry, and it returns to `ready` when Dial resumes sending — each move is a `number.status_changed` event. The line still receives WhatsApp, so `whatsapp` stays in the number's `capabilities` while paused.\n\n`offline` is temporary too: WhatsApp is temporarily offline on this line and Dial is reconnecting it, with nothing for you to do. Sends are refused with `409 whatsapp_offline`, whose `Retry-After` header says when to try again. It only ever follows `ready`, and it ends at `ready` once the line is reconnected, or at `failed` if it cannot be — each move is a `number.status_changed` event, so you can stop sending when a line goes offline and start again when it is back.","title":"PhoneNumberWhatsappStatus"},"PhoneNumberWhatsapp":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PhoneNumberWhatsappStatus","description":"Where WhatsApp setup stands for this line. Sending with `channel: \"whatsapp\"` is rejected until `ready`, again once `banned`, and while `paused` or `offline`.\n\n`warming_up` appears only after Connect WhatsApp to a number: the line is registered and is warming up before its first use, which takes about 6 hours. It is still in progress — the number-level `status` stays `unsettled` — and it ends at `ready`, or at `failed` if the warm-up cannot finish. A number provisioned with `whatsapp: true` never passes through it: it arrives already `ready`. `whatsapp` joins the number's `capabilities` only once this is `ready`.\n\n`failed` and `banned` are different endings. `failed` means setup never completed, and `retryAvailableAt` may tell you when to try again. `banned` means WhatsApp withdrew a line that **was** working: it is permanent, no retry helps, and the only route back is registering WhatsApp on the number afresh. The number's other channels are unaffected and keep working.\n\n`paused` is temporary: Dial has paused WhatsApp sending on this line, and sends are refused with `503 whatsapp_unavailable` until it resumes. It only ever follows `ready`, there is nothing to retry, and it returns to `ready` when Dial resumes sending — each move is a `number.status_changed` event. The line still receives WhatsApp, so `whatsapp` stays in the number's `capabilities` while paused.\n\n`offline` is temporary too: WhatsApp is temporarily offline on this line and Dial is reconnecting it, with nothing for you to do. Sends are refused with `409 whatsapp_offline`, whose `Retry-After` header says when to try again. It only ever follows `ready`, and it ends at `ready` once the line is reconnected, or at `failed` if it cannot be — each move is a `number.status_changed` event, so you can stop sending when a line goes offline and start again when it is back."},"error":{"type":["string","null"],"description":"Human-readable reason when `status` is `failed`, `banned`, `paused` or `offline`; null otherwise. Safe to show a user."},"retryAvailableAt":{"type":["string","null"],"format":"date-time","description":"When WhatsApp will accept another verification attempt for this number, or null. Only ever set on a `failed` track, and only while still in the future. Always null on a `banned` track — there is nothing to come back for.\n\nIt is the one failure that can be neither fixed nor retried around — enforced per number by WhatsApp itself — so a retry is refused until it lifts. Show the time rather than a button that cannot work."},"autoRetryScheduled":{"type":"boolean","description":"Whether Dial will retry this line by itself once `retryAvailableAt` passes, without anyone asking. True only on a `failed` track that is inside a cooling-off period and still has automatic attempts left; false everywhere else, including on a `ready` or `banned` line.\n\nA cooling-off period is the one failure that resolves on its own clock, so Dial waits it out and re-runs setup for you, a bounded number of times. While this is true, leave the line alone and say a retry is coming; when it is false and `retryAvailableAt` is null, a retry is yours to ask for."}},"description":"The WhatsApp channel's own setup state, or null when the number has no WhatsApp registration at all — which is every number unless the beta was enabled and WhatsApp was requested for this line.\n\n**Independent of `setupStatus`.** They are separate tracks on one line: voice caller-ID can be `ready` while WhatsApp is `failed`, and the other way round, so one status field could not carry both. See WhatsApp lines.","title":"PhoneNumberWhatsapp"},"PhoneNumberTenDlcStatus":{"type":"string","enum":["not_registered","in_review","with_carrier","approved","rejected"],"description":"Where this number's registration stands.\n- `not_registered` — 10DLC applies to this number but nothing has\n  been submitted. Outbound US SMS/MMS is blocked by carriers.\n- `in_review` — submitted; Dial is checking the details before\n  filing them with the carrier registry.\n- `with_carrier` — filed with the carrier registry; a decision\n  usually lands within 3–5 business days.\n- `approved` — registered. The number can send outbound SMS and\n  MMS to US phone numbers.\n- `rejected` — changes are needed before it can be registered.\n  See `reason`, then resubmit (no additional fee).\n\nThe brand and the campaign are vetted separately, and this is the combined outcome: `approved` means both cleared, and `rejected` means either was turned down.","title":"PhoneNumberTenDlcStatus"},"PhoneNumberTenDlcKind":{"type":"string","enum":["sole_proprietor","business"],"description":"Who the number was registered as. Null while `status` is `not_registered`.","title":"PhoneNumberTenDlcKind"},"PhoneNumberTenDlc":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PhoneNumberTenDlcStatus","description":"Where this number's registration stands.\n- `not_registered` — 10DLC applies to this number but nothing has\n  been submitted. Outbound US SMS/MMS is blocked by carriers.\n- `in_review` — submitted; Dial is checking the details before\n  filing them with the carrier registry.\n- `with_carrier` — filed with the carrier registry; a decision\n  usually lands within 3–5 business days.\n- `approved` — registered. The number can send outbound SMS and\n  MMS to US phone numbers.\n- `rejected` — changes are needed before it can be registered.\n  See `reason`, then resubmit (no additional fee).\n\nThe brand and the campaign are vetted separately, and this is the combined outcome: `approved` means both cleared, and `rejected` means either was turned down."},"kind":{"$ref":"#/components/schemas/PhoneNumberTenDlcKind","description":"Who the number was registered as. Null while `status` is `not_registered`."},"submittedAt":{"type":["string","null"],"format":"date-time","description":"When the current submission was sent. Null while `status` is `not_registered`. A resubmission after a rejection updates this."},"reviewedAt":{"type":["string","null"],"format":"date-time","description":"When the registration was approved or rejected. Null until then."},"reason":{"type":["string","null"],"description":"What needs to change, verbatim as shown to the account owner. Non-null only when `status` is `rejected`."}},"required":["status","kind","submittedAt","reviewedAt","reason"],"description":"US 10DLC carrier registration for this number. Null when 10DLC does not apply to it — a non-US number, a number with the `imessage` capability (those send over Apple Messages for Business, not carrier SMS), or a number on an account that isn't pay-as-you-go and has no registration yet. Otherwise an object whose `status` says where the registration stands, starting at `not_registered`.\nUS carriers block outbound SMS and MMS sent from an unregistered 10-digit number to US phone numbers. Registering lifts that block for this number. Inbound texts, voice calls in either direction, and messaging to numbers outside the US are unaffected.","title":"PhoneNumberTenDlc"},"PhoneNumber":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string","description":"The number in E.164 format."},"nickname":{"type":["string","null"],"description":"Optional human-readable label for the number, e.g. \"Support line\". Free text, at most 100 characters, not required to be unique. Null when unset. Set and cleared with Update a phone number."},"firstName":{"type":["string","null"],"description":"iMessage display first name — with `lastName` and the avatar photo, the identity shown beside this number's messages in recipients' Messages apps. At most 30 characters. Null when unset, and always null on numbers without the `imessage` capability. Set and cleared with Update a phone number."},"lastName":{"type":["string","null"],"description":"iMessage display last name. At most 30 characters. Null when unset, and always null on numbers without the `imessage` capability. Set and cleared with Update a phone number."},"avatarUrl":{"type":["string","null"],"description":"Public URL of the number's current iMessage avatar photo, hosted by Dial. Null when no photo has been set, and always null on numbers without the `imessage` capability. Set with Update a phone number; the photo can be replaced but not removed."},"whatsappName":{"type":["string","null"],"description":"The number's current WhatsApp display name. Null when none is set, and always null on numbers without a working `whatsapp` capability. Set with Update a phone number."},"whatsappAvatarUrl":{"type":["string","null"],"description":"Public URL of the number's current WhatsApp avatar, hosted by Dial. Null when no photo has been set, and always null on numbers without a working `whatsapp` capability. Set with Update a phone number."},"country":{"type":"string","description":"ISO-3166-1 alpha-2 country code of the number. Always `US` — only US numbers can be provisioned at this time."},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberCapabilitiesItems"},"description":"Channels the number supports. `[\"sms\",\"call\"]` for a standard number; `[\"sms\",\"call\",\"imessage\"]` for an iMessage number (which sends iMessage with automatic fallback to RCS/SMS); that plus `whatsapp` once a WhatsApp registration on the line is live.\n\n`whatsapp` appears only when the channel actually works — while it is still being set up the line reports the iMessage list, and `whatsapp.status` is where the progress shows. Mirrors the `capabilities` accepted when provisioning, plus `whatsapp`, which is requested with the separate `whatsapp` flag rather than in this array."},"callingEnabled":{"type":"boolean","default":true,"description":"Whether calling is switched on for this number, in both directions. `true` (the default) is normal operation. When `false`, inbound calls to the number are not connected — the caller is not answered, no AI agent runs, and no minute is billed — and Place a call from this number is refused with `409 calling_disabled`. Messaging on the number (SMS, iMessage, RCS, WhatsApp) is unaffected either way. Set at provisioning time and changeable with Update a phone number; takes effect on the next call, never on one already in progress.\n\nDistinct from `capabilities`, which reports what the line was provisioned to do and never moves when this switch is flipped. To decide whether a call can be placed from this number right now, read all three: `capabilities` contains `call`, `setupStatus` is `ready`, and `callingEnabled` is `true`."},"forwardTo":{"type":["string","null"],"description":"Phone number (E.164) that inbound calls to this number are forwarded to, or `null` (the default) when inbound calls are answered by the AI voice agent. While set, an inbound call rings straight through to this number instead of the agent; the forwarded phone sees the original caller's number as caller ID where the network allows it, and this number otherwise. If the forwarded phone is busy or doesn't answer, the call ends. A forwarded call is a normal inbound call record: it emits the same events, is billed at the same per-minute rate, carries this number as its `transferTo`, and has `transferredAt` stamped when the forwarded phone answers. Set with Update a phone number. Ignored while `callingEnabled` is `false`."},"inboundCallPolicy":{"$ref":"#/components/schemas/InboundCallPolicy"},"setupStatus":{"$ref":"#/components/schemas/PhoneNumberSetupStatus","description":"Whether the number is ready to use. An SMS/call number is always `ready`. An `imessage` number is `provisioning` while it's being set up and only becomes usable for sending or calling once `ready` (`failed` on a setup error). Every change to this field emits a `number.status_changed` event — wait for that rather than polling. That event reports per-capability statuses rather than this single field, so it can also tell you about the WhatsApp channel, which settles independently of this one."},"setupError":{"type":["string","null"],"description":"Human-readable reason when `setupStatus` is `failed`; null otherwise."},"inboundInstruction":{"type":["string","null"],"description":"System prompt the AI voice agent uses on inbound calls to this number. Set at provisioning time and changeable with Update a phone number. Null for numbers provisioned before this field existed — those reject inbound calls until an instruction is set."},"inboundVoiceGender":{"$ref":"#/components/schemas/PhoneNumberInboundVoiceGender","description":"Voice gender the AI agent uses on inbound calls to this number. Null when unset — the voice then uses the default, female. Set and cleared with Update a phone number."},"inboundLanguage":{"type":["string","null"],"description":"BCP-47 language tag the AI voice agent uses on inbound calls to this number. Null when unset — the language is then detected from the caller's country prefix on each call, with the agent handling both that language and `en-US`. Set and cleared with Update a phone number."},"accountId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"replaces":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberReplacesItems"},"description":"Numbers this number replaced, newest first; empty when it replaced none. Dial can move a number onto a new line: the number keeps its `id` and every setting, `number` becomes the new E.164, and the old E.164 is listed as a separate, replaced number. A request that names a replaced number by its `id` acts on this number instead. The replaced E.164 stops working the moment the number is replaced: a request naming it returns `404`, and messages and calls sent to it are no longer received."},"replacedBy":{"oneOf":[{"$ref":"#/components/schemas/PhoneNumberReplacedBy"},{"type":"null"}],"description":"The number this one was replaced by, or null for a live number. A replaced number can't be used directly: requests that name it by `id` act on `replacedBy`, its E.164 no longer works, and it is released together with that number."},"replacedAt":{"type":["string","null"],"format":"date-time","description":"When this number was replaced; null for a live number."},"maxCallDurationSeconds":{"type":["integer","null"],"description":"Call-length cap in seconds; the effective cap on a call is the first one set in priority order — per-call, then number, then account — falling back to the global default. A higher-priority level overrides a lower one. Null means this level sets no cap. Free accounts (never added credit, never subscribed) are additionally hard-capped at 300 seconds regardless of any configured cap."},"whatsapp":{"oneOf":[{"$ref":"#/components/schemas/PhoneNumberWhatsapp"},{"type":"null"}],"description":"The WhatsApp channel's own setup state, or null when the number has no WhatsApp registration at all — which is every number unless the beta was enabled and WhatsApp was requested for this line.\n\n**Independent of `setupStatus`.** They are separate tracks on one line: voice caller-ID can be `ready` while WhatsApp is `failed`, and the other way round, so one status field could not carry both. See WhatsApp lines."},"tenDlc":{"oneOf":[{"$ref":"#/components/schemas/PhoneNumberTenDlc"},{"type":"null"}],"description":"US 10DLC carrier registration for this number. Null when 10DLC does not apply to it — a non-US number, a number with the `imessage` capability (those send over Apple Messages for Business, not carrier SMS), or a number on an account that isn't pay-as-you-go and has no registration yet. Otherwise an object whose `status` says where the registration stands, starting at `not_registered`.\nUS carriers block outbound SMS and MMS sent from an unregistered 10-digit number to US phone numbers. Registering lifts that block for this number. Inbound texts, voice calls in either direction, and messaging to numbers outside the US are unaffected."}},"title":"PhoneNumber"},"Phone_numbers_listNumbers_Response_200":{"type":"object","properties":{"numbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}}},"title":"Phone numbers_listNumbers_Response_200"},"ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaCapabilitiesItems":{"type":"string","enum":["sms","call","imessage"],"title":"ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaCapabilitiesItems"},"ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaInboundVoiceGender":{"type":"string","enum":["male","female"],"description":"Voice gender for the AI agent on inbound calls to this number. Optional — when omitted, the voice is female (the default for every language). Pass `male` to override. Update later with Update a phone number.","title":"ApiV1NumbersPostRequestBodyContentApplicationJsonSchemaInboundVoiceGender"},"Phone_numbers_provisionNumber_Response_201":{"type":"object","properties":{"number":{"$ref":"#/components/schemas/PhoneNumber"}},"title":"Phone numbers_provisionNumber_Response_201"},"Phone_numbers_getNumber_Response_200":{"type":"object","properties":{"number":{"$ref":"#/components/schemas/PhoneNumber"}},"title":"Phone numbers_getNumber_Response_200"},"Success":{"type":"object","properties":{"success":{"type":"boolean"}},"title":"Success"},"ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaInboundVoiceGender":{"type":"string","enum":["male","female"],"description":"Voice gender for the AI agent on inbound calls to this number. Send null to clear it (the voice reverts to the default, female). Takes effect on the next inbound call.","title":"ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaInboundVoiceGender"},"ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaChannel":{"type":"string","enum":["imessage","whatsapp","both"],"description":"Which display profile(s) `name` and `avatarUrl` are written to. `both` writes one identity to the iMessage and WhatsApp profiles; each channel succeeds or fails on its own, and a channel's outcome is reported in `profileResults`. Cannot be combined with `firstName`, `lastName`, `whatsappName`, or `whatsappAvatar`/`whatsappAvatarUrl` — rejected with `400`.","title":"ApiV1NumbersIdPatchRequestBodyContentApplicationJsonSchemaChannel"},"ProfileChannelResultStatus":{"type":"string","enum":["updated","failed"],"description":"`updated` — the channel's profile was changed. `failed` — it was left unchanged, for the reason below.","title":"ProfileChannelResultStatus"},"ProfileChannelResult":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ProfileChannelResultStatus","description":"`updated` — the channel's profile was changed. `failed` — it was left unchanged, for the reason below."},"httpStatus":{"type":"integer","description":"Only when `failed`: the HTTP status this channel's failure maps to — `400` for a value the channel rejects or a channel the number doesn't have, `502` or `503` for a failure applying it."},"error":{"type":"string","description":"Only when `failed`. Plain-language reason, safe to show to a person."},"code":{"type":"string","description":"Only when `failed`. Machine-readable error code, when the failure has one."}},"required":["status"],"description":"What happened to one display profile a number update targeted.","title":"ProfileChannelResult"},"ProfileResults":{"type":"object","properties":{"imessage":{"$ref":"#/components/schemas/ProfileChannelResult"},"whatsapp":{"$ref":"#/components/schemas/ProfileChannelResult"}},"description":"Present whenever the request touched a display profile. Keyed by channel; a channel the request didn't target has no key.","title":"ProfileResults"},"Phone_numbers_updateNumber_Response_200":{"type":"object","properties":{"number":{"$ref":"#/components/schemas/PhoneNumber"},"profileResults":{"$ref":"#/components/schemas/ProfileResults"}},"title":"Phone numbers_updateNumber_Response_200"},"ProfileUpdateErrorError":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"description":"Any type"}}],"description":"An error message, or a validation-error object for 400 responses.","title":"ProfileUpdateErrorError"},"ProfileUpdateError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ProfileUpdateErrorError","description":"An error message, or a validation-error object for 400 responses."},"code":{"type":"string","description":"Machine-readable error code, when the failure has one."},"profileResults":{"$ref":"#/components/schemas/ProfileResults"}},"description":"An error response from updating a number. When every targeted display profile failed, `error`/`code` are the first failing channel's (iMessage before WhatsApp) and `profileResults` lists each channel's outcome.","title":"ProfileUpdateError"},"TenDlcBrandSummaryKind":{"type":"string","enum":["business"],"description":"Always `business` — a sole proprietor brand carries one campaign only and is never reusable.","title":"TenDlcBrandSummaryKind"},"TenDlcBrandSummaryCampaignsItemsStatus":{"type":"string","enum":["in_review","with_carrier","approved"],"title":"TenDlcBrandSummaryCampaignsItemsStatus"},"TenDlcBrandSummaryCampaignsItemsNumbersItems":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["id","phoneNumber"],"title":"TenDlcBrandSummaryCampaignsItemsNumbersItems"},"TenDlcBrandSummaryCampaignsItems":{"type":"object","properties":{"id":{"type":"string"},"useCase":{"type":"string"},"description":{"type":"string"},"status":{"$ref":"#/components/schemas/TenDlcBrandSummaryCampaignsItemsStatus"},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcBrandSummaryCampaignsItemsNumbersItems"}}},"required":["id","useCase","description","status","numbers"],"title":"TenDlcBrandSummaryCampaignsItems"},"TenDlcBrandSummary":{"type":"object","properties":{"id":{"type":"string","description":"Pass as `brandId` when submitting a registration."},"brandName":{"type":"string","description":"The registered business or DBA name carriers vetted."},"kind":{"$ref":"#/components/schemas/TenDlcBrandSummaryKind","description":"Always `business` — a sole proprietor brand carries one campaign only and is never reusable."},"websiteUrl":{"type":["string","null"],"description":"The site registered with the brand."},"approvedAt":{"type":["string","null"],"format":"date-time","description":"When this brand's approval was recorded. Null for a brand approved before Dial began stamping the decision."},"campaignCount":{"type":"integer","description":"How many campaigns already run under this brand."},"reusable":{"type":"boolean","description":"Whether the brand can take a new campaign via `brandId` (it has an approved registration)."},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcBrandSummaryCampaignsItems"},"description":"Campaigns a number can be added to with `campaignId`. Rejected campaigns and full campaigns (400 numbers) are omitted."}},"description":"An approved brand, as the reuse picker sees it. Deliberately short: enough to recognise which business identity this is. The contact details and tax ID on the registration are not part of it.","title":"TenDlcBrandSummary"},"Phone_numbers_listTenDlcBrands_Response_200":{"type":"object","properties":{"brands":{"type":"array","items":{"$ref":"#/components/schemas/TenDlcBrandSummary"}}},"title":"Phone numbers_listTenDlcBrands_Response_200"},"TenDlcRegistrationStatus":{"type":"string","enum":["in_review","with_carrier","approved","rejected"],"description":"Where the registration stands. Unlike the `tenDlc` summary on a phone number, this object only exists once something has been submitted, so `not_registered` never appears here.","title":"TenDlcRegistrationStatus"},"TenDlcRegistrationKind":{"type":"string","enum":["sole_proprietor","business"],"description":"Who the number is registered as. A sole proprietor operates under their own name and has no EIN — lower throughput, quicker to approve. A business is a registered company with an EIN.","title":"TenDlcRegistrationKind"},"TenDlcBrandBusinessType":{"type":"string","enum":["Co-operative","Corporation","Limited Liability Corporation","Non-profit Corporation","Partnership"],"description":"`business` only. The legal form. A sole proprietorship is not a business brand — register as `sole_proprietor` instead.","title":"TenDlcBrandBusinessType"},"TenDlcBrandBusinessIndustry":{"type":"string","enum":["AGRICULTURE","AUTOMOTIVE","BANKING","CONSTRUCTION","CONSUMER","EDUCATION","ELECTRONICS","ENGINEERING","ENERGY","FAST_MOVING_CONSUMER_GOODS","FINANCIAL","FINTECH","FOOD_AND_BEVERAGE","GOVERNMENT","HEALTHCARE","HOSPITALITY","INSURANCE","JEWELRY","LEGAL","MANUFACTURING","MEDIA","NOT_FOR_PROFIT","OIL_AND_GAS","ONLINE","PROFESSIONAL_SERVICES","RAW_MATERIALS","REAL_ESTATE","RELIGION","RETAIL","TECHNOLOGY","TELECOMMUNICATIONS","TRANSPORTATION","TRAVEL"],"description":"`business` only.","title":"TenDlcBrandBusinessIndustry"},"TenDlcBrandVertical":{"type":"string","enum":["AGRICULTURE","COMMUNICATION","CONSTRUCTION","EDUCATION","ENERGY","ENTERTAINMENT","FINANCIAL","GAMBLING","GOVERNMENT","HEALTHCARE","HOSPITALITY","HUMAN_RESOURCES","INSURANCE","LEGAL","MANUFACTURING","NGO","POLITICAL","POSTAL","PROFESSIONAL","REAL_ESTATE","RETAIL","TECHNOLOGY","TRANSPORTATION"],"description":"`sole_proprietor` only, and required. The trade the brand operates in.\nThis is the sole proprietor's counterpart to `businessIndustry`, but **the two take different values** — the registry validates them against separate vocabularies. `PROFESSIONAL` here is `PROFESSIONAL_SERVICES` there, and several industries have no vertical at all (`TRAVEL`, `MEDIA`, `TELECOMMUNICATIONS`, `RELIGION`, `ONLINE`, `NOT_FOR_PROFIT`, `AUTOMOTIVE`, `BANKING`). Send a value from this list, not from `businessIndustry`'s.","title":"TenDlcBrandVertical"},"TenDlcBrandRegistrationIdType":{"type":"string","enum":["EIN","DUNS","CBN","CN","ACN","CIN","VAT","VATRN","RN","Other"],"description":"`business` only. Which registration number follows.","title":"TenDlcBrandRegistrationIdType"},"TenDlcBrandJobPosition":{"type":"string","enum":["Director","GM","VP","CEO","CFO","General Counsel","Other"],"description":"`business` only. The representative's role.","title":"TenDlcBrandJobPosition"},"TenDlcBrandBusinessRegionsOfOperation":{"type":"string","enum":["USA_AND_CANADA","AFRICA","ASIA","EUROPE","LATIN_AMERICA"],"description":"`business` only. Where the business operates.","title":"TenDlcBrandBusinessRegionsOfOperation"},"TenDlcBrandCompanyType":{"type":"string","enum":["private","public","non-profit","government"],"description":"`business` only.","title":"TenDlcBrandCompanyType"},"TenDlcBrandStockExchange":{"type":"string","enum":["NASDAQ","NYSE","AMEX","AMX","ASX","B3","BME","BSE","FRA","ICEX","JPX","JSE","KRX","LON","NSE","OMX","SEHK","SGX","SSE","STO","SWX","SZSE","TSX","TWSE","VSE","OTHER"],"description":"`business` only, and required when `companyType` is `public`. Carriers check it against public sources.","title":"TenDlcBrandStockExchange"},"TenDlcBrand":{"type":"object","properties":{"brandName":{"type":"string","description":"The registered business or DBA name; for a sole proprietor, the name they trade under. Carriers reject an account id or an email address."},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"Mobile number in **E.164** — it must carry its country code, because a brand registered outside the US would otherwise be guessed at. For a sole proprietor this receives the carrier's verification SMS, answered by replying `YES` within 24 hours. It may not be a Dial number — carriers won't verify a number issued by a messaging provider."},"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State or province of the registered address, required whatever the country. The two-letter code for the US and Canada; the region name elsewhere."},"zip":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the registered address, defaulting to `US`.\nThe NUMBER being registered is always US — that is what 10DLC is — but the business need not be. A **business** may be registered from any country the registry accepts, with its own country's tax ID in `registrationNumber` (a non-US brand may draw additional vetting). A **sole proprietor** must be in the US or Canada, so only `US` and `CA` are accepted for that kind."},"businessType":{"$ref":"#/components/schemas/TenDlcBrandBusinessType","description":"`business` only. The legal form. A sole proprietorship is not a business brand — register as `sole_proprietor` instead."},"businessIndustry":{"$ref":"#/components/schemas/TenDlcBrandBusinessIndustry","description":"`business` only."},"vertical":{"$ref":"#/components/schemas/TenDlcBrandVertical","description":"`sole_proprietor` only, and required. The trade the brand operates in.\nThis is the sole proprietor's counterpart to `businessIndustry`, but **the two take different values** — the registry validates them against separate vocabularies. `PROFESSIONAL` here is `PROFESSIONAL_SERVICES` there, and several industries have no vertical at all (`TRAVEL`, `MEDIA`, `TELECOMMUNICATIONS`, `RELIGION`, `ONLINE`, `NOT_FOR_PROFIT`, `AUTOMOTIVE`, `BANKING`). Send a value from this list, not from `businessIndustry`'s."},"registrationIdType":{"$ref":"#/components/schemas/TenDlcBrandRegistrationIdType","description":"`business` only. Which registration number follows."},"registrationNumber":{"type":"string","description":"`business` only. In the US, the EIN."},"websiteUrl":{"type":"string","description":"`business` only. Reviewers check it matches the brand."},"jobPosition":{"$ref":"#/components/schemas/TenDlcBrandJobPosition","description":"`business` only. The representative's role."},"businessTitle":{"type":"string","description":"`business` only. The actual job title, free text."},"businessRegionsOfOperation":{"$ref":"#/components/schemas/TenDlcBrandBusinessRegionsOfOperation","description":"`business` only. Where the business operates."},"companyType":{"$ref":"#/components/schemas/TenDlcBrandCompanyType","description":"`business` only."},"stockExchange":{"$ref":"#/components/schemas/TenDlcBrandStockExchange","description":"`business` only, and required when `companyType` is `public`. Carriers check it against public sources."},"stockTicker":{"type":"string","description":"`business` only, and required when `companyType` is `public`."}},"required":["brandName","firstName","lastName","email","phone","street","city","state","zip","country"],"description":"Who is registering — the business identity carriers vet. The `business`-only fields are absent on a sole proprietor registration.","title":"TenDlcBrand"},"TenDlcCampaignUseCase":{"type":"string","enum":["MIXED","MARKETING","CUSTOMER_CARE","2FA","ACCOUNT_NOTIFICATION","DELIVERY_NOTIFICATION","FRAUD_ALERT","SECURITY_ALERT","HIGHER_EDUCATION","POLLING_VOTING","PUBLIC_SERVICE_ANNOUNCEMENT","SOLE_PROPRIETOR"],"description":"What the campaign is for. Optional on submit for a `business`, defaulting to `MIXED`. Always `SOLE_PROPRIETOR` for a sole proprietor, which takes no value on submit.","title":"TenDlcCampaignUseCase"},"TenDlcCampaign":{"type":"object","properties":{"useCase":{"$ref":"#/components/schemas/TenDlcCampaignUseCase","description":"What the campaign is for. Optional on submit for a `business`, defaulting to `MIXED`. Always `SOLE_PROPRIETOR` for a sole proprietor, which takes no value on submit."},"description":{"type":"string","minLength":40,"maxLength":4096,"description":"Who is messaged and why. Reviewers weigh this heavily — a single word like \"Marketing\" is rejected."},"messageFlow":{"type":"string","minLength":40,"maxLength":1920,"description":"How people opt in. If more than one method is used, all must be named. Room above 1920 characters is reserved for compliance material Dial appends when filing with the carrier registry."},"samples":{"type":"array","items":{"type":"string","minLength":20,"maxLength":1024},"description":"Sample messages. Each must name the brand and carry an opt-out instruction. If only one message text will ever be sent, repeat it — carriers require at least two."},"privacyPolicyUrl":{"type":"string","description":"The privacy policy registered with the campaign. Your own if you gave one; otherwise, for a sole proprietor, the notice Dial publishes for the brand."},"termsUrl":{"type":"string","description":"The terms registered with the campaign — your own, or the page Dial publishes for a sole proprietor who gave none."},"containsUrls":{"type":"boolean","description":"Whether messages will contain links. Defaults to false."},"containsPhones":{"type":"boolean","description":"Whether messages will contain phone numbers. Defaults to false."},"acceptPublishedNotice":{"type":"boolean","description":"Accepted on submit, never returned. Required on a sole proprietor campaign that sends neither `privacyPolicyUrl` nor `termsUrl`: it authorises Dial to publish those two pages for the brand and register them. Ignored when you send your own URLs."},"optInImage":{"description":"Accepted on submit, never returned. The screenshot itself travels as the `optInImage` file part of a `multipart/form-data` request; this JSON key exists only to **remove** a stored screenshot — send `null` on a resubmission. Leaving both out keeps whatever is stored."},"optInImageUrl":{"type":["string","null"],"description":"Where the submitted opt-in screenshot is hosted — the image carrier reviewers see. `null` when none was attached."}},"required":["useCase","description","messageFlow","samples","containsUrls","containsPhones"],"description":"What the number sends — the use case carriers approve. A sole proprietor registration's use case is always `SOLE_PROPRIETOR`, and its policy URLs are the ones Dial publishes unless it supplied its own.","title":"TenDlcCampaign"},"TenDlcRegistration":{"type":"object","properties":{"phoneNumberId":{"type":"string"},"status":{"$ref":"#/components/schemas/TenDlcRegistrationStatus","description":"Where the registration stands. Unlike the `tenDlc` summary on a phone number, this object only exists once something has been submitted, so `not_registered` never appears here."},"kind":{"$ref":"#/components/schemas/TenDlcRegistrationKind","description":"Who the number is registered as. A sole proprietor operates under their own name and has no EIN — lower throughput, quicker to approve. A business is a registered company with an EIN."},"brand":{"$ref":"#/components/schemas/TenDlcBrand"},"campaign":{"$ref":"#/components/schemas/TenDlcCampaign"},"feeCents":{"type":"integer","description":"The one-time registration fee charged for this number, in USD cents."},"reason":{"type":["string","null"],"description":"What needs to change. Non-null only when `status` is `rejected`."},"submittedAt":{"type":"string","format":"date-time"},"reviewedAt":{"type":["string","null"],"format":"date-time","description":"When the registration was approved or rejected; null until then."}},"required":["phoneNumberId","status","kind","brand","campaign","feeCents","reason","submittedAt","reviewedAt"],"description":"A number's 10DLC registration — the brand, the campaign, and where the registration stands. Returned by Get and Submit 10DLC registration.","title":"TenDlcRegistration"},"Phone_numbers_getTenDlcRegistration_Response_200":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/TenDlcRegistration"}},"title":"Phone numbers_getTenDlcRegistration_Response_200"},"ApiV1NumbersId10DlcPostRequestBodyContentApplicationJsonSchemaKind":{"type":"string","enum":["sole_proprietor","business"],"description":"Who is registering. A sole proprietor operates under their own name and has no EIN — lower throughput, quicker to approve. A business is a registered company with an EIN.\n\n**Required unless `brandId` is set**, which supplies it.","title":"ApiV1NumbersId10DlcPostRequestBodyContentApplicationJsonSchemaKind"},"Phone_numbers_submitTenDlcRegistration_Response_200":{"type":"object","properties":{"registration":{"$ref":"#/components/schemas/TenDlcRegistration"}},"title":"Phone numbers_submitTenDlcRegistration_Response_200"},"Phone_numbers_addWhatsappToNumber_Response_200":{"type":"object","properties":{"number":{"$ref":"#/components/schemas/PhoneNumber"}},"title":"Phone numbers_addWhatsappToNumber_Response_200"},"ApiV1MessagesGetParametersDirection":{"type":"string","enum":["inbound","outbound"],"title":"ApiV1MessagesGetParametersDirection"},"MessageDirection":{"type":"string","enum":["inbound","outbound"],"title":"MessageDirection"},"MessageChannel":{"type":"string","enum":["sms","imessage","rcs","whatsapp","unknown"],"description":"The channel the message was delivered on. `sms` for SMS/call numbers. For iMessage numbers, inbound messages report the channel actually used — `imessage`, `rcs`, or `sms`. Outbound iMessage sends report `unknown`, because the iMessage channel does not confirm which channel was ultimately used.\n\n`whatsapp` is a channel in its own right — a WhatsApp registration on an iMessage line — and is reported in both directions. Every group message is `whatsapp` today.","title":"MessageChannel"},"MessageService":{"type":"string","enum":["imessage","rcs","sms"],"description":"For iMessage numbers, the confirmed delivery channel. Null for SMS/call numbers (where `channel` already says `sms`). Deprecated — prefer `channel`, which is authoritative.","title":"MessageService"},"MessageStatus":{"type":"string","enum":["sent","delivered","undelivered","failed","unknown","received"],"description":"Delivery status. Outbound SMS/call messages start at `sent` and reach a terminal `delivered`, `undelivered`, or `failed`. Outbound iMessage messages are `unknown` (the iMessage channel does not report delivery). Inbound messages are `received`.","title":"MessageStatus"},"MessageDeliveryState":{"type":"string","enum":["pending","delivered","undelivered","failed","unconfirmed"],"description":"The delivery axis — the same information as `status`, in the vocabulary that says what to do about it. `pending` means wait for a disposition (`status: \"sent\"`); `unconfirmed` means never expect one (`status: \"unknown\"`, an iMessage send, or a WhatsApp send before its first receipt). Inbound messages are `delivered`.","title":"MessageDeliveryState"},"MessageReadState":{"type":"string","enum":["unread","read","unsupported"],"description":"The read axis, independent of delivery — a message can be both delivered and read, which `status` alone could never express.\n\n`unsupported` on channels that report no reads (SMS) and on every inbound message, since Dial does not track whether you read one. iMessage and WhatsApp report reads, so an outbound message there is `unread` until it is `read`. In a group, `read` means every recipient has read it — never just somebody.","title":"MessageReadState"},"MessageMedia":{"type":"object","properties":{"id":{"type":"string","description":"Public media ID — an unguessable 32-character token."},"url":{"type":"string","format":"uri","description":"Stable public URL serving the media (see Get public media). Safe to use directly as an image source; requires no authentication."},"contentType":{"type":"string","description":"MIME type of the media. A contact card shared with the line (on iMessage, WhatsApp or MMS) is `text/vcard`, and its `url` serves the `.vcf` file itself."},"originalUrl":{"type":["string","null"],"description":"The caller-supplied source URL on outbound messages. Null on inbound messages and when the media was uploaded directly as bytes — inbound media is always served from `url`."}},"description":"A media attachment on a message, hosted by Dial.","title":"MessageMedia"},"MessagePollOptionsItems":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"votes":{"type":"array","items":{"type":"string"}}},"required":["id","text","votes"],"title":"MessagePollOptionsItems"},"MessagePoll":{"type":"object","properties":{"options":{"type":"array","items":{"$ref":"#/components/schemas/MessagePollOptionsItems"}}},"description":"Set when this message is a poll. `options` are in send order with Dial-issued ids, and each option's `votes` is the current tally — the voters (E.164 or handle) whose latest vote selects it, in first-vote order. Derived from the poll's vote messages, so it is always current. Null on every other message.","title":"MessagePoll"},"MessagePollVote":{"type":"object","properties":{"optionId":{"type":"string"},"selected":{"type":"boolean"}},"description":"Set when this inbound message is a vote on one of your polls: `optionId` names the option (see the poll's `poll.options[].id`) and `selected` is `true` for a vote, `false` for a retracted vote. `replyToId` is the poll message. `body` is empty. Null on every other message.","title":"MessagePollVote"},"Message":{"type":"object","properties":{"id":{"type":"string"},"phoneNumberId":{"type":"string"},"from":{"type":"string","description":"Sender in E.164 format. On an inbound group message this is the participant who sent it — not the group, and not your own line."},"to":{"type":["string","null"],"description":"Recipient in E.164 format, and **null exactly when `groupId` is set** — in both directions. A group message is addressed to the group, and a group is not a phone number.\n\nWhich of your numbers the conversation is on is `phoneNumberId`, which is set on every message. Code that reads `to` as \"my number\" must read `phoneNumberId` instead."},"groupId":{"type":["string","null"],"description":"The group conversation this message belongs to, or null for a one-to-one conversation. A Dial ID (see List groups) — never the channel's own group identifier."},"body":{"type":"string"},"direction":{"$ref":"#/components/schemas/MessageDirection"},"channel":{"$ref":"#/components/schemas/MessageChannel","description":"The channel the message was delivered on. `sms` for SMS/call numbers. For iMessage numbers, inbound messages report the channel actually used — `imessage`, `rcs`, or `sms`. Outbound iMessage sends report `unknown`, because the iMessage channel does not confirm which channel was ultimately used.\n\n`whatsapp` is a channel in its own right — a WhatsApp registration on an iMessage line — and is reported in both directions. Every group message is `whatsapp` today."},"service":{"$ref":"#/components/schemas/MessageService","description":"For iMessage numbers, the confirmed delivery channel. Null for SMS/call numbers (where `channel` already says `sms`). Deprecated — prefer `channel`, which is authoritative."},"status":{"$ref":"#/components/schemas/MessageStatus","description":"Delivery status. Outbound SMS/call messages start at `sent` and reach a terminal `delivered`, `undelivered`, or `failed`. Outbound iMessage messages are `unknown` (the iMessage channel does not report delivery). Inbound messages are `received`."},"statusError":{"type":["string","null"],"description":"A human-readable reason, present only when `status` is `undelivered` or `failed` (for example, when a carrier rejects the message). Null otherwise."},"deliveryState":{"$ref":"#/components/schemas/MessageDeliveryState","description":"The delivery axis — the same information as `status`, in the vocabulary that says what to do about it. `pending` means wait for a disposition (`status: \"sent\"`); `unconfirmed` means never expect one (`status: \"unknown\"`, an iMessage send, or a WhatsApp send before its first receipt). Inbound messages are `delivered`."},"readState":{"$ref":"#/components/schemas/MessageReadState","description":"The read axis, independent of delivery — a message can be both delivered and read, which `status` alone could never express.\n\n`unsupported` on channels that report no reads (SMS) and on every inbound message, since Dial does not track whether you read one. iMessage and WhatsApp report reads, so an outbound message there is `unread` until it is `read`. In a group, `read` means every recipient has read it — never just somebody."},"readAt":{"type":["string","null"],"format":"date-time","description":"When the message was read, or null. Always null on inbound messages and on channels that report no reads."},"deliveryError":{"type":["string","null"],"description":"The current name for `statusError`; identical value. A vendor-neutral reason, present only on an `undelivered` or `failed` message."},"media":{"type":"array","items":{"$ref":"#/components/schemas/MessageMedia"},"description":"Media attachments on the message, in send order. Empty for plain text messages."},"replyToId":{"type":["string","null"],"description":"ID of the message this one replies to, reacts to, or votes on. Set on messages created via Reply to a message, and on inbound threaded replies, reactions, and poll votes received on iMessage numbers. Null for ordinary messages, or when the target of an inbound reply isn't a message on your account."},"reaction":{"type":["string","null"],"description":"The reaction this message carries — a reaction name (`love`, `like`, `dislike`, `laugh`, `emphasize`, `question`) or an emoji — when the message is a reaction, sent or received. Null otherwise. A reaction delivered natively has an empty `body`; a reaction delivered as a regular message over SMS carries the emoji in `body` too."},"poll":{"oneOf":[{"$ref":"#/components/schemas/MessagePoll"},{"type":"null"}],"description":"Set when this message is a poll. `options` are in send order with Dial-issued ids, and each option's `votes` is the current tally — the voters (E.164 or handle) whose latest vote selects it, in first-vote order. Derived from the poll's vote messages, so it is always current. Null on every other message."},"pollVote":{"oneOf":[{"$ref":"#/components/schemas/MessagePollVote"},{"type":"null"}],"description":"Set when this inbound message is a vote on one of your polls: `optionId` names the option (see the poll's `poll.options[].id`) and `selected` is `true` for a vote, `false` for a retracted vote. `replyToId` is the poll message. `body` is empty. Null on every other message."},"createdAt":{"type":"string","format":"date-time"}},"title":"Message"},"Messages_listMessages_Response_200":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}},"title":"Messages_listMessages_Response_200"},"ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaChannel":{"type":"string","enum":["sms","imessage","whatsapp"],"description":"Which rail to send on, for a line that carries more than one. Omit to use the number's own default — a standard number sends SMS, an iMessage number sends iMessage — so existing requests need no change.\n\n`sms` sends a carrier text from a number without iMessage; on a standard number it is the same as omitting `channel`. `whatsapp` requires a line whose WhatsApp channel is `ready` (otherwise `400`, \"WhatsApp isn't connected on this number.\"). `imessage` requires an iMessage-capable number; on a standard SMS/call number it is rejected with `400` rather than delivered as an SMS. Redundant on a `groupId` send, which is always WhatsApp.","title":"ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaChannel"},"ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaPoll":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300,"description":"The question, shown as the message `body`."},"options":{"type":"array","items":{"type":"string","minLength":1},"description":"The choices, in display order; unique after trimming."}},"required":["title","options"],"description":"Send a poll instead of text (iMessage numbers only). Exclusive with `body`, `mediaUrls`, and `forceAudioFile`. Not accepted on multipart requests.","title":"ApiV1MessagesPostRequestBodyContentApplicationJsonSchemaPoll"},"Messages_sendMessage_Response_201":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"}},"title":"Messages_sendMessage_Response_201"},"Messages_replyToMessage_Response_201":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"}},"title":"Messages_replyToMessage_Response_201"},"ApiV1TypingPostRequestBodyContentApplicationJsonSchemaChannel":{"type":"string","enum":["sms","imessage","whatsapp"],"description":"Which rail to show the indicator on, for a line that carries more than one. Mirrors `channel` on Send a message: omit to use the number's own default. SMS has no typing concept, so `sms` succeeds without showing anything.\n\n`whatsapp` requires a line whose WhatsApp channel is `ready`, and returns `503` when the channel can't be driven right now (rather than reporting a \"typing…\" that never appeared). `imessage` on a number with no iMessage rail is rejected with `400`.\n\nOmit `channel` on a `groupId` request: a group belongs to exactly one channel, so the group already names the rail, and a `channel` naming a different one is rejected with `400`.","title":"ApiV1TypingPostRequestBodyContentApplicationJsonSchemaChannel"},"Messages_sendTyping_Response_200":{"type":"object","properties":{"ok":{"type":"boolean"}},"title":"Messages_sendTyping_Response_200"},"Messages_getPublicMedia_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Messages_getPublicMedia_Response_200"},"GroupChannel":{"type":"string","enum":["whatsapp","imessage"],"description":"The channel the group is on — the same value as `channel` on its messages. A group never changes channel, so a send into it needs no `channel`; naming a different one is rejected with `400`.","title":"GroupChannel"},"Group":{"type":"object","properties":{"id":{"type":"string","description":"The group's Dial ID. Never the channel's own group identifier, which is opaque, unroutable, and does not cross this boundary."},"channel":{"$ref":"#/components/schemas/GroupChannel","description":"The channel the group is on — the same value as `channel` on its messages. A group never changes channel, so a send into it needs no `channel`; naming a different one is rejected with `400`."},"name":{"type":["string","null"],"description":"The group's current name, or null when no line could report it.\n\nNot stored: participants rename groups, so a saved subject would be a cache with nothing to invalidate it. It is read live from the line holding the conversation, and a line that cannot answer in time yields null here rather than failing the whole listing."},"createdAt":{"type":"string","format":"date-time","description":"When Dial first learned of this group — your line creating it or being added to it, or the first message that named it. Not when the group itself was created, except for a group your line created."}},"required":["id","channel","name","createdAt"],"description":"A group conversation — a conversation that is not a phone number, and so has an ID of its own. Address it with `groupId` when sending, and filter for it on List messages. Groups exist on WhatsApp lines and iMessage numbers.","title":"Group"},"Groups_listGroups_Response_200":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}},"title":"Groups_listGroups_Response_200"},"ApiV1GroupsPostRequestBodyContentApplicationJsonSchemaChannel":{"type":"string","enum":["whatsapp"],"default":"whatsapp","description":"The channel to create the group on. Only `whatsapp` today; any other value is rejected with `400`. Optional — omitted, it defaults to `whatsapp`.","title":"ApiV1GroupsPostRequestBodyContentApplicationJsonSchemaChannel"},"ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItemsReason":{"type":"string","enum":["privacy_restricted","not_added"],"description":"`privacy_restricted` — the participant's settings only allow their contacts to add them to groups. `not_added` — WhatsApp did not add them for another reason.","title":"ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItemsReason"},"ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItems":{"type":"object","properties":{"number":{"type":["string","null"],"description":"The participant's E.164 number, or null only when the line could not say which participant it was."},"reason":{"$ref":"#/components/schemas/ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItemsReason","description":"`privacy_restricted` — the participant's settings only allow their contacts to add them to groups. `not_added` — WhatsApp did not add them for another reason."}},"title":"ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItems"},"Groups_createGroup_Response_201":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/Group"},"notAdded":{"type":"array","items":{"$ref":"#/components/schemas/ApiV1GroupsPostResponsesContentApplicationJsonSchemaNotAddedItems"},"description":"Participants who were not added, and so are not in the group. Empty when everyone was added."}},"title":"Groups_createGroup_Response_201"},"ApiV1CallsGetParametersDirection":{"type":"string","enum":["inbound","outbound"],"title":"ApiV1CallsGetParametersDirection"},"CallDirection":{"type":"string","enum":["inbound","outbound"],"title":"CallDirection"},"CallStatusState":{"type":"string","enum":["Queued","Ringing","In-Progress","Terminated","Unknown"],"description":"`Queued` — placed, not ringing yet. `Ringing` — the destination is ringing. `In-Progress` — answered and connected. `Terminated` — over; see `terminationType`. `Unknown` — a call record with no lifecycle information (rare).","title":"CallStatusState"},"CallStatusTerminationType":{"type":"string","enum":["completed","busy","no-answer","failed","canceled","blocked"],"description":"How the call ended. Set only when `state` is `Terminated`, null otherwise. `canceled` means the call was stopped before it was answered. `blocked` means an inbound call was declined by an allow list before it connected (see `blockedByPolicyId`); it was never answered or billed.","title":"CallStatusTerminationType"},"CallStatus":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/CallStatusState","description":"`Queued` — placed, not ringing yet. `Ringing` — the destination is ringing. `In-Progress` — answered and connected. `Terminated` — over; see `terminationType`. `Unknown` — a call record with no lifecycle information (rare)."},"terminationType":{"$ref":"#/components/schemas/CallStatusTerminationType","description":"How the call ended. Set only when `state` is `Terminated`, null otherwise. `canceled` means the call was stopped before it was answered. `blocked` means an inbound call was declined by an allow list before it connected (see `blockedByPolicyId`); it was never answered or billed."},"cancelRequested":{"type":"boolean","description":"`true` once [Stop a call](/api-reference/calls/stop-call) has been requested for this call (or it was ended from the dashboard)."},"cancelPending":{"type":"boolean","description":"`true` while a stop has been requested but the call hasn't reached `Terminated` yet."},"label":{"type":"string","description":"A display string for the status, e.g. `Ringing`, `Completed`, or `Completed (Cancelled)` for an answered call that was stopped. Use `state` and `terminationType` for logic."}},"description":"Where the call is in its lifecycle. Moves forward only: `Queued` → `Ringing` → `In-Progress` → `Terminated`, though a call can skip states (see [`call.status_changed`](/api-reference/events/call-status-changed)).","title":"CallStatus"},"TranscriptTurnSpeaker":{"type":"string","enum":["agent","user","transfer_target"],"description":"Who spoke. `agent` is Dial's AI voice agent. `user` is the human on the other end, on inbound and outbound calls alike. `transfer_target` is the human the call was cold-transferred to (see `transferTo`), who is a different party from `user` and only ever appears on a call that was handed off. `agent` and `user` are the same values the Self-Hosted transcript frames use.","title":"TranscriptTurnSpeaker"},"TranscriptTurn":{"type":"object","properties":{"speaker":{"$ref":"#/components/schemas/TranscriptTurnSpeaker","description":"Who spoke. `agent` is Dial's AI voice agent. `user` is the human on the other end, on inbound and outbound calls alike. `transfer_target` is the human the call was cold-transferred to (see `transferTo`), who is a different party from `user` and only ever appears on a call that was handed off. `agent` and `user` are the same values the Self-Hosted transcript frames use."},"text":{"type":"string","description":"What was said during the turn."},"startMs":{"type":"integer","description":"Approximate milliseconds into the call's audio at which the turn began."},"endMs":{"type":"integer","description":"Approximate milliseconds into the call's audio at which the turn ended. Never smaller than `startMs`."}},"required":["speaker","text","startMs","endMs"],"description":"One uninterrupted stretch of speech by one party, placed in time. Offsets count milliseconds into the call's audio, so the pause before a turn is `startMs` of that turn minus `endMs` of the one before it.\nThe offsets are **approximate**. They are derived from per-word timings the voice runtime does not guarantee to be exact, and they measure audio time rather than wall-clock time. Ample for spotting a long silence, which is what they are for; not a basis for splitting tenths of a second.","title":"TranscriptTurn"},"CallVoiceRuntime":{"type":"string","enum":["managed","self-hosted-audio"],"description":"Which voice runtime served this call. `managed` — Dial's voice agent ran the call; this includes Self-Hosted's LLM mode, where Dial still handles the audio and only the LLM is yours. `self-hosted-audio` — the call's raw audio was streamed to your own server, so Dial never heard the conversation and produced no transcript or recording for it — `transcript` is always `null`. See the [Self-Hosted guide](/documentation/platform/self-hosted). Null on calls that predate this field.","title":"CallVoiceRuntime"},"CallFailureReason":{"type":"string","enum":["self_hosted_key_rejected","self_hosted_agent_not_found","self_hosted_at_capacity","self_hosted_unreachable"],"description":"Why the call failed, when Dial knows. Set only on a call whose `terminationType` is `failed`; `null` on every other call, and on a failed call whose cause Dial can't name. Today every reason comes from a Self-Hosted **audio** target. `self_hosted_key_rejected`: Pipecat Cloud rejected your public key; save the right key in Self-Hosted settings. `self_hosted_agent_not_found`: no Pipecat Cloud agent has the configured agent name. `self_hosted_at_capacity`: your Pipecat Cloud agent had no capacity for another session (raise `max_agents`). `self_hosted_unreachable`: Dial could not reach your target, either your `wsUrl` server didn't accept the connection or Pipecat Cloud didn't answer. More values may be added; treat an unknown value like `null`.","title":"CallFailureReason"},"Call":{"type":"object","properties":{"id":{"type":"string"},"phoneNumberId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"direction":{"$ref":"#/components/schemas/CallDirection"},"status":{"$ref":"#/components/schemas/CallStatus"},"duration":{"type":"integer","description":"Call duration in seconds."},"transcript":{"type":["string","null"],"description":"Transcript text, available after the call ends."},"transcriptTurns":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TranscriptTurn"},"description":"The same conversation as `transcript`, split into timed turns. Use it to analyse pacing, above all the silence between turns, which the flat `transcript` string gives you no way to see. Ordered by `startMs`. Null whenever `transcript` is null, on calls that completed before Dial began recording turn timing, and on any call whose turns could not ALL be timed and attributed. The array is never partial: a transcript missing a turn would report the silence around it as one long pause that never happened, so Dial publishes every turn or none."},"voiceRuntime":{"$ref":"#/components/schemas/CallVoiceRuntime","description":"Which voice runtime served this call. `managed` — Dial's voice agent ran the call; this includes Self-Hosted's LLM mode, where Dial still handles the audio and only the LLM is yours. `self-hosted-audio` — the call's raw audio was streamed to your own server, so Dial never heard the conversation and produced no transcript or recording for it — `transcript` is always `null`. See the [Self-Hosted guide](/documentation/platform/self-hosted). Null on calls that predate this field."},"failureReason":{"$ref":"#/components/schemas/CallFailureReason"},"instruction":{"type":["string","null"],"description":"The system prompt the AI voice agent ran with for this call.\nFor outbound calls, this is the `outboundInstruction` passed to\n`POST /api/v1/calls`. For inbound calls, this is a snapshot of the\ndestination number's `inboundInstruction` at the moment the call was\nanswered — later edits to the number do not retroactively change it.\n"},"transferTo":{"type":["string","null"],"description":"Forward-to number (E.164), or `null` when the call was not transferred or forwarded. For an outbound call, the `transferTo` requested when the call was placed (see `POST /api/v1/calls`). For an inbound call, the number's `forwardTo` at the moment the call arrived, when the call was forwarded instead of answered by the AI voice agent."},"transferredAt":{"type":["string","null"],"format":"date-time","description":"Timestamp of the moment the call was handed off to `transferTo` — the cold transfer on an outbound call, or the moment the forwarded phone answered on an inbound call — or `null` if no hand-off occurred."},"blockedByPolicyId":{"type":["string","null"],"description":"The allow list that declined this inbound call, when `status.terminationType` is `blocked`; `null` on every other call. Kept after the policy is deleted."},"createdAt":{"type":"string","format":"date-time"}},"title":"Call"},"Calls_listCalls_Response_200":{"type":"object","properties":{"calls":{"type":"array","items":{"$ref":"#/components/schemas/Call"}}},"title":"Calls_listCalls_Response_200"},"ApiV1CallsPostRequestBodyContentApplicationJsonSchemaVoiceGender":{"type":"string","enum":["male","female"],"description":"Gender of the AI voice agent for this call. Optional — when omitted, the voice is female (the default for every language). Pass `male` or `female` to choose explicitly; the choice also tells the agent how to refer to itself in gendered languages.","title":"ApiV1CallsPostRequestBodyContentApplicationJsonSchemaVoiceGender"},"Calls_makeCall_Response_200":{"type":"object","properties":{"call":{"$ref":"#/components/schemas/Call"}},"title":"Calls_makeCall_Response_200"},"Calls_getCall_Response_200":{"type":"object","properties":{"call":{"$ref":"#/components/schemas/Call"}},"title":"Calls_getCall_Response_200"},"Calls_stopCall_Response_200":{"type":"object","properties":{"call":{"$ref":"#/components/schemas/Call"}},"title":"Calls_stopCall_Response_200"},"ContactLastDirection":{"type":"string","enum":["inbound","outbound"],"description":"Whether the most recent interaction came from them or from you.","title":"ContactLastDirection"},"ContactLastKind":{"type":"string","enum":["message","call"],"description":"Whether the most recent interaction was a message or a call. It selects which of the two fields below carries anything.","title":"ContactLastKind"},"Contact":{"type":"object","properties":{"number":{"type":"string","description":"The contact's number in E.164."},"name":{"type":["string","null"],"description":"The name you gave this contact with Set a contact name, or null when it has none."},"messageCount":{"type":"integer","description":"One-to-one messages exchanged with this contact across every line on the account (or the one line named by `numberId`), in both directions. Group messages are excluded."},"inboundMessageCount":{"type":"integer","description":"The part of `messageCount` the contact sent to your lines. Filter on it with `minInbound`."},"outboundMessageCount":{"type":"integer","description":"The part of `messageCount` your lines sent to the contact. Filter on it with `minOutbound`."},"callCount":{"type":"integer","description":"Calls exchanged with this contact across every line on the account (or the one line named by `numberId`), in both directions."},"lastAt":{"type":"string","format":"date-time","description":"When the most recent message or call happened. The list is ordered by this, newest first, and it is the value to pass as `starting_after` for the next page."},"lastDirection":{"$ref":"#/components/schemas/ContactLastDirection","description":"Whether the most recent interaction came from them or from you."},"lastKind":{"$ref":"#/components/schemas/ContactLastKind","description":"Whether the most recent interaction was a message or a call. It selects which of the two fields below carries anything."},"lastBody":{"type":"string","description":"The most recent message's text, for a preview line. Empty when the most recent interaction was a call, when the message carried only an attachment, and when data retention has cleared its content — `lastKind`, `lastMediaCount` and `lastRedacted` tell those apart."},"lastMediaCount":{"type":"integer","description":"Attachments on the most recent message; 0 for a call and for a text-only message. A positive count with an empty `lastBody` is a media-only message."},"lastRedacted":{"type":"boolean","description":"True when data retention cleared the most recent message's content. Distinguishes a swept conversation from an empty one, which would otherwise look identical."},"lastCallDuration":{"type":["integer","null"],"description":"The most recent call's duration in seconds, or null when the most recent interaction was a message. 0 for a call that never connected."}},"required":["number","name","messageCount","inboundMessageCount","outboundMessageCount","callCount","lastAt","lastDirection","lastKind","lastBody","lastMediaCount","lastRedacted","lastCallDuration"],"description":"One phone number your lines have talked to, with the totals for that conversation and a summary of its most recent moment. Derived from message and call history rather than stored, so there is no ID to address it by — the number is the identity.","title":"Contact"},"Contacts_listContacts_Response_200":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"hasMore":{"type":"boolean","description":"True when more contacts exist with activity older than the last one returned."}},"required":["contacts","hasMore"],"title":"Contacts_listContacts_Response_200"},"Contacts_setContactName_Response_200":{"type":"object","properties":{"number":{"type":"string"},"name":{"type":["string","null"]}},"required":["number","name"],"title":"Contacts_setContactName_Response_200"},"ApiV1LookupGetResponsesContentApplicationJsonSchemaSupports":{"type":"object","properties":{"imessage":{"type":"boolean","description":"Whether the number can currently receive iMessage."},"whatsapp":{"type":"boolean","description":"Whether the number can currently receive WhatsApp."}},"required":["imessage","whatsapp"],"description":"One key per channel, true when the number can be reached there. Keys are added over time — read the ones you need by name.","title":"ApiV1LookupGetResponsesContentApplicationJsonSchemaSupports"},"Lookup_number_Response_200":{"type":"object","properties":{"number":{"type":"string","description":"The number you asked about, normalized to E.164."},"supports":{"$ref":"#/components/schemas/ApiV1LookupGetResponsesContentApplicationJsonSchemaSupports","description":"One key per channel, true when the number can be reached there. Keys are added over time — read the ones you need by name."}},"required":["number","supports"],"title":"Lookup_number_Response_200"},"MessageReceivedEventObject":{"type":"string","enum":["event"],"title":"MessageReceivedEventObject"},"MessageReceivedEventType":{"type":"string","enum":["message.received"],"title":"MessageReceivedEventType"},"RelatedObjectType":{"type":"string","enum":["call","message"],"title":"RelatedObjectType"},"RelatedObject":{"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/RelatedObjectType"},"url":{"type":["string","null"]}},"required":["id","type","url"],"description":"A pointer to the REST resource this event concerns. `url` is the get-by-id path when one exists (calls), or null when it does not yet (messages have no get-by-id endpoint).","title":"RelatedObject"},"MessageReceivedEventDataChannel":{"type":"string","enum":["sms","imessage","rcs","whatsapp","unknown"],"description":"The channel the inbound message arrived on: `sms`, `imessage`, `rcs`, or `whatsapp` (`unknown` when the channel can't be determined).","title":"MessageReceivedEventDataChannel"},"MessageReceivedEventDataPollVote":{"type":"object","properties":{"optionId":{"type":"string"},"selected":{"type":"boolean"}},"description":"Set when the inbound message is a vote on one of your polls: `optionId` and `selected` (`false` is a retracted vote). `replyToId` is the poll message and `body` is empty. Null otherwise.","title":"MessageReceivedEventDataPollVote"},"MessageReceivedEventDataSource":{"type":"string","enum":["external","internal"],"description":"`external` — delivered by a real carrier via the inbound webhook.\n`internal` — synthesized by Dial itself (e.g. dashboard test\ntools); the row is real but no SMS was sent over the wire.\n","title":"MessageReceivedEventDataSource"},"MessageReceivedEventData":{"type":"object","properties":{"messageId":{"type":"string","description":"The Dial message id (matches `Message.id`)."},"from":{"type":"string","description":"Who sent it. On a group message, the participant who sent it — not the group."},"to":{"type":["string","null"],"description":"The number it arrived on, and **null when `groupId` is set**: a group message is addressed to the group. Which of your numbers the conversation is on is the message's `phoneNumberId`."},"groupId":{"type":["string","null"],"description":"The group conversation the message belongs to, or null for a one-to-one conversation. A Dial ID (see List groups); filter on it with `filters: { \"groupId\": \"…\" }` when waiting for an event."},"channel":{"$ref":"#/components/schemas/MessageReceivedEventDataChannel","description":"The channel the inbound message arrived on: `sms`, `imessage`, `rcs`, or `whatsapp` (`unknown` when the channel can't be determined)."},"body":{"type":"string"},"replyToId":{"type":["string","null"],"description":"ID of the message this one replies to, reacts to, or votes on. Set on inbound threaded replies, reactions, and poll votes received on iMessage numbers. Null for ordinary messages, or when the target isn't a message on your account."},"reaction":{"type":["string","null"],"description":"The reaction this message carries — a reaction name or an emoji — when the message is a reaction. Null otherwise."},"pollVote":{"oneOf":[{"$ref":"#/components/schemas/MessageReceivedEventDataPollVote"},{"type":"null"}],"description":"Set when the inbound message is a vote on one of your polls: `optionId` and `selected` (`false` is a retracted vote). `replyToId` is the poll message and `body` is empty. Null otherwise."},"source":{"$ref":"#/components/schemas/MessageReceivedEventDataSource","description":"`external` — delivered by a real carrier via the inbound webhook.\n`internal` — synthesized by Dial itself (e.g. dashboard test\ntools); the row is real but no SMS was sent over the wire.\n"}},"required":["messageId","from","to","channel","body","source"],"title":"MessageReceivedEventData"},"CallEndedEventObject":{"type":"string","enum":["event"],"title":"CallEndedEventObject"},"CallEndedEventType":{"type":"string","enum":["call.ended"],"title":"CallEndedEventType"},"CallEndedEventDataDirection":{"type":"string","enum":["inbound","outbound"],"title":"CallEndedEventDataDirection"},"CallEndedEventDataStatus":{"type":"string","enum":["completed","busy","no-answer","failed","canceled","blocked"],"description":"The call's terminal status. `blocked` means an allow list declined the inbound call before it connected.","title":"CallEndedEventDataStatus"},"CallEndedEventData":{"type":"object","properties":{"callId":{"type":"string","description":"The Dial call id (matches `Call.id`)."},"from":{"type":"string"},"to":{"type":"string"},"direction":{"$ref":"#/components/schemas/CallEndedEventDataDirection"},"durationSeconds":{"type":["integer","null"]},"status":{"$ref":"#/components/schemas/CallEndedEventDataStatus","description":"The call's terminal status. `blocked` means an allow list declined the inbound call before it connected."},"blockedByPolicyId":{"type":["string","null"],"description":"The allow list that declined the call when `status` is `blocked`; `null` otherwise."},"canceled":{"type":"boolean","description":"True if the call was cancelled before it ended (dashboard terminate or cancel API) — even if `status` is `completed`."},"transcriptAvailable":{"type":"boolean","description":"Whether a transcript exists. When true, a `call.transcribed` event follows once the transcript is processed."}},"required":["callId","from","to","direction","durationSeconds","status","canceled","transcriptAvailable"],"title":"CallEndedEventData"},"CallTranscribedEventObject":{"type":"string","enum":["event"],"title":"CallTranscribedEventObject"},"CallTranscribedEventType":{"type":"string","enum":["call.transcribed"],"title":"CallTranscribedEventType"},"CallTranscribedEventData":{"type":"object","properties":{"callId":{"type":"string","description":"The Dial call id (matches `Call.id`)."}},"required":["callId"],"title":"CallTranscribedEventData"},"Event":{"oneOf":[{"type":"object","properties":{"type":{"$ref":"#/components/schemas/MessageReceivedEventType"},"id":{"type":"string","description":"Stable event id (also the webhook X-Dial-Event-ID)."},"object":{"$ref":"#/components/schemas/MessageReceivedEventObject"},"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"relatedObject":{"$ref":"#/components/schemas/RelatedObject"},"data":{"$ref":"#/components/schemas/MessageReceivedEventData"}},"required":["type","id","object","version","createdAt","relatedObject","data"],"description":"message.received variant"},{"type":"object","properties":{"type":{"$ref":"#/components/schemas/CallEndedEventType"},"id":{"type":"string","description":"Stable event id (also the webhook X-Dial-Event-ID)."},"object":{"$ref":"#/components/schemas/CallEndedEventObject"},"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"relatedObject":{"$ref":"#/components/schemas/RelatedObject"},"data":{"$ref":"#/components/schemas/CallEndedEventData"}},"required":["type","id","object","version","createdAt","relatedObject","data"],"description":"call.ended variant"},{"type":"object","properties":{"type":{"$ref":"#/components/schemas/CallTranscribedEventType"},"id":{"type":"string","description":"Stable event id (also the webhook X-Dial-Event-ID)."},"object":{"$ref":"#/components/schemas/CallTranscribedEventObject"},"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"relatedObject":{"$ref":"#/components/schemas/RelatedObject"},"data":{"$ref":"#/components/schemas/CallTranscribedEventData"}},"required":["type","id","object","version","createdAt","relatedObject","data"],"description":"call.transcribed variant"}],"discriminator":{"propertyName":"type"},"description":"An account event. Every event shares one envelope — `id`, `object`\n(\"event\"), `type`, `version`, `createdAt`, `relatedObject` — and a\n`data` payload whose shape the `type` selects. Field names are camelCase.\nToday: `message.received` (an inbound SMS), `call.ended` (a call\nfinished), and `call.transcribed` (a call's transcript is ready).\n","title":"Event"},"Events_waitForEvent_Response_200":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event"}},"title":"Events_waitForEvent_Response_200"},"SubscribeToken":{"type":"object","properties":{"subscribeKey":{"type":"string"},"channel":{"type":"string"},"token":{"type":"string"},"ttlSeconds":{"type":"integer"}},"title":"SubscribeToken"},"PolicyType":{"type":"string","enum":["allow_list"],"description":"The kind of policy. `allow_list` is the only type today.","title":"PolicyType"},"PolicyAppliesTo":{"type":"string","enum":["inbound_calls"],"description":"What the policy screens. `inbound_calls` is the only value today: outbound calls and messages are never affected.","title":"PolicyAppliesTo"},"PolicyScope":{"type":"string","enum":["account","numbers"],"description":"`account` covers every number on the account, including numbers added later, except numbers that have an enabled allow list of their own. `numbers` covers only `numberIds`, and on those numbers it replaces the account-wide list.","title":"PolicyScope"},"PolicyEntry":{"type":"object","properties":{"number":{"type":"string","description":"A caller allowed through, in E.164. On input, a number without a leading `+` is accepted only as 10 digits (or `1` followed by 10 digits) and read as a US number; anything else is refused with `400`."},"label":{"type":["string","null"],"maxLength":60,"description":"Who this caller is, for your own reference."}},"required":["number"],"title":"PolicyEntry"},"Policy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":60},"type":{"$ref":"#/components/schemas/PolicyType","description":"The kind of policy. `allow_list` is the only type today."},"appliesTo":{"$ref":"#/components/schemas/PolicyAppliesTo","description":"What the policy screens. `inbound_calls` is the only value today: outbound calls and messages are never affected."},"scope":{"$ref":"#/components/schemas/PolicyScope","description":"`account` covers every number on the account, including numbers added later, except numbers that have an enabled allow list of their own. `numbers` covers only `numberIds`, and on those numbers it replaces the account-wide list."},"numberIds":{"type":"array","items":{"type":"string"},"description":"The phone numbers a `numbers`-scoped policy covers. Always empty for `account` scope. Only numbers that can take calls can be added. A number can be on at most one policy of its own."},"enabled":{"type":"boolean","description":"Whether the policy is screening calls. A disabled policy counts as if it weren't there: its numbers fall back to the account-wide list, if there is one."},"entryCount":{"type":"integer","description":"How many callers are on the list."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEntry"},"description":"The callers allowed through. Present on Get, Create and Update responses and on the entry endpoints; omitted from List."},"blockedCallsLast7Days":{"type":"integer","description":"Inbound calls this policy declined in the last 7 days. Each one is a call record with `status.terminationType` `blocked` and `blockedByPolicyId` set to this policy's `id`."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","description":"Last change to the policy, including changes to its entries."}},"title":"Policy"},"Policies_listPolicies_Response_200":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}}},"title":"Policies_listPolicies_Response_200"},"CreatePolicyRequestType":{"type":"string","enum":["allow_list"],"default":"allow_list","title":"CreatePolicyRequestType"},"CreatePolicyRequestAppliesTo":{"type":"string","enum":["inbound_calls"],"default":"inbound_calls","title":"CreatePolicyRequestAppliesTo"},"CreatePolicyRequestScope":{"type":"string","enum":["account","numbers"],"title":"CreatePolicyRequestScope"},"CreatePolicyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"type":{"$ref":"#/components/schemas/CreatePolicyRequestType","default":"allow_list"},"appliesTo":{"$ref":"#/components/schemas/CreatePolicyRequestAppliesTo","default":"inbound_calls"},"scope":{"$ref":"#/components/schemas/CreatePolicyRequestScope"},"numberIds":{"type":"array","items":{"type":"string"},"description":"Required, and non-empty, when `scope` is `numbers`. Must be omitted or empty for `account`."},"enabled":{"type":"boolean","default":true},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEntry"},"description":"The callers allowed through, up to 10,000. Duplicates are collapsed. Defaults to empty, which declines every inbound call on the covered numbers while the policy is enabled."}},"required":["name","scope"],"title":"CreatePolicyRequest"},"Policies_createPolicy_Response_201":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/Policy"}},"title":"Policies_createPolicy_Response_201"},"Policies_getPolicy_Response_200":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/Policy"}},"title":"Policies_getPolicy_Response_200"},"UpdatePolicyRequestScope":{"type":"string","enum":["account","numbers"],"title":"UpdatePolicyRequestScope"},"UpdatePolicyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"scope":{"$ref":"#/components/schemas/UpdatePolicyRequestScope"},"numberIds":{"type":"array","items":{"type":"string"},"description":"Replaces the covered numbers. Required, and non-empty, when changing `scope` to `numbers`."},"enabled":{"type":"boolean"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEntry"},"description":"Replaces the whole list of allowed callers."}},"title":"UpdatePolicyRequest"},"Policies_updatePolicy_Response_200":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/Policy"}},"title":"Policies_updatePolicy_Response_200"},"AddPolicyEntriesRequest":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEntry"},"description":"Callers to add. The list may hold at most 10,000 callers after the addition."}},"required":["entries"],"title":"AddPolicyEntriesRequest"},"Policies_addPolicyEntries_Response_200":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/Policy"}},"title":"Policies_addPolicyEntries_Response_200"},"RemovePolicyEntriesRequest":{"type":"object","properties":{"numbers":{"type":"array","items":{"type":"string"},"description":"Callers to remove, in E.164."}},"required":["numbers"],"title":"RemovePolicyEntriesRequest"},"Policies_removePolicyEntries_Response_200":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/Policy"}},"title":"Policies_removePolicyEntries_Response_200"},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"string"},"targetUrl":{"type":"string","format":"uri"},"eventTypes":{"type":"array","items":{"type":"string"},"description":"[\"*\"] for all events, or explicit types."},"secretMasked":{"type":"string","description":"Masked secret. Full value via the create response or the /secret endpoint."},"phoneNumberIds":{"type":["array","null"],"items":{"type":"string"},"description":"`null` when the webhook covers every number on the account. A list when it covers only those numbers; each entry is the `id` of a number from `GET /api/v1/numbers`. Numbers that have been released are left out, so the list can be empty: every chosen number was released, and the webhook receives nothing until you edit it."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"The custom headers sent with every delivery, with masked values: the first and last four characters of a value 12 characters or longer, otherwise fully hidden. `{}` when there are none."},"queryParams":{"type":"object","additionalProperties":{"type":"string"},"description":"The custom query parameters added to every delivery, masked the same way as `headers`. `{}` when there are none."},"lastPingSucceededAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"title":"WebhookSubscription"},"Webhooks_listWebhooks_Response_200":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}},"title":"Webhooks_listWebhooks_Response_200"},"CreateWebhookRequestEventTypesItems":{"type":"string","enum":["message.received","message.status_changed","call.status_changed","call.ended","call.transcribed","number.status_changed","*"],"title":"CreateWebhookRequestEventTypesItems"},"WebhookCustomHeaders":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":2048},"description":"Headers added to every delivery, as `{ \"Name\": \"value\" }`. Names must be valid HTTP header names (at most 256 characters) and are case-insensitive, so each name may appear once. Values are 1 to 2048 printable ASCII characters. Names Dial sets itself are rejected with `400`: `Content-Type`, `Content-Length`, `Content-Encoding`, `Content-Digest`, `Host`, `Signature`, `Signature-Input`, `Signature-Agent`, any `X-Dial-*` header, and hop-by-hop headers (`Connection`, `Keep-Alive`, `Transfer-Encoding`, `Upgrade`, `TE`, `Trailer`, `Expect`, `Proxy-Authorization`, `Proxy-Connection`). At most 20 headers.","title":"WebhookCustomHeaders"},"WebhookQueryParams":{"type":"object","additionalProperties":{"type":"string","maxLength":2048},"description":"Query parameters added to `targetUrl` on every delivery, as `{ \"key\": \"value\" }`, URL-encoded by Dial. A key that's also in `targetUrl`'s own query string takes this value instead. Keys are 1 to 256 characters; values up to 2048 characters and may be empty. At most 20 parameters.","title":"WebhookQueryParams"},"CreateWebhookRequest":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri","description":"HTTPS only; not a private/loopback host."},"eventTypes":{"type":"array","items":{"$ref":"#/components/schemas/CreateWebhookRequestEventTypesItems"}},"phoneNumberIds":{"type":["array","null"],"items":{"type":"string"},"description":"Limit the webhook to these numbers. Omit it or send `null` for every number on the account. Each entry is the `id` from `GET /api/v1/numbers`. An empty list, or an id that isn't one of your active numbers, is rejected with `400`."},"headers":{"oneOf":[{"$ref":"#/components/schemas/WebhookCustomHeaders"},{"type":"null"}],"description":"Custom headers to send with every delivery, e.g. an `Authorization` header your endpoint checks. Stored encrypted and returned masked."},"queryParams":{"oneOf":[{"$ref":"#/components/schemas/WebhookQueryParams"},{"type":"null"}],"description":"Custom query parameters to add to `targetUrl` on every delivery. Stored encrypted and returned masked."}},"required":["targetUrl","eventTypes"],"title":"CreateWebhookRequest"},"Webhooks_createWebhook_Response_201":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookSubscription"}},"title":"Webhooks_createWebhook_Response_201"},"Webhooks_getWebhook_Response_200":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookSubscription"}},"title":"Webhooks_getWebhook_Response_200"},"UpdateWebhookRequestEventTypesItems":{"type":"string","enum":["message.received","message.status_changed","call.status_changed","call.ended","call.transcribed","number.status_changed","*"],"title":"UpdateWebhookRequestEventTypesItems"},"UpdateWebhookRequest":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri","description":"HTTPS only; not a private/loopback host."},"eventTypes":{"type":"array","items":{"$ref":"#/components/schemas/UpdateWebhookRequestEventTypesItems"}},"phoneNumberIds":{"type":["array","null"],"items":{"type":"string"},"description":"Replace the numbers the webhook covers. Send `null` to cover every number on the account again; omit it to leave the numbers unchanged. An empty list, or an id that isn't one of your active numbers, is rejected with `400`."},"headers":{"oneOf":[{"$ref":"#/components/schemas/WebhookCustomHeaders"},{"type":"null"}],"description":"Replace the webhook's custom headers with this set. Send `null` or `{}` to remove them all; omit it to leave them unchanged. Stored values are never returned, so send every header you want to keep."},"queryParams":{"oneOf":[{"$ref":"#/components/schemas/WebhookQueryParams"},{"type":"null"}],"description":"Replace the webhook's custom query parameters with this set. Send `null` or `{}` to remove them all; omit it to leave them unchanged."}},"description":"Send at least one field. Fields you omit are left unchanged.","title":"UpdateWebhookRequest"},"Webhooks_updateWebhook_Response_200":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookSubscription"}},"title":"Webhooks_updateWebhook_Response_200"},"Webhooks_revealWebhookSecret_Response_200":{"type":"object","properties":{"secret":{"type":"string"}},"title":"Webhooks_revealWebhookSecret_Response_200"},"Webhooks_fireWebhookPing_Response_202":{"type":"object","properties":{"eventId":{"type":"string"}},"title":"Webhooks_fireWebhookPing_Response_202"},"ContextMcpAuthMode":{"type":"string","enum":["none","static","oauth"],"description":"How the server authenticates, detected on connect. `none`: unauthenticated. `static`: fixed headers you supplied. `oauth`: OAuth 2.1, with tokens managed by Dial.","title":"ContextMcpAuthMode"},"ContextMcpStatus":{"type":"string","enum":["pending_auth","connected","error"],"description":"`pending_auth`: awaiting OAuth consent. `connected`: tools are wired to the agent. `error`: connection or token refresh failed (see `lastError`).","title":"ContextMcpStatus"},"ContextMcp":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"The MCP server URL."},"authMode":{"$ref":"#/components/schemas/ContextMcpAuthMode","description":"How the server authenticates, detected on connect. `none`: unauthenticated. `static`: fixed headers you supplied. `oauth`: OAuth 2.1, with tokens managed by Dial."},"status":{"$ref":"#/components/schemas/ContextMcpStatus","description":"`pending_auth`: awaiting OAuth consent. `connected`: tools are wired to the agent. `error`: connection or token refresh failed (see `lastError`)."},"toolCount":{"type":"integer","description":"Number of MCP tools wired into the agent."},"timeoutMs":{"type":["integer","null"],"description":"Connection timeout in ms; null uses the default (120000)."},"headersMasked":{"type":"object","additionalProperties":{"type":"string"},"description":"Extra static request headers, with values masked. The OAuth-managed `Authorization` header is never returned."},"queryParams":{"type":"object","additionalProperties":{"type":"string"},"description":"Query parameters appended to the connection URL, with values masked."},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"title":"ContextMcp"},"Context_MCP_listContextMcps_Response_200":{"type":"object","properties":{"contextMcps":{"type":"array","items":{"$ref":"#/components/schemas/ContextMcp"}}},"title":"Context MCP_listContextMcps_Response_200"},"CreateContextMcpRequest":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the connection."},"url":{"type":"string","format":"uri","description":"HTTPS MCP server URL (http allowed only for localhost in development)."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Extra static headers to send on every connection. For an OAuth-protected server, any `Authorization` header you set is ignored — Dial manages it."},"queryParams":{"type":"object","additionalProperties":{"type":"string"},"description":"Query parameters to append to the connection URL."},"timeoutMs":{"type":"integer","description":"Connection timeout in ms. Defaults to 120000."}},"required":["name","url"],"title":"CreateContextMcpRequest"},"Context_MCP_createContextMcp_Response_201":{"type":"object","properties":{"contextMcp":{"$ref":"#/components/schemas/ContextMcp"},"authorizationUrl":{"type":["string","null"],"format":"uri","description":"Present only for OAuth-protected servers. Open in a browser to grant consent and finish connecting."}},"required":["contextMcp"],"title":"Context MCP_createContextMcp_Response_201"},"Context_MCP_getContextMcp_Response_200":{"type":"object","properties":{"contextMcp":{"$ref":"#/components/schemas/ContextMcp"}},"title":"Context MCP_getContextMcp_Response_200"},"SelfHostedAccess":{"type":"string","enum":["none","pending","granted","denied"],"description":"Whether this account may configure Self-Hosted mode. Self-Hosted lets a third-party server drive live calls, so accounts are approved before they can point calls at one.\n\n`none` — no access and no request on file; submit one with the `request_access` action. `pending` — a request is awaiting review. `granted` — you may `save` and `activate` freely. `denied` — the request was reviewed and turned down; `accessRequest.reviewNote` says why.\n\nAccounts that already had Self-Hosted before approval was introduced are `granted` — nothing changed for them.","title":"SelfHostedAccess"},"SelfHostedAccessRequestStatus":{"type":"string","enum":["pending","approved","denied"],"description":"Where this particular request landed.","title":"SelfHostedAccessRequestStatus"},"SelfHostedAccessRequest":{"type":"object","properties":{"useCase":{"type":"string","description":"What you told us you plan to build on Self-Hosted mode."},"companyUrl":{"type":["string","null"],"description":"The company or project URL you supplied, if any."},"status":{"$ref":"#/components/schemas/SelfHostedAccessRequestStatus","description":"Where this particular request landed."},"submittedAt":{"type":"string","format":"date-time"},"reviewedAt":{"type":["string","null"],"format":"date-time"},"reviewNote":{"type":["string","null"],"description":"The reviewer's note — the reason shown when a request is denied."}},"required":["useCase","status","submittedAt"],"description":"An access request you submitted, and how it was reviewed.","title":"SelfHostedAccessRequest"},"SelfHostedConfigActiveMode":{"type":"string","enum":["llm","audio"],"description":"Which mode drives calls when `enabled`: `\"llm\"` (Dial runs voice; your server drives the conversation in text) or `\"audio\"` (Dial pipes the raw call audio to your server, full duplex).","title":"SelfHostedConfigActiveMode"},"SelfHostedLlmConfigType":{"type":"string","enum":["llm"],"title":"SelfHostedLlmConfigType"},"SelfHostedLlmConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SelfHostedLlmConfigType"},"wsUrl":{"type":"string","format":"uri","description":"The `wss://` URL of the server Dial connects to for each call."},"urlKey":{"type":"string","description":"The unguessable per-account path segment Dial uses when connecting. Stable once the URL is first set."},"secretMasked":{"type":"string","description":"A masked preview of the signing secret (`shs_••••••••<last4>`). Copy the full value from `GET /api/v1/self-hosted/secret?mode=llm`."}},"required":["type","wsUrl","urlKey","secretMasked"],"description":"The LLM variant — Dial handles telephony, speech-to-text, and text-to-speech; your server answers with the agent's text turns over the Self-hosted LLM protocol.","title":"SelfHostedLlmConfig"},"SelfHostedAudioConfigType":{"type":"string","enum":["audio"],"title":"SelfHostedAudioConfigType"},"SelfHostedPipecatCloud":{"type":"object","properties":{"agentName":{"type":"string","description":"The Pipecat Cloud agent name."},"publicKeyMasked":{"type":"string","description":"A masked preview of the key (`pk_••••••••<last4>`)."}},"required":["agentName","publicKeyMasked"],"description":"A Pipecat Cloud agent target, as stored. The key is secret and only ever returned masked.","title":"SelfHostedPipecatCloud"},"SelfHostedAudioFormat":{"type":"string","enum":["mulaw_8000","alaw_8000","l16_8000","l16_16000","l16_24000"],"description":"An audio-pipe format: G.711 μ-law/A-law at 8 kHz, or 16-bit little-endian linear PCM at 8/16/24 kHz. Defaults to `mulaw_8000`.","title":"SelfHostedAudioFormat"},"SelfHostedAudioConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SelfHostedAudioConfigType"},"wsUrl":{"type":["string","null"],"format":"uri","description":"The `wss://` URL of the server Dial connects to for each call, or `null` when the target is a Pipecat Cloud agent (`pipecatCloud`)."},"pipecatCloud":{"oneOf":[{"$ref":"#/components/schemas/SelfHostedPipecatCloud"},{"type":"null"}],"description":"The Pipecat Cloud agent Dial connects to for each call, or `null` when the target is `wsUrl`. Exactly one of the two is set."},"secretMasked":{"type":"string","description":"A masked preview of the signing secret (`shs_••••••••<last4>`). Copy the full value from `GET /api/v1/self-hosted/secret?mode=audio`."},"audioInboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"},"audioOutboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"}},"required":["type","wsUrl","pipecatCloud","secretMasked","audioInboundFormat","audioOutboundFormat"],"description":"The audio variant — Dial pipes the raw call audio to your server, full duplex, over the Self-hosted audio protocol. Your server brings the entire voice stack.","title":"SelfHostedAudioConfig"},"SelfHostedConfig":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether Self-Hosted mode is currently driving the account's calls."},"access":{"$ref":"#/components/schemas/SelfHostedAccess"},"accessRequest":{"oneOf":[{"$ref":"#/components/schemas/SelfHostedAccessRequest"},{"type":"null"}],"description":"Your most recent access request, or `null` if you have never submitted one (including accounts that already have access without asking)."},"activeMode":{"$ref":"#/components/schemas/SelfHostedConfigActiveMode","description":"Which mode drives calls when `enabled`: `\"llm\"` (Dial runs voice; your server drives the conversation in text) or `\"audio\"` (Dial pipes the raw call audio to your server, full duplex)."},"llm":{"oneOf":[{"$ref":"#/components/schemas/SelfHostedLlmConfig"},{"type":"null"}],"description":"The LLM-mode config, or `null` until that mode is configured."},"audio":{"oneOf":[{"$ref":"#/components/schemas/SelfHostedAudioConfig"},{"type":"null"}],"description":"The audio-mode config, or `null` until that mode is configured."}},"required":["enabled","access","activeMode"],"description":"The account's Self-Hosted configuration. Each mode owns an **independent** config (`llm` and `audio`), both readable at once; `activeMode` is which one drives calls when `enabled`.","title":"SelfHostedConfig"},"SelfHostedSaveActionAction":{"type":"string","enum":["save"],"title":"SelfHostedSaveActionAction"},"SelfHostedLlmConfigInputType":{"type":"string","enum":["llm"],"title":"SelfHostedLlmConfigInputType"},"SelfHostedAudioUrlConfigInputType":{"type":"string","enum":["audio"],"title":"SelfHostedAudioUrlConfigInputType"},"SelfHostedAudioUrlConfigInput":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SelfHostedAudioUrlConfigInputType"},"wsUrl":{"type":"string","format":"uri","description":"The `wss://` URL Dial connects to for each call."},"audioInboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"},"audioOutboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"}},"required":["type","wsUrl"],"description":"Connect calls to a WebSocket server you host.","title":"SelfHostedAudioUrlConfigInput"},"SelfHostedAudioPipecatCloudConfigInputType":{"type":"string","enum":["audio"],"title":"SelfHostedAudioPipecatCloudConfigInputType"},"SelfHostedPipecatCloudInput":{"type":"object","properties":{"agentName":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$","description":"The Pipecat Cloud agent name, as in your `pcc-deploy.toml`."},"publicKey":{"type":"string","pattern":"^pk_","description":"Your Pipecat Cloud public API key (`pk_…`). Treat it as a **secret**: anyone who has it can start sessions on your agent, so never share it or put it in client-side code. Dial stores it encrypted and only ever returns it masked."}},"required":["agentName","publicKey"],"description":"Connect calls to an agent on Pipecat Cloud, with its WebSocket token auth left on. Before every connection (including a reconnect mid-call) Dial calls the agent's `/start` endpoint with this key and connects with the single-use token it returns.","title":"SelfHostedPipecatCloudInput"},"SelfHostedAudioPipecatCloudConfigInput":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SelfHostedAudioPipecatCloudConfigInputType"},"pipecatCloud":{"$ref":"#/components/schemas/SelfHostedPipecatCloudInput"},"audioInboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"},"audioOutboundFormat":{"$ref":"#/components/schemas/SelfHostedAudioFormat"}},"required":["type","pipecatCloud"],"description":"Connect calls to an agent on Pipecat Cloud.","title":"SelfHostedAudioPipecatCloudConfigInput"},"SelfHostedConfigInput":{"oneOf":[{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SelfHostedLlmConfigInputType"},"wsUrl":{"type":"string","format":"uri","description":"The `wss://` URL Dial connects to for each call."}},"required":["type","wsUrl"],"description":"llm variant"},{"type":"object","properties":{"type":{"type":"string","enum":["audio"],"description":"Discriminator value: audio"}},"required":["type"],"description":"The audio mode's config. Set **exactly one** target: `wsUrl` (a server you host) or `pipecatCloud` (an agent on Pipecat Cloud). Sending both, or neither, returns `400`. Saving one target clears the other."}],"discriminator":{"propertyName":"type"},"description":"A mode's config, tagged by `type` (the mode).","title":"SelfHostedConfigInput"},"SelfHostedActivateActionAction":{"type":"string","enum":["activate"],"title":"SelfHostedActivateActionAction"},"SelfHostedDisableActionAction":{"type":"string","enum":["disable"],"title":"SelfHostedDisableActionAction"},"SelfHostedRequestAccessActionAction":{"type":"string","enum":["request_access"],"title":"SelfHostedRequestAccessActionAction"},"SelfHostedAction":{"oneOf":[{"type":"object","properties":{"action":{"$ref":"#/components/schemas/SelfHostedSaveActionAction"},"config":{"$ref":"#/components/schemas/SelfHostedConfigInput"}},"required":["action","config"],"description":"Persist a mode's config. Does **not** change which mode is active or whether Self-Hosted is on. The signing secret (and, for `llm`, the `urlKey`) is minted the first time a mode is saved."},{"type":"object","properties":{"action":{"$ref":"#/components/schemas/SelfHostedActivateActionAction"},"config":{"$ref":"#/components/schemas/SelfHostedConfigInput"}},"required":["action","config"],"description":"A `save` (same `config` body) that **also** enables Self-Hosted and routes calls through `config.type` — enable, or switch from the other mode. Affects new calls only."},{"type":"object","properties":{"action":{"$ref":"#/components/schemas/SelfHostedDisableActionAction"}},"required":["action"],"description":"Turn Self-Hosted off. Both modes' configs are kept."},{"type":"object","properties":{"action":{"$ref":"#/components/schemas/SelfHostedRequestAccessActionAction"},"useCase":{"type":"string","minLength":30,"maxLength":2000,"description":"What you plan to build: who you'll be calling or messaging, and why your own server needs to drive the conversation. Reviewed by a human, so specifics get approved faster than a one-liner."},"companyUrl":{"type":"string","format":"uri","description":"Your company or project URL. Optional, but it speeds up review."}},"required":["action","useCase"],"description":"Ask for approval to use Self-Hosted mode. Valid only while `access` is `none` or `denied` — a `pending` request must be reviewed first, and a `granted` account has nothing to ask for. Returns the configuration with `access` moved to `pending`."}],"discriminator":{"propertyName":"action"},"description":"One Self-Hosted state transition, tagged by `action`: `save` (persist a mode's config), `activate` (a `save` that also enables/switches to that mode), `disable` (turn off), or `request_access` (ask for approval to use Self-Hosted at all).","title":"SelfHostedAction"},"ApiV1SelfHostedSecretGetParametersMode":{"type":"string","enum":["llm","audio"],"title":"ApiV1SelfHostedSecretGetParametersMode"},"Self-Hosted_revealSelfHostedSecret_Response_200":{"type":"object","properties":{"secret":{"type":"string","description":"The HMAC signing secret used to verify `X-Dial-Signature`."}},"required":["secret"],"title":"Self-Hosted_revealSelfHostedSecret_Response_200"},"AccountMemberRole":{"type":"string","enum":["owner","member"],"title":"AccountMemberRole"},"AccountMemberStatus":{"type":"string","enum":["pending","active"],"description":"`pending` until the invitation is accepted. A pending member has no API key and no access. The owner is always `active`.","title":"AccountMemberStatus"},"AccountMember":{"type":"object","properties":{"id":{"type":["string","null"],"description":"The membership id, used to remove the member. Always `null` for the owner, who is the account's own email address and cannot be removed."},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/AccountMemberRole"},"status":{"$ref":"#/components/schemas/AccountMemberStatus","description":"`pending` until the invitation is accepted. A pending member has no API key and no access. The owner is always `active`."},"invitedByEmail":{"type":["string","null"],"format":"email","description":"Who sent the invitation. Null for the owner."},"invitedAt":{"type":["string","null"],"format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time","description":"When the invitation was accepted, or null while pending."},"lastActiveAt":{"type":["string","null"],"format":"date-time","description":"When this member's API key was last used, or null if never used."}},"required":["id","email","role","status"],"title":"AccountMember"},"Members_listMembers_Response_200":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/AccountMember"}}},"required":["members"],"title":"Members_listMembers_Response_200"},"InviteMemberRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The address to invite. The invitation is locked to it."}},"required":["email"],"title":"InviteMemberRequest"},"Members_inviteMember_Response_201":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/AccountMember"}},"required":["member"],"title":"Members_inviteMember_Response_201"},"MemberInvite":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The address this invitation was issued to."},"invitedByEmail":{"type":"string","format":"email","description":"Who sent the invitation."},"expiresAt":{"type":"string","format":"date-time"}},"required":["email","invitedByEmail","expiresAt"],"title":"MemberInvite"},"Members_getMemberInvite_Response_200":{"type":"object","properties":{"invite":{"$ref":"#/components/schemas/MemberInvite"}},"required":["invite"],"title":"Members_getMemberInvite_Response_200"},"AcceptMemberInviteRequest":{"type":"object","properties":{"verificationId":{"type":"string","description":"The `verificationId` returned by Create an account for the invited address."},"code":{"type":"string","minLength":6,"maxLength":6,"description":"The 6-digit code emailed to the invited address."}},"required":["verificationId","code"],"title":"AcceptMemberInviteRequest"},"Members_acceptMemberInvite_Response_200":{"type":"object","properties":{"accountId":{"type":"string","description":"The account the caller has joined."},"apiKey":{"type":"string","description":"The member's own API key. Shown once."},"member":{"$ref":"#/components/schemas/AccountMember"}},"required":["accountId","apiKey","member"],"title":"Members_acceptMemberInvite_Response_200"},"MembershipRole":{"type":"string","enum":["owner","member"],"description":"Your role in that account.","title":"MembershipRole"},"Membership":{"type":"object","properties":{"accountId":{"type":"string"},"accountEmail":{"type":"string","format":"email","description":"The owner's address, which identifies the account."},"role":{"$ref":"#/components/schemas/MembershipRole","description":"Your role in that account."}},"required":["accountId","accountEmail","role"],"title":"Membership"},"Members_listMemberships_Response_200":{"type":"object","properties":{"memberships":{"type":"array","items":{"$ref":"#/components/schemas/Membership"}}},"required":["memberships"],"title":"Members_listMemberships_Response_200"},"Members_getMembershipKey_Response_200":{"type":"object","properties":{"accountId":{"type":"string"},"apiKey":{"type":"string"}},"required":["accountId","apiKey"],"title":"Members_getMembershipKey_Response_200"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your Dial API key, sent as `Authorization: Bearer sk_live_...`"}},"headers":{"Deprecation":{"description":"Present only when this endpoint is deprecated (RFC 9745): when the deprecation took effect, as `@<unix-seconds>`. The endpoint keeps working until the `Sunset` date. See https://docs.getdial.ai/documentation/reference/versioning.","required":false,"schema":{"type":"string","example":"@1798761600"}},"Sunset":{"description":"Present only when this endpoint is deprecated (RFC 8594): the HTTP date after which it stops working, at least 6 months after the deprecation was announced.","required":false,"schema":{"type":"string","example":"Sat, 01 Jul 2028 00:00:00 GMT"}}}},"x-api-lifecycle":{"versioning":"url-path","deprecationPolicy":"https://docs.getdial.ai/documentation/reference/versioning","minimumDeprecationNotice":"P6M","deprecationHeaders":["Deprecation","Sunset"]},"security":[{"bearerAuth":[]}]}