Prepare Number Registration
curl --request POST \
--url https://api.tracklysms.com/api/v2/agent/number-requests \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"brandName": "<string>",
"phoneNumberType": "<string>",
"targetCountries": [
"<string>"
],
"useOwnOptInUrl": true
}
'import requests
url = "https://api.tracklysms.com/api/v2/agent/number-requests"
payload = {
"brandName": "<string>",
"phoneNumberType": "<string>",
"targetCountries": ["<string>"],
"useOwnOptInUrl": True
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"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: {
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
brandName: '<string>',
phoneNumberType: '<string>',
targetCountries: ['<string>'],
useOwnOptInUrl: true
})
};
fetch('https://api.tracklysms.com/api/v2/agent/number-requests', 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.tracklysms.com/api/v2/agent/number-requests",
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([
'brandName' => '<string>',
'phoneNumberType' => '<string>',
'targetCountries' => [
'<string>'
],
'useOwnOptInUrl' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Api-Key: <api-key>"
],
]);
$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.tracklysms.com/api/v2/agent/number-requests"
payload := strings.NewReader("{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.tracklysms.com/api/v2/agent/number-requests")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracklysms.com/api/v2/agent/number-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}"
response = http.request(request)
puts response.read_bodyAgent Number Registration (v2)
Prepare Number Registration
Create an inert registration draft with owner-approved delegated API access.
POST
/
v2
/
agent
/
number-requests
Prepare Number Registration
curl --request POST \
--url https://api.tracklysms.com/api/v2/agent/number-requests \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"brandName": "<string>",
"phoneNumberType": "<string>",
"targetCountries": [
"<string>"
],
"useOwnOptInUrl": true
}
'import requests
url = "https://api.tracklysms.com/api/v2/agent/number-requests"
payload = {
"brandName": "<string>",
"phoneNumberType": "<string>",
"targetCountries": ["<string>"],
"useOwnOptInUrl": True
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"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: {
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
brandName: '<string>',
phoneNumberType: '<string>',
targetCountries: ['<string>'],
useOwnOptInUrl: true
})
};
fetch('https://api.tracklysms.com/api/v2/agent/number-requests', 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.tracklysms.com/api/v2/agent/number-requests",
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([
'brandName' => '<string>',
'phoneNumberType' => '<string>',
'targetCountries' => [
'<string>'
],
'useOwnOptInUrl' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Api-Key: <api-key>"
],
]);
$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.tracklysms.com/api/v2/agent/number-requests"
payload := strings.NewReader("{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.tracklysms.com/api/v2/agent/number-requests")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracklysms.com/api/v2/agent/number-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"brandName\": \"<string>\",\n \"phoneNumberType\": \"<string>\",\n \"targetCountries\": [\n \"<string>\"\n ],\n \"useOwnOptInUrl\": true\n}"
response = http.request(request)
puts response.read_bodyRequires an API-audience bearer with
Returns
trackly.registration: see delegated OAuth, including rollout availability. Ordinary API keys and MCP-audience tokens are not accepted. Drafts are bound to the account, grant, and credential that created them.
Send a JSON object of at most 64 KiB. Unknown or duplicate fields and query overrides are rejected. Only brandName is required to start; use returned missingFields to collect the remaining business and program details. Delegated registration supports US toll-free and 10DLC only; use the dashboard for other countries.
string
required
1–255 printable ASCII characters. Keep the same key and exact body when recovering an uncertain creation; changed content under that key conflicts.
string
required
Business or brand name, up to 255 characters.
string
default:"toll_free"
toll_free or 10dlc.string[]
Only
["US"] is supported.boolean
default:"false"
Set true only after the owner explicitly chooses their own form. Recommend Trackly’s hosted form even when another form exists; this choice changes registration evidence.
201 with {"request": ...}, including id, revision, fields, missingFields, preview/domain/registration status, and nextActions. Creation does not publish a page, change DNS, or submit paid registration. Continue with update and owner review.
Errors include 400 invalid input, 401 invalid bearer, 403 missing authority, 409 idempotency conflict, 413 oversized body, 422 unsupported details, 429 rate limit, and 503 unavailable dependencies or registration indexes. Respect Retry-After; do not create another draft to bypass uncertainty or a limit.