API reference
AI voice agents
Build, preview and attach AI voice agents to campaigns.
9 operationsBase URL https://packetexchange.io/api/v1Postman collection
BrowseAI voice agents
List your AI voice agents
GET/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string (uuid) | - |
userIdrequireddata[].userId | string (uuid) | - |
namerequireddata[].name | string | - |
voiceIdrequireddata[].voiceId | string | null | - |
voiceProviderrequireddata[].voiceProvider | string | - |
languagerequireddata[].language | string | - |
firstMessagerequireddata[].firstMessage | string | null | What the agent says when the call is answered |
systemPromptrequireddata[].systemPrompt | string | The script and instructions the agent follows |
modelrequireddata[].model | string | - |
guardrailsrequireddata[].guardrails | string | null | - |
toolsrequireddata[].tools | string[] | - |
maxCallSecondsrequireddata[].maxCallSeconds | integer | - |
enabledrequireddata[].enabled | boolean | - |
createdAtrequireddata[].createdAt | string (date-time) | ISO-8601 timestamp (UTC) |
updatedAtrequireddata[].updatedAt | string (date-time) | ISO-8601 timestamp (UTC) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Create an AI voice agent
POST/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Request body (application/json)
| Field | Type | Description |
|---|---|---|
namerequired | string | -max 120 chars |
voiceId | string | null | -max 120 chars |
voiceProvider | string | -max 40 chars |
language | string | -max 12 chars |
firstMessage | string | null | -max 500 chars |
systemPromptrequired | string | -max 8000 chars |
model | string | -max 60 chars |
guardrails | string | null | -max 4000 chars |
tools | string[] | - |
maxCallSeconds | integer | -1 to 3600 |
enabled | boolean | - |
Response 201
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as AiAgent, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
List the voices an agent can speak with
GET/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
A trimmed list (about 60), English non-premium voices first.
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object[] | - |
idrequireddata[].id | string | - |
namerequireddata[].name | string | - |
descriptionrequireddata[].description | string | - |
genderrequireddata[].gender | string | - |
languagerequireddata[].language | string | - |
is_prorequireddata[].is_pro | boolean | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Hear a voice speak a short line
POST/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Returns MP3 audio of text (up to 300 characters) in the chosen voice.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
voiceIdrequired | string | -max 120 chars |
textrequired | string | -max 300 chars |
Response 200 (audio/mpeg)
MP3 audio of the line.
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Draft an agent from a plain-English description
POST/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 20 requests per minute
Turns a description such as "call leads and book demos" into a name, opening line, script, guardrails and suggested tools. Nothing is saved; pass the result to POST /ai-agents.
Request body (application/json)
| Field | Type | Description |
|---|---|---|
descriptionrequired | string | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
namerequireddata.name | string | - |
firstMessagerequireddata.firstMessage | string | - |
systemPromptrequireddata.systemPrompt | string | - |
guardrailsrequireddata.guardrails | string | - |
suggestedToolsrequireddata.suggestedTools | string[] | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Get an AI voice agent
GET/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as AiAgent, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Update an AI voice agent
PATCH/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
name | string | -max 120 chars |
voiceId | string | null | -max 120 chars |
voiceProvider | string | -max 40 chars |
language | string | -max 12 chars |
firstMessage | string | null | -max 500 chars |
systemPrompt | string | -max 8000 chars |
model | string | -max 60 chars |
guardrails | string | null | -max 4000 chars |
tools | string[] | - |
maxCallSeconds | integer | -1 to 3600 |
enabled | boolean | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | Same fields as AiAgent, shown earlier on this page. |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Delete an AI voice agent
DELETE/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 100 requests per second (the default)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
idrequireddata.id | string (uuid) | - |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.
Simulate one conversation turn with an agent
POST/
- Access
- API key. Scoped keys need
dialer:write. - Rate limit
- 20 requests per minute
Send what the callee said (message) plus the prior turns (history); the agent answers with its spoken reply and what it would do next. No call is placed and nothing is billed.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | - |
Request body (application/json)
| Field | Type | Description |
|---|---|---|
history | object[] | - |
rolerequiredhistory[].role | string | -One of user, assistant |
contentrequiredhistory[].content | string | -max 4000 chars |
messagerequired | string | -max 2000 chars |
Response 200
| Field | Type | Description |
|---|---|---|
datarequired | object | - |
replyrequireddata.reply | string | What the agent would say |
actionrequireddata.action | string | -One of continue, end, transfer |
captureddata.captured | object | Structured details captured this turn (name, email, intent...) |
Errors
- 400
VALIDATION_ERROR,INVALID_INPUTorBAD_REQUEST. ForVALIDATION_ERROR,error.detailsis an array of{ path, message }. - 401
UNAUTHORIZED: missing, invalid, expired or revoked credential. - 403
FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only. - 404
NOT_FOUND: no such resource on your account. - 409
CONFLICT(or a code-specific 409): the change clashes with existing state. - 429
RATE_LIMITED: slow down and retry after theRetry-Afterseconds. - 500
INTERNAL_ERROR: unexpected failure. QuoteX-Request-Idto support.