Import a Twilio number
curl --request POST \
--url https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"twilioNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAccountAuthToken": "<string>",
"twilioCallerId": "<string>",
"workspaceId": "<string>",
"agentId": "<string>",
"capabilities": [
"voice",
"sms"
]
}
'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number"
payload = {
"twilioNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAccountAuthToken": "<string>",
"twilioCallerId": "<string>",
"workspaceId": "<string>",
"agentId": "<string>",
"capabilities": ["voice", "sms"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
twilioNumber: '<string>',
twilioAccountSid: '<string>',
twilioAccountAuthToken: '<string>',
twilioCallerId: '<string>',
workspaceId: '<string>',
agentId: '<string>',
capabilities: ['voice', 'sms']
})
};
fetch('https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'twilioNumber' => '<string>',
'twilioAccountSid' => '<string>',
'twilioAccountAuthToken' => '<string>',
'twilioCallerId' => '<string>',
'workspaceId' => '<string>',
'agentId' => '<string>',
'capabilities' => [
'voice',
'sms'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number"
payload := strings.NewReader("{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"phoneNumber": "<string>",
"phoneNumberSid": "<string>",
"message": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Voices
Import a Twilio number
Import an existing phone number from your own Twilio account into your workspace.
POST
/
utils
/
import-twilio-number
Import a Twilio number
curl --request POST \
--url https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"twilioNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAccountAuthToken": "<string>",
"twilioCallerId": "<string>",
"workspaceId": "<string>",
"agentId": "<string>",
"capabilities": [
"voice",
"sms"
]
}
'import requests
url = "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number"
payload = {
"twilioNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAccountAuthToken": "<string>",
"twilioCallerId": "<string>",
"workspaceId": "<string>",
"agentId": "<string>",
"capabilities": ["voice", "sms"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
twilioNumber: '<string>',
twilioAccountSid: '<string>',
twilioAccountAuthToken: '<string>',
twilioCallerId: '<string>',
workspaceId: '<string>',
agentId: '<string>',
capabilities: ['voice', 'sms']
})
};
fetch('https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'twilioNumber' => '<string>',
'twilioAccountSid' => '<string>',
'twilioAccountAuthToken' => '<string>',
'twilioCallerId' => '<string>',
'workspaceId' => '<string>',
'agentId' => '<string>',
'capabilities' => [
'voice',
'sms'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number"
payload := strings.NewReader("{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu-gcp-api.vg-stuff.com/v3/utils/import-twilio-number")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"twilioNumber\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAccountAuthToken\": \"<string>\",\n \"twilioCallerId\": \"<string>\",\n \"workspaceId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"phoneNumber": "<string>",
"phoneNumberSid": "<string>",
"message": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Example Request
{
"twilioNumber": "+14155551234",
"twilioAccountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"twilioAccountAuthToken": "your-auth-token",
"twilioCallerId": "PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"agentId": "your-agent-id",
"capabilities": ["voice", "sms"]
}
You need your Twilio Account SID, Auth Token and the phone number’s SID from your Twilio Console.
Import numbers if you already have Twilio phone numbers you want to use with your AI agents — Convocore will configure the voice/SMS webhooks for you.
Dashboard workflow
You can also import from the UI without calling this endpoint directly:- Open Agents → your agent → Voice → Phone Numbers
- Click Import Twilio Number
- Enter credentials and capabilities — the number is assigned to that agent automatically
agentId in the request body must match the agent you want to handle calls for that number.
Related documentation
- Twilio Setup — purchase, assign, and import numbers
- Troubleshooting Imported Twilio Numbers — routing, webhooks, and common errors
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
