SwitGo to swit.io
Search
Search

Swit incoming webhooks

What is an incoming webhook?

Swit's incoming webhooks are a convenient way of sharing information from external services to Swit. Using webhooks, sometimes referred to as “reverse APIs”, users can get notified of changes in the information of their interest in real time and better handle a high volume of workload.

Utilize incoming webhooks in Swit

You can create and delete incoming webhooks directly in Swit's channels and projects, and you can be notified through in-channel system messages when a webhook is created, deleted, or edited. If a task is created using a webhook, notifications about the webhook will be recorded in the activity log of the task details page and the in-channel system messages of a paired channel, if there is one.

Create an incoming webhook

Aug-17-2023 20-20-48.gif

  1. After entering a channel or project page where you want to use the incoming webhook, click the channel name or project name at the top.
  2. Click on Incoming webhooks in the drop-down menu.
  3. In the incoming webhooks page, click on New webhook.
  4. Enter a name of the webhook you want to create, select the post type as either Messages or Ideas depending on the desired action, then click on the Create button.
  5. Click on Copy webhook URL to send an HTTP request when needed.

Types of actions supported with webhooks

Swit's incoming webhooks support the following actions:

  • Post a message to a channel: When creating a new incoming webhook in a channel, select Messages as the post type to enable this action.

    image.png

  • Post an idea to a channel: When creating a new incoming webhook in a channel, select Ideas as the post type to enable this action.

    image.png

  • Create a task to a project's Backlog: When creating a new incoming webhook in a project, select Tasks as the post type to enable this action.

    image.png

HTTP request format

You can send an HTTP request to trigger the incoming webhook you created. Click on Copy webhook URL on the Incoming webhooks page to copy the webhook URL required when making a request.

image.png

When you send a request in the below format, a post will be created in the designated channel or project. The URL can be replaced with the webhook URL created.

POST https://hook.swit.io/chat/<CHANNEL_ID>/<WEBHOOK_ID>
Content-type: application/json
{
    "text": "Hello World!"
}

TIP

You can use Sample cURL request for testing. image.png

Delete an incoming webhook

Click on the arrow button at the right of a webhook you want to delete, then click on Delete. Webhooks cannot be restored once they are deleted.

image.png

Frequently asked questions

Are Swit’s incoming webhooks useful?

The webhook feature requires programming knowledge, so it may not be useful for everyone. However, Swit’s Automation plug-in can help anyone without programming knowledge receive notifications for external information or automate their workflow.

Is there a rate limit on the API requests?

There is a limit of three requests per second.

Open Contact
Contact Support
Close
Contact Support
Contact Support
If you have any questions using Swit, let us know using the contact form below. We’ll get back to you via email as soon as possible (within 24 hours on weekdays).
Paste from the clipboard into the Your inquiry field, drag & drop, or browse your computer.