messages:write.
Find a group or channel
There is no separate group endpoint. A group is a conversation. Its id isgrp_…, and a named channel inside it has a chn_… id. Your bot sees
the groups and channels it is a member of.
- To list them, call
GET /v1/conversations. Each entry hastypeset togrouporchannel. Privacy is a separate field,is_private. - To fetch one, call
GET /v1/conversations/{grp_id}. It takes achn_id too. - To get only groups, pass
types=group. To get only channels, passtypes=channel. With notypes, you get both. Unknown values are ignored, and a list of only unknown values returns both.
conversation with that grp_… or chn_… id.
Needs conversations:read. See the
Conversation object.
Send
Who gets a push notification depends on the destination and on each
person’s settings. See Notifications before you
choose between a DM and a group.
Idempotency-Key is required on every send. See
Idempotency before you write retry logic.
Response 201:
conversation_id is dm_… for a direct message, or the grp_… / chn_…
you sent to. Keep it — you’ll want it for edits, and it’s what interaction
callbacks reference as data.message.conversation_id.
Mention people
Write a mention intotext with one of two tokens:
<…>, <!here> included, is
shown exactly as you wrote it, and nothing is unescaped, so < stays
four characters. blocks are never read for mentions.
Which ids you can mention. A <@usr_…> needs users:read. Without it,
any <@usr_…> is 403 missing_scope, whatever the id. With it, an id is
valid exactly when GET /v1/users/{id} answers 200 for your App. Any
other id is 400 invalid_request, whatever the conversation, and nothing is
posted. The error message names the text field and the token, for example
"`text` mentions <@usr_…>, who is not a person this App can see.". A
message can carry at most 25 mentions; more is 400 invalid_request.
Who is notified. A valid person who isn’t in the conversation, or who
has left it, is shown by name and not notified. So is a person who hasn’t
finished joining the company (GET /v1/users already lists them with
is_active: true), or who is deactivated or removed. That is the same rule
a colleague’s mention follows. Everyone else mentioned gets a mention
notification and a push, even when the installation doesn’t notify
conversation members. See Mentions for
when that push has mention priority.
<!channel> is limited to about one send a minute per conversation for
your App, on top of the message limits. See
Rate limits.
A repeat while the original is still being written. A repeat of a
<!channel> send, with the same Idempotency-Key, that arrives while the
original is still being written may answer 429 rate_limited with
Retry-After, because each server counts <!channel> sends on its own.
Otherwise it gets the original 201. After a 429, retry after that many
seconds: the retry returns the original 201 and posts nothing.
Edits. In PATCH /v1/messages/{id}, write mentions the same way. The
new text replaces the old mentions, and an edit notifies nobody. Leave
text out to keep the text and its mentions.
Reading them back. History returns <@usr_…> and <!channel> as you
sent them while the person stays visible to your App. A person who wasn’t
notifiable when mentioned reads back as @Name. See
Mentions in history text.
Edit
text, blocks and metadata. An empty body, or
"text": null, is 400 invalid_request.
to, reply_to_id and unfurl_links are ignored, because you can’t move
a message after sending it. You can only edit messages your own bot sent.
The limits (4,000 characters of text, 50 blocks, 4 KB of metadata) apply
to the result of the merge.
Change the text and keep the card. Send only text:
{"lead_id": "lead_1", "owner": "sarah", "stage": "new"}. This edit sets
stage, removes owner and leaves lead_id alone:
{"lead_id": "lead_1", "stage": "claimed"}. Send
"metadata": null to remove all of it.
200
Delete
200 {"ok": true}, or 404 message_not_found if it’s already gone
— treat both as success. This works even after your bot was removed from
the conversation. Deletion removes the message’s content immediately from
every client and API; see Data & security.
Errors specific to sending
Full table on Errors.