Get carrier account
curl --request GET \
--url https://api.goyappr.com/carrier-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/carrier-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}{
"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>"
}Carrier accounts
Get Carrier Account
Requires carrier_accounts:read. webhook_url is included only for carrier_accounts:manage keys.
GET
/
carrier-accounts
/
{id}
Get carrier account
curl --request GET \
--url https://api.goyappr.com/carrier-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/carrier-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/carrier-accounts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/carrier-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/carrier-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/carrier-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}{
"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>"
}One connected Telnyx account with its numbers, status and last refusal. Requires
With a
carrier_accounts:read.
curl https://api.goyappr.com/carrier-accounts/7c1e… \
-H "Authorization: Bearer ypr_live_..."
carrier_accounts:manage key the response also carries webhook_url: the
exact URL a Call Control App you made must use. It contains a secret for your
account, so treat it like a password.
signature_verified turns true after the first call event that verified against
your public key. If last_error.code is public_key_mismatch, the public key you
saved does not match your Telnyx account: update it.
Another workspace’s id answers 404 CARRIER_ACCOUNT_NOT_FOUND.Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.
Path Parameters
Response
The account
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