Notification Inbox API
Pair one recipient device, send one actionable notification, and inspect its delivery state.
1. Create a pairing session
Use an application API key. The code expires after ten minutes and works once.
curl -X POST "https://notify-api.crewring.com/v1/pairing-sessions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"external_recipient_id":"recipient-42"}'
2. Send a notification
Use the connection identifier returned after pairing. Every request needs an idempotency key.
curl -X POST "https://notify-api.crewring.com/v1/notifications" \
-H "Authorization: Bearer $API_KEY" \
-H "Idempotency-Key: order-42-ready-v1" \
-H "Content-Type: application/json" \
-d '{
"connection_id":"CONNECTION_ID",
"title":"Order ready",
"body":"Your order is ready for collection.",
"action_url":"https://example.com/orders/42"
}'
Delivery states
- queued
- The queue accepted the delivery job.
- provider_accepted
- Expo accepted the push request.
- delivered
- APNs or FCM accepted the push through Expo.
- in_app_only
- The inbox item exists, but this device has no active push token.
- suppressed
- The recipient muted or revoked the connection.
- failed
- The push provider rejected the notification.
Security rules
Action URLs must use public HTTPS. Configure allowed hosts on each application for stricter control.
The service never returns stored API keys, device session tokens, or push tokens.