curl --request GET \
--url https://app.metricaas.com.br/v1/conversas/{id}/mensagens \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.metricaas.com.br/v1/conversas/{id}/mensagens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.metricaas.com.br/v1/conversas/{id}/mensagens', 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://app.metricaas.com.br/v1/conversas/{id}/mensagens",
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://app.metricaas.com.br/v1/conversas/{id}/mensagens"
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))
}HttpResponse<String> response = Unirest.get("https://app.metricaas.com.br/v1/conversas/{id}/mensagens")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.metricaas.com.br/v1/conversas/{id}/mensagens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6a1f0c3e-5b7d-4e2a-9c84-1d2e3f4a5b6c",
"direction": "in",
"source": "lead",
"type": "audio",
"text": null,
"transcript": "Quanto custa o plano anual?",
"media": {
"url": "/v1/mensagens/6a1f0c3e-5b7d-4e2a-9c84-1d2e3f4a5b6c/midia",
"mime": "audio/ogg"
},
"status": "received",
"deleted": false,
"created_at": "2026-10-21T14:02:11.123Z"
},
{
"id": "0d9e8f7a-6b5c-4d3e-8f21-a0b1c2d3e4f5",
"direction": "out",
"source": "api",
"type": "text",
"text": "Oi, Maria! Já te passo os valores.",
"transcript": null,
"media": null,
"status": "sent",
"deleted": false,
"created_at": "2026-10-21T13:58:40.000Z"
}
],
"next_cursor": "1761055120000_0d9e8f7a-6b5c-4d3e-8f21-a0b1c2d3e4f5"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}O histórico da conversa
Exige inbox:view. Da mais nova para a mais antiga, por cursor: leia a
primeira página para responder e pagine para trás só se precisar de mais
contexto.
- Notas internas do time não saem — só a equipe as vê.
- Mensagem apagada sai com
deleted: true, semtexte semtranscript. sourcediz quem falou:lead,api(este agente),inbox(alguém do time pelo MetricaaS),celular(alguém respondeu pelo aparelho) ouautomacao(um fluxo).- Áudio transcrito traz o texto em
transcript.
curl --request GET \
--url https://app.metricaas.com.br/v1/conversas/{id}/mensagens \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.metricaas.com.br/v1/conversas/{id}/mensagens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.metricaas.com.br/v1/conversas/{id}/mensagens', 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://app.metricaas.com.br/v1/conversas/{id}/mensagens",
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://app.metricaas.com.br/v1/conversas/{id}/mensagens"
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))
}HttpResponse<String> response = Unirest.get("https://app.metricaas.com.br/v1/conversas/{id}/mensagens")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.metricaas.com.br/v1/conversas/{id}/mensagens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "6a1f0c3e-5b7d-4e2a-9c84-1d2e3f4a5b6c",
"direction": "in",
"source": "lead",
"type": "audio",
"text": null,
"transcript": "Quanto custa o plano anual?",
"media": {
"url": "/v1/mensagens/6a1f0c3e-5b7d-4e2a-9c84-1d2e3f4a5b6c/midia",
"mime": "audio/ogg"
},
"status": "received",
"deleted": false,
"created_at": "2026-10-21T14:02:11.123Z"
},
{
"id": "0d9e8f7a-6b5c-4d3e-8f21-a0b1c2d3e4f5",
"direction": "out",
"source": "api",
"type": "text",
"text": "Oi, Maria! Já te passo os valores.",
"transcript": null,
"media": null,
"status": "sent",
"deleted": false,
"created_at": "2026-10-21T13:58:40.000Z"
}
],
"next_cursor": "1761055120000_0d9e8f7a-6b5c-4d3e-8f21-a0b1c2d3e4f5"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Authorization: Bearer mcp_… — gere em Configurações → Tokens de API.
O token de API tem modo read ou write. Um token read responde 403
a qualquer verbo que não seja GET. As capacidades do token são a
interseção com as da pessoa de quem ele herda o papel: se ela perder
acesso na grade de Equipe, o token perde junto, sem ninguém revogar nada.
Token de agência (gerado no console da agência): vale para as
empresas da agência, e a empresa de cada chamada vai no header
X-Empresa: <slug da empresa>. Sem o header, 401. Num token de
empresa o header é opcional e, se vier, tem de ser a própria empresa. O
modo read vale igual: um token de agência de leitura só faz GET —
é o token para pôr numa função que só consulta.