POST
/
apps
/
{app_id}
/
integrations
/
custom_events
Create Custom Events
curl --request POST \
  --url https://api.onesignal.com/apps/{app_id}/integrations/custom_events \
  --header 'Content-Type: application/json' \
  --data '{
  "events": [
    {
      "name": "<string>",
      "external_id": "<string>",
      "onesignal_id": "<string>",
      "timestamp": "<string>",
      "payload": {}
    }
  ]
}'
"{}"

Custom events are currently in beta. To get access, contact support@onesignal.com with:

  • your company name
  • your OneSignal Organization ID
  • your OneSignal App ID(s) that you want to use the feature on

Overview

The Custom Events API allows you to track user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones. See Custom events for more information.

Use Cases

Custom events can be used to:


Headers

Authorization
string
default:Key YOUR_APP_API_KEY

Your app API key with prefix Key. See Keys & IDs.

Path Parameters

app_id
string
required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

Body

application/json

Response

200
application/json

200

The response is of type object.