Import a Twilio number
curl --request POST \
--url https://api.ryvo.so/v1/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+5215555550100",
"label": "Main line",
"twilio": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "<string>"
}
}
'import requests
url = "https://api.ryvo.so/v1/phone-numbers"
payload = {
"phone_number": "+5215555550100",
"label": "Main line",
"twilio": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "<string>"
}
}
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({
phone_number: '+5215555550100',
label: 'Main line',
twilio: {account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', auth_token: '<string>'}
})
};
fetch('https://api.ryvo.so/v1/phone-numbers', 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://api.ryvo.so/v1/phone-numbers",
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([
'phone_number' => '+5215555550100',
'label' => 'Main line',
'twilio' => [
'account_sid' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'auth_token' => '<string>'
]
]),
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://api.ryvo.so/v1/phone-numbers"
payload := strings.NewReader("{\n \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\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://api.ryvo.so/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ryvo.so/v1/phone-numbers")
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 \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"phone_number": "+5215555550100",
"label": "Main line",
"provider": "twilio",
"runtime": "engine",
"agent": {
"id": "4d0f3c2a-6b7e-4a1c-9f2d-1e2b3c4d5e6f",
"name": "Sales assistant"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "unauthorized",
"message": "Invalid or revoked API key.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "unauthorized",
"message": "Invalid or revoked API key.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "insufficient_scope",
"message": "This API key does not have the agents:write scope.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Retry in 32s (see the Retry-After header).",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}Phone numbers
Import a Twilio number
Imports a number from your Twilio account. Ryvo verifies the credentials with Twilio, stores them encrypted and registers the number. The Account SID and Auth Token never appear in any response or log.
POST
/
v1
/
phone-numbers
Import a Twilio number
curl --request POST \
--url https://api.ryvo.so/v1/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_number": "+5215555550100",
"label": "Main line",
"twilio": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "<string>"
}
}
'import requests
url = "https://api.ryvo.so/v1/phone-numbers"
payload = {
"phone_number": "+5215555550100",
"label": "Main line",
"twilio": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "<string>"
}
}
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({
phone_number: '+5215555550100',
label: 'Main line',
twilio: {account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', auth_token: '<string>'}
})
};
fetch('https://api.ryvo.so/v1/phone-numbers', 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://api.ryvo.so/v1/phone-numbers",
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([
'phone_number' => '+5215555550100',
'label' => 'Main line',
'twilio' => [
'account_sid' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'auth_token' => '<string>'
]
]),
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://api.ryvo.so/v1/phone-numbers"
payload := strings.NewReader("{\n \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\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://api.ryvo.so/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ryvo.so/v1/phone-numbers")
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 \"phone_number\": \"+5215555550100\",\n \"label\": \"Main line\",\n \"twilio\": {\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"auth_token\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"phone_number": "+5215555550100",
"label": "Main line",
"provider": "twilio",
"runtime": "engine",
"agent": {
"id": "4d0f3c2a-6b7e-4a1c-9f2d-1e2b3c4d5e6f",
"name": "Sales assistant"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "unauthorized",
"message": "Invalid or revoked API key.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "unauthorized",
"message": "Invalid or revoked API key.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "insufficient_scope",
"message": "This API key does not have the agents:write scope.",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Retry in 32s (see the Retry-After header).",
"request_id": "f0c0a9d2-8b1e-4d8a-9c2f-6e5b7a1d2c3b"
}Authorizations
A Bearer token. Create keys in the portal under Settings > API keys
(https://app.ryvo.so/developers). The token has the form
ryvo_live_<64 hex characters> and is shown once.
Header: Authorization: Bearer ryvo_live_...
Body
application/json
Response
The imported number.
Example:
"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
Example:
"+5215555550100"
Example:
"Main line"
Example:
"twilio"
engine is the Ryvo runtime; elevenlabs is the legacy voice runtime.
Available options:
engine, elevenlabs Example:
"engine"
Show child attributes
Show child attributes

