The Custom Events API allows you to record user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones.
Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
errors key will be returned in the response (with HTTP status 202) containing information about each failing event. The most common event-specific error is a failure to find a user associated with the External ID or OneSignal ID in the event.
If you’d like to retry sending events in the case of a failure, you only need to re-send the events for which errors were returned — events that don’t have an error associated with them are still processed. However, if a 5xx HTTP response is returned, you must retry the entire batch of events.
In either case, if you are implementing retry, make sure to also pass an idempotency_key.
idempotency_key field. Each unique event should get its own unique UUID, and when retrying delivery for events, the same UUID must be provided. Duplicate events with the same idempotency_key will be ignored on a best-effort basis within a 4-hour period. This allows you to avoid erroneously triggering Journeys multiple times or incurring charges for storing unnecessary duplicate events.
Your app API key with prefix Key . See Keys & IDs.
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Array of event objects to be recorded. Maximum size for each event is 2024 bytes. Maximum size of request is 1 MB.
202
Errors for specific events in the payload. If this is returned, only the specified events have failed -- other events in the same payload were successfully processed.