curl --request POST \
--url https://api.goyappr.com/carrier-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Main Telnyx account",
"api_key": "<string>",
"public_key": "3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
}
'import requests
url = "https://api.goyappr.com/carrier-accounts"
payload = {
"name": "Main Telnyx account",
"api_key": "<string>",
"public_key": "3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
}
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({
name: 'Main Telnyx account',
api_key: '<string>',
public_key: '3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY='
})
};
fetch('https://api.goyappr.com/carrier-accounts', 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.goyappr.com/carrier-accounts",
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([
'name' => 'Main Telnyx account',
'api_key' => '<string>',
'public_key' => '3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY='
]),
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.goyappr.com/carrier-accounts"
payload := strings.NewReader("{\n \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\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.goyappr.com/carrier-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts")
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 \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Main Telnyx account",
"provider": "telnyx",
"api_key_last4": "9XyZ",
"api_key_updated_at": "2023-11-07T05:31:56Z",
"public_key_set": true,
"signature_verified": true,
"connection": {
"id": "2890000000000000001",
"created_by_yappr": true,
"outbound_voice_profile_id": "<string>"
},
"status": "untested",
"pause_reason": "key_rejected",
"last_error": {
"code": "<string>",
"sip_code": "403",
"at": "2023-11-07T05:31:56Z"
},
"last_success_at": "2023-11-07T05:31:56Z",
"last_tested_at": "2023-11-07T05:31:56Z",
"numbers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "<string>",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"created_at": "2023-11-07T05:31:56Z",
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
],
"webhook_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"webhook_url": "<string>",
"telnyx": {}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Calling out through your own Telnyx account is switched off for this workspace. Contact Yappr support.",
"code": "CARRIER_ACCOUNTS_NOT_ENABLED",
"enabled": false
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Connect a Telnyx Account
Save a Telnyx API key made just for Yappr. The key is checked with Telnyx
first; nothing is saved if Telnyx refuses it. Then
choose the Call Control App and
add your numbers. Requires
carrier_accounts:manage. Limit: 10 per workspace per day.
curl --request POST \
--url https://api.goyappr.com/carrier-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Main Telnyx account",
"api_key": "<string>",
"public_key": "3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
}
'import requests
url = "https://api.goyappr.com/carrier-accounts"
payload = {
"name": "Main Telnyx account",
"api_key": "<string>",
"public_key": "3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
}
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({
name: 'Main Telnyx account',
api_key: '<string>',
public_key: '3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY='
})
};
fetch('https://api.goyappr.com/carrier-accounts', 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.goyappr.com/carrier-accounts",
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([
'name' => 'Main Telnyx account',
'api_key' => '<string>',
'public_key' => '3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY='
]),
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.goyappr.com/carrier-accounts"
payload := strings.NewReader("{\n \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\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.goyappr.com/carrier-accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts")
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 \"name\": \"Main Telnyx account\",\n \"api_key\": \"<string>\",\n \"public_key\": \"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY=\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Main Telnyx account",
"provider": "telnyx",
"api_key_last4": "9XyZ",
"api_key_updated_at": "2023-11-07T05:31:56Z",
"public_key_set": true,
"signature_verified": true,
"connection": {
"id": "2890000000000000001",
"created_by_yappr": true,
"outbound_voice_profile_id": "<string>"
},
"status": "untested",
"pause_reason": "key_rejected",
"last_error": {
"code": "<string>",
"sip_code": "403",
"at": "2023-11-07T05:31:56Z"
},
"last_success_at": "2023-11-07T05:31:56Z",
"last_tested_at": "2023-11-07T05:31:56Z",
"numbers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "+972551234567",
"friendly_name": "<string>",
"provider": "<string>",
"status": "active",
"is_active": true,
"inbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_inbound_configured": true,
"sip_outbound_configured": true,
"country_code": "<string>",
"monthly_cost": 123,
"created_at": "2023-11-07T05:31:56Z",
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"ownership_verified_at": "2023-11-07T05:31:56Z"
}
],
"webhook_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"webhook_url": "<string>",
"telnyx": {}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Calling out through your own Telnyx account is switched off for this workspace. Contact Yappr support.",
"code": "CARRIER_ACCOUNTS_NOT_ENABLED",
"enabled": false
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}carrier_accounts:manage, which API keys do not have by
default: create a key with it (the dashboard’s full access includes it).
Carrier accounts are available in every workspace.
GET /carrier-accounts/status answers
{ "enabled": true } unless Yappr has switched them off for yours.
Set Telnyx up first: Level 2 verification, an outbound voice profile with your
destination countries allowed, and an API key made just for Yappr. The
setup guide walks through it.
curl -X POST https://api.goyappr.com/carrier-accounts \
-H "Authorization: Bearer ypr_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Main Telnyx account",
"api_key": "KEY0199…",
"public_key": "3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
}'
{
"data": {
"id": "7c1e…",
"name": "Main Telnyx account",
"provider": "telnyx",
"api_key_last4": "9XyZ",
"public_key_set": true,
"signature_verified": false,
"connection": null,
"status": "untested",
"numbers": []
},
"webhook_url": "https://voice.goyappr.com/webhook/telnyx?ca=7c1e…&t=…",
"telnyx": {
"connections": [{ "id": "2890…", "name": "My app", "active": true, "outbound_voice_profile_id": "2890…" }],
"outbound_voice_profiles": [
{ "id": "2890…", "name": "Israel", "enabled": true, "allowed_destinations": ["IL"],
"daily_spend_limit": "20.00", "daily_spend_limit_enabled": true, "channel_limit": 4 }
]
}
}
| Field | Rule |
|---|---|
name | 1–100 characters. |
api_key | A Telnyx API key. Telnyx is asked first; if it refuses the key, nothing is saved. Stored encrypted and never returned. |
public_key | Optional, recommended: your account’s public key (Keys & Credentials → Public Key). Yappr uses it to check that call events really come from your account. |
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | INVALID_NAME, INVALID_API_KEY, INVALID_PUBLIC_KEY, INVALID_JSON | Fix the field named in error. |
| 403 | CARRIER_ACCOUNTS_NOT_ENABLED | Yappr has switched carrier accounts off for this workspace. Nothing was sent to Telnyx. Contact Yappr support. |
| 422 | TELNYX_KEY_REJECTED | Telnyx refused the key. Check it is switched on and pasted in full. |
| 422 | KEY_IS_YAPPR_ACCOUNT | The key belongs to Yappr’s own Telnyx account. |
| 429 | RATE_LIMITED | 10 accounts connected in this workspace today. |
| 503 | TELNYX_UNAVAILABLE | Telnyx did not answer. Nothing was saved. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.
Body
1 - 100"Main Telnyx account"
A Telnyx API key created just for Yappr (Account Settings → API Keys). Checked with Telnyx before anything is saved; stored encrypted; never returned.
Your account's public key (Keys & Credentials → Public Key), 44 characters of base64. Recommended.
"3MYsSvZbhKUP9VZ1pRgGNlDtJGbNkFMhTqwPjGEgUoY="
Response
Connected (status untested, no app yet)
Your own Telnyx account, connected so agents can call from the numbers you own there. Yappr places each call on your Call Control App, with your API key, so the call runs on your Telnyx account and Telnyx bills you for it. The API key is write-only: no response ever contains it.
Show child attributes
Show child attributes
The URL a Call Control App you made must use.
The Call Control Apps and outbound voice profiles your key can see (same shape as the test result's telnyx).