Skip to content
Black Friday: 40% off the first year, until December 1
Slack REST APISlack workspaces: public channels, and private ones the app is invited to

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
Free plan: 2 accounts, 20 posts a month, no cardNeed AI agents? Slack MCP
  • 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. 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. 2

    Discover target channels and save optional defaults

    Call GET /api/v1/accounts/{account}/slack/channels to 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. Pass channel_id per post or save a default channel_id via PUT /api/v1/accounts/{account}/defaults.

  3. 3

    Schedule messages, files, buttons and threaded replies

    Send POST /api/v1/posts with 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.

Slack endpoints on one REST API
EndpointPermissionWhat it does
GET/api/v1/accounts/{account}/slack/channelsaccounts:readList a connected workspace’s public channels, and its private ones for the person who connected it.
POST/api/v1/postsposts:create / schedule / publishSchedule or publish Slack channel messages, Block Kit headers/CTAs, multi-file uploads and threaded replies.
POST/api/v1/accounts/connect-linksaccounts:createCreate a 7-day OAuth connect link so workspace admins authorize Slack without a PostSyncer login.
DELETE/api/v1/posts/{id}posts:deleteCancel scheduled posts, or delete a published message with its thread replies, replies sent from PostSyncer and files.
GET/api/v1/analytics/posts/{id}analytics:readRead emoji reactions (likes) and thread replies (comments) of published Slack posts, on paid plans.

Read the full Slack reference

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.

Slack media and text limits
TypeFormatsLimitNotes
Photos & GIFsJPG, JPEG, PNG, GIF, WebPUp to 10 files · 25 MB eachUploaded through Slack’s external upload API with alt text, then added to the post’s message.
VideosMP4, MOV, WebMUp to 10 files · 100 MB eachMix freely with photos and documents up to 10 total files per item.
DocumentsPDF, DOC, DOCX, PPT, PPTXUp to 10 filesRelease notes, slide decks and briefs. CSV and TXT files aren’t taken: share them as a link.
Message & headerSlack mrkdwn + Block Kit40,000 text · 150 header · 75 CTAHeader 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_id selects 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_comment post as replies under the root thread_ts, with optional reply_broadcast.
Deleting posts
DELETE /posts/{id} calls chat.delete on the message (stored as channel_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 any channel_id per 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_label and cta_url for an actions link button, username and icon_emoji/icon_url for 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 under thread_ts and lets you toggle reply_broadcast when 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.

Slack accounts[].settings keys
Setting keyValueWhat it controls
channel_idstringTarget Slack channel ID (required to publish unless saved in Account Post Defaults).
titlestring (≤ 150)Optional Block Kit header block displayed above the message body.
textstring (≤ 40,000)Slack-specific mrkdwn text overriding content[0].text.
usernamestring (≤ 80)Custom bot display name override (requires chat:write.customize scope).
icon_urlstring (https://)Custom bot avatar URL.
icon_emojistringCustom bot emoji icon, such as :rocket: or :coffee:.
unfurl_linksbooleanEnable or disable automatic link preview unfurling (default true).
unfurl_mediabooleanEnable or disable automatic media preview unfurling (default true).
reply_broadcastbooleanAlso broadcast threaded replies into the main channel stream (default false).
cta_labelstring (≤ 75)Interactive Block Kit button label (must be paired with cta_url).
cta_urlstring (http/https)Interactive Block Kit button link URL (must be paired with cta_label).
hashtagsstring[]Up to 30 hashtags appended after the Slack message text.
first_commentstringPosted as the first thread reply under the Slack message, when the post has no first comment of its own.
medianumber[]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.

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/mcp

Cross-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.

Limits by plan
PlanSocial accountsPostsAPI posts a day, per network
Free220 a monthWithin the 20
Starter$29 a month10UnlimitedUnlimited
Pro$49 a month30UnlimitedUnlimited
Agency$99 a month100, then $1/mo eachUnlimitedUnlimited

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.

Compare plans and prices

FAQ

Slack API questions

Need help with a specific endpoint or webhook? Ask us in live chat.

Chat with us

Does 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