Listar eventos
curl --request GET \
--url https://api.routa.chat/v1/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/events"
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/events",
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/events"
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))
}{
"data": [
{
"id": "evt_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"type": "message.accepted",
"api_version": "v1",
"schema_version": 1,
"project_id": "proj_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"sequence": 123,
"occurred_at": "2026-09-04T13:22:41.031Z",
"recorded_at": "2026-09-04T13:22:41.031Z",
"data": "<unknown>"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"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": {}
}
}{
"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": {}
}
}Eventos
Listar eventos
Lista os eventos do projeto em ordem crescente de sequence, do mais antigo para o mais recente. É o caminho de reconciliação para quem perdeu entregas de webhook: guarde o id do último evento processado e passe-o em after.
Os eventos ficam disponíveis por 90 dias. Veja Reconciliar eventos.
GET
/
v1
/
events
Listar eventos
curl --request GET \
--url https://api.routa.chat/v1/events \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.routa.chat/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.routa.chat/v1/events"
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/events",
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/events"
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))
}{
"data": [
{
"id": "evt_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"type": "message.accepted",
"api_version": "v1",
"schema_version": 1,
"project_id": "proj_01J8ZK9M3Q7XABCDEFGHJKMNPQ",
"sequence": 123,
"occurred_at": "2026-09-04T13:22:41.031Z",
"recorded_at": "2026-09-04T13:22:41.031Z",
"data": "<unknown>"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"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": {}
}
}{
"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>.
Query Parameters
Filtra por tipo de evento.
Available options:
message.accepted, message.sent, message.delivered, message.read, message.failed, message.received, channel.status_changed, template.submitted, template.pending, template.approved, template.rejected, template.paused, template.disabled Retoma a listagem depois deste id de evento (evt_...).
Quantidade de itens por página, de 1 a 100. O padrão é 20.
Required range:
1 <= x <= 100