Create Phone Number
curl --request POST \
--url https://api.voicebot.studio/api/v1/phone-number \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"number": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"provider": "twilio",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": true
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
}
'import requests
url = "https://api.voicebot.studio/api/v1/phone-number"
payload = {
"number": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"provider": "twilio",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": True
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '<string>',
twilioAccountSid: '<string>',
twilioAuthToken: '<string>',
provider: 'twilio',
name: '<string>',
assistantId: '<string>',
squadId: '<string>',
fallbackDestination: {
number: '<string>',
type: 'number',
extension: '<string>',
callerId: '<string>',
message: '<string>',
description: '<string>',
numberE164CheckEnabled: true
},
serverUrl: '<string>',
serverUrlSecret: '<string>'
})
};
fetch('https://api.voicebot.studio/api/v1/phone-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voicebot.studio/api/v1/phone-number"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAuthToken\": \"<string>\",\n \"provider\": \"twilio\",\n \"name\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"squadId\": \"<string>\",\n \"fallbackDestination\": {\n \"number\": \"<string>\",\n \"type\": \"number\",\n \"extension\": \"<string>\",\n \"callerId\": \"<string>\",\n \"message\": \"<string>\",\n \"description\": \"<string>\",\n \"numberE164CheckEnabled\": true\n },\n \"serverUrl\": \"<string>\",\n \"serverUrlSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "<string>",
"provider": "<string>",
"number": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": true
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"orgId": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Phone Numbers
Create Phone Number
Create a new phone number.
POST
/
api
/
v1
/
phone-number
Create Phone Number
curl --request POST \
--url https://api.voicebot.studio/api/v1/phone-number \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"number": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"provider": "twilio",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": true
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
}
'import requests
url = "https://api.voicebot.studio/api/v1/phone-number"
payload = {
"number": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"provider": "twilio",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": True
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '<string>',
twilioAccountSid: '<string>',
twilioAuthToken: '<string>',
provider: 'twilio',
name: '<string>',
assistantId: '<string>',
squadId: '<string>',
fallbackDestination: {
number: '<string>',
type: 'number',
extension: '<string>',
callerId: '<string>',
message: '<string>',
description: '<string>',
numberE164CheckEnabled: true
},
serverUrl: '<string>',
serverUrlSecret: '<string>'
})
};
fetch('https://api.voicebot.studio/api/v1/phone-number', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voicebot.studio/api/v1/phone-number"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"twilioAccountSid\": \"<string>\",\n \"twilioAuthToken\": \"<string>\",\n \"provider\": \"twilio\",\n \"name\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"squadId\": \"<string>\",\n \"fallbackDestination\": {\n \"number\": \"<string>\",\n \"type\": \"number\",\n \"extension\": \"<string>\",\n \"callerId\": \"<string>\",\n \"message\": \"<string>\",\n \"description\": \"<string>\",\n \"numberE164CheckEnabled\": true\n },\n \"serverUrl\": \"<string>\",\n \"serverUrlSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "<string>",
"provider": "<string>",
"number": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"assistantId": "<string>",
"squadId": "<string>",
"fallbackDestination": {
"number": "<string>",
"type": "number",
"extension": "<string>",
"callerId": "<string>",
"message": "<string>",
"description": "<string>",
"numberE164CheckEnabled": true
},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"orgId": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Allowed value:
"twilio"- TransferDestinationNumber
- TransferDestinationSip
Show child attributes
Show child attributes
Server URL must match either workflow.amira.bot or workflow.voicebot.studio
Response
Successful Response
- TransferDestinationNumber
- TransferDestinationSip
Show child attributes
Show child attributes
⌘I