{"openapi":"3.1.0","info":{"title":"OpenPhn API","description":"Agentic voice calls with structured outcome extraction.\n\nAuthenticate with `Authorization: Bearer sk_live_...` on all endpoints except `/auth/signup`, `/auth/login`, and the public `/webhooks/twilio/*` callbacks.","version":"0.1.0"},"paths":{"/auth/signup":{"post":{"tags":["auth"],"summary":"Create an account","description":"Creates a user and returns the initial API key. The key is shown **once**.","operationId":"signup_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Session login","description":"Email/password login. Returns a JWT valid for 24 hours.\n\nRate-limited to 10 attempts per 5 minutes per IP to blunt brute force.","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Revoke a session token","description":"Adds the JWT `jti` to the revocation blocklist until natural expiry.\n\nStateless tokens can't otherwise be invalidated; the blocklist persists the\nrevocation in Redis and is checked by session-auth dependencies.","operationId":"logout_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Current user","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/auth/api-keys":{"get":{"tags":["auth"],"summary":"List your API keys (without raw values)","description":"Returns a redacted view of every key on the account — only the\nprefix and metadata, never the raw key. Use this to audit which\nkeys exist before revoking any.","operationId":"list_api_keys_auth_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}}}},"post":{"tags":["auth"],"summary":"Generate a new API key","description":"Generate a new API key. The raw key is returned once and never stored.\n\nAccepts an optional body to scope the key to a subset of permissions\nand/or specific Numbers. An empty body or omitted body produces a\nbackcompat all-permissions key (scopes=NULL, number_ids=NULL).","operationId":"create_api_key_auth_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateApiKeyRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys/{key_id}/rotate":{"post":{"tags":["auth"],"summary":"Rotate an API key (24h grace window)","description":"Mint a new key with the same scope + number_ids. Set the old key's\nexpires_at to now+24h. Usage of the old key during the grace window\nwrites an `api_key.rotated_key_used` audit event.","operationId":"rotate_api_key_auth_api_keys__key_id__rotate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-email":{"post":{"tags":["auth"],"summary":"Complete email verification","operationId":"verify_email_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend the verification email","description":"Always returns 200 to avoid user enumeration. Rate-limit managed\nimplicitly by the 60-min Resend free-tier quota.","operationId":"resend_verification_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Request a password reset email","description":"Generates a 1-hour reset token and emails a link. Always returns\n`{status: \"ok\"}` regardless of whether the email exists, to prevent\naccount enumeration.\n\nRate-limited per IP (shared with login).","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Complete a password reset","description":"Exchange a valid reset token for a new password. The token is single-use\nand invalidated on success.","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke an API key","description":"Soft-revokes — the key stops authenticating but the record is retained.","operationId":"revoke_api_key_auth_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls":{"post":{"tags":["calls"],"summary":"Create Call","operationId":"create_call_v1_calls_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["calls"],"summary":"List Calls","operationId":"list_calls_v1_calls_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/batch":{"post":{"tags":["calls"],"summary":"Create a batch of calls in one request","description":"Validate every item up-front (consent / phone format / suppression /\ncall hours), then dispatch the accepted ones via the same path as the\nsingle-call endpoint. Returns a per-item result so the caller can see\nexactly which numbers went through and which were rejected.\n\nHard limit: 200 items per batch.","operationId":"create_batch_v1_calls_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCallRequest"}}},"required":true},"responses":{"207":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}":{"get":{"tags":["calls"],"summary":"Get Call","operationId":"get_call_v1_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/export.csv":{"get":{"tags":["calls"],"summary":"Export calls as CSV","description":"Stream the user's calls as a CSV file.\n\nColumns: call_id, created_at, to, from, objective, status, confidence,\nduration_seconds, cost_total, error_code, recording_url.","operationId":"export_calls_csv_v1_calls_export_csv_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/inbound":{"post":{"tags":["twilio"],"summary":"Inbound Endpoint","description":"Twilio routes inbound PSTN calls here. We look up the Number row by\ndialled number, then return TwiML connecting to our Media Stream with a\nper-call context token carrying the number_id so the WS side can load\nthe greeting/persona/schema.","operationId":"inbound_endpoint_webhooks_twilio_inbound_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_inbound_endpoint_webhooks_twilio_inbound_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/twiml/{call_id}":{"get":{"tags":["twilio"],"summary":"Twiml Endpoint","description":"Return TwiML telling Twilio to open a Media Stream to us.\n\nTwilio drops query strings from the Stream URL, so the auth token is\npassed as a custom <Parameter>. It arrives in the WebSocket's `start`\nevent as `start.customParameters.token`.","operationId":"twiml_endpoint_webhooks_twilio_twiml__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["twilio"],"summary":"Twiml Endpoint","description":"Return TwiML telling Twilio to open a Media Stream to us.\n\nTwilio drops query strings from the Stream URL, so the auth token is\npassed as a custom <Parameter>. It arrives in the WebSocket's `start`\nevent as `start.customParameters.token`.","operationId":"twiml_endpoint_webhooks_twilio_twiml__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/recording/{call_id}":{"post":{"tags":["twilio"],"summary":"Recording Callback","description":"Twilio posts here when a recording is available.\n\nWe store the `.mp3` URL so the dashboard can link to it. Twilio requires\nauthentication to fetch the actual media (Basic auth with Account SID +\nAuth Token) — we don't proxy or re-host, just expose the URL.","operationId":"recording_callback_webhooks_twilio_recording__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_recording_callback_webhooks_twilio_recording__call_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/status/{call_id}":{"post":{"tags":["twilio"],"summary":"Status Callback","description":"Twilio posts call lifecycle events here.\n\nAnsweredBy is populated once machine-detection finishes. Values:\n  - `human` — a person picked up, continue as normal\n  - `machine_start` / `machine_end_beep` / `machine_end_silence` /\n    `machine_end_other` — voicemail / answering machine. We abandon\n    the call so we don't waste audio on a beep or leave a message.\n  - `fax` — fax machine. Same abandon.\n  - `unknown` — AMD timed out without a decision. Default to treating\n    as human (better than dropping a real call).\n  - `no_answer` — rare status when AMD detects pure silence.","operationId":"status_callback_webhooks_twilio_status__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_status_callback_webhooks_twilio_status__call_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/transfer/{call_id}":{"post":{"tags":["twilio"],"summary":"Transfer Entry","operationId":"transfer_entry_webhooks_twilio_transfer__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"dest","in":"query","required":false,"schema":{"type":"string","default":"0","title":"Dest"}},{"name":"brief","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brief"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/transfer-whisper/{call_id}":{"post":{"tags":["twilio"],"summary":"Transfer Whisper","operationId":"transfer_whisper_webhooks_twilio_transfer_whisper__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"brief","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brief"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/transfer-action/{call_id}":{"post":{"tags":["twilio"],"summary":"Transfer Action","operationId":"transfer_action_webhooks_twilio_transfer_action__call_id__post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"dest","in":"query","required":false,"schema":{"type":"string","default":"0","title":"Dest"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_transfer_action_webhooks_twilio_transfer_action__call_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/twilio/sms/status/{send_id}":{"post":{"tags":["webhooks"],"summary":"Sms Status Callback","operationId":"sms_status_callback_webhooks_twilio_sms_status__send_id__post","parameters":[{"name":"send_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Send Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_sms_status_callback_webhooks_twilio_sms_status__send_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List your active webhooks","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWebhooksResponse"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a webhook endpoint","description":"Register a URL to receive call events. Returns the signing secret **once**.","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"Recent delivery attempts for a webhook","description":"Returns the most recent delivery attempts, newest first. Includes retries.","operationId":"list_deliveries_v1_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry":{"post":{"tags":["webhooks"],"summary":"Retry a past webhook delivery","description":"Rebuild the payload from the call's current state and re-attempt delivery.\n\nGoes through the full retry chain (5s, 30s, 120s on 5xx/transport errors).\nEach attempt is logged to `webhook_deliveries`. The response reflects the\nfirst attempt's synchronous outcome; subsequent retries run in the\nbackground.","operationId":"retry_delivery_v1_webhooks__webhook_id__deliveries__delivery_id__retry_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete a webhook endpoint","description":"Soft-deletes — the webhook stops receiving events but the record is retained.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/providers/twilio/verify":{"post":{"tags":["providers"],"summary":"Verify and store Twilio credentials","description":"Validates Twilio credentials by calling the Twilio API, encrypts them, and\nstores them. Returns all phone numbers on the account.","operationId":"verify_twilio_v1_providers_twilio_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyTwilioRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyTwilioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/providers/numbers/select":{"post":{"tags":["providers"],"summary":"Set active outbound number","description":"Set the active outbound number used for future calls. Must be a number\nowned by the connected Twilio account.","operationId":"select_number_v1_providers_numbers_select_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectNumberRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectNumberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/providers/{provider}/verify":{"post":{"tags":["providers"],"summary":"Verify and store carrier credentials (vonage / telnyx / sip / twilio)","operationId":"verify_generic_v1_providers__provider__verify_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/providers/{provider}":{"get":{"tags":["providers"],"summary":"Get stored credential metadata (last4 only)","operationId":"get_provider_v1_providers__provider__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VerifyResponse"},{"type":"null"}],"title":"Response Get Provider V1 Providers  Provider  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/suppression":{"get":{"tags":["suppression"],"summary":"List your suppression entries","operationId":"list_suppression_v1_suppression_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSuppressionResponse"}}}}}},"post":{"tags":["suppression"],"summary":"Add numbers to your suppression list","operationId":"add_suppression_v1_suppression_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSuppressionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSuppressionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates":{"get":{"tags":["templates"],"summary":"List your templates","operationId":"list_templates_v1_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TemplateOut"},"type":"array","title":"Response List Templates V1 Templates Get"}}}}}},"post":{"tags":["templates"],"summary":"Save a template","operationId":"create_template_v1_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates/{template_id}":{"get":{"tags":["templates"],"summary":"Fetch a template","operationId":"get_template_v1_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["templates"],"summary":"Delete a template","operationId":"delete_template_v1_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/aup-attest":{"post":{"tags":["tenants"],"summary":"Attest Aup","operationId":"attest_aup_v1_tenants_aup_attest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AUPAttestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wizard/generate":{"post":{"tags":["wizard"],"summary":"Generate","operationId":"generate_v1_wizard_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wizard/provision":{"post":{"tags":["wizard"],"summary":"Provision","operationId":"provision_v1_wizard_provision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/numbers":{"get":{"tags":["numbers"],"summary":"List Numbers","operationId":"list_numbers_v1_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NumberOut"},"type":"array","title":"Response List Numbers V1 Numbers Get"}}}}}}},"/v1/numbers/{number_id}":{"patch":{"tags":["numbers"],"summary":"Update Number","operationId":"update_number_v1_numbers__number_id__patch","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/numbers/{number_id}/greeting/rerender":{"post":{"tags":["numbers"],"summary":"Rerender Greeting","operationId":"rerender_greeting_v1_numbers__number_id__greeting_rerender_post","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/numbers/{number_id}/greeting/audio":{"get":{"tags":["numbers"],"summary":"Get Greeting Audio","operationId":"get_greeting_audio_v1_numbers__number_id__greeting_audio_get","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/push/vapid-key":{"get":{"tags":["push"],"summary":"Get Vapid Key","description":"Public VAPID key for browsers to sign subscriptions with.\n\nNo auth — the key is designed to be public. Returns 404 when VAPID\nis unconfigured so dev/local builds fail fast rather than returning\nan empty string.","operationId":"get_vapid_key_v1_push_vapid_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VapidKeyOut"}}}}}}},"/v1/push/subscribe":{"post":{"tags":["push"],"summary":"Subscribe","description":"Register a browser push subscription for the caller on a tenant number.\n\nIdempotent on (user_id, number_id, endpoint): re-subscribing with the same\ntuple returns 201 with the existing row id rather than 409. Rate-limited\nto 10 / minute / user.","operationId":"subscribe_v1_push_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/push/unsubscribe":{"post":{"tags":["push"],"summary":"Unsubscribe","description":"Remove caller's subscription(s) for a given endpoint. Idempotent —\n204 on both hit and no-op.","operationId":"unsubscribe_v1_push_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/push/delivered":{"post":{"tags":["push"],"summary":"Delivered","description":"Record that the SW surfaced a notification. Updates last_delivered_at\nusing server time (we trust the SW for ordering, not for wall clock).\n\nReturns 404 if the subscription isn't the caller's — defends against a\ncompromised SW trying to update foreign rows.","operationId":"delivered_v1_push_delivered_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveredIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/push/subscriptions":{"get":{"tags":["push"],"summary":"List Subscriptions","description":"Return the caller's subscriptions. Does NOT return the raw endpoint\nstring — treat endpoints as sensitive (they identify a specific device\nto a specific push service).","operationId":"list_subscriptions_v1_push_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionOut"},"type":"array","title":"Response List Subscriptions V1 Push Subscriptions Get"}}}}}}},"/v1/numbers/{number_id}/sms/preview":{"post":{"tags":["sms"],"summary":"Sms Preview","operationId":"sms_preview_v1_numbers__number_id__sms_preview_post","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__sms__PreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}/sms_sends":{"get":{"tags":["sms"],"summary":"List Sms Sends","operationId":"list_sms_sends_v1_calls__call_id__sms_sends_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SmsSendOut"},"title":"Response List Sms Sends V1 Calls  Call Id  Sms Sends Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit-log":{"get":{"tags":["audit-log"],"summary":"List Audit Log","operationId":"list_audit_log_v1_audit_log_get","parameters":[{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"}},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/connections/test-call":{"post":{"tags":["connections"],"summary":"Place Test Call","operationId":"place_test_call_v1_connections_test_call_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallResponse"}}}}}}},"/admin/users":{"get":{"tags":["admin"],"summary":"List users","operationId":"list_users_admin_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/suppression/bulk":{"post":{"tags":["admin"],"summary":"Bulk-add platform-wide suppression entries (federal DNC imports, etc.)","description":"Add numbers to the platform-wide suppression list. Use this for\nimported Federal DNC registry, STIR/SHAKEN flagged numbers, or any\nblocklist that should apply across all users. Deduplicates within\nthe platform-wide scope.","operationId":"bulk_suppress_admin_suppression_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSuppressRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSuppressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/audit-logs":{"get":{"tags":["admin"],"summary":"View audit log entries with filters","operationId":"list_audit_logs_admin_audit_logs_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAuditLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/verify-number":{"post":{"tags":["admin"],"summary":"Manually add a verified number for a user","description":"Bypasses the normal verification flow and adds a VerifiedNumber row\nfor the user. Use when a user can't complete automatic verification\n(e.g. shared line, automated system).","operationId":"verify_number_admin_users__user_id__verify_number_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNumberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_v1_admin_users_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserOut"},"title":"Response List Users V1 Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"Get User","operationId":"get_user_v1_admin_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/approve":{"post":{"tags":["admin"],"summary":"Approve User","operationId":"approve_user_v1_admin_users__user_id__approve_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/reject":{"post":{"tags":["admin"],"summary":"Reject User","operationId":"reject_user_v1_admin_users__user_id__reject_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/suspend":{"post":{"tags":["admin"],"summary":"Suspend User","operationId":"suspend_user_v1_admin_users__user_id__suspend_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserActionReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/promote_admin":{"post":{"tags":["admin"],"summary":"Promote Admin","operationId":"promote_admin_v1_admin_users__user_id__promote_admin_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/demote_admin":{"post":{"tags":["admin"],"summary":"Demote Admin","operationId":"demote_admin_v1_admin_users__user_id__demote_admin_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit":{"get":{"tags":["admin"],"summary":"List Audit","operationId":"list_audit_v1_admin_audit_get","parameters":[{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Audit V1 Admin Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit/verify":{"get":{"tags":["admin"],"summary":"Audit Verify","operationId":"audit_verify_v1_admin_audit_verify_get","parameters":[{"name":"since_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since Id"}},{"name":"until_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Until Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Audit Verify V1 Admin Audit Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/summary":{"get":{"tags":["analytics"],"summary":"Summary","operationId":"summary_v1_analytics_summary_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/volume-by-status":{"get":{"tags":["analytics"],"summary":"Volume By Status","operationId":"volume_by_status_v1_analytics_volume_by_status_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/outcome-quality":{"get":{"tags":["analytics"],"summary":"Outcome Quality","operationId":"outcome_quality_v1_analytics_outcome_quality_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/cost-breakdown":{"get":{"tags":["analytics"],"summary":"Cost Breakdown","operationId":"cost_breakdown_v1_analytics_cost_breakdown_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/latency-percentiles":{"get":{"tags":["analytics"],"summary":"Latency Percentiles","operationId":"latency_percentiles_v1_analytics_latency_percentiles_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/top-failures":{"get":{"tags":["analytics"],"summary":"Top Failures","operationId":"top_failures_v1_analytics_top_failures_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Direction"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flows":{"get":{"tags":["flows"],"summary":"List Flows","operationId":"list_flows_v1_flows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FlowOut"},"type":"array","title":"Response List Flows V1 Flows Get"}}}}}},"post":{"tags":["flows"],"summary":"Create Flow","operationId":"create_flow_v1_flows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flows/{flow_id}":{"get":{"tags":["flows"],"summary":"Get Flow","operationId":"get_flow_v1_flows__flow_id__get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["flows"],"summary":"Update Flow","operationId":"update_flow_v1_flows__flow_id__patch","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["flows"],"summary":"Delete Flow","operationId":"delete_flow_v1_flows__flow_id__delete","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flows/{flow_id}/publish":{"post":{"tags":["flows"],"summary":"Publish Flow","operationId":"publish_flow_v1_flows__flow_id__publish_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/flows/{flow_id}/preview":{"post":{"tags":["flows"],"summary":"Preview Flow","operationId":"preview_flow_v1_flows__flow_id__preview_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__flows__PreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voices":{"get":{"tags":["voices"],"summary":"List Voices","operationId":"list_voices_v1_voices_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoiceOut"},"title":"Response List Voices V1 Voices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dnc/upload":{"post":{"tags":["dnc"],"summary":"Upload","operationId":"upload_v1_dnc_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dnc":{"get":{"tags":["dnc"],"summary":"List Dnc","operationId":"list_dnc_v1_dnc_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Dnc V1 Dnc Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dnc"],"summary":"Purge","operationId":"purge_v1_dnc_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Purge V1 Dnc Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dnc/{entry_id}":{"delete":{"tags":["dnc"],"summary":"Delete Entry","operationId":"delete_entry_v1_dnc__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AUPAttestRequest":{"properties":{"aup_version":{"type":"string","title":"Aup Version"}},"type":"object","required":["aup_version"],"title":"AUPAttestRequest"},"AddSuppressionRequest":{"properties":{"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["phone_numbers"],"title":"AddSuppressionRequest"},"AddSuppressionResponse":{"properties":{"added":{"type":"integer","title":"Added"},"skipped_existing":{"type":"integer","title":"Skipped Existing"}},"type":"object","required":["added","skipped_existing"],"title":"AddSuppressionResponse"},"AdminUserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"is_admin":{"type":"boolean","title":"Is Admin"},"verification_status":{"type":"string","title":"Verification Status"},"verification_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verification Reviewed At"},"verification_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","is_admin","verification_status","verification_reviewed_at","verification_reason","created_at"],"title":"AdminUserOut"},"AdminUserRow":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"tier":{"type":"string","title":"Tier"},"is_admin":{"type":"boolean","title":"Is Admin"},"is_verified":{"type":"boolean","title":"Is Verified"},"has_payment":{"type":"boolean","title":"Has Payment"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","email","tier","is_admin","is_verified","has_payment","use_case","created_at"],"title":"AdminUserRow"},"ApiKeyCreatedResponse":{"properties":{"api_key":{"type":"string","title":"Api Key"},"id":{"type":"string","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["api_key","id","prefix","created_at"],"title":"ApiKeyCreatedResponse"},"ApiKeySummary":{"properties":{"id":{"type":"string","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"number_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Number Ids"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"last_used_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used Ip"}},"type":"object","required":["id","prefix","name","is_active","created_at","scopes","number_ids","expires_at","last_used_at","last_used_ip"],"title":"ApiKeySummary"},"AuditEntry":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"event":{"type":"string","title":"Event"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","user_id","event","details","call_id","created_at"],"title":"AuditEntry"},"AuditLogRow":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"event":{"type":"string","title":"Event"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","user_id","call_id","event","details","created_at"],"title":"AuditLogRow"},"BatchCallItem":{"properties":{"to":{"type":"string","title":"To"},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"outcome_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outcome Schema"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["to"],"title":"BatchCallItem","description":"A single call within a batch. All fields except `to` inherit from\nthe batch-level defaults if omitted."},"BatchCallRequest":{"properties":{"objective":{"type":"string","title":"Objective"},"consent_type":{"type":"string","title":"Consent Type"},"outcome_schema":{"additionalProperties":true,"type":"object","title":"Outcome Schema"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"voice_engine":{"type":"string","title":"Voice Engine","default":"gemini_25"},"language":{"type":"string","title":"Language","default":"en-US"},"items":{"items":{"$ref":"#/components/schemas/BatchCallItem"},"type":"array","title":"Items"}},"type":"object","required":["objective","consent_type","outcome_schema","items"],"title":"BatchCallRequest","description":"Create many calls at once with shared defaults.\n\nEach item must specify `to` and may override any other field.\nPer-item validation failures are reported individually — the rest of\nthe batch still goes through."},"BatchCallResponse":{"properties":{"accepted":{"type":"integer","title":"Accepted"},"rejected":{"type":"integer","title":"Rejected"},"items":{"items":{"$ref":"#/components/schemas/BatchItemResult"},"type":"array","title":"Items"}},"type":"object","required":["accepted","rejected","items"],"title":"BatchCallResponse"},"BatchItemResult":{"properties":{"to":{"type":"string","title":"To"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["to"],"title":"BatchItemResult"},"Body_inbound_endpoint_webhooks_twilio_inbound_post":{"properties":{"To":{"type":"string","title":"To","default":""},"From":{"type":"string","title":"From","default":""},"CallSid":{"type":"string","title":"Callsid","default":""}},"type":"object","title":"Body_inbound_endpoint_webhooks_twilio_inbound_post"},"Body_recording_callback_webhooks_twilio_recording__call_id__post":{"properties":{"RecordingSid":{"type":"string","title":"Recordingsid","default":""},"RecordingUrl":{"type":"string","title":"Recordingurl","default":""},"RecordingStatus":{"type":"string","title":"Recordingstatus","default":""},"RecordingDuration":{"type":"string","title":"Recordingduration","default":""}},"type":"object","title":"Body_recording_callback_webhooks_twilio_recording__call_id__post"},"Body_sms_status_callback_webhooks_twilio_sms_status__send_id__post":{"properties":{"MessageStatus":{"type":"string","title":"Messagestatus"},"MessageSid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Messagesid"},"ErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode"},"ErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errormessage"}},"type":"object","required":["MessageStatus"],"title":"Body_sms_status_callback_webhooks_twilio_sms_status__send_id__post"},"Body_status_callback_webhooks_twilio_status__call_id__post":{"properties":{"CallSid":{"type":"string","title":"Callsid","default":""},"CallStatus":{"type":"string","title":"Callstatus","default":""},"AnsweredBy":{"type":"string","title":"Answeredby","default":""}},"type":"object","title":"Body_status_callback_webhooks_twilio_status__call_id__post"},"Body_transfer_action_webhooks_twilio_transfer_action__call_id__post":{"properties":{"DialCallStatus":{"type":"string","title":"Dialcallstatus","default":""},"DialCallDuration":{"type":"string","title":"Dialcallduration","default":""}},"type":"object","title":"Body_transfer_action_webhooks_twilio_transfer_action__call_id__post"},"BulkSuppressRequest":{"properties":{"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers"},"source":{"type":"string","title":"Source","default":"manual"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["phone_numbers"],"title":"BulkSuppressRequest"},"BulkSuppressResponse":{"properties":{"added":{"type":"integer","title":"Added"},"skipped_existing":{"type":"integer","title":"Skipped Existing"}},"type":"object","required":["added","skipped_existing"],"title":"BulkSuppressResponse"},"CreateApiKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Scopes","description":"Closed vocabulary. None or [] = all permissions."},"number_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Number Ids","description":"UUIDs of Numbers this key may act on. None = all."}},"type":"object","title":"CreateApiKeyRequest"},"CreateCallRequest":{"properties":{"to":{"type":"string","title":"To"},"objective":{"type":"string","title":"Objective"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"outcome_schema":{"additionalProperties":true,"type":"object","title":"Outcome Schema"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"consent_type":{"type":"string","title":"Consent Type"},"voice_engine":{"type":"string","title":"Voice Engine","default":"gemini_25"},"language":{"type":"string","title":"Language","default":"en-US"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"}},"type":"object","required":["to","objective","outcome_schema","consent_type"],"title":"CreateCallRequest"},"CreateWebhookRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"HTTPS endpoint to POST events to"},"events":{"items":{"type":"string"},"type":"array","title":"Events","description":"Event types to subscribe to. Currently only `call.completed`.","default":["call.completed"]}},"type":"object","required":["url"],"title":"CreateWebhookRequest"},"DeliveredIn":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"call_id":{"type":"string","title":"Call Id"},"ts":{"type":"string","title":"Ts"}},"type":"object","required":["subscription_id","call_id","ts"],"title":"DeliveredIn"},"DeliveryRecord":{"properties":{"id":{"type":"string","title":"Id"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"event":{"type":"string","title":"Event"},"attempt":{"type":"integer","title":"Attempt"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attempted_at":{"type":"string","title":"Attempted At"}},"type":"object","required":["id","call_id","event","attempt","status_code","error","attempted_at"],"title":"DeliveryRecord"},"FlowCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"graph_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Json"}},"type":"object","required":["name"],"title":"FlowCreate"},"FlowOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"graph_json":{"additionalProperties":true,"type":"object","title":"Graph Json"},"published_compiled_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Compiled Objective"},"published_compiled_outcome_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Published Compiled Outcome Schema"},"published_compiled_tools":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Published Compiled Tools"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By User Id"},"last_compiled_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Compiled Error"},"used_by_count":{"type":"integer","title":"Used By Count"}},"type":"object","required":["id","name","description","status","graph_json","published_compiled_objective","published_compiled_outcome_schema","published_compiled_tools","published_at","published_by_user_id","last_compiled_error","used_by_count"],"title":"FlowOut"},"FlowUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"graph_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph Json"}},"type":"object","title":"FlowUpdate"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GenerateRequest":{"properties":{"business_description":{"type":"string","maxLength":1000,"minLength":1,"title":"Business Description"}},"type":"object","required":["business_description"],"title":"GenerateRequest"},"GenerateResponse":{"properties":{"verdict":{"type":"string","title":"Verdict"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","required":["verdict"],"title":"GenerateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ListApiKeysResponse":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/ApiKeySummary"},"type":"array","title":"Keys"}},"type":"object","required":["keys"],"title":"ListApiKeysResponse"},"ListAuditLogsResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/AuditLogRow"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["logs","total"],"title":"ListAuditLogsResponse"},"ListAuditResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AuditEntry"},"type":"array","title":"Entries"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["entries","next_cursor"],"title":"ListAuditResponse"},"ListDeliveriesResponse":{"properties":{"deliveries":{"items":{"$ref":"#/components/schemas/DeliveryRecord"},"type":"array","title":"Deliveries"}},"type":"object","required":["deliveries"],"title":"ListDeliveriesResponse"},"ListSuppressionResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/SuppressionEntry"},"type":"array","title":"Entries"}},"type":"object","required":["entries"],"title":"ListSuppressionResponse"},"ListUsersResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/AdminUserRow"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"ListUsersResponse"},"ListWebhooksResponse":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/WebhookSummary"},"type":"array","title":"Webhooks"}},"type":"object","required":["webhooks"],"title":"ListWebhooksResponse"},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"session_token":{"type":"string","title":"Session Token","description":"JWT session token, 24h expiry"}},"type":"object","required":["session_token"],"title":"LoginResponse"},"LogoutRequest":{"properties":{"session_token":{"type":"string","title":"Session Token"}},"type":"object","required":["session_token"],"title":"LogoutRequest"},"MeResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"tier":{"type":"string","title":"Tier"},"has_payment":{"type":"boolean","title":"Has Payment"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"needs_aup":{"type":"boolean","title":"Needs Aup","default":true}},"type":"object","required":["id","email","tier","has_payment"],"title":"MeResponse"},"NumberOut":{"properties":{"id":{"type":"string","title":"Id"},"e164":{"type":"string","title":"E164"},"greeting":{"type":"string","title":"Greeting"},"greeting_voice_id":{"type":"string","title":"Greeting Voice Id"},"greeting_audio_fresh":{"type":"boolean","title":"Greeting Audio Fresh"},"persona":{"type":"string","title":"Persona"},"recording_enabled":{"type":"boolean","title":"Recording Enabled"},"outcome_schema":{"additionalProperties":true,"type":"object","title":"Outcome Schema"},"hours_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours Json"},"timezone":{"type":"string","title":"Timezone"},"overflow_action":{"type":"string","title":"Overflow Action"},"routes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Routes"},"voicemail_mode":{"type":"string","title":"Voicemail Mode"},"voicemail_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voicemail Schema"},"voicemail_persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voicemail Persona"},"sms_enabled":{"type":"boolean","title":"Sms Enabled"},"sms_templates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sms Templates"},"sms_brand_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Brand Id"},"transfer_destinations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Transfer Destinations"},"transfer_max_attempts":{"type":"integer","title":"Transfer Max Attempts"}},"type":"object","required":["id","e164","greeting","greeting_voice_id","greeting_audio_fresh","persona","recording_enabled","outcome_schema","hours_json","timezone","overflow_action","routes","voicemail_mode","voicemail_schema","voicemail_persona","sms_enabled","sms_templates","sms_brand_id","transfer_destinations","transfer_max_attempts"],"title":"NumberOut"},"NumberUpdate":{"properties":{"greeting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting"},"greeting_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Greeting Voice Id"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"recording_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording Enabled"},"hours_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours Json"},"overflow_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overflow Action"},"routes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Routes"},"voicemail_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voicemail Mode"},"voicemail_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voicemail Schema"},"voicemail_persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voicemail Persona"},"sms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Enabled"},"sms_templates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Sms Templates"},"sms_brand_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Brand Id"},"transfer_destinations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transfer Destinations"},"transfer_max_attempts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Max Attempts"}},"type":"object","title":"NumberUpdate"},"PhoneNumber":{"properties":{"number":{"type":"string","title":"Number"},"friendly":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly"}},"type":"object","required":["number"],"title":"PhoneNumber"},"PreviewIn":{"properties":{"template_id":{"type":"string","title":"Template Id"},"mock_outcome":{"additionalProperties":true,"type":"object","title":"Mock Outcome","default":{}},"mock_caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Caller Phone"},"mock_caller_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Caller Name"}},"type":"object","required":["template_id"],"title":"PreviewIn"},"ProvisionRequest":{"properties":{"business_name":{"type":"string","maxLength":200,"minLength":1,"title":"Business Name"},"business_description":{"type":"string","maxLength":1000,"minLength":1,"title":"Business Description"},"area_code":{"type":"string","maxLength":3,"minLength":3,"pattern":"^[0-9]{3}$","title":"Area Code"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"recording_enabled":{"type":"boolean","title":"Recording Enabled","default":false}},"type":"object","required":["business_name","business_description","area_code","config"],"title":"ProvisionRequest"},"ProvisionResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"number":{"additionalProperties":true,"type":"object","title":"Number"}},"type":"object","required":["tenant_id","number"],"title":"ProvisionResponse"},"PurgeBody":{"properties":{"confirm":{"type":"string","title":"Confirm"}},"type":"object","required":["confirm"],"title":"PurgeBody"},"ResendVerifyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerifyRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","minLength":10,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RetryResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"RetryResponse"},"RotateApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"api_key":{"type":"string","title":"Api Key"},"rotated_from":{"type":"string","title":"Rotated From"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","prefix","api_key","rotated_from","created_at"],"title":"RotateApiKeyResponse"},"SelectNumberRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"E.164 phone number, e.g. +15551234567"}},"type":"object","required":["phone_number"],"title":"SelectNumberRequest"},"SelectNumberResponse":{"properties":{"active_number":{"type":"string","title":"Active Number"}},"type":"object","required":["active_number"],"title":"SelectNumberResponse"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":10,"title":"Password","description":"At least 10 characters, including a letter and a number"},"use_case":{"type":"string","title":"Use Case","description":"Brief description of intended use"}},"type":"object","required":["email","password","use_case"],"title":"SignupRequest"},"SignupResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"api_key":{"type":"string","title":"Api Key","description":"Raw API key — shown once, save it"}},"type":"object","required":["user_id","api_key"],"title":"SignupResponse"},"SmsSendOut":{"properties":{"id":{"type":"string","title":"Id"},"template_id":{"type":"string","title":"Template Id"},"template_name":{"type":"string","title":"Template Name"},"to_e164":{"type":"string","title":"To E164"},"from_e164":{"type":"string","title":"From E164"},"body":{"type":"string","title":"Body"},"status":{"type":"string","title":"Status"},"twilio_message_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twilio Message Sid"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"type":"string","title":"Created At"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"failed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failed At"}},"type":"object","required":["id","template_id","template_name","to_e164","from_e164","body","status","twilio_message_sid","error_code","created_at","sent_at","delivered_at","failed_at"],"title":"SmsSendOut"},"StatusResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"StatusResponse"},"SubscribeIn":{"properties":{"number_id":{"type":"string","title":"Number Id"},"endpoint":{"type":"string","title":"Endpoint"},"p256dh":{"type":"string","title":"P256Dh"},"auth":{"type":"string","title":"Auth"},"user_agent":{"type":"string","title":"User Agent"}},"type":"object","required":["number_id","endpoint","p256dh","auth","user_agent"],"title":"SubscribeIn"},"SubscribeOut":{"properties":{"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"SubscribeOut"},"SubscriptionOut":{"properties":{"id":{"type":"string","title":"Id"},"number_id":{"type":"string","title":"Number Id"},"user_agent":{"type":"string","title":"User Agent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Delivered At"}},"type":"object","required":["id","number_id","user_agent","created_at","last_used_at","last_delivered_at"],"title":"SubscriptionOut"},"SuppressionEntry":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["phone_number"],"title":"SuppressionEntry"},"TemplateBody":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"objective":{"type":"string","title":"Objective"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"outcome_schema":{"additionalProperties":true,"type":"object","title":"Outcome Schema"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"consent_type":{"type":"string","title":"Consent Type","default":"prior_express"},"voice_engine":{"type":"string","title":"Voice Engine","default":"gemini_25"},"language":{"type":"string","title":"Language","default":"en-US"}},"type":"object","required":["name","objective","outcome_schema"],"title":"TemplateBody"},"TemplateOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"objective":{"type":"string","title":"Objective"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"outcome_schema":{"additionalProperties":true,"type":"object","title":"Outcome Schema"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"consent_type":{"type":"string","title":"Consent Type","default":"prior_express"},"voice_engine":{"type":"string","title":"Voice Engine","default":"gemini_25"},"language":{"type":"string","title":"Language","default":"en-US"},"id":{"type":"string","title":"Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["name","objective","outcome_schema","id"],"title":"TemplateOut"},"TestCallResponse":{"properties":{"call_id":{"type":"string","title":"Call Id"},"to_number":{"type":"string","title":"To Number"},"status":{"type":"string","title":"Status"}},"type":"object","required":["call_id","to_number","status"],"title":"TestCallResponse"},"UnsubscribeIn":{"properties":{"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["endpoint"],"title":"UnsubscribeIn"},"UploadBody":{"properties":{"entries":{"items":{"type":"string"},"type":"array","title":"Entries"},"source":{"type":"string","enum":["upload","manual","api"],"title":"Source","default":"upload"}},"type":"object","required":["entries"],"title":"UploadBody"},"UploadResult":{"properties":{"added":{"type":"integer","title":"Added"},"skipped":{"type":"integer","title":"Skipped"},"invalid":{"type":"integer","title":"Invalid"}},"type":"object","required":["added","skipped","invalid"],"title":"UploadResult"},"UserActionReason":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"UserActionReason"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VapidKeyOut":{"properties":{"public_key":{"type":"string","title":"Public Key"}},"type":"object","required":["public_key"],"title":"VapidKeyOut"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"VerifyNumberRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number"}},"type":"object","required":["phone_number"],"title":"VerifyNumberRequest"},"VerifyResponse":{"properties":{"status":{"type":"string","title":"Status"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"}},"type":"object","required":["status"],"title":"VerifyResponse"},"VerifyTwilioRequest":{"properties":{"account_sid":{"type":"string","title":"Account Sid","description":"Twilio Account SID (ACxxxxx…)"},"auth_token":{"type":"string","title":"Auth Token","description":"Twilio Auth Token"}},"type":"object","required":["account_sid","auth_token"],"title":"VerifyTwilioRequest"},"VerifyTwilioResponse":{"properties":{"status":{"type":"string","title":"Status"},"account_name":{"type":"string","title":"Account Name"},"phone_numbers":{"items":{"$ref":"#/components/schemas/PhoneNumber"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["status","account_name","phone_numbers"],"title":"VerifyTwilioResponse"},"VoiceOut":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"gender":{"type":"string","title":"Gender"},"language":{"type":"string","title":"Language"},"preview_url":{"type":"string","title":"Preview Url"}},"type":"object","required":["id","provider","display_name","description","gender","language","preview_url"],"title":"VoiceOut"},"WebhookCreatedResponse":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret","description":"HMAC signing secret — shown once, save it"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["id","url","secret","events"],"title":"WebhookCreatedResponse"},"WebhookSummary":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","url","events","is_active"],"title":"WebhookSummary"},"app__api__v1__flows__PreviewOut":{"properties":{"compiled_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compiled Objective"},"compiled_outcome_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compiled Outcome Schema"},"compiled_tools":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Compiled Tools"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["compiled_objective","compiled_outcome_schema","compiled_tools","error"],"title":"PreviewOut"},"app__api__v1__sms__PreviewOut":{"properties":{"would_fire":{"type":"boolean","title":"Would Fire"},"rendered_body":{"type":"string","title":"Rendered Body"}},"type":"object","required":["would_fire","rendered_body"],"title":"PreviewOut"}}}}