Skip to main content
POST
Use the quickstart to set your API key. JavaScript uses Node.js; Python uses Requests. input holds context values for the call. output is the JSON Schema defining the answers you want back in data. input is optional and defaults to an empty object. The output is always an object: define properties, list required fields, and set additionalProperties to false. No top-level type is needed.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <THRED_API_KEY>. Development keys begin thr_dev_; Production keys begin thr_prod_. Each key is scoped to a workspace and environment. Keep secrets on your server.

Headers

Idempotency-Key
string

Optional key for retrying a request without creating another collection. Omit it to create a new collection on each POST. Reuse the same key only with the same request; a different request returns 409. Use 1–200 printable, non-space ASCII characters.

Required string length: 1 - 200
Pattern: ^[!-~]{1,200}$

Body

application/json

The destination, task, input context, and output JSON Schema.

Send UTF-8 JSON, up to 64 KiB. Unknown fields are rejected.

to
string
required

Destination phone number in E.164 format.

Pattern: ^\+[1-9]\d{6,14}$
Example:

"+14155550123"

instructions
string
required

What you want to find out. Thred manages conversation, navigation, and assistance. Must contain non-whitespace text.

Required string length: 1 - 8000
output
object
required

The JSON Schema defining the answers returned in data. The output root is always an object, so no top-level type is needed. Define properties and required fields, and set additionalProperties to false.

Example:
input
object

Known context values for the call, such as a date, product name, or reference number. Must be a JSON object; optional and defaults to an empty object. Up to 16,000 bytes of JSON. Maximum depth: 32; maximum values: 8,192.

Example:
max_duration_seconds
integer
default:300

Maximum job duration. Your workspace and environment may have a lower limit.

Required range: 30 <= x <= 1800
caller_number_id
string

Enabled caller number ID belonging to the same workspace and environment. Omit to use the environment default.

Required string length: 1 - 160
webhook_id
string

Enabled webhook endpoint ID from your dashboard, in the same workspace and environment. Omit to poll for results.

Required string length: 1 - 160
navigation
object

Optional routing hints. IVR navigation is automatic. Custom routes, actions, and navigation policy overrides are not accepted.

screener_sequence
object[]

An intro followed by optional detail messages for screeners. If omitted, Thred prepares a sequence from the task and input before dialing.

Required array length: 1 - 8 elements
metadata
object

Your tracking fields, up to 4,000 bytes of JSON. Maximum depth: 32; maximum values: 8,192.

record
boolean
default:false

Recording is currently disabled. Leave false or omit; true returns 503.

Response

New collection accepted, or an existing idempotent request returned.

id
string
required

The collection ID, using the call_ prefix. Use it to retrieve or cancel the collection.

Example:

"call_123e4567-e89b-42d3-a456-426614174000"

status
enum<string>
required

Final: completed, incomplete, failed, canceled. Continue polling for all other statuses.

Available options:
queued,
dialing,
in_progress,
processing,
awaiting_review,
completed,
incomplete,
failed,
canceled
reused
boolean
required

True when the same idempotency key and normalized request already existed. No new collection is created.

Example:

false

environment
enum<string>
required

The API key selects the workspace environment. Development and Production are isolated, but either can place real calls when enabled.

Available options:
development,
production