Mobile Push API
Beta
REST

Mobile Push API

Send transactional and marketing push notifications to iOS and Android apps. Register device tokens, target users or topics, attach deep-link data, and track delivery and opens with webhooks.

iOS & Android

One REST surface for both platforms. Sendexa routes through FCM (Android) and APNs (iOS) using credentials you configure once.

Flexible Targeting

Address a single device token, every device linked to a userId, or an entire topic subscription list.

Topics & Segments

Subscribe devices to topics for broadcast campaigns, product updates, and audience segments without storing token lists yourself.

Rich Notifications

Title, body, optional image, and arbitrary data payload for deep links and in-app routing.

Delivery & Opens

Webhooks for delivered, failed, and opened events so you can measure engagement without polling.

Secure by Default

HTTP Basic Auth on every call. Device tokens are scoped to your business and never shared across accounts.

Platforms

iOS + Android

APNs & FCM

Avg Accept

<200ms

API response time

Rate Limit

200/s

per API key

Title Limit

65

chars recommended

Quick Start

After you have registered a device token (see Getting Started), send a notification:

Bash
curl -X POST 'https://api.sendexa.co/v1/push/send' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-d '{
"to": { "type": "device", "value": "dG9rZW4tZXhhbXBsZQ..." },
"title": "Order shipped",
"body": "Your order #1234 is on the way.",
"data": { "orderId": "1234", "screen": "orders" },
"priority": "high"
}'

Response

JSON
{
"success": true,
"code": "PUSH_QUEUED",
"message": "Push notification accepted for delivery.",
"requestId": "REQ-1782000000001",
"timestamp": "2026-07-12T10:15:22.100Z",
"data": {
"pushId": "PUSH-8c1a2b3d-4e5f-6789-abcd-ef0123456789",
"channel": "push",
"target": {
"type": "device",
"value": "dG9rZW4tZXhhbXBsZQ...",
"platform": "android",
"resolvedDevices": 1
},
"notification": {
"title": "Order shipped",
"body": "Your order #1234 is on the way.",
"image": null,
"data": {
"orderId": "1234",
"screen": "orders"
}
},
"delivery": {
"status": "queued",
"priority": "high",
"ttl": 86400,
"submittedAt": "2026-07-12T10:15:22.100Z"
},
"billing": {
"units": 1,
"pricing": {
"unitCost": 0.002,
"totalCost": 0.002,
"currency": "USD"
}
}
}
}
Targeting Models
Device

type: "device" — send to one FCM or APNs token. Use for device-specific alerts or when you already resolved the token client-side.

User

type: "user" — fan-out to every registered device bound to a userId. Ideal for account alerts across phone and tablet.

Topic

type: "topic" — broadcast to all devices subscribed to a topic (e.g. news, promo-july).

Integration Lifecycle
  1. Configure credentials — upload FCM service account JSON and/or APNs key (.p8) in the Sendexa dashboard. See Getting Started.
  2. Register devices — your mobile app obtains a push token and calls POST /v1/push/devices (via your backend) with optional userId and topics.
  3. Send notifications — use POST /v1/push/send from your servers. Prefer user/topic targeting over storing tokens in every service.
  4. Observe events — subscribe to push.delivered, push.failed, and push.opened webhooks.
  5. Clean up — unregister tokens on logout or when FCM/APNs reports them invalid to keep delivery rates high.
Delivery Statuses
StatusMeaningAction
queuedAccepted by Sendexa, waiting to be handed to FCM/APNsWait — normal
sentAccepted by the platform push serviceWait for delivery/open webhooks
deliveredConfirmed delivered to the device (when available)Success — store the receipt
openedUser tapped the notification (client SDK reports open)Attribute engagement
failedRejected by FCM/APNs or token invalidCheck error code; unregister bad tokens
expiredNot delivered before TTL elapsedResend if still relevant
Common Error Codes
HTTPCodeCause
400INVALID_TOKENDevice token missing, malformed, or wrong platform
400INVALID_TARGETto.type not device|user|topic, or value empty
400PAYLOAD_TOO_LARGECombined title/body/data exceeds platform size limits
401UNAUTHORIZEDMissing or invalid Authorization header
403PUSH_CREDENTIALS_MISSINGFCM or APNs credentials not configured for this business
403INSUFFICIENT_CREDITSAccount balance too low to send
404DEVICE_NOT_FOUNDToken not registered, or already deleted
404USER_HAS_NO_DEVICESNo devices registered for the given userId
429RATE_LIMIT_EXCEEDEDExceeded 200 req/s — implement exponential backoff