POST
/
phone
curl --request POST \
  --url http://localhost:8080/phone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "type": "inbound",
  "language": "<string>",
  "accent": "<string>",
  "handoff_phone_number": "<string>",
  "speed": 1,
  "interruptible": true,
  "actionIds": [
    "<string>"
  ],
  "instructions": [
    "<string>"
  ],
  "data_collection_fields": [
    "<string>"
  ],
  "data_collection_webhook_url": "<string>",
  "model": "oppie-vox",
  "first_message": "<string>",
  "voice_id": "<string>",
  "flow": {
    "id": "<string>",
    "type": "root",
    "content": "<string>",
    "connectionType": "true",
    "position": {
      "x": 123,
      "y": 123
    },
    "children": [
      {
        "id": "<string>",
        "type": "root",
        "content": "<string>",
        "connectionType": "true",
        "position": {
          "x": 123,
          "y": 123
        },
        "children": [
          {
            "id": "<string>",
            "type": "root",
            "content": "<string>",
            "connectionType": "true",
            "position": {
              "x": 123,
              "y": 123
            },
            "children": [
              "<any>"
            ]
          }
        ]
      }
    ]
  },
  "use_org_knowledgebase": true
}'
{
  "id": "<string>",
  "org_id": "<string>",
  "phone_number": "<string>",
  "name": "<string>",
  "type": "inbound",
  "language": "<string>",
  "accent": "<string>",
  "handoff_phone_number": "<string>",
  "speed": 123,
  "interruptible": true,
  "actionIds": [
    "<string>"
  ],
  "instructions": [
    "<string>"
  ],
  "data_collection_fields": [
    "<string>"
  ],
  "data_collection_webhook_url": "<string>",
  "model": "oppie-vox",
  "voice_id": "<string>",
  "first_message": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "provider_external_id": "<string>",
  "flow": {
    "id": "<string>",
    "type": "root",
    "content": "<string>",
    "connectionType": "true",
    "position": {
      "x": 123,
      "y": 123
    },
    "children": [
      {
        "id": "<string>",
        "type": "root",
        "content": "<string>",
        "connectionType": "true",
        "position": {
          "x": 123,
          "y": 123
        },
        "children": [
          {
            "id": "<string>",
            "type": "root",
            "content": "<string>",
            "connectionType": "true",
            "position": {
              "x": 123,
              "y": 123
            },
            "children": [
              "<any>"
            ]
          }
        ]
      }
    ]
  },
  "use_org_knowledgebase": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the AI phone agent

flow
object | null
required
type
enum<string>
default:inbound
Available options:
inbound,
outbound
language
string | null

The language the AI phone agent should mainly speak in

accent
string | null

The accent the AI phone agent should mainly speak in

handoff_phone_number
string | null

The phone number of the human agent to hand off the call to

speed
number | null
default:1

The speed of the AI phone agent

interruptible
boolean
default:true

Whether the agent can be interrupted or not

actionIds
string[] | null

A list of action ids the AI phone agent has access to. A null value means all actions. An empty list means no actions

instructions
string[] | null

A list of instructions

data_collection_fields
string[] | null

A list of fields to collect data about

data_collection_webhook_url
string | null

The webhook url to send the collected data to

model
enum<string>
default:oppie-vox

The AI model of the agent. This cannot be changed after creation

Available options:
oppie-vox,
oppie-vox-turbo,
oppie-vox-2
first_message
string | null

The first message the AI phone agent should say

voice_id
string | null

The voice id

use_org_knowledgebase
boolean | null

Whether the AI phone agent should use the organization's knowledgebase

Response

201
application/json
id
string
required
org_id
string
required
phone_number
string | null
required
name
string | null
required
type
enum<string>
required
Available options:
inbound,
outbound
language
string | null
required
accent
string | null
required
handoff_phone_number
string | null
required
speed
number | null
required
interruptible
boolean
required
actionIds
string[] | null
required
instructions
string[] | null
required
data_collection_fields
string[] | null
required
data_collection_webhook_url
string | null
required
model
enum<string>
required
Available options:
oppie-vox,
oppie-vox-turbo,
oppie-vox-2
voice_id
string | null
required
first_message
string | null
required
created_at
string
required
updated_at
string
required
provider_external_id
string | null
required
flow
object | null
required
use_org_knowledgebase
boolean
required