Hooks (webhooks)
Automatic translation. View original
Learn hooks allow receiving booking notifications at a URL on your platform.
To receive notifications, register a subscription per school and event. Function availability does not automatically activate subscriptions.
Requirements
You need a valid API key from a Learn administrator and authorized access to the school. If you do not yet have access, coordinate the integration enablement with the school administrator.
If the integration uses a PADMA key, see How to generate and manage API keys for your school. The key must be associated with the corresponding user in Learn; creating it does not grant additional permissions.
Prepare an endpoint that accepts POST requests and reads URL parameters.
Subscriptions
Each subscription relates:
- A school, identified by its
account_padma_id. - A booking event.
- The URL that will receive the notifications.
Learn does not allow repeating the same combination of school, event, and URL. You can register different URLs for the same event.
Events
Use the value from the “Event” column when creating the subscription. The field event_name received in the notification includes an additional prefix.
| Event | When it is generated |
event_name received |
|---|---|---|
booking_created |
A confirmed booking is created. | booking_create-booking_created |
booking_confirmed |
The confirmation of a booking changes, without changing its waitlist status. | booking_update-booking_confirmed |
booking_on_waiting_list |
A booking is created on the waitlist or a booking moves to that list. | booking_update-booking_on_waiting_list |
booking_pending_confirmation |
A booking is created unconfirmed and off the waitlist. | booking_update-booking_pending_confirmation |
booking_promoted |
A booking leaves the waitlist. | booking_update-booking_promoted |
booking_destroyed |
A booking is deleted. | booking_destroy-booking_destroyed |
An unconfirmed created booking does not initially booking_created: generate the corresponding event for its status.
Notification format
Learn makes a POST to the registered URL. Data travel as URL query parameters; the body does not contain a JSON payload.
This example shows the parameters of a confirmed booking. The values are fictitious and shown unencoded for readability.:
event_name=booking_create-booking_created
data[booked_date]=2026-11-10
data[update_date]=2026-11-10
data[booking_id]=12345
data[booked_class_name]=Clase de ejemplo
data[teacher_username]=instructor_ejemplo
data[contact_id]=contacto_ejemplo
data[recipient_email]=alumno@example.com
data[account_name]=escuela_ejemplo
data[is_trial]=true
| Field | Content |
|---|---|
event_name |
Received event name, with the prefix indicated in the previous table. |
data[booked_date] |
Reservation date. |
data[update_date] |
Notification preparation date; does not include time. |
data[booking_id] |
Reservation ID in Learn. |
data[booked_class_name] |
Class name. |
data[teacher_username] |
PADMA username of the class author, if available. |
data[contact_id] |
PADMA ID of the associated user, if available. |
data[recipient_email] |
Email of the associated user or email registered in the reservation. |
data[account_name] |
PADMA identifier of the school that owns the class. |
data[is_trial] |
Indicates if the reservation is a test. |
Fields without information may arrive empty. For booking_destroyed, Learn sends the reservation ID and preparation date; the other fields of data remain empty.
Notifications are processed asynchronously. The data reflects the reservation when preparing to send, not an immutable copy of the moment of the event.
Delivery and reception
Prepare the receiver to accept repetitions without duplicating actions. Do not rely on immediate delivery, a specific order, or a guaranteed retry.
Current notifications do not include an authenticity signature. Before using an event for a sensitive action, agree on a validation mechanism for your integration.
API Authentication
Administration endpoints require an API key and the format .jsonYou can send the key in the header X-API-KEY or in the parameter api_key.
Examples use X-API-KEY. Replace TU_API_KEY with your authorized key and escuela_ejemplo with the PADMA identifier of your school.
The API key authenticates administration calls. It is not a signature for notifications sent to your URL.
Create a subscription
POST https://learn.derose.app/admin/hooks_subscriptions.json
Parameters:
-
hooks_subscription[account_padma_id]: PADMA identifier of the school. -
hooks_subscription[event]: one of the events from the table. -
hooks_subscription[url]: Receiver URL.
curl --request POST \
'https://learn.derose.app/admin/hooks_subscriptions.json' \
--header 'X-API-KEY: TU_API_KEY' \
--data-urlencode 'hooks_subscription[account_padma_id]=escuela_ejemplo' \
--data-urlencode 'hooks_subscription[event]=booking_created' \
--data-urlencode 'hooks_subscription[url]=https://example.com/learn-hooks'
Keep the ID of the created subscription to consult or delete it. If creation fails, check permissions, the school, the event, and possible duplicate subscriptions.
Consult a subscription
Replace 123 with the subscription ID:
curl 'https://learn.derose.app/admin/hooks_subscriptions/123.json' \
--header 'X-API-KEY: TU_API_KEY'
Cancel a subscription
curl --request DELETE \
'https://learn.derose.app/admin/hooks_subscriptions/123.json' \
--header 'X-API-KEY: TU_API_KEY'
Cancellation deletes that subscription. It does not delete the reservation or other subscriptions.