Skip to main content
POST
/
utils
/
twilio
/
sync-sms
Assign a Twilio number to an agent for SMS
curl --request POST \
  --url https://eu-gcp-api.vg-stuff.com/v3/utils/twilio/sync-sms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "twilioNumberId": "<string>",
  "agentId": "<string>"
}
'
{
  "success": true,
  "message": "<string>"
}
The number must already exist in twilio_numbers and have:
  • capabilities containing 'sms'
  • accountSid and authToken saved (own-account only — platform-rented numbers reuse the platform account)
curl -X POST "https://eu-gcp-api.vg-stuff.com/v3/utils/twilio/sync-sms" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "twilioNumberId": "PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "agentId": "agent_123" }'
This also updates the agent doc with twilioSmsPhoneNumber, twilioSmsAccountSid, twilioSmsAuthToken, twilioSmsMode for backward compatibility with legacy SMS flows.

Authorizations

Authorization
string
header
required

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

Body

application/json
twilioNumberId
string
required
agentId
string
required

Response

Successful response

success
boolean
required
message
string
required