Build on Sonely

Sonely has a REST API and signed webhooks. Use them to connect your studio to your own tools, from a spreadsheet to Zapier.

Explore the API

One API for your whole studio

The API reads and writes the records your studio already keeps: students and families, events, attendance, payments and invoices. It answers in JSON, and each request sees only the studio its key belongs to.

API keys

Create a key in Business settings, under Integrations, and make it read only or read and write. You see the key once: Sonely keeps only a fingerprint of it. Name each key after what uses it, and revoke it when you're done. It stops at once.

Signed webhooks

Add an HTTPS address and choose the events it should get. Each one arrives as JSON, signed with your endpoint's secret. If your address doesn't answer, Sonely tries again for half a day, and every attempt stays in the log for 30 days.

What the API covers

Send the key in an Authorization: Bearer header (or X-API-Key) to /api/v1/public/ on your Sonely address. GET /api/v1/public/ping answers with your studio's name and the key's permission. A read-only key can only read, and only the studio owner can create keys.

RecordsRead-only keyRead-and-write key adds
StudentsList, search and read oneAdd a student, update a student
ParentsFind one by family, email or name, or list a family's parents–
EventsRead one, with its attendees–
Students on eventsList, newest first–
AttendanceList, newest first, for one student or all–
PaymentsList, newest firstAdd a payment
InvoicesList, newest first–

In an update, a field you leave blank stays as it is, and a value replaces what was there. Allowed statuses are Active, Trial, Waiting, Lead and Inactive. The same key works for Zapier: see Zapier with an API key.

How webhooks are signed

  1. Each delivery is a POST with a JSON body: id, type, created_at and data, the record as the API shows it.
  2. The X-Sonely-Signature header reads t=<unix seconds>,v1=<hex>.
  3. Work out the HMAC-SHA256 of t, a full stop and the raw body, with your endpoint's signing secret (it starts whsec_), and compare it with v1.
  4. Answer with any 2xx status. Otherwise Sonely tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours: six attempts in all. X-Sonely-Delivery stays the same on each try.
A sample delivery (the values are examples)
POST https://example.com/sonely-hook
Content-Type: application/json
X-Sonely-Event: payment.created
X-Sonely-Delivery: 5c9e2a71-…
X-Sonely-Signature: t=1793890800,v1=3f1a9c…

{
  "id": "0d6f8b42-…",
  "type": "payment.created",
  "created_at": "2026-11-05T15:00:00Z",
  "data": {
    "id": "8b2c11e9-…",
    "date": "2026-11-05",
    "amount": 40.00,
    "amount_minor": 4000,
    "description": "Lesson payment",
    "payee": null,
    "method": "Card",
    "family_id": "a41e07d3-…"
  }
}

Events you can subscribe to

EventSent whenWhat data holds
student.createdA student is added, by hand, by import or from a formThe student: names, status, family_id, contact details, instruments, group_tags and more
student.updatedA student's profile changesThe student: names, status, family_id, contact details, instruments, group_tags and more
student.status_changedA student's status changesThe student, with previous_status
student.event_addedA student is added to an eventThe seat: event_id, student_id, family_id, start_datetime, category, teacher and attendance_status
attendance.takenAttendance is taken or editedevent_id, student_id, family_id, status and the lesson notes
payment.createdA payment is recorded, by hand, online or by auto-payid, date, amount, description, payee, method, family_id
invoice.createdAn invoice is created, by hand or by auto-invoicingnumber, its dates, status, amount_due, emailed, paid, void, family_id, family_name
booking.createdA lesson is booked onlineThe seat: event_id, student_id, family_id, start_datetime, category, teacher and attendance_status
booking.cancelledA booking is cancelledThe seat: event_id, student_id, family_id, start_datetime, category, teacher and attendance_status

A test you send from the endpoint's settings arrives as webhook.test. Webhooks are turned off in the demo studio; they work in your own.

Ready to connect your own tools? Start a studio and create your first key.

Sign up free

Get product news

Changes to the API and webhooks are listed in What's new. Leave your email and we'll send product news now and then.

Ask us

Questions about a key, a field or a signature go to the same support team as everything else, at support@sonely.co.

Contact us

See what's new

Every update we ship is in the changelog, including changes to the API, webhooks and integrations.

Read the changelog