Your masjid · Webhooks
Your webhook endpoints
The URLs Masjidbox posts your organization's events to, each signed with its endpoint's secret. They need a secret key.
The endpoints you register and the deliveries sent to them. A secret key with Masjid profile: read.
Your webhook endpoints
GET/v1/masjid/webhook-endpoints
The URLs Masjidbox posts your organization's events to, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
limitinteger · queryItems per page, 1 to 100.
cursorstring · queryThe previous page's
pagination.nextCursor; absent for the first page.
Returns
A page of endpoints.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (8)
objectwebhook_endpointAlways
webhook_endpoint.idstringThe webhook endpoint id.
urlstringWhere the events are posted.
eventsstring[]The event types it receives.
enabledbooleanIt receives events.
disabledReasonfailing | nullfailing: Masjidbox disabled it after three days of failed deliveries; null otherwise.createdAtstring | nullWhen it was registered (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
paginationobjectWhere this page stands.
Show child attributes (3)
limitintegerThe page size asked for.
hasMorebooleanWhether another page follows: stop on false, never on a short page.
nextCursorstring | nullThe
cursorof the next page; null on the last one.
Errors
curl "https://hub.masjidbox.com/v1/masjid/webhook-endpoints" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"createdAt": "2026-11-13T08:00:00.000Z",
"disabledReason": null,
"enabled": true,
"events": [
"event.created",
"event.updated"
],
"id": "whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10",
"object": "webhook_endpoint",
"updatedAt": "2026-11-13T08:00:00.000Z",
"url": "https://example.org/masjidbox/webhooks"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your webhook endpoints
GET/v1/masjid/webhook-endpoints/{id}
A webhook endpoint of your organization: its URL, its event types, whether it receives them (disabledReason: failing once Masjidbox disabled it after three days of failed deliveries). Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
idstring · pathrequiredThe webhook endpoint id.
Returns
The endpoint.
objectwebhook_endpointAlways
webhook_endpoint.idstringThe webhook endpoint id.
urlstringWhere the events are posted.
eventsstring[]The event types it receives.
enabledbooleanIt receives events.
disabledReasonfailing | nullfailing: Masjidbox disabled it after three days of failed deliveries; null otherwise.createdAtstring | nullWhen it was registered (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/webhook-endpoints/whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"createdAt": "2026-11-13T08:00:00.000Z",
"disabledReason": null,
"enabled": true,
"events": [
"event.created",
"event.updated"
],
"id": "whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10",
"object": "webhook_endpoint",
"updatedAt": "2026-11-13T08:00:00.000Z",
"url": "https://example.org/masjidbox/webhooks"
}Register a webhook endpoint
POST/v1/masjid/webhook-endpoints
Registers a URL (https, a public host name, no credentials: else 400, the reason in the detail) and the event types Masjidbox posts to it, each signed in Masjidbox-Signature with the endpoint's secret (whsec_…). The secret is answered here, once: store it now. Each event type needs the read right of its product on the key: masjid.*, profile.* Masjid profile; prayer_times.*, jumuah_times.* Prayer times; event.*, announcement.*, media.*, news.*, album.*, collection.*, poll.*, quiz.*, question.*, live.* Content; notification.*, app_notification.*, app_recurring_notification.*, app_one_time_notification.* Notifications; donation_account.*, donation_campaign.* Donation campaigns; website.*, widget.*, app_widget.*, app_popup.*, app_page.* Website and app; screen.*, screen_settings.*, playlist.*, playlist_schedule.* Screens (else 403). Five endpoints per organization (409). Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
No parameters.
Request body
urlstringrequiredWhere the events are posted: https, a public host name (no IP address, no private name), no credentials, 2048 characters at most.
eventsstring[]requiredThe event types it receives, one at least (the enum lists them; the webhooks guide groups them by product). Each needs the read right of its product on the key.
Returns
The endpoint, and its signing secret, once.
objectwebhook_endpointAlways
webhook_endpoint.idstringThe webhook endpoint id.
urlstringWhere the events are posted.
eventsstring[]The event types it receives.
enabledbooleanIt receives events.
disabledReasonfailing | nullfailing: Masjidbox disabled it after three days of failed deliveries; null otherwise.createdAtstring | nullWhen it was registered (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
secretstringThe signing secret (
whsec_…) of theMasjidbox-Signatureheader. Answered here only, once: store it now.
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/webhook-endpoints" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"events":["event.created"],"url":"https://example.org/masjidbox/webhooks"}'{
"events": [
"event.created"
],
"url": "https://example.org/masjidbox/webhooks"
}{
"createdAt": "2026-11-13T08:00:00.000Z",
"disabledReason": null,
"enabled": true,
"events": [
"event.created",
"event.updated"
],
"id": "whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10",
"object": "webhook_endpoint",
"updatedAt": "2026-11-13T08:00:00.000Z",
"url": "https://example.org/masjidbox/webhooks",
"secret": "whsec_example"
}Change a webhook endpoint
PATCH/v1/masjid/webhook-endpoints/{id}
Changes the URL, the event types (the whole list) or enabled; a field you leave out stays. enabled: true resumes the deliveries and clears a failing disable; false stops them. Each event type needs the read right of its product on the key: masjid.*, profile.* Masjid profile; prayer_times.*, jumuah_times.* Prayer times; event.*, announcement.*, media.*, news.*, album.*, collection.*, poll.*, quiz.*, question.*, live.* Content; notification.*, app_notification.*, app_recurring_notification.*, app_one_time_notification.* Notifications; donation_account.*, donation_campaign.* Donation campaigns; website.*, widget.*, app_widget.*, app_popup.*, app_page.* Website and app; screen.*, screen_settings.*, playlist.*, playlist_schedule.* Screens (else 403). Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
idstring · pathrequiredThe webhook endpoint id.
Request body
urlstringWhere the events are posted: https, a public host name (no IP address, no private name), no credentials, 2048 characters at most.
eventsstring[]The event types it receives, one at least (the enum lists them; the webhooks guide groups them by product). Each needs the read right of its product on the key.
enabledbooleanfalsestops its deliveries;trueresumes them, and clears afailingdisable.
Returns
The endpoint after the change.
objectwebhook_endpointAlways
webhook_endpoint.idstringThe webhook endpoint id.
urlstringWhere the events are posted.
eventsstring[]The event types it receives.
enabledbooleanIt receives events.
disabledReasonfailing | nullfailing: Masjidbox disabled it after three days of failed deliveries; null otherwise.createdAtstring | nullWhen it was registered (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/webhook-endpoints/whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'{
"enabled": true
}{
"createdAt": "2026-11-13T08:00:00.000Z",
"disabledReason": null,
"enabled": true,
"events": [
"event.created",
"event.updated"
],
"id": "whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10",
"object": "webhook_endpoint",
"updatedAt": "2026-11-13T08:00:00.000Z",
"url": "https://example.org/masjidbox/webhooks"
}Delete a webhook endpoint
DELETE/v1/masjid/webhook-endpoints/{id}
Deletes an endpoint and its delivery log: nothing is posted to it any more, the attempts still due included. Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
idstring · pathrequiredThe webhook endpoint id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/webhook-endpoints/whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10" \
-H "Authorization: Bearer $MASJIDBOX_KEY"Rotate a webhook endpoint's secret
POST/v1/masjid/webhook-endpoints/{id}/rotate-secret
A new signing secret, answered here once: store it now. For 24 hours every delivery carries a second v1 signature under the previous secret, so your receiver switches without a gap. Needs a secret key with Masjid profile: read; an endpoint belongs to your organization, not to the key.
Parameters
idstring · pathrequiredThe webhook endpoint id.
Returns
The endpoint, and its new signing secret, once.
objectwebhook_endpointAlways
webhook_endpoint.idstringThe webhook endpoint id.
urlstringWhere the events are posted.
eventsstring[]The event types it receives.
enabledbooleanIt receives events.
disabledReasonfailing | nullfailing: Masjidbox disabled it after three days of failed deliveries; null otherwise.createdAtstring | nullWhen it was registered (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
secretstringThe signing secret (
whsec_…) of theMasjidbox-Signatureheader. Answered here only, once: store it now.
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/webhook-endpoints/whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10/rotate-secret" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"createdAt": "2026-11-13T08:00:00.000Z",
"disabledReason": null,
"enabled": true,
"events": [
"event.created",
"event.updated"
],
"id": "whk_3f0c2a52-7d8e-4b1a-9c6f-2e5d8a4b7c10",
"object": "webhook_endpoint",
"updatedAt": "2026-11-13T08:00:00.000Z",
"url": "https://example.org/masjidbox/webhooks",
"secret": "whsec_example"
}Events, by product
Every event Masjidbox posts to a webhook endpoint, and the read right a key needs to subscribe to it. The webhooks guide says how to verify them.
| Event | Product (right to subscribe) | Entity | data.id |
|---|---|---|---|
masjid.updated | Masjid profile | Your organization | null |
profile.updated | Masjid profile | Your masjid's profile | null |
prayer_times.updated | Prayer times | Your prayer times | null |
jumuah_times.updated | Prayer times | Your jumu'ah times | null |
event.created | Content | Your events | evt_… |
event.updated | Content | Your events | evt_… |
event.deleted | Content | Your events | evt_… |
announcement.created | Content | Your announcements | ann_… |
announcement.updated | Content | Your announcements | ann_… |
announcement.deleted | Content | Your announcements | ann_… |
media.created | Content | Your media | med_… |
media.updated | Content | Your media | med_… |
media.deleted | Content | Your media | med_… |
news.created | Content | Your news | nws_… |
news.updated | Content | Your news | nws_… |
news.deleted | Content | Your news | nws_… |
album.created | Content | Your albums | alb_… |
album.updated | Content | Your albums | alb_… |
album.deleted | Content | Your albums | alb_… |
collection.created | Content | Your collections | col_… |
collection.updated | Content | Your collections | col_… |
collection.deleted | Content | Your collections | col_… |
poll.created | Content | Your polls | pol_… |
poll.updated | Content | Your polls | pol_… |
poll.deleted | Content | Your polls | pol_… |
quiz.created | Content | Your quizzes | qiz_… |
quiz.updated | Content | Your quizzes | qiz_… |
quiz.deleted | Content | Your quizzes | qiz_… |
question.updated | Content | Ask-the-imam questions | qst_… |
question.deleted | Content | Ask-the-imam questions | qst_… |
live.created | Content | Your lives | liv_… |
live.updated | Content | Your lives | liv_… |
live.deleted | Content | Your lives | liv_… |
notification.created | Notifications | Your One notifications | ntf_… |
notification.updated | Notifications | Your One notifications | ntf_… |
notification.deleted | Notifications | Your One notifications | ntf_… |
app_notification.created | Notifications | Your app's scheduled pushes | apn_… |
app_notification.updated | Notifications | Your app's scheduled pushes | apn_… |
app_notification.deleted | Notifications | Your app's scheduled pushes | apn_… |
app_recurring_notification.created | Notifications | Your app's recurring pushes | arn_… |
app_recurring_notification.updated | Notifications | Your app's recurring pushes | arn_… |
app_recurring_notification.deleted | Notifications | Your app's recurring pushes | arn_… |
app_one_time_notification.created | Notifications | Your app's one-time pushes | aon_… |
app_one_time_notification.updated | Notifications | Your app's one-time pushes | aon_… |
app_one_time_notification.deleted | Notifications | Your app's one-time pushes | aon_… |
donation_account.updated | Donation campaigns | Your donation account | null |
donation_campaign.created | Donation campaigns | Your donation campaigns | cmp_… |
donation_campaign.updated | Donation campaigns | Your donation campaigns | cmp_… |
donation_campaign.deleted | Donation campaigns | Your donation campaigns | cmp_… |
website.updated | Website and app | Your website | null |
widget.created | Website and app | Your website widgets | wdg_… |
widget.updated | Website and app | Your website widgets | wdg_… |
widget.deleted | Website and app | Your website widgets | wdg_… |
app_widget.updated | Website and app | Your app's widget | null |
app_popup.created | Website and app | Your app's popups | apo_… |
app_popup.updated | Website and app | Your app's popups | apo_… |
app_popup.deleted | Website and app | Your app's popups | apo_… |
app_page.created | Website and app | Your app's pages | the stored id |
app_page.updated | Website and app | Your app's pages | the stored id |
app_page.deleted | Website and app | Your app's pages | the stored id |
screen.updated | Screens | Your screens | scr_… |
screen.deleted | Screens | Your screens | scr_… |
screen_settings.updated | Screens | Your screen settings | null |
playlist.created | Screens | Your playlists | pll_… |
playlist.updated | Screens | Your playlists | pll_… |
playlist.deleted | Screens | Your playlists | pll_… |
playlist_schedule.created | Screens | Your playlist schedules | psc_… |
playlist_schedule.updated | Screens | Your playlist schedules | psc_… |
playlist_schedule.deleted | Screens | Your playlist schedules | psc_… |