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 APIOne 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.
| Records | Read-only key | Read-and-write key adds |
|---|---|---|
| Students | List, search and read one | Add a student, update a student |
| Parents | Find one by family, email or name, or list a family's parents | – |
| Events | Read one, with its attendees | – |
| Students on events | List, newest first | – |
| Attendance | List, newest first, for one student or all | – |
| Payments | List, newest first | Add a payment |
| Invoices | List, 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
- Each delivery is a
POSTwith a JSON body:id,type,created_atanddata, the record as the API shows it. - The
X-Sonely-Signatureheader readst=<unix seconds>,v1=<hex>. - Work out the HMAC-SHA256 of
t, a full stop and the raw body, with your endpoint's signing secret (it startswhsec_), and compare it withv1. - 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-Deliverystays the same on each try.
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
| Event | Sent when | What data holds |
|---|---|---|
student.created | A student is added, by hand, by import or from a form | The student: names, status, family_id, contact details, instruments, group_tags and more |
student.updated | A student's profile changes | The student: names, status, family_id, contact details, instruments, group_tags and more |
student.status_changed | A student's status changes | The student, with previous_status |
student.event_added | A student is added to an event | The seat: event_id, student_id, family_id, start_datetime, category, teacher and attendance_status |
attendance.taken | Attendance is taken or edited | event_id, student_id, family_id, status and the lesson notes |
payment.created | A payment is recorded, by hand, online or by auto-pay | id, date, amount, description, payee, method, family_id |
invoice.created | An invoice is created, by hand or by auto-invoicing | number, its dates, status, amount_due, emailed, paid, void, family_id, family_name |
booking.created | A lesson is booked online | The seat: event_id, student_id, family_id, start_datetime, category, teacher and attendance_status |
booking.cancelled | A booking is cancelled | The 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 freeGet 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 usSee what's new
Every update we ship is in the changelog, including changes to the API, webhooks and integrations.
Read the changelog