Human-approve and submit for network review
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"approved_by": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit"
payload = { "approved_by": "<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({approved_by: '<string>'})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit', 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/{id}/submit",
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([
'approved_by' => '<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/{id}/submit"
payload := strings.NewReader("{\n \"approved_by\": \"<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/{id}/submit")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approved_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit")
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 \"approved_by\": \"<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
}Telephony
Human-approve and submit for network review
Submits for network review only after all evidence, confidence, matching, malware, and attestation gates pass and a human approver is named. Requires Idempotency-Key.
POST
/
v1
/
telephony
/
compliance-cases
/
{id}
/
submit
Human-approve and submit for network review
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"approved_by": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit"
payload = { "approved_by": "<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({approved_by: '<string>'})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit', 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/{id}/submit",
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([
'approved_by' => '<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/{id}/submit"
payload := strings.NewReader("{\n \"approved_by\": \"<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/{id}/submit")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approved_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/submit")
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 \"approved_by\": \"<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
}Authorizations
apiKeyxApiKey
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Headers
Required string length:
1 - 255Path Parameters
Body
application/json
Minimum string length:
1Response
Submitted
Example:
"ncc_..."
Allowed value:
"telephony.compliance_case"Available options:
new_number, port_in Available options:
US, CA, IN, GB, AU Available options:
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
Required range:
x >= 1Available options:
network_review_submitted, cancelled_by_customer, null Show child attributes
Show child attributes
Correction audit metadata. Corrected PII values are intentionally omitted from API views.