در حال بارگذاری…
Sends a message in a specific chat.
| Permission | Description |
|---|---|
chat_messages.create | Send a message in a chat |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| chat-id | int | Yes | ID of the chat | 123 |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| content | string | Yes | Message content | "Hello!" |
| chat_message_id | int | No | ID of the message being replied to (optional) | 456 |
{
"content": "Hello!",
"chat_message_id": 456
}
Returns the created chat message resource.
{
"data": { /* chat message resource */ }
}
For a full schema, see Chat Message Resource.
| Status | Description | Reference |
|---|---|---|
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden (no permission) | Permission error |
| 404 | chat_message_id names a message that is not in this chat | Not found |
Replying across chats is refused.
chat_message_idis validated withexists:, which only proves the message exists somewhere on the platform. If it belongs to a different chat the request returns404rather than403— a403would confirm that the other chat's message exists to someone who should not be able to tell.