Criar número (PILOT_STATUS)
Cria um número WhatsApp não-oficial (PILOT_STATUS) e retorna o QR code + pairing code para parear. Por padrão, vincula o número à API key chamadora (defina linkToApiKey:false para não vincular). Efeito real: provisiona uma instância.
curl --request POST \
--url https://pilotstatus.com.br/v1/numbers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Suporte",
"number": "5511999999999",
"linkToApiKey": "true",
"settings": {
"historyImportEnabled": true,
"webhookHistoricalMessages": false,
"ignoreNewsletters": false
}
}
'import requests
url = "https://pilotstatus.com.br/v1/numbers"
payload = {
"name": "Suporte",
"number": "5511999999999",
"linkToApiKey": "true",
"settings": {
"historyImportEnabled": True,
"webhookHistoricalMessages": False,
"ignoreNewsletters": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Suporte',
number: '5511999999999',
linkToApiKey: 'true',
settings: {
historyImportEnabled: true,
webhookHistoricalMessages: false,
ignoreNewsletters: false
}
})
};
fetch('https://pilotstatus.com.br/v1/numbers', 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/numbers",
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([
'name' => 'Suporte',
'number' => '5511999999999',
'linkToApiKey' => 'true',
'settings' => [
'historyImportEnabled' => true,
'webhookHistoricalMessages' => false,
'ignoreNewsletters' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/numbers"
payload := strings.NewReader("{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/numbers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"instance": {
"id": "num_01HZX...",
"number": "5511999999999",
"name": "Suporte",
"provider": "PILOT_STATUS",
"status": "CONNECTING",
"isFullyConnected": false
},
"qrcodeBase64": "data:image/png;base64,iVBORw0KGgo...",
"pairingCode": "ABCD-1234",
"linkedApiKeyId": "key_01HZX..."
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}Autorizações
Sua chave de API ps_
Corpo
Nome de exibição do número.
"Suporte"
Número de telefone (mínimo 10 dígitos, opcional +).
"5511999999999"
Vincular o novo número à API key chamadora (padrão true).
"true"
Per-number settings the number is BORN with — the same block as PATCH /v1/numbers/{id}. This is where historyImportEnabled is decided: it defaults to true (it was false for numbers created between 2026-08-26 and 2026-09-16), the provider hands the device history over in a single burst right after the connection, and there is no way to request it afterwards. Every field of the PATCH block is accepted here; the 201 echoes back what the number was created with.
Show child attributes
Show child attributes
Resposta
Criar número
Esta página foi útil?
curl --request POST \
--url https://pilotstatus.com.br/v1/numbers \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Suporte",
"number": "5511999999999",
"linkToApiKey": "true",
"settings": {
"historyImportEnabled": true,
"webhookHistoricalMessages": false,
"ignoreNewsletters": false
}
}
'import requests
url = "https://pilotstatus.com.br/v1/numbers"
payload = {
"name": "Suporte",
"number": "5511999999999",
"linkToApiKey": "true",
"settings": {
"historyImportEnabled": True,
"webhookHistoricalMessages": False,
"ignoreNewsletters": False
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Suporte',
number: '5511999999999',
linkToApiKey: 'true',
settings: {
historyImportEnabled: true,
webhookHistoricalMessages: false,
ignoreNewsletters: false
}
})
};
fetch('https://pilotstatus.com.br/v1/numbers', 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/numbers",
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([
'name' => 'Suporte',
'number' => '5511999999999',
'linkToApiKey' => 'true',
'settings' => [
'historyImportEnabled' => true,
'webhookHistoricalMessages' => false,
'ignoreNewsletters' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/numbers"
payload := strings.NewReader("{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/numbers")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Suporte\",\n \"number\": \"5511999999999\",\n \"linkToApiKey\": \"true\",\n \"settings\": {\n \"historyImportEnabled\": true,\n \"webhookHistoricalMessages\": false,\n \"ignoreNewsletters\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"instance": {
"id": "num_01HZX...",
"number": "5511999999999",
"name": "Suporte",
"provider": "PILOT_STATUS",
"status": "CONNECTING",
"isFullyConnected": false
},
"qrcodeBase64": "data:image/png;base64,iVBORw0KGgo...",
"pairingCode": "ABCD-1234",
"linkedApiKeyId": "key_01HZX..."
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}