# chat.postMessage

> Post a message (or a thread reply) as the bot, where it is a member.

Source: https://slaiky.xyz/docs/reference/methods/chat.postMessage

Public channels are joined on first use with channels:join (or posted to as is with chat:write.public).

`POST https://app.slaiky.xyz/api/methods/chat.postMessage` · needs `chat:write`

## Arguments

| Argument | Type | Required | What |
| --- | --- | --- | --- |
| `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. |
| `text` | string | no | Message text (Markdown). May be empty when blocks are sent. Up to 40,000 characters. |
| `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. |
| `threadId` | id | no | Reply in the thread of this message. |
| `alsoInChannel` | boolean | no | Thread reply also shown in the channel. |

## Answer

`{ "ok": true, … }` with: message: Message. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)).

## Example

Recorded on a real server (ids replaced).

*you run*

```sh

curl -s https://app.slaiky.xyz/api/methods/chat.postMessage \
  -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"channel":"7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08","threadId":"7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06","text":"Deploy is green."}'

```

*Slaiky → your app · `answer`*

```json

{
  "ok": true,
  "message": {
    "id": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14",
    "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08",
    "parentId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06",
    "author": {
      "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03",
      "handle": "docsrecorder",
      "name": "Docs Recorder",
      "title": "Records what Slaiky sends, for the developer docs",
      "avatarUrl": null,
      "timezone": null,
      "role": "member",
      "status": null,
      "isBot": true,
      "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01",
      "agentId": null,
      "look": null,
      "deactivated": false
    },
    "body": "Deploy is green.",
    "blocks": null,
    "files": [],
    "createdAt": "2026-11-10T12:00:02.000Z",
    "editedAt": null,
    "replyCount": 0,
    "lastReplyAt": null,
    "replyUsers": [],
    "reactions": [],
    "pinned": false,
    "alsoInChannel": false,
    "subtype": null,
    "meta": null
  }
}

```
