Send Notification
Changed onSends a notification to one user's devices (target.app_user_id, with devices: "all" or "latest") or to one device (target.device_id), across every application of the project whose notifications are enabled. Delivery is through APNs with the application's APNs key.
The response is 202 { "id", "status": "queued" } once the send is accepted. Superwall then resolves the target to its devices and delivers to each one the user allows notifications on (a background notification also reaches devices whose permission is off). Each device's outcome arrives later as a NOTIFICATION_SENT or NOTIFICATION_FAILED webhook and a notification_send / notification_fail event, all carrying this send's id. A target with no registered device is accepted and delivers nothing.
Send notification content (title, subtitle, body, badge or sound), content_available: true for a background notification, or both. A background notification has no visible content, always uses normal priority, and reaches devices whose notification permission is off. The encoded APNs payload (including data and Superwall's sw key) must be at most 4096 bytes.
idempotency_key is required: the same key within 30 days returns the original response and sends nothing; the same key with a different body answers 409 idempotency_key_in_use, as does a retry while the first request is still being processed. After a 503, retry with the same key and body: the retry sends under the same id, and a device that already received the notification may receive it again.
Answers 404 when no application of the project has notifications enabled, 409 credentials_missing when none of those applications has an APNs key (an application without one is left out of the send), and 400 for a placeholder app_user_id (null, undefined, 0, ...), reserved data keys (aps, sw, deep_link), or a payload over 4096 bytes.
Requires notifications:send scope.
Request
- Base URLhttps://api.superwall.com
- URLhttps://api.superwall.com/v2/projects/{id}/notifications
- Auth
- HTTP bearer
- or API key in cookie accounts_superwall_token
- or HTTP bearer
Path parameters
Request body
Example request
{
"target": {
"app_user_id": "user_8812"
},
"notification": {
"sound": "default",
"deep_link": "myapp://offers/spring"
},
"idempotency_key": "spring-offer-2026-user_8812"
}Response
NotificationSendResponse
Changes
- info
added the new optional request property
- info
- info
endpoint added
- info