Skip to main content
Version: 1.0.0

Analytics Events API

Quran Foundation Analytics Events API allows approved applications to submit product analytics events for asynchronous processing. Authorization is application-level and does not require an end-user OAuth session.

How to get access

We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to get an access token to make requests to this API. The analytics.events.write scope authorizes the calling application rather than an end user, so use the client_credentials grant type when sending a request to The OAuth 2.0 Token Endpoint. After getting a valid access token, each request must include the x-auth-token and x-client-id headers described below.

Delivery guarantees

Batch acceptance is all-or-nothing. A 202 Accepted response means every event in the batch was acknowledged by the durable event queue. A 422 Unprocessable Entity response means the entire batch was rejected before publication. Downstream processing is asynchronous and delivery is at least once. If the API returns 503 Service Unavailable, retry the complete batch with the same event IDs.

Event data

Generate a stable, unique event_id for each event and reuse it when retrying. Use properties only for event-specific JSON data and observe the documented limits. The API derives client_id from the authenticated request; do not include it in an event. When an event belongs to a signed-in person identified through Quran Foundation OAuth, include the QF user_id associated with that Quran Foundation OAuth identity. Omit it for guests or unknown users. Do not send an application-local user ID. Never send credentials, access tokens, or secrets.

Authentication


The access token required for submitting analytics events. It must include the analytics.events.write scope.

Security Scheme Type:apiKey
Header parameter name:x-auth-token