curl --request POST \
--url https://onesignal.com/api/v1/notifications \
--header "Content-Type: application/json; charset=utf-8" \
--header "Authorization: Key KEY" \
--data '{
"app_id": "APP-ID",
"include_external_user_ids": ["EXTERNAL_ID"],
"channel_for_external_user_ids": "push",
"contents": { "en": "Test message from OneSignal!" },
"headings": { "en": "Notification Title" },
"data": { "custom_key": "custom_value" }
}'
curl --request POST \
--url https://onesignal.com/api/v1/notifications \
--header "Content-Type: application/json; charset=utf-8" \
--header "Authorization: Key KEY" \
--data '{
"app_id": "APP-ID",
"include_external_user_ids": ["EXTERNAL_ID"],
"channel_for_external_user_ids": "push",
"contents": { "en": "Test message from OneSignal!" },
"headings": { "en": "Notification Title" },
"data": { "custom_key": "custom_value" }
}'