curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"number_type": "<string>",
"capabilities": [
"voice",
"sms"
],
"use_case": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases"
payload = {
"number_type": "<string>",
"capabilities": ["voice", "sms"],
"use_case": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({number_type: '<string>', capabilities: ['voice', 'sms'], use_case: '<string>'})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases', 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.pyai.com/v1/telephony/compliance-cases",
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([
'number_type' => '<string>',
'capabilities' => [
'voice',
'sms'
],
'use_case' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.pyai.com/v1/telephony/compliance-cases"
payload := strings.NewReader("{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.pyai.com/v1/telephony/compliance-cases")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ncc_...",
"object": "telephony.compliance_case",
"project_id": "<string>",
"kind": "new_number",
"country": "US",
"state": "collecting_evidence",
"rules_snapshot": {
"available": true,
"registry_version": "<string>",
"source_ids": [
"<string>"
],
"frozen_at": 123,
"config": {}
},
"document_requests": [
{
"id": "<string>",
"document_type": "<string>",
"label": "<string>",
"required": true,
"accepted_mime_types": [
"<string>"
],
"max_bytes": 123
}
],
"uploads": [
{
"id": "<string>",
"document_request_id": "<string>",
"object_ref": "<string>",
"generation": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"sha256": "<string>",
"malware_status": "pending",
"uploaded_at": 123,
"retention_delete_at": 123
}
],
"extractions": [
{
"id": "<string>",
"upload_id": "<string>",
"processing_profile": "standard",
"status": "succeeded",
"failure_reason": "<string>",
"attempts": 123,
"fields": [
{
"field": "<string>",
"value": "<string>",
"confidence": 0.5,
"provenance": {},
"pii_class": "<string>",
"redacted": true
}
],
"cost_micros": 123,
"model_version": "<string>",
"latency_ms": 1,
"started_at": 123,
"completed_at": 123
}
],
"timeline": [
{}
],
"version": 2,
"number_type": "<string>",
"capabilities": [
"<string>"
],
"use_case": "<string>",
"network_status": "<string>",
"continuation_reason": "<string>",
"terminal_reason": "network_review_submitted",
"attestation_requests": [
{
"id": "<string>",
"text": "<string>",
"required": true
}
],
"corrections": [
{}
],
"matches": [
{}
],
"attestations": [
{}
],
"created_at": 123,
"updated_at": 123,
"retention_delete_at": 123
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Start a number compliance or porting case
Starts a project-scoped workflow for a new number or port-in request in the US, Canada, India, the UK, or Australia. The applicable requirements and execution budgets are frozen at creation. Missing market rules fail closed. Requires telephony:manage and an Idempotency-Key.
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"number_type": "<string>",
"capabilities": [
"voice",
"sms"
],
"use_case": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases"
payload = {
"number_type": "<string>",
"capabilities": ["voice", "sms"],
"use_case": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({number_type: '<string>', capabilities: ['voice', 'sms'], use_case: '<string>'})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases', 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.pyai.com/v1/telephony/compliance-cases",
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([
'number_type' => '<string>',
'capabilities' => [
'voice',
'sms'
],
'use_case' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.pyai.com/v1/telephony/compliance-cases"
payload := strings.NewReader("{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.pyai.com/v1/telephony/compliance-cases")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number_type\": \"<string>\",\n \"capabilities\": [\n \"voice\",\n \"sms\"\n ],\n \"use_case\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ncc_...",
"object": "telephony.compliance_case",
"project_id": "<string>",
"kind": "new_number",
"country": "US",
"state": "collecting_evidence",
"rules_snapshot": {
"available": true,
"registry_version": "<string>",
"source_ids": [
"<string>"
],
"frozen_at": 123,
"config": {}
},
"document_requests": [
{
"id": "<string>",
"document_type": "<string>",
"label": "<string>",
"required": true,
"accepted_mime_types": [
"<string>"
],
"max_bytes": 123
}
],
"uploads": [
{
"id": "<string>",
"document_request_id": "<string>",
"object_ref": "<string>",
"generation": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"sha256": "<string>",
"malware_status": "pending",
"uploaded_at": 123,
"retention_delete_at": 123
}
],
"extractions": [
{
"id": "<string>",
"upload_id": "<string>",
"processing_profile": "standard",
"status": "succeeded",
"failure_reason": "<string>",
"attempts": 123,
"fields": [
{
"field": "<string>",
"value": "<string>",
"confidence": 0.5,
"provenance": {},
"pii_class": "<string>",
"redacted": true
}
],
"cost_micros": 123,
"model_version": "<string>",
"latency_ms": 1,
"started_at": 123,
"completed_at": 123
}
],
"timeline": [
{}
],
"version": 2,
"number_type": "<string>",
"capabilities": [
"<string>"
],
"use_case": "<string>",
"network_status": "<string>",
"continuation_reason": "<string>",
"terminal_reason": "network_review_submitted",
"attestation_requests": [
{
"id": "<string>",
"text": "<string>",
"required": true
}
],
"corrections": [
{}
],
"matches": [
{}
],
"attestations": [
{}
],
"created_at": 123,
"updated_at": 123,
"retention_delete_at": 123
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Headers
1 - 255Body
new_number, port_in US, CA, IN, GB, AU Requested market number type, such as local, mobile, or toll_free.
["voice", "sms"]
Customer-declared use case used to select requirements.
Response
Case created or idempotently replayed
"ncc_..."
"telephony.compliance_case"new_number, port_in US, CA, IN, GB, AU collecting_evidence, extracting, needs_review, ready_for_submission, submitted, cancelled Immutable rules, source identifiers, thresholds, retry caps, parallelism, wall-clock, cost, and retention configuration frozen when the case started.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Terminal processing attempts. Extracted personal values are masked in API views.
Show child attributes
Show child attributes
x >= 1network_review_submitted, cancelled_by_customer, null Show child attributes
Show child attributes
Correction audit metadata. Corrected PII values are intentionally omitted from API views.