Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: ThunderPhone Widget API
version: 1.0.0
description: Programmatic access to the ThunderPhone platform — agents, phone numbers, calls, billing, webhooks, and more. See https://thunderphone.com/docs and https://thunderphone.com/developers for the reference, tutorials and migration guides.
contact:
name: ThunderPhone support
url: https://thunderphone.com/docs
servers:
- url: https://api.thunderphone.com
description: Production
tags:
- name: Widget
paths:
/v1/widget/session:
post:
operationId: widget_session_create
description: Create or run widget / session. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
tags:
- Widget
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WidgetSessionRequestRequest'
security:
- bearerAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WidgetSession'
description: ''
summary: Widget session create
x-summary-source: derived
components:
schemas:
WidgetSessionRequestRequest:
type: object
properties:
variables:
type: object
additionalProperties:
oneOf:
- type: string
- type: number
- type: boolean
description: Browser override. Accepted only when the publishable key's allowed_overrides lists "variables"; otherwise the request fails with 400 override_not_allowed.
language:
type: string
minLength: 1
description: 'Browser override. Accepted only when the publishable key''s allowed_overrides lists "language"; otherwise the request fails with 400 override_not_allowed. The session starts in it: a saved agent speaks it with its voice for that language (its language_voices entry, native voice switching''s choice, or its own voice when that speaks it) and keeps its other languages; when none speaks it, the language''s default voice and that language alone. An unsupported code is 400 unsupported_language.'
primary_language:
type: string
minLength: 1
description: Browser override. Accepted only when the publishable key's allowed_overrides lists "language"; otherwise the request fails with 400 override_not_allowed.
voice:
type: string
minLength: 1
description: Browser override. Accepted only when the publishable key's allowed_overrides lists "voice"; otherwise the request fails with 400 override_not_allowed.
context:
type: string
minLength: 1
description: Browser override. Accepted only when the publishable key's allowed_overrides lists "context"; otherwise the request fails with 400 override_not_allowed.
website_context:
type: string
minLength: 1
description: Browser override. Accepted only when the publishable key's allowed_overrides lists "context"; otherwise the request fails with 400 override_not_allowed.
analytics_distinct_id:
type: string
minLength: 1
maxLength: 200
analytics_replay_url:
type: string
format: uri
minLength: 1
maxLength: 2048
WidgetSession:
type: object
properties:
call_id:
type: integer
token:
type: string
room_name:
type: string
server_url:
type: string
agent_name:
type: string
required:
- agent_name
- call_id
- room_name
- server_url
- token
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: sk_live_…
description: 'Organization API key. Send Authorization: Bearer sk_live_…; create a key in the dashboard.'
humanToken:
type: apiKey
in: header
name: Authorization
description: 'Human session token: Authorization: Token <session-token>. Organization API keys are rejected by key-management and account-control operations.'
x-mcp-server: https://api.thunderphone.com/v1/mcp