Consultar activación
Una solicitud de código: su status y, una vez TRANSCRIBED, su code. Consúltala después de POST /v1/phone-lines/{id}/activations cada pocos segundos: el estado solo puede cambiar después de nuestra próxima revisión de la línea, más o menos cada 15 segundos.
No dejes de consultar en el primer estado que no sea WAITING. Sigue consultando mientras status sea WAITING, o CAPTURED con failureReason: null (la llamada llegó y se está leyendo su código; una transcripción fallida se reintenta desde la grabación guardada, hasta 3 intentos en total, así que esto puede tardar unos minutos). TRANSCRIBED no garantiza un código: revisa code (null con no_code_in_transcript cuando no se escuchó ningún código de 6 dígitos). TIMED_OUT se registra en la primera revisión después de pollDeadline, hasta unos 15 segundos más tarde; esa revisión aún lee la línea una última vez, así que una solicitud también puede pasar de WAITING a CAPTURED justo después de su pollDeadline.
La grabación no está en esta respuesta: hasAudio: true indica que hay una, servida por GET /v1/phone-lines/activations/{activationId}/audio. Una solicitud de otro workspace responde 404 ACTIVATION_NOT_FOUND, igual que una que no existe. Se envía con Cache-Control: no-store: el código es una credencial.
Requiere una clave con alcance de tenant: una clave con alcance de número (o un permiso OAuth por número) recibe 403 NUMBER_SCOPE_NOT_ALLOWED. Permiso phone_lines:read: con un token OAuth / MCP el usuario debe ser Owner o Admin (403 PERMISSION_DENIED en otro caso).
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/activations/{activationId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}', 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://pilotstatus.com.br/v1/phone-lines/activations/{activationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activation": {
"id": "cmg5k3a7c0002ac8example4q",
"lineId": "cmg5k2l1n0001pl8example9x",
"status": "TRANSCRIBED",
"requestedAt": "2026-10-01T14:10:00.000Z",
"pollDeadline": "2026-10-01T14:15:00.000Z",
"code": "123456",
"capturedAt": "2026-10-01T14:11:42.000Z",
"transcribedAt": "2026-10-01T14:11:51.000Z",
"failureReason": null,
"hasAudio": true
}
}Parámetros de ruta
¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/activations/{activationId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}', 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://pilotstatus.com.br/v1/phone-lines/activations/{activationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/activations/{activationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activation": {
"id": "cmg5k3a7c0002ac8example4q",
"lineId": "cmg5k2l1n0001pl8example9x",
"status": "TRANSCRIBED",
"requestedAt": "2026-10-01T14:10:00.000Z",
"pollDeadline": "2026-10-01T14:15:00.000Z",
"code": "123456",
"capturedAt": "2026-10-01T14:11:42.000Z",
"transcribedAt": "2026-10-01T14:11:51.000Z",
"failureReason": null,
"hasAudio": true
}
}