Correct an extracted field
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"extraction_id": "<string>",
"field": "<string>",
"corrected_value": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections"
payload = {
"extraction_id": "<string>",
"field": "<string>",
"corrected_value": "<string>",
"reason": "<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({
extraction_id: '<string>',
field: '<string>',
corrected_value: '<string>',
reason: '<string>'
})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections', 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}/corrections",
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([
'extraction_id' => '<string>',
'field' => '<string>',
'corrected_value' => '<string>',
'reason' => '<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}/corrections"
payload := strings.NewReader("{\n \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<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}/corrections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections")
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 \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<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>"
}Telephony
Correct an extracted field
POST
/
v1
/
telephony
/
compliance-cases
/
{id}
/
corrections
Correct an extracted field
curl --request POST \
--url https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"extraction_id": "<string>",
"field": "<string>",
"corrected_value": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections"
payload = {
"extraction_id": "<string>",
"field": "<string>",
"corrected_value": "<string>",
"reason": "<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({
extraction_id: '<string>',
field: '<string>',
corrected_value: '<string>',
reason: '<string>'
})
};
fetch('https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections', 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}/corrections",
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([
'extraction_id' => '<string>',
'field' => '<string>',
'corrected_value' => '<string>',
'reason' => '<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}/corrections"
payload := strings.NewReader("{\n \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<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}/corrections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/compliance-cases/{id}/corrections")
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 \"extraction_id\": \"<string>\",\n \"field\": \"<string>\",\n \"corrected_value\": \"<string>\",\n \"reason\": \"<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
apiKeyxApiKey
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Path Parameters
Body
application/json
Response
Correction recorded
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.