Skip to main content
POST
/
inbound-agents
/
{phoneNumber}
Update an inbound agent
curl --request POST \
  --url https://api.cleartalk.ai/inbound-agents/{phoneNumber} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "phoneNumber": "+1234567890",
  "agentName": "Agent Name",
  "task": "Task description",
  "selectedVoice": "en-US-Standard-A",
  "background_track": "none",
  "noise_cancellation": false,
  "model": "gpt-4",
  "max_duration": 300,
  "interruptionThreshold": 1000,
  "firstSentence": "Hello!",
  "selectedLanguage": "en",
  "voice_settings": {
    "speed": 1
  },
  "waitForGreeting": true,
  "temperature": 0.7,
  "pathwayID": "pathway-123",
  "tools": [
    "tool1",
    "tool2"
  ],
  "knowledgeName": "Knowledge base name",
  "knowledgeBases": [
    {
      "name": "kb1",
      "content": "content1"
    }
  ],
  "metadata": {
    "key": "value"
  },
  "transferPhoneNumber": [
    {
      "transfer_type": "default",
      "transfer_number": "+1234567890"
    }
  ],
  "appointmentAgent": true,
  "calendarID": "cal-123",
  "calendarName": "My Calendar",
  "questionsData": [
    {
      "question": "How are you?",
      "questionType": "greeting"
    }
  ],
  "customTool": [
    {
      "name": "tool1",
      "description": "Tool 1 description"
    }
  ],
  "inboundCustomTool": [
    {
      "name": "tool1",
      "description": "Tool 1 description"
    }
  ],
  "from": "+1234567890",
  "block_interruptions": false,
  "keywords": [
    "keyword1",
    "keyword2"
  ],
  "pronunciationGuide": [
    {
      "word": "example",
      "pronunciation": "ex-am-ple",
      "case_sensitive": false,
      "spaced": false
    }
  ],
  "timezone": "America/Los_Angeles",
  "request_data": {
    "name": "John Doe",
    "age": 30
  },
  "start_time": "2024-03-20 12:00:00 -05:00",
  "voicemail_message": "Please leave a message after the beep",
  "voicemail_action": "hangup",
  "retry": {
    "wait": 10,
    "voicemail_action": "leave_message",
    "voicemail_message": "Hello, this is a test message."
  },
  "record": true,
  "webhook_events": [
    "queue",
    "call",
    "latency"
  ],
  "citation_schema_id": "dcad76eb-57b6-4be6-922f-8a5a95e2ffrt",
  "analysis_preset": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
  "answered_by_enabled": true,
  "available_tags": [
    "got_full_name_and_number",
    "no_information_provided"
  ],
  "geospatial_dialing": "bd039087-decb-435a-a6e3-ca1ffbf89974",
  "precall_dtmf_sequence": "1234567890*#w",
  "pool_id": "#1234-5678-9012-3456",
  "memory_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "webhook_config": {
    "name": "WEBHOOK JSON TEMPLATES",
    "description": "TEMPLATES",
    "speech": "speech",
    "url": "https://templates.com",
    "method": "POST",
    "headers": {
      "Authorization": "########",
      "Content-Type": "application/json"
    },
    "body": {
      "BODY1": "LOREM",
      "BODY2": "LOREM"
    },
    "timeout": 10000
  },
  "get_data": {
    "name": "name getdata",
    "description": "getdata description",
    "speech": "GETDATA SPEECH8",
    "url": "url get data",
    "method": "GET",
    "headers": {
      "clave": "valor"
    },
    "body": {},
    "query": {},
    "input_schema": {},
    "response": {
      "valor": "clave"
    },
    "timeout": 10000
  }
}
'

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

phoneNumber
string
required

Body

application/json
phoneNumber
string

Phone number for the inbound agent

Example:

"+1234567890"

agentName
string

Name of the agent

Example:

"Agent Name"

task
string

Task or prompt for the agent

Example:

"Task description"

selectedVoice
string

Voice for the agent

Example:

"en-US-Standard-A"

background_track
string

Background track for the agent

Example:

"none"

noise_cancellation
boolean

Whether to enable noise cancellation

Example:

false

model
string

AI model to use

Example:

"gpt-4"

max_duration
number

Maximum duration in seconds

Example:

300

interruptionThreshold
number

Interruption threshold

Example:

1000

firstSentence
string

First sentence to say

Example:

"Hello!"

selectedLanguage
string

Language for the agent

Example:

"en"

voice_settings
object

Voice settings

Example:
{ "speed": 1 }
waitForGreeting
boolean

Whether to wait for greeting

Example:

true

temperature
number

Temperature for AI responses

Example:

0.7

pathwayID
string

Pathway ID

Example:

"pathway-123"

tools
string[]

Tools to use

Example:
["tool1", "tool2"]
knowledgeName
string

Name of the knowledge base

Example:

"Knowledge base name"

knowledgeBases
string[]

Knowledge base data

Example:
[{ "name": "kb1", "content": "content1" }]
metadata
object

Additional metadata

Example:
{ "key": "value" }
transferPhoneNumber
object[]

Transfer phone numbers

Example:
[
{
"transfer_type": "default",
"transfer_number": "+1234567890"
}
]
appointmentAgent
boolean

Whether this is an appointment agent

Example:

true

calendarID
string

Calendar ID

Example:

"cal-123"

calendarName
string

Calendar name

Example:

"My Calendar"

questionsData
object[]

Questions for the agent

Example:
[
{
"question": "How are you?",
"questionType": "greeting"
}
]
customTool
string[]

Custom tools

Example:
[
{
"name": "tool1",
"description": "Tool 1 description"
}
]
inboundCustomTool
string[]

Custom tools

Example:
[
{
"name": "tool1",
"description": "Tool 1 description"
}
]
from
string

Phone number to call from

Example:

"+1234567890"

block_interruptions
boolean

Whether to block interruptions

Example:

false

keywords
string[]

Keywords to boost in transcription

Example:
["keyword1", "keyword2"]
pronunciationGuide
string[]

Pronunciation guide for specific words

Example:
[
{
"word": "example",
"pronunciation": "ex-am-ple",
"case_sensitive": false,
"spaced": false
}
]
timezone
string

Timezone for the call

Example:

"America/Los_Angeles"

request_data
object

Request data available to the AI agent during the call

Example:
{ "name": "John Doe", "age": 30 }
start_time
string

Scheduled start time for the call

Example:

"2024-03-20 12:00:00 -05:00"

voicemail_message
string

Message to leave on voicemail

Example:

"Please leave a message after the beep"

voicemail_action
enum<string>

Action to take when voicemail is detected

Available options:
hangup,
leave_message,
ignore
Example:

"hangup"

retry
object

Retry configuration for voicemail calls

Example:
{
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
}
record
boolean

Whether to record the call

Example:

true

webhook_events
string[]

Events to stream to webhook

Example:
["queue", "call", "latency"]
citation_schema_id
string

Citation schema ID for post-call analysis

Example:

"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt"

analysis_preset
string

Analysis preset UUID

Example:

"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7"

answered_by_enabled
boolean

Whether to enable answered-by detection

Example:

true

available_tags
string[]

Available disposition tags

Example:
[
"got_full_name_and_number",
"no_information_provided"
]
geospatial_dialing
string

Geospatial dialing pool UUID

Example:

"bd039087-decb-435a-a6e3-ca1ffbf89974"

precall_dtmf_sequence
string

DTMF sequence to play before call starts

Example:

"1234567890*#w"

pool_id
string

Pool ID

Example:

"#1234-5678-9012-3456"

memory_id
string

UUID of the memory to associate with this agent

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

webhook_config
object

Webhook configuration

get_data
object

Get data configuration

Response

200

Agent updated successfully