Mensageria WhatsApp
Mensageria WhatsApp é POST https://api.verifik.co/v2/communication/whatsapp, não GET. O corpo exige phone e countryCode. A rota fixa phoneGateway em whatsapp. whatsappTemplate opcional é authentication (o padrão) ou flow2. Com flow2, language escolhe flow2_es ou flow2_en, e title opcional (1 a 15 caracteres) é a seção da marca.
O que a chamada devolve
phoneecountryCodephoneGatewayemwhatsappstatus
Casos de uso
- Envie um código de acesso pelo WhatsApp.
- Escolha flow2 se precisar de um modelo de marca.
- Deixe authentication como modelo padrão.
Referência da API
Endpoint
POST https://api.verifik.co/v2/communication/whatsapp
Um envio bem-sucedido devolve phoneGateway whatsapp e estado sent.
Headers
| Nome | Valor | Descrição |
|---|---|---|
| Content-Type | application/json | Formato da solicitação |
| Accept | application/json | Formato da resposta |
| Authorization | Bearer <seu_token> | JWT do cliente |
Parameters
| Nome | Tipo | Obrigatório | Exemplo | Descrição |
|---|---|---|---|---|
phone | string | Sim | 3001234567 | Só o número nacional. |
countryCode | string | Sim | +57 | Indicativo que começa com +. |
whatsappTemplate | string | Não | authentication | Opcional. authentication (padrão) ou flow2. |
language | string | Não | es | Opcional. Com flow2, escolhe flow2_es ou flow2_en. |
Request
- Node.js / JavaScript
- Python
- cURL
import axios from "axios";
const options = {
method: "POST",
url: "https://api.verifik.co/v2/communication/whatsapp",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer <your_token>",
},
data: {
"phone": "3001234567",
"countryCode": "+57",
"whatsappTemplate": "authentication"
},
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error.response ? error.response.data : error.message);
}
import requests
url = "https://api.verifik.co/v2/communication/whatsapp"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <your_token>",
}
payload = {
"phone": "3001234567",
"countryCode": "+57",
"whatsappTemplate": "authentication",
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
curl -X POST "https://api.verifik.co/v2/communication/whatsapp" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <your_token>" \
-d '{"phone":"3001234567","countryCode":"+57","whatsappTemplate":"authentication"}'
Response
- 200 (Registro encontrado)
- 409 (Parâmetro ausente)
- 404 (Não encontrado)
- 401 (Não autorizado)
- 500 (Fonte indisponível)
{
"data": {
"phone": "3001234567",
"countryCode": "+57",
"phoneGateway": "whatsapp",
"status": "sent"
},
"signature": {
"dateTime": "November 27, 2026 12:00 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "MissingParameter",
"message": "\"phone\" is required"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
{
"code": "InternalServerError",
"message": "The official source is temporarily unavailable. Please retry shortly."
}
Notas
- Esta rota é POST, não GET.
whatsappTemplateé opcional:authenticationouflow2.- A rota fixa
phoneGatewayemwhatsapp. - Envie um JWT Bearer no cabeçalho
Authorization. - O JSON de exemplo ilustra os campos. Uma chamada real devolve o registro dos valores enviados.
- Não envie um indicador de bypass de cache. Esta página documenta apenas os parâmetros de cliente.
Sandbox
| Cenário | Parâmetros | Resultado |
|---|---|---|
| Registro na fonte | phone: "3001234567", countryCode: "+57" | 200 quando o OTP de WhatsApp é enviado. |
| Valor obrigatório ausente | Omit countryCode | 409 MissingParameter. |
| Valor desconhecido | whatsappTemplate: "flow2", language: "es" | 200 com o modelo flow2 se language for es. |
401 when the bearer token is missing or rejected.