Request activation code
Gets the line ready to capture a NEW WhatsApp verification call — no body. WhatsApp verifies a landline by calling it and speaking a 6-digit code; this endpoint opens the capture window, it does not place the call. The line is reset at the carrier, so the recording of an earlier call can never be read as this one’s code, and a request opens in WAITING until pollDeadline — 5 minutes later. A call that arrives before this request exists is not captured.
After the 201, register the number in WhatsApp Business and choose the phone call option (“Call me”) — the line is a landline and does not receive SMS. Then poll GET /v1/phone-lines/activations/{activationId} every few seconds (or listen for the phone_line.code_received webhook) and type code into WhatsApp.
Allowed while the line is ACTIVE or PAYMENT_PENDING; a SUSPENDED, RETURNED or CANCELED line gets 409 LINE_NOT_ACTIVE. One waiting request per line: while a request is WAITING and its pollDeadline is still ahead, another POST answers 409 ACTIVATION_IN_PROGRESS — poll the one you have, or cancel it with POST /v1/phone-lines/{id}/activations/{activationId}/cancel to ask again right away. No limit on requests over time; each request that opens increments the line’s activationCount. Sent with Cache-Control: no-store: the code is a credential.
Requires a tenant-scoped key — a number-scoped key (or per-number OAuth grant) gets 403 NUMBER_SCOPE_NOT_ALLOWED. Permission phone_lines:read: with an OAuth / MCP token the user must be an Owner or Admin (403 PERMISSION_DENIED otherwise).
curl --request POST \
--url https://pilotstatus.com.br/v1/phone-lines/{id}/activations \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/{id}/activations"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/{id}/activations', 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/{id}/activations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{id}/activations"
req, _ := http.NewRequest("POST", 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.post("https://pilotstatus.com.br/v1/phone-lines/{id}/activations")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/{id}/activations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activation": {
"id": "cmg5k3a7c0002ac8example4q",
"lineId": "cmg5k2l1n0001pl8example9x",
"status": "WAITING",
"requestedAt": "2026-10-01T14:10:00.000Z",
"pollDeadline": "2026-10-01T14:15:00.000Z",
"code": null,
"capturedAt": null,
"transcribedAt": null,
"failureReason": null,
"hasAudio": false
}
}Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/phone-lines/{id}/activations \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/{id}/activations"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/phone-lines/{id}/activations', 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/{id}/activations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{id}/activations"
req, _ := http.NewRequest("POST", 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.post("https://pilotstatus.com.br/v1/phone-lines/{id}/activations")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/{id}/activations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activation": {
"id": "cmg5k3a7c0002ac8example4q",
"lineId": "cmg5k2l1n0001pl8example9x",
"status": "WAITING",
"requestedAt": "2026-10-01T14:10:00.000Z",
"pollDeadline": "2026-10-01T14:15:00.000Z",
"code": null,
"capturedAt": null,
"transcribedAt": null,
"failureReason": null,
"hasAudio": false
}
}