Pular para o conteúdo principal
POST
/
api
/
v1
/
chats
/
{chat_id}
/
messages
Send a message into a chat
curl --request POST \
  --url https://api.izap.ai/api/v1/chats/{chat_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "sender": "human-assistant",
  "sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "attachments": [
    {}
  ]
}
'
{
  "user_message": {
    "id": "m1a2b3c4-1234-4a5b-9c8d-abcdef123456",
    "content": "Oi!",
    "status": "sent"
  },
  "ai_messages": [],
  "ai_response_pending": true
}

Autorizações

Authorization
string
header
obrigatório

JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth token endpoint, or a business-scoped API token. Some Business/Chat/Template/Scheduling endpoints alternatively accept HTTP Basic credentials scoped to the business slug.

Parâmetros de caminho

chat_id
string<uuid>
obrigatório

Corpo

application/json
content
string
obrigatório
sender
enum<string>

Set to send as a human operator; omit for an AI-generated reply.

Opções disponíveis:
human-assistant
sender_user_id
string<uuid>
attachments
object[]

Resposta

Message accepted.

The response is of type object.