Skip to main content
An incoming webhook posts into one channel. Its URL is its credential: there is no header to send, and anyone who has the URL can post. For how to create one, format messages and use it from other tools, see Incoming webhooks.

Endpoints

Every webhook takes three addresses, all POST: Copy the URL from the channel’s Integrations: Copy URL, Copy Slack URL or Copy GitHub URL. It is shown in full only when the webhook is created or its URL is rotated.

Mantle JSON

POST https://api.mantle.chat/api/hooks/{webhookId}/{token}, with content-type: application/json.

Body

All three fields are strings. The body can be up to 64 KB. Fields Mantle doesn’t know are ignored.

Answer

200, when the post went through or the request repeated an idempotency_key:

Errors

Every error answers { "ok": false, "error": "…", "message": "…" }. Retry only 429, 500 and 503, with the same idempotency_key. A wrong URL and a deleted webhook answer the same 404.

Slack format

POST https://api.mantle.chat/api/hooks/{webhookId}/{token}/slack, with Slack’s incoming webhook body as JSON, or as a form with the JSON in a payload field (application/x-www-form-urlencoded).
  • Read: text, blocks and attachments. When there are blocks, they’re the post, and text is only Slack’s notification text.
  • Ignored: username, icon_url, icon_emoji and channel. The webhook keeps its own name, icon and channel.
  • Body: up to 64 KB.
It answers as Slack does, in plain text: The Slack URL takes no thread_key or idempotency_key.

GitHub events

POST https://api.mantle.chat/api/hooks/{webhookId}/{token}/github, as GitHub sends a repository’s or an organization’s webhook events, as JSON or as a form.
  • Events that post: push, pull_request, pull_request_review, issues, issue_comment, release and workflow_run, plus ping when the webhook is added. See Use it with GitHub for which actions of each post.
  • Threads: a pull request’s events, reviews and comments share a thread, and so do an issue’s.
  • Body: up to 1 MB.

Answer

  • An event that posts answers as Mantle JSON does.
  • An event that doesn’t post answers 200 { "ok": true, "posted": false }, after its URL is checked, so GitHub’s delivery log shows it as delivered.
  • Errors answer as Mantle JSON’s do. A body that isn’t a GitHub event, or a request without X-GitHub-Event, answers 400 invalid_payload, and a body over 1 MB answers 413 payload_too_large.

Limits