👋 Ping us at sales@currentclient.com
Skip to content

Post to Team chat with incoming webhooks

An incoming webhook lets another app post messages into a Team chat channel. Each webhook has its own secret URL and posts under the name you give it.

Check your access first#

  • You need to be a workspace admin. Team chat in Settings is for admins, and a team member who isn't an admin doesn't see it.
  • Team chat needs to be turned on for your workspace.

Add a webhook#

  1. Go to Settings, then Team chat.
  2. Click the Webhooks tab.
  3. Click Add webhook.
  4. Choose a channel from the Channel list.
  5. Enter a name in App name.
  6. Click Create webhook.
  7. Click Copy to copy the webhook URL.
  8. Click Done.

Note: The app name shows as the sender of every post, with an App badge after it. It can be 1 to 80 characters. The Channel list leaves out archived channels.

Keep the URL safe#

The URL is shown once. It contains the webhook's secret and can't be shown again.

Keep it private: anyone with the URL can post to that channel as your app. If you lose it or it leaks, click Regenerate on the webhook's row in the Webhooks tab and confirm. The old URL stops working right away, so update whatever posts to it.

Send a message#

  1. Send a POST request to the webhook URL.
  2. Add the header Content-Type: application/json.
  3. Put your message in a JSON body with the field text.

Here's an example with curl. Replace WEBHOOK_URL with the URL you copied:

curl -X POST 'WEBHOOK_URL' \
  -H 'Content-Type: application/json' \
  -d '{"text": "Deploy finished"}'

Format your message#

  • Messages show as plain text. Markdown such as **bold** shows exactly as you typed it.
  • Line breaks are kept.
  • The text can't be empty, and it can be up to 4,000 characters.
  • Other fields, such as blocks and username, are accepted and ignored.

Read the response#

A message that's accepted answers ok. These are the errors you might see:

  • 400: The text is empty or longer than 4,000 characters.
  • 404: The URL is wrong, the webhook was revoked or regenerated, or the channel no longer exists.
  • 409: The channel is archived.
  • 415: The Content-Type header isn't application/json.
  • 429: Too many requests. Wait a minute, then try again.

Note: Keep each webhook to 60 posts or fewer in any 60 seconds and you won't hit the rate limit.