Webhooks overview

Webhooks in Unipile are a robust feature that enables your application to stay informed in real-time whenever specific events occur within the Unipile system. Unlike periodic polling, where your application checks for updates, webhooks employ a push notification protocol, ensuring that you receive immediate notifications when something changes. Unipile makes webhook integration effortless by sending an HTTP POST request to a URL of your choice, allowing you to configure your application to respond promptly to these notifications.

Create Webhooks

There is two ways of creating Webhooks:

  • Using the POST /webhooks Method or the appropriate SDK Method
  • In Unipile's Dashboard

Retries

Make sure to reply a status code 200 as a Webhook makes five retry attempts when the HTTP response code is not equal to 200, with an incremental time delay between each attempt.

Webhooks types

Unipile provide three types of Webhooks:

Webhook Content-Type

Some application like Bubble need a header Content-Type to receive well JSON. You can use "headers" parameters to set it.

curl --request POST \
     --url https://{YOUR_DSN}/api/v1/webhooks \
     --header 'X-API-KEY: XXXXXXXX' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{ 
  "request_url": "https://endpoint",
  "source": "messaging",
  "headers": [
    {
      "key": "Content-Type",
      "value": "application/json"
    }
  ]
}'