Atendimento
Buscar mensagens
Permissão: product:inbox.
AuthorizationBearer <token>
Chave de API criada no painel (API e integrações). Prefixos: zz_live_, zz_test_ (e os antigos wl_live_/wl_test_).
In: header
requestSearchMessagesRequest
billing?object
Não usado nesta operação.
deadlineMs?integer
Prazo máximo da operação em milissegundos.
Default
30000Range
1 <= value <= 30000Response Body
curl -X POST "https://api.zynzap.com.br/v1/rpc/SearchMessages" \ -H "Authorization: Bearer $ZYNZAP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "request": {}}'{
"messages": [
{
"id": "string",
"conversation_id": "string",
"session_id": "string",
"chat_jid": "string",
"sender_jid": "string",
"from_me": true,
"provider_message_id": "string",
"direction": "string",
"message_type": "string",
"body": "string",
"caption": "string",
"media": {
"media_asset_id": "string",
"mime": "string",
"size_bytes": "string",
"file_name": "string",
"seconds": 0
},
"quoted_provider_id": "string",
"origin": "string",
"status": "string",
"status_detail": "string",
"author_user_id": "string",
"edited_at_unix_ms": "string",
"revoked_at_unix_ms": "string",
"provider_ts_unix_ms": "string",
"created_at_unix_ms": "string",
"idempotency_key": "string"
}
]
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "Requisição inválida para esta operação.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "RPC_REQUEST_INVALID"
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Credencial de API ausente, inválida ou revogada.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "API_AUTH_REQUIRED"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Este endereço IP não está autorizado a usar esta chave de API.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "API_KEY_IP_FORBIDDEN"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Não encontramos o recurso solicitado.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6"
}
}{
"error": {
"code": "CONFLICT",
"message": "A cotação expirou. Revise os custos novamente.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "BILLING_QUOTE_EXPIRED"
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "Requisição inválida para esta operação.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "RPC_REQUEST_INVALID"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Limite de requisições desta chave atingido. Aguarde um instante.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "API_KEY_RATE_LIMITED"
}
}{
"error": {
"code": "UNAVAILABLE",
"message": "Resultado incerto. Confira o estado antes de repetir a operação.",
"requestId": "7f3c1a9e-2b4d-4c6e-8f10-a1b2c3d4e5f6",
"reason": "OUTCOME_UNCERTAIN"
}
}