Skip to main content
POST
/
cleartalk-sms
/
update-sms-configuration
Update SMS configuration
curl --request POST \
  --url https://api.cleartalk.ai/cleartalk-sms/update-sms-configuration \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "phone_number": "+1234567890",
  "webhook": "https://your-webhook-url.com/sms-callback",
  "agent_name": "John Doe",
  "request_data": [
    {
      "key": "value",
      "customer_id": "12345"
    }
  ],
  "time_out": 300,
  "messaging_service_sid": "MG1234567890abcdef1234567890abcdef",
  "objective": "You are a helpful customer service agent. Your goal is to assist customers with their inquiries.",
  "tools": [
    {
      "name": "search",
      "description": "Search for information"
    }
  ],
  "temperature": 0.7,
  "pathway_id": "path_1234567890abcdef",
  "pathway_version": "v1.0.0",
  "start_node_id": "node_1234567890abcdef",
  "webhook_trigger_on": "final_disposition",
  "follow_up_config": {
    "enable_follow_ups": true,
    "enable_smart_follow_ups": true,
    "repeat_final_follow_up": false,
    "follow_up_schedule": [
      {
        "time": 5,
        "unit": "minutes",
        "repeat_forever": false
      }
    ],
    "extra_follow_up_prompt": "Please respond to continue our conversation"
  }
}
'

Authorizations

x-api-key
string
header
required

API Key for authentication

Body

application/json
phone_number
string
required

The E.164 formatted phone number to update (must belong to the authenticated user)

Example:

"+1234567890"

webhook
string
required

When the agent sends a response, we'll send the message details in a POST request to the URL you specify here, along with chat history

Example:

"https://your-webhook-url.com/sms-callback"

agent_name
string
required

The name of the agent

Example:

"John Doe"

request_data
string[]
required

Request data fields are available to the AI agent during the call when referenced in the associated pathway or task

Example:
[{ "key": "value", "customer_id": "12345" }]
time_out
number
required

Maximum time to wait for a response (in seconds). Follow-up times must be less than this value.

Example:

300

messaging_service_sid
string
required

Twilio Messaging Service SID, if set

Example:

"MG1234567890abcdef1234567890abcdef"

objective
string
required

Assistant system prompt or conversational goal

Example:

"You are a helpful customer service agent. Your goal is to assist customers with their inquiries."

tools
string[]
required

List of tools available to the assistant

Example:
[
{
"name": "search",
"description": "Search for information"
}
]
temperature
number
required

The model's temperature setting, controlling creativity

Example:

0.7

pathway_id
string
required

The ID of the linked conversational pathway (if any)

Example:

"path_1234567890abcdef"

pathway_version
string
required

The specific version of the pathway to use

Example:

"v1.0.0"

start_node_id
string
required

Entry point node ID for the pathway

Example:

"node_1234567890abcdef"

webhook_trigger_on
enum<string>

When to trigger the webhook: on each message or only on final disposition

Available options:
each_message,
final_disposition
Example:

"final_disposition"

follow_up_config
object

Follow-up configuration for the SMS agent

Example:
{
"enable_follow_ups": true,
"enable_smart_follow_ups": true,
"repeat_final_follow_up": false,
"follow_up_schedule": [
{
"time": 5,
"unit": "minutes",
"repeat_forever": false
}
],
"extra_follow_up_prompt": "Please respond to continue our conversation"
}

Response

201 - undefined