1. Create A Key In PocketMusala
- Open the PocketMusala Developer API portal from the mosque management surface.
- Select the mosque to sync.
- Create a key named after the external system, such as
Website weekly sync. - Grant
sync:writewhen the external system should update profile content, prayer rows, announcements, or events.sync:writeincludes read access. - Copy the raw key and store it in the external server’s secret manager.
2. Set Shell Variables
Use the official API base URL and the key created in the PocketMusala portal:3. Check Capabilities
4. Update The Mosque Profile
5. Replace Prayer Rows Safely
Manual prayer times are stored as rows. A weekly sync should reconcile rows:- Read the current rows.
- Create missing rows with
POST /v1/mosques/{mosqueId}/prayers. - Update existing rows with
PATCH /v1/mosques/{mosqueId}/prayers/{prayerId}. - Delete stale rows with
DELETE /v1/mosques/{mosqueId}/prayers/{prayerId}.
6. Verify The Snapshot
X-Request-Id values and response bodies in your sync logs. They are
the fastest way for a mosque admin or PocketMusala support to investigate a
failed setup.