Built in

Webhooks

  • Developers

About webhooks

A webhook is a message one app sends to another as soon as something happens, so the other app doesn't have to keep asking.

How it works with Sonely

  • Add an HTTPS address and choose the events it should get. Each one arrives as a POST with a JSON body: id, type, created_at and data.
  • Every message is signed. The X-Sonely-Signature header carries a timestamp and an HMAC-SHA256 of the timestamp and body, made with your endpoint's signing secret.
  • If your address doesn't answer with a 2xx status, Sonely tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours: six attempts in all.
  • Every attempt is logged with the status code and the start of the reply, for 30 days. Send a delivery again by hand, or send a test event.
  • Change the signing secret whenever you need to.

Set it up

  1. As the studio owner, open Business settings, then Integrations.
  2. Under Webhooks, choose Add endpoint. Paste a public https:// address and pick the events.
  3. Copy the signing secret and check each message's signature in your code. The developer page shows how.
  4. Send a test event, then open the log to see what your address answered.

What it doesn't do

  • Only public https:// addresses. Local and private network addresses are refused.
  • Nine events for now. See the list.
  • Webhooks are turned off in the demo studio. They work in your own studio.

Works with these Sonely features:

This integration is built by Sonely. If you have questions about how it works, contact our support team.