Slack API for channels, files and threads
Building Slack publishing across customer workspaces usually means managing OAuth v2 bot tokens, implementing the three-step files.getUploadURLExternal flow, joining public channels before sharing files, formatting Block Kit blocks and tracking channel:ts pairs for replies and analytics. PostSyncer handles every step behind one REST API.
- List a workspace’s channels with GET /api/v1/accounts/{account}/slack/channels (private ones for the person who connected it)
- 40,000-character mrkdwn posts, Block Kit headers, CTA buttons and custom bot username/icon overrides
- Up to 10 photos, videos and documents in the same message as the text, plus thread_ts replies
- Cancel anytime
- Unlimited posts on paid plans
curl -X POST "https://postsyncer.com/api/v1/posts" \
-H "Authorization: Bearer $POSTSYNCER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 4815,
"schedule_type": "schedule",
"schedule_for": {
"date": "2026-12-11",
"time": "09:00",
"timezone": "America/Los_Angeles"
},
"content": [
{
"text": "The new *Ethiopia Guji* lot is roasted and live across all Halden Coffee locations.",
"media": [
"https://cdn.postsyncer.com/examples/latte-art.jpg"
]
},
{
"text": "Tasting notes: jasmine, stone fruit and honey. Wholesale bags ship Monday."
}
],
"accounts": [
{
"id": 16410,
"settings": {
"channel_id": "C01ANNOUNCE",
"title": "Autumn Harvest Launch",
"username": "Roastery Updates",
"icon_emoji": ":coffee:",
"unfurl_links": true,
"unfurl_media": true,
"reply_broadcast": false,
"cta_label": "View Menu",
"cta_url": "https://example.com/guji"
}
}
]
}'PostSyncer uploads the photo through Slack’s external upload flow, posts one message with the header, the button, the text and the photo, sends item two as a thread reply and stores the message’s Slack permalink.
01 Quick start
Live on Slack in three steps
- 1
Connect a Slack workspace via OAuth or connect link
Generate a 7-day connect link via
POST /api/v1/accounts/connect-links(provider: slack) or connect inside PostSyncer. Each connected Slack workspace is stored as one account with encrypted bot tokens. - 2
Discover target channels and save optional defaults
Call
GET /api/v1/accounts/{account}/slack/channelsto list the workspace’s public channels, and the private channels the app was invited to when the key belongs to the person who connected Slack. Passchannel_idper post or save a defaultchannel_idviaPUT /api/v1/accounts/{account}/defaults. - 3
Schedule messages, files, buttons and threaded replies
Send
POST /api/v1/postswith Slack mrkdwn copy, Block Kit header/CTA settings, custom bot display identity, up to 10 media/document files and multi-item thread replies.
02 Endpoints
Slack endpoints on one REST API
Every Slack operation runs on https://postsyncer.com/api/v1 with Bearer API keys and resource:action permissions.
| Endpoint | Permission | What it does |
|---|---|---|
GET/api/v1/accounts/{account}/slack/channels | accounts:read | List a connected workspace’s public channels, and its private ones for the person who connected it. |
POST/api/v1/posts | posts:create / schedule / publish | Schedule or publish Slack channel messages, Block Kit headers/CTAs, multi-file uploads and threaded replies. |
POST/api/v1/accounts/connect-links | accounts:create | Create a 7-day OAuth connect link so workspace admins authorize Slack without a PostSyncer login. |
DELETE/api/v1/posts/{id} | posts:delete | Cancel scheduled posts, or delete a published message with its thread replies, replies sent from PostSyncer and files. |
GET/api/v1/analytics/posts/{id} | analytics:read | Read emoji reactions (likes) and thread replies (comments) of published Slack posts, on paid plans. |
03 Media and text specs
What you can publish to Slack
Verified media limits, text caps and platform behaviors PostSyncer enforces when sending to Slack.
| Type | Formats | Limit | Notes |
|---|---|---|---|
| Photos & GIFs | JPG, JPEG, PNG, GIF, WebP | Up to 10 files · 25 MB each | Uploaded through Slack’s external upload API with alt text, then added to the post’s message. |
| Videos | MP4, MOV, WebM | Up to 10 files · 100 MB each | Mix freely with photos and documents up to 10 total files per item. |
| Documents | PDF, DOC, DOCX, PPT, PPTX | Up to 10 files | Release notes, slide decks and briefs. CSV and TXT files aren’t taken: share them as a link. |
| Message & header | Slack mrkdwn + Block Kit | 40,000 text · 150 header · 75 CTA | Header and CTA render as Block Kit header and actions blocks; long text with them is split across sections (up to 50 blocks). |
Platform behavior
Slack at a glance
- platform key
- slack
- Account granularity
- 1 PostSyncer account = 1 Slack workspace;
channel_idselects the channel per post or via Account Post Defaults. - Public channels
- Text posts go out with chat:write.public, without the app joining the channel. A post with files joins a public channel first (conversations.join), since Slack shares files only in channels the app is in.
- Threads & first comment
- Additional content[] items and
first_commentpost as replies under the rootthread_ts, with optionalreply_broadcast. - Deleting posts
DELETE /posts/{id} calls chat.delete on the message (stored aschannel_id:ts), its thread replies and the replies sent from PostSyncer, and deletes the post’s files. A message already gone counts as deleted.- Text escaping
- &, < and > are escaped, so text shows as typed; user, channel and link markup is kept, and @channel, @here and @everyone never ping.
- Slow-downs
- Slack’s ratelimited answer is a slow-down, not a refusal: inside a publish PostSyncer waits Slack’s Retry-After and sends again.
- Analytics metrics
- One reactions.get answer gives reaction totals (likes) and the thread’s reply count (comments). PostSyncer never reads channel history.
04 Capabilities and settings
Everything the Slack API handles for you
Slack is where product teams, customer communities, agencies and internal comms live. PostSyncer brings scheduled Slack publishing into the same API, calendar and defaults workflow as your public social channels.
One workspace connection, every channel reachable
Instead of creating a separate connection per channel, connect each Slack workspace once, list its channels via
GET /accounts/{account}/slack/channels, and target anychannel_idper post or save a default channel. Private channels are listed only for the person who connected the workspace.Files and text in one message
Slack retired legacy files.upload in favor of a three-step flow (files.getUploadURLExternal, binary POST to the upload URL, and files.completeUploadExternal). PostSyncer runs all three steps for photos, videos and documents with alt text, then adds the files to the post’s own message, so the text never goes out twice.
Structured Block Kit without raw JSON boilerplate
Pass simple settings keys — title for a bold header block,
cta_labelandcta_urlfor an actions link button, username andicon_emoji/icon_urlfor custom bot identity — and PostSyncer generates valid Block Kit payloads automatically.Threaded announcements & channel broadcast control
Keep busy channels uncluttered by placing secondary details, links or changelogs in content[1..n] or
first_comment. PostSyncer replies cleanly underthread_tsand lets you togglereply_broadcastwhen follow-ups should also appear in the main channel.
Slack per-post settings keys
Pass any of these optional keys inside accounts[].settings on POST /posts or PATCH /posts/{id}. Keys for other networks are ignored when cross-posting.
| Setting key | Value | What it controls |
|---|---|---|
channel_id | string | Target Slack channel ID (required to publish unless saved in Account Post Defaults). |
title | string (≤ 150) | Optional Block Kit header block displayed above the message body. |
text | string (≤ 40,000) | Slack-specific mrkdwn text overriding content[0].text. |
username | string (≤ 80) | Custom bot display name override (requires chat:write.customize scope). |
icon_url | string (https://) | Custom bot avatar URL. |
icon_emoji | string | Custom bot emoji icon, such as :rocket: or :coffee:. |
unfurl_links | boolean | Enable or disable automatic link preview unfurling (default true). |
unfurl_media | boolean | Enable or disable automatic media preview unfurling (default true). |
reply_broadcast | boolean | Also broadcast threaded replies into the main channel stream (default false). |
cta_label | string (≤ 75) | Interactive Block Kit button label (must be paired with cta_url). |
cta_url | string (http/https) | Interactive Block Kit button link URL (must be paired with cta_label). |
hashtags | string[] | Up to 30 hashtags appended after the Slack message text. |
first_comment | string | Posted as the first thread reply under the Slack message, when the post has no first comment of its own. |
media | number[] | Slack-specific media library IDs overriding content[0].media. |
Workspace-level OAuth with channel discovery and Account Post Defaults
Connecting Slack at the workspace level matches how real teams operate: marketing announces launches in #announcements, product posts release summaries in #changelog and customer success shares digests in #community — all inside one workspace. PostSyncer stores one encrypted OAuth connection per Slack workspace and lets every API call pick channel_id dynamically.
If a workspace almost always posts to one primary channel, save channel_id once using PUT /api/v1/accounts/{account}/defaults. Any subsequent POST /api/v1/posts call that omits channel_id inherits your default automatically while still allowing per-post overrides whenever you target another channel.
Handling Slack’s 3-step external file upload pipeline and thread_ts replies
Slack’s file API requires calling files.getUploadURLExternal with exact byte length and filename, streaming binary bytes to the signed upload_url, and finalizing with files.completeUploadExternal. PostSyncer handles all three stages for up to 10 images, videos or documents, then adds them to the message it posted with the text, header, button and name, so a post is one message, never a copy of the text plus the files.
Text posts reach any public channel through chat:write.public, without the app joining it. A post with files joins the public channel first with conversations.join, before anything goes out, since Slack shares files only in channels the app is in. For private channels, invite the app into the channel once in Slack: until then, a post there fails before anything goes out, with a plain message to add the app.
Permalinks, deletes and reaction/reply analytics
Every published Slack post records both the channel_id and message timestamp (channel_id:ts) alongside the Slack permalink fetched from chat.getPermalink. That identifier lets DELETE /posts/{id} call chat.delete, and analytics read the right message.
On paid plans, one reactions.get call gives the emoji reaction totals (mapped to likes) and the thread’s reply count (mapped to comments). PostSyncer doesn’t ask for Slack’s history scopes, so it never reads a channel’s other messages.
05 Response and MCP
Same Slack rules over REST and MCP
Use the REST API from your backend or connect an AI agent to the Slack MCP server using the same accounts, permissions and rate limits.
AI agent alternative
Publish to Slack channels from ChatGPT, Claude or Cursor via MCP
Connect your AI assistant to PostSyncer’s MCP server to list workspace channels, schedule Block Kit announcements and post threaded updates alongside all 14 networks.
“List our Slack channels and schedule our Friday launch announcement to #announcements at 9 AM with a View Menu button and a thread reply.”
PostSyncer MCP server
https:// postsyncer.com/ mcpCross-posting
Ship Slack plus all 14 networks from one schema
Add more account IDs to the same POST /posts request to publish to Slack, Instagram, YouTube, LinkedIn, X and the rest together. Each account reads its own settings block while sharing the media upload and schedule.
Limits and plans
What each plan allows
The Slack REST API is available on every PostSyncer plan, Free included. Paid plans remove the monthly post cap; every plan shares 60 requests a minute.
| Plan | Social accounts | Posts | API posts a day, per network |
|---|---|---|---|
| Free | 2 | 20 a month | Within the 20 |
| Starter$29 a month | 10 | Unlimited | Unlimited |
| Pro$49 a month | 30 | Unlimited | Unlimited |
| Agency$99 a month | 100, then $1/mo each | Unlimited | Unlimited |
Every plan: 60 requests a minute for each PostSyncer user, across all their keys, the API and the MCP server together.
401The API key is missing, wrong or past its end date.403The key lacks the resource:action permission, or the plan limit was reached (plan_limit_reached).422A field failed validation or the network’s rules refused a file, setting or text length.429Too many requests: more than 60 in a minute across your user’s keys, API and MCP together.
Docs
Read more in the docs
- Slack platform guideMedia limits, settings, comments and analytics on Slack
- Create a postFull POST /posts request schema and platform settings
- QuickstartAPI keys, workspace IDs and your first scheduled post
- Authentication and permissionsBearer API keys and resource:action permissions
- Media uploads and video coversURL imports, file uploads and cover frames
- Compare all 14 networksSide-by-side matrix of media, threads, comments and deletes
FAQ
Slack API questions
Need help with a specific endpoint or webhook? Ask us in live chat.
Chat with usDoes each Slack channel count as a separate account?
No. One connected Slack workspace counts as one account in PostSyncer, and each post picks its channel with channel_id: any public channel, or a private one the app was invited to.
How do I find Slack channel IDs through the API?
Call GET /api/v1/accounts/{account}/slack/channels with an API key carrying accounts:read. It returns the public channels, and the private channels the app was invited to when the key belongs to the person who connected the workspace.
Can I upload PDFs and videos to Slack via the API?
Yes. Pass up to 10 images, videos or documents (PDF, DOC, DOCX, PPT, PPTX) and PostSyncer uploads them into the post’s message. CSV and TXT files aren’t taken.
Does Slack support threads and first comments?
Yes. Extra items in content[] and first_comment post as replies under the root message’s thread_ts, with optional reply_broadcast.
Can I customize the bot name and icon per post?
Yes. Set username, icon_emoji or an https:// icon_url in accounts[].settings or save them in Account Post Defaults.
What happens if the app is not in a public channel yet?
A text post goes out anyway, through chat:write.public. For a post with files, PostSyncer joins the public channel first with conversations.join. A private channel needs the app invited once with /invite @PostSyncer.
Automate Slack channel publishing with one REST API.
Connect your Slack workspace, list channels and start scheduling Block Kit updates, files and threads today.
- No card for free
- Cancel anytime
- Unlimited posts on paid plans