← Help center

Webhooks

Webhooks let you subscribe to events inside Sonido and have them pushed to any HTTPS endpoint you control. Use them to sync bookings/projects into external systems, trigger automations in Zapier, or keep a CRM in step with studio activity without polling our API.


1. Concepts

Managed at Settings → Webhooks (/v2/settings/webhooks).

The Webhooks settings page


2. Event catalog

Initial scope — more will be added as needed. Each event fires once per model lifecycle transition.

Event When it fires
booking.created A new Booking is persisted
booking.updated An existing Booking is saved
booking.deleted A Booking is soft- or hard-deleted
project.created A new Project is persisted
project.updated An existing Project is saved
project.deleted A Project is soft- or hard-deleted

3. Request shape

Every delivery is a POST with a JSON body and the following headers:

Content-Type: application/json
Authorization: Bearer <workspace signing secret>
User-Agent: Sonido-Webhooks/1.0
X-Sonido-Event: booking.created
X-Sonido-Event-Id: evt_<24 random chars>
X-Sonido-Delivery-Attempt: 1

The body is a uniform envelope:

{
  "id": "evt_5fE7nGqJ8xZ3yU2wV1tBcKhD",
  "type": "booking.created",
  "timestamp": 1713370210,
  "data": {
    "object": { ... }
  }
}

4. Payload — data.object

Booking (booking.*)

{
  "id": 1842,
  "title": "Mixdown session",
  "type": "session",
  "start_at": "2026-04-18T14:00:00-04:00",
  "end_at": "2026-04-18T18:00:00-04:00",
  "all_day": false,
  "is_pending": false,
  "is_recurring": false,
  "description": "Final mix pass on LP2",
  "event_type_id": 3,
  "invoice_id": null,
  "room": {
    "id": 4,
    "name": "Studio A",
    "color": "#c24e2a"
  },
  "created_by": {
    "id": 22,
    "first_name": "Jamie",
    "last_name": "Liu",
    "email": "jamie@example.com"
  },
  "assigned_users": [
    {
      "id": 12,
      "first_name": "Alex",
      "last_name": "Park",
      "email": "alex@example.com",
      "role_id": 3,
      "role_name": "Engineer"
    }
  ],
  "associated_entity": {
    "id": 87,
    "type": "App\\Models\\Band",
    "label": "The Midnight Drifters",
    "email": null,
    "contacts": [
      {
        "id": 140,
        "first_name": "Morgan",
        "last_name": "Reyes",
        "email": "morgan@example.com",
        "role": "primary"
      },
      {
        "id": 141,
        "first_name": "Sam",
        "last_name": "Okafor",
        "email": "sam@example.com",
        "role": "member"
      }
    ]
  },
  "guests": [
    {
      "name": "Taylor Brooks",
      "email": "taylor@example.com",
      "is_contact": true,
      "contact_id": 512
    },
    {
      "name": null,
      "email": "producer@label.com",
      "is_contact": false,
      "contact_id": null
    }
  ],
  "created_at": "2026-04-15T09:22:11-04:00",
  "updated_at": "2026-04-17T16:08:44-04:00"
}

Notes:

Project (project.*)

{
  "id": 314,
  "name": "LP2 Pre-production",
  "type": "album",
  "stage": "tracking",
  "stage_id": 2,
  "start_date": "2026-04-20",
  "due_date": "2026-06-30",
  "band": { "id": 87, "name": "The Midnight Drifters" },
  "primary_contact": {
    "id": 140,
    "first_name": "Morgan",
    "last_name": "Reyes",
    "email": "morgan@example.com"
  },
  "company": { "id": 9, "name": "Drifters Records" },
  "created_at": "2026-04-10T11:00:00-04:00",
  "updated_at": "2026-04-17T12:33:00-04:00"
}

Any of band, primary_contact, company can be null when the foreign key is not set.


5. Verifying the request

The tenant-level signing secret is sent on every delivery:

Authorization: Bearer whsec_<48 random chars>

Reject any request whose Authorization header does not match the secret you rotated into your app (use a constant-time comparison).

Example — Node/Express:

app.post('/sonido-webhook', express.json(), (req, res) => {
  const provided = (req.headers.authorization || '').replace(/^Bearer /, '');
  const expected = process.env.SONIDO_WEBHOOK_SECRET;
  const ok = provided.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(provided), Buffer.from(expected));
  if (!ok) return res.sendStatus(401);

  const event = req.body;            // { id, type, timestamp, data }
  // handle event.type ...
  res.sendStatus(204);
});

Example — PHP:

$provided = preg_replace('/^Bearer /', '', $request->header('Authorization', ''));
$expected = env('SONIDO_WEBHOOK_SECRET');
if (! hash_equals($expected, $provided)) {
    abort(401);
}
$event = $request->json()->all();
// handle $event['type'] ...
return response()->noContent();

If you rotate the secret in Settings → Webhooks, redeploy any receiver that stores it before rotating — existing integrations will start seeing 401s until the new value is in place.


6. Retries

A delivery is considered successful when your endpoint returns a 2xx response within 5 seconds. Any other outcome (non-2xx, timeout, connection error) is treated as a failure and retried.

Attempt Delay after previous failure
1 — (initial send)
2 1 minute
3 10 minutes
4 15 minutes

After four failed attempts the event is dropped. It is visible in the endpoint's deliveries log and can be manually redelivered from the UI or the API.

Design your receiver to be idempotent. Use id from the envelope as a unique key — a retry carries the same id, so duplicate processing is safe to reject. The X-Sonido-Delivery-Attempt header tells you which attempt this is (1 = first send, ≥2 = retry).