curl --request POST \
--url https://app.metricaas.com.br/v1/conversas/{id}/ia \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pausada": true,
"motivo": "pediu atendente"
}
'import requests
url = "https://app.metricaas.com.br/v1/conversas/{id}/ia"
payload = {
"pausada": True,
"motivo": "pediu atendente"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pausada: true, motivo: 'pediu atendente'})
};
fetch('https://app.metricaas.com.br/v1/conversas/{id}/ia', 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}/ia",
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([
'pausada' => true,
'motivo' => 'pediu atendente'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.metricaas.com.br/v1/conversas/{id}/ia"
payload := strings.NewReader("{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.metricaas.com.br/v1/conversas/{id}/ia")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.metricaas.com.br/v1/conversas/{id}/ia")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}"
response = http.request(request)
puts response.read_body{
"pausada": true,
"mudou": true
}{
"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": "about:blank",
"title": "Pausada por uma pessoa da equipe",
"status": 409,
"detail": "A IA foi pausada por uma pessoa da equipe nesta conversa — só ela retoma, pelo inbox."
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Pausa ou retoma a IA nesta conversa
Exige inbox:operate e um token write. É como o agente pede um
humano: com pausada: true, os envios seguintes recebem 409.
A IA também pausa sozinha quando alguém do time responde (pelo MetricaaS ou pelo celular), e retoma quando a equipe resolve a conversa.
O agente só retoma a pausa que ele pediu. Se quem pausou foi uma
pessoa da equipe (ou alguém respondendo pelo celular), pausada: false
devolve 409 e nada muda — quem retoma é ela, pelo inbox. Do mesmo jeito,
resolver a conversa por POST /conversas/{id}/atendimento não derruba a
pausa de uma pessoa.
Idempotente: pausar o que já está pausado devolve mudou: false e não
troca quem pausou nem quando.
curl --request POST \
--url https://app.metricaas.com.br/v1/conversas/{id}/ia \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pausada": true,
"motivo": "pediu atendente"
}
'import requests
url = "https://app.metricaas.com.br/v1/conversas/{id}/ia"
payload = {
"pausada": True,
"motivo": "pediu atendente"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pausada: true, motivo: 'pediu atendente'})
};
fetch('https://app.metricaas.com.br/v1/conversas/{id}/ia', 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}/ia",
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([
'pausada' => true,
'motivo' => 'pediu atendente'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.metricaas.com.br/v1/conversas/{id}/ia"
payload := strings.NewReader("{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.metricaas.com.br/v1/conversas/{id}/ia")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.metricaas.com.br/v1/conversas/{id}/ia")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pausada\": true,\n \"motivo\": \"pediu atendente\"\n}"
response = http.request(request)
puts response.read_body{
"pausada": true,
"mudou": true
}{
"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": "about:blank",
"title": "Pausada por uma pessoa da equipe",
"status": 409,
"detail": "A IA foi pausada por uma pessoa da equipe nesta conversa — só ela retoma, pelo inbox."
}{
"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.