Slack's Web API is organized around conversations (channels, DMs, group DMs), users, files, messages, and workspace/admin resources. Most day-to-day actions — sending or editing messages, uploading files, examining members — use conversation and user identifiers. Admin/enterprise actions live under distinct admin.* methods and typically require extra scopes and workspace (team) identifiers.
Key entities and where to get their IDs
-
Conversations / channels: almost every conversations- and chat-related method needs a conversation identifier (
channel/channel_id). Get these fromconversations.listorusers.conversations(filter bytypesas needed). For a DM with a specific user, open (or ensure) a DM withconversations.openand use the returned channel. -
Users: many actions require a user ID (
user). To find a user by email useusers.lookupByEmail. For broad lists useusers.list.users.conversationscan enumerate channels a user belongs to. -
Teams / workspaces: admin and org-level methods often require
team_idorenterprise_id. The current token's team is visible inauth.test(returnsteam_id). Admin flows may need workspace IDs returned fromadmin_teams_listoradmin_conversations_getTeams. -
Messages: messages are identified by
ts(timestamp) returned bychat.postMessageand many history/reply endpoints. Use thattsforchat.update,chat.delete,chat.getPermalink, andconversations.replies(thread parentthread_ts). -
Files:
files.uploadreturns afileobject with an ID; usefiles.infoorfiles_sharedPublicURL/files_revokePublicURLto manage sharing. For remote-file flows, methods accept eitherfile(Slack ID) orexternal_id(app GUID); one of them is usually required. -
Views/dialogs/workflows: view payloads and dialogs are submitted as stringified view/dialog parameters (
view,dialog,inputs,outputs). Where the signature calls for a JSON-encodedviewordialogprovide the view as a single string value matching the API's expected view object structure.
Authentication and scopes (practical notes)
-
Many methods require an OAuth token; check the operation signature to see whether that token appears as a header parameter (
tokenin the header) or as a query parameter (tokenin the query). Provide the token in the exact parameter location the operation's signature shows. -
Admin and enterprise operations require specialized admin scopes (for example
admin.*,admin.conversations:*,admin.users:*) and often only operate at the workspace/org level. If a user asks for admin tasks, confirm that the token has the appropriate admin scopes and that ateam_id(orenterprise_id) is supplied when required.
Common tasks and the typical operation sequence
Each example below states the minimal sequence of calls and which IDs you need to obtain along the way. Use the exact parameter names shown in each operation's signature.
-
Send a message to a public/private channel by name
- Find the channel ID: call
conversations.listand filter byname(or useusers.conversationsif looking for channels for a particular user).conversations.listreturns channel objects inchannelsand may includeresponse_metadata.next_cursorfor pagination. - Call
chat.postMessagewith thechannelID andtext(and optionalblocks,attachments). The response includestsand the postedmessageobject.
- Find the channel ID: call
-
Send a direct message to a user (by email)
- Get the user ID: call
users.lookupByEmailwithemail. - Open a DM: call
conversations.openwith theuser(oruserslist). Inspect the returnedchannel— watch foralready_openand for the returned shape (some responses provide a conversation object or arrays). Use the returned channel'sid. - Call
chat.postMessagewith that DMchannelID.
- Get the user ID: call
-
Update or delete a specific message
- Use the
channeland the messagetsreturned when the message was posted. For updates callchat.update. For deletion callchat.delete(orchat_deleteScheduledMessagefor scheduled messages) using the samechannel+ts(orscheduled_message_idfor scheduled items).
- Use the
-
Schedule, list, and cancel scheduled messages
chat.scheduleMessagereturnsscheduled_message_idandpost_atand the scheduledmessagesummary.- List scheduled messages with
chat.scheduledMessages.list(filter bychannel,oldest,latestas needed). Look forresponse_metadata.next_cursorfor pagination. - Delete a scheduled message with
chat.deleteScheduledMessageusing thescheduled_message_id(or the operation signature's required fields).
-
Work with threads and replies
- Use
conversations.replieswith the parent messagets(thread_ts) and the channel to fetch thread replies. To post a reply, callchat.postMessagewiththread_tsset to the parenttsand the channel.
- Use
-
Upload and share a file
- Call
files.upload(supplychannelsif immediate sharing is desired). The response includes thefileobject. - To make a file public, call
files.sharedPublicURL; to revoke public access callfiles.revokePublicURL. - For remote files (registered by an app), use
files.remote.*methods; sharing requires eitherfileorexternal_idper the method signature.
- Call
-
Pinning, starring, reacting
- Pin a message or file with
pins.add. Remove withpins.remove. Add emoji reactions withreactions.addand remove withreactions.remove. To list pins or stars, usepins.listandstars.list(note some list responses can be paginated or returned as different shaped payloads — inspect the response).
- Pin a message or file with
-
Post ephemeral messages
- Use
chat.postEphemeraland provide bothchannelanduser. Ephemeral messages are targeted to the user and do not appear to others.
- Use
-
Open views, update views, and use trigger-based flows
views.openandviews.pushrequire atrigger_idand aviewpayload (string).views_publishrequiresuser_idand aviewstring.views_updaterequiresview_idorexternal_idand theviewstring; it may also accept ahashto prevent race conditions.
-
User profile and presence
- Read profile with
users.profile.get(passuseroptionally). Update withusers.profile.set(requires the write scope). Presence can be read withusers.getPresenceand changed withusers.setPresence.
- Read profile with
Admin and org-level patterns (non-obvious details)
-
Admin endpoints are separate (
admin.*). These perform org-level operations: approving or restricting apps (admin.apps_*), creating teams (admin.teams_create), managing workspace users (admin.users_*), and creating or managing organization conversations (admin.conversations_*). They usually require: an admin token with the specific admin scopes, and sometimes an explicitteam_idorenterprise_idparameter. Verify which identifier the specific admin call expects. -
Admin conversation methods sometimes return only
okwithout the full conversation object, or they return different field names for created IDs (e.g.,channel_idvschannel). Check the exact operation response for which field contains the new ID. -
Listing approved or restricted apps and invite requests uses paginated responses with
cursor/next_cursor. Limits vary across admin calls (read the operation signature for allowedlimitranges).
Response and schema quirks to watch for
-
Token parameter location varies. Some operations declare
tokenin the header; others accept it in the query. Provide the token exactly as the operation signature requires. -
Inconsistent field names for new or returned IDs. Examples:
conversations.createreturns achannelobject;admin.conversations.createmay returnchannel_id. Always inspect the success response for the field that holds the created resource ID. -
conversations.openand some other endpoints can return different shapes depending on the call (single object vs array,already_openflags, or additional fields). Do not assume a fixed shape—use the actual response. -
Some endpoints require JSON-structured strings for parameters (for example
view,dialog,inputs,outputs). The signature will note when a parameter is a JSON-encoded string; supply the view/dialog as a single string matching the API's view format. -
Pagination is common and uses
cursor/response_metadata.next_cursor. Many list endpoints also return alimitand may have operation-specific maximums (check the operation signature for allowedlimitranges). -
Some operations in the surface list have incomplete or terse response schemas (responses that show only
ok: trueorbody: never). For these, inspect the response payload for the useful fields instead of assuming a consistent schema.
Practical checks before making changes
-
Confirm the token has the required scopes for the requested operation. Admin actions require admin-specific scopes; posting/reading messages require
chat:*orconversations:*orusers:*scopes as indicated in the operation signature. -
When doing cross-workspace or org-level work, confirm whether a
team_idorenterprise_idis required and obtain it (for the current tokenauth.testreturns the activeteam_id). -
When interacting with messages, always capture
tsandchannelfrom the response to reference that message later (updates, deletes, permalinks, replies).
Quick patterns (one-line reminders)
- Find a user by email:
users.lookupByEmail-> open DM:conversations.open-> post:chat.postMessage. - Find a channel by name:
conversations.list(filterchannelsbyname) -> post:chat.postMessage. - Edit/delete a message: use the
channel+ messagetsreturned from the original post. - Schedule a message:
chat.scheduleMessage-> list scheduled:chat.scheduledMessages.list-> delete scheduled:chat.deleteScheduledMessage. - Upload and share a file:
files.upload-> manage public link:files.sharedPublicURL/files.revokePublicURL.
Use the operation signatures to confirm required fields, where to place the token, and whether a parameter expects a JSON string. The API surface exposes both end-user and admin operations; pick workspace-level identifiers (channel, user, team) from the appropriate list/info calls before calling mutation endpoints.