Switch sectionYour AI and integrations

Incoming webhooks: messages from your services

How to get an address that lets any service post text into a chosen Syncra channel with a single request.

An incoming webhook is a secret web address linked to one channel. When a service sends a request with some text to that address, a bot posts the text in the channel. Teams use webhooks to get notices about builds, payments or outages from any service that can send an HTTP request. You don’t write any bot code for this.

Workspace owners and admins create webhooks. A webhook belongs to a bot, so you need a bot first: Bots: how to create and connect one.

How to create a webhook

  1. Open the workspace settings, the Bots tab, and the page of the bot you want.
  2. On the bot page, find the Incoming webhooks section.
  3. In the Channel field, pick a channel. A webhook cannot post into direct messages.
  4. If you like, enter a Name (optional), for example “Alerts from Grafana”.
  5. Press Create webhook. The bot joins that channel by itself.
  6. The webhook row shows the address. Copy it with the Copy button next to it.

Keep the address secret: anyone who knows it can post to the channel. Do not put it in public code.

How to send a message

Send a POST request to the webhook address with a JSON body that has a text field of 1 to 4000 characters:

curl -X POST "https://ai-syncra.ru/api/webhooks/whk_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"Deploy finished"}'

No authorization header is needed. The answer is {"ok":true,"messageId":"..."}, and the message appears in the channel from the bot.

Limits

  • At most 60 requests per minute per webhook. Extra requests get a 429 answer, “Too many requests”.
  • A webhook sends text only. There are no attachments, no thread replies, and no custom name or avatar.
  • @channel and @here in the webhook text do not notify anyone.
  • If the address is unknown, the webhook is disabled or the bot itself is switched off, the answer is 404.

How to delete a webhook

Press Delete on the webhook row and confirm. Requests to that address start failing at once. Deleting cannot be undone: create a new webhook and replace the address in your service.

When a webhook is not enough

If you need to reply in threads, read messages or attach files, give your program a bot token and use the Syncra API. The bots article, linked below, shows a first request.

Updated:

More in “Your AI and integrations”

Back to the category

Didn't find an answer?

Message us on Telegram. A person from the Syncra team replies.

Message us on Telegram