Consultar endpoint de webhook
curl --request GET \
--url https://api.routa.chat/v1/webhook_endpoints/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/webhook_endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/webhook_endpoints/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routa.chat/v1/webhook_endpoints/{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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.routa.chat/v1/webhook_endpoints/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "whe_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"url": "https://exemplo.com/webhooks/routa",
"subscribed_types": [
"<string>"
],
"api_version": "<string>",
"status": "enabled",
"consecutive_failures": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"created_at": "2026-09-04T13:22:41.031Z"
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}Webhooks
Consultar endpoint de webhook
Retorna um endpoint, incluindo status, consecutive_failures e os horários do último sucesso e da última falha.
GET
/
v1
/
webhook_endpoints
/
{id}
Consultar endpoint de webhook
curl --request GET \
--url https://api.routa.chat/v1/webhook_endpoints/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/webhook_endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/webhook_endpoints/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.routa.chat/v1/webhook_endpoints/{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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.routa.chat/v1/webhook_endpoints/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "whe_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"url": "https://exemplo.com/webhooks/routa",
"subscribed_types": [
"<string>"
],
"api_version": "<string>",
"status": "enabled",
"consecutive_failures": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"created_at": "2026-09-04T13:22:41.031Z"
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "channel_inactive",
"message": "Channel chan_01J8... is not active and cannot send messages.",
"request_id": "req_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"param": "<string>",
"doc_url": "<string>",
"details": {}
}
}Authorizations
Chave de API do projeto, no formato rt_live_... ou rt_test_..., enviada como Authorization: Bearer <chave>.
Path Parameters
Identificador do endpoint (whe_...).
Response
Sucesso
Identificador do endpoint.
Example:
"whe_01J8ZK9M3Q7XABCDEFGHJKMNPQ"
URL que recebe os eventos.
Example:
"https://exemplo.com/webhooks/routa"
Tipos de evento assinados, incluindo curingas como message.*.
Versão da API fixada na criação do endpoint.
Estado do endpoint: enabled, disabled_by_user ou disabled_by_system.
Available options:
enabled, disabled_by_user, disabled_by_system Falhas consecutivas de entrega. Zera a cada sucesso.
Último sucesso de entrega, ou null.
Última falha de entrega, ou null.
Quando o endpoint foi criado.
Example:
"2026-09-04T13:22:41.031Z"