Get phone line
Returns { "line": { … } } for one line of your workspace, finished lines included. {id} is the line’s id (from the list, or lineId in the purchase result) — not the phone number. A line of another workspace answers 404 LINE_NOT_FOUND, the same as one that does not exist.
Permissions: with an OAuth / MCP token, the user must be an Owner or Admin (phone_lines:read) — 403 PERMISSION_DENIED otherwise.
Every /v1/phone-lines endpoint takes a tenant-scoped key only: a line belongs to the workspace, not to a WhatsApp number, so a number-scoped key (or a per-number OAuth grant) gets 403 NUMBER_SCOPE_NOT_ALLOWED before any role is looked at. A 403 PERMISSION_DENIED / WORKSPACE_MEMBERSHIP_REQUIRED is sent with Cache-Control: no-store.
Requires a tenant-scoped key.
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/{id}"
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/{id}', 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}",
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/{id}"
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/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/{id}")
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{
"line": {
"id": "cmg5k2l1n0001pl8example9x",
"name": "Support SP",
"number": "551148637200",
"display": "(11) 4863-7200",
"ddd": "11",
"status": "PAYMENT_PENDING",
"price": 33.9,
"currency": "BRL",
"purchasedAt": "2026-10-01T14:03:11.000Z",
"currentPeriodEnd": "2026-11-01T14:03:11.000Z",
"cancelAtPeriodEnd": false,
"paymentPendingSince": "2026-11-01T14:17:02.000Z",
"suspendedAt": null,
"returnedAt": null,
"canceledAt": null,
"activationCount": 1,
"amountDue": 33.9
}
}Was this page helpful?
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/{id}"
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/{id}', 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}",
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/{id}"
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/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/{id}")
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{
"line": {
"id": "cmg5k2l1n0001pl8example9x",
"name": "Support SP",
"number": "551148637200",
"display": "(11) 4863-7200",
"ddd": "11",
"status": "PAYMENT_PENDING",
"price": 33.9,
"currency": "BRL",
"purchasedAt": "2026-10-01T14:03:11.000Z",
"currentPeriodEnd": "2026-11-01T14:03:11.000Z",
"cancelAtPeriodEnd": false,
"paymentPendingSince": "2026-11-01T14:17:02.000Z",
"suspendedAt": null,
"returnedAt": null,
"canceledAt": null,
"activationCount": 1,
"amountDue": 33.9
}
}