Pular para o conteúdo principal
POST
/
api
/
{agentId}
Enviar mensagem
curl --request POST \
  --url https://chat.meuassistente.rdstationmentoria.com.br/api/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "tools": [],
  "preview": false,
  "utm": {
    "source": "<string>",
    "medium": "<string>",
    "campaign": "<string>",
    "content": "<string>",
    "term": "<string>"
  },
  "format": "markdown",
  "leadId": "<string>",
  "platformUserIdentifier": "<string>",
  "message": {
    "role": "system",
    "content": null,
    "name": null,
    "createdAt": "2025-11-26T20:01:13.172Z",
    "metadata": {},
    "toolCallId": null,
    "attachments": []
  },
  "messages": []
}
'
{
  "id": "<string>",
  "messages": [
    {
      "id": "<string>",
      "conversationId": "<string>",
      "role": "system",
      "usage": {
        "promptTokens": 123,
        "completionTokens": 123,
        "cachedTokens": 123
      },
      "name": null,
      "content": null,
      "toolCallId": null,
      "toolCalls": null,
      "metadata": {},
      "feedback": null,
      "attachments": [],
      "createdAt": "2025-11-26T20:01:13.177Z",
      "updatedAt": "2025-11-26T20:01:13.177Z"
    }
  ],
  "status": "active",
  "lead": {
    "id": "<string>",
    "workspaceId": "<string>",
    "agentId": null,
    "name": null,
    "email": null,
    "phone": null,
    "company": null,
    "site": null,
    "custom": {},
    "utm": {},
    "capture": "completed",
    "createdAt": "2025-11-26T20:01:13.178Z",
    "updatedAt": "2025-11-26T20:01:13.178Z"
  }
}

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parâmetros de caminho

agentId
string
obrigatório

Identificador do assistente

Corpo

application/json
id
string

A conversa para enviar a mensagem, ou undefined para iniciar uma nova conversa

tools
object[]

Ferramentas utilizadas pelo assistente

preview
boolean
padrão:false
utm
object

Informações de rastreamento UTM

format
enum<string>
padrão:markdown

Formata a resposta gerada pelo assistente para diferentes canais

Opções disponíveis:
markdown,
plain,
whatsapp,
slack
leadId
string

Identificador do lead

platformUserIdentifier
string

Identificador do usuário plataforma de origem

message
object

Mensagem única para adicionar neste turno da conversa e gerar uma resposta

messages
object[] | null

Mensagens para adicionar neste turno da conversa e gerar uma resposta

Resposta

Successful response

Resposta de uma conversa de chat com mensagens, status e lead

id
string
obrigatório

Identificador da conversa

messages
object[]
obrigatório

Mensagens geradas durante este turno da conversa

status
enum<string>
obrigatório

Status

Opções disponíveis:
active,
finished
lead
object

Dados do lead