POST
/
api
/
{agentId}
Enviar mensagem
curl --request POST \
  --url https://chat.meuassistente.rdstationmentoria.com.br/rest/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>",
  "message": {
    "role": "system",
    "content": null,
    "name": null,
    "createdAt": "2025-07-21T17:52:50.132Z",
    "metadata": {},
    "toolCallId": null,
    "attachments": []
  },
  "messages": []
}'
{
  "id": "<string>",
  "messages": [
    {
      "id": "<string>",
      "conversationId": "<string>",
      "role": "system",
      "name": null,
      "content": null,
      "toolCallId": null,
      "toolCalls": null,
      "metadata": {},
      "feedback": null,
      "usage": {
        "promptTokens": 123,
        "completionTokens": 123,
        "cachedTokens": 123
      },
      "attachments": [],
      "createdAt": "2025-07-21T17:52:50.133Z",
      "updatedAt": "2025-07-21T17:52:50.133Z"
    }
  ],
  "lead": {
    "id": "<string>",
    "agentId": null,
    "name": null,
    "email": null,
    "phone": null,
    "company": null,
    "site": null,
    "custom": {},
    "utm": {},
    "capture": "completed",
    "workspaceId": "<string>",
    "createdAt": "2025-07-21T17:52:50.134Z",
    "updatedAt": "2025-07-21T17:52:50.134Z"
  },
  "status": "active"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

agentId
string
required

Identificador do assistente

Body

application/json

Response

200
application/json

Successful response

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