curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_request_id": "<string>",
"object_ref": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 2,
"sha256": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads"
payload = {
"document_request_id": "<string>",
"object_ref": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 2,
"sha256": "<string>",
"generation": "<string>"
}
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({
document_request_id: '<string>',
object_ref: '<string>',
file_name: '<string>',
mime_type: '<string>',
size_bytes: 2,
sha256: '<string>',
generation: '<string>'
})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads', 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}/uploads",
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([
'document_request_id' => '<string>',
'object_ref' => '<string>',
'file_name' => '<string>',
'mime_type' => '<string>',
'size_bytes' => 2,
'sha256' => '<string>',
'generation' => '<string>'
]),
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.pyai.com/v1/telephony/compliance-cases/{id}/uploads"
payload := strings.NewReader("{\n \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<string>\"\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.pyai.com/v1/telephony/compliance-cases/{id}/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads")
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 \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<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>"
}Register document upload metadata
Finalizes a previously granted upload. The immutable object generation, ownership path, signed metadata, byte length, SHA-256, and actual file signature are verified before a bounded malware scan runs. Extraction remains blocked unless the terminal scan result is clean.
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_request_id": "<string>",
"object_ref": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 2,
"sha256": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads"
payload = {
"document_request_id": "<string>",
"object_ref": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"size_bytes": 2,
"sha256": "<string>",
"generation": "<string>"
}
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({
document_request_id: '<string>',
object_ref: '<string>',
file_name: '<string>',
mime_type: '<string>',
size_bytes: 2,
sha256: '<string>',
generation: '<string>'
})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads', 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}/uploads",
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([
'document_request_id' => '<string>',
'object_ref' => '<string>',
'file_name' => '<string>',
'mime_type' => '<string>',
'size_bytes' => 2,
'sha256' => '<string>',
'generation' => '<string>'
]),
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.pyai.com/v1/telephony/compliance-cases/{id}/uploads"
payload := strings.NewReader("{\n \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<string>\"\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.pyai.com/v1/telephony/compliance-cases/{id}/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/uploads")
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 \"document_request_id\": \"<string>\",\n \"object_ref\": \"<string>\",\n \"file_name\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 2,\n \"sha256\": \"<string>\",\n \"generation\": \"<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>"
}Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Path Parameters
Body
Opaque object-storage reference. Never a document body or public URL.
^obj_[A-Za-z0-9_-]{20,}$255x >= 1Lowercase SHA-256 content hash.
^[0-9a-f]{64}$Optional immutable object generation returned by storage.
^[1-9][0-9]*$Response
Upload metadata registered
"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.