Messages
Scope: messages:send. For email, use Emails.
Send a message
Section titled “Send a message”POST /api/v1/messages
| Field | Type | Notes |
|---|---|---|
appId |
string | Required |
channel |
string | Required. push, in_app, feed or sms |
target |
object | Required. Exactly one of aliases, segmentId, subscriptionIds |
content |
object | title, body, url, imageUrl, data, buttons, per language: { "en": {…}, "ko": {…} } |
templateId |
string | Instead of content |
topic |
string | Consent topic, such as promotions. Marketing topics go only to opted-in users. |
sendAfter |
string | ISO 8601, up to 30 days ahead |
ttlSeconds |
number | Drop if not delivered in time |
target.aliases takes up to 20,000 ids: { "external_id": ["u_8812", "u_9001"] }.
const message = await mailpidge.messages.send( { appId: 'pidgefit-ios', channel: 'push', target: { aliases: { external_id: ['u_8812'] } }, content: { en: { title: 'Streak at risk', body: 'One workout keeps your 12-day streak.', url: 'pidgefit://today' } }, }, { idempotencyKey: 'streak-u_8812-2026-11-25' },)message = mailpidge.messages.send( app_id="pidgefit-ios", channel="push", target={"aliases": {"external_id": ["u_8812"]}}, content={"en": {"title": "Streak at risk", "body": "One workout keeps your 12-day streak.", "url": "pidgefit://today"}}, idempotency_key="streak-u_8812-2026-11-25",)curl https://api.mailpidge.com/api/v1/messages \ -H "Authorization: Bearer $MAILPIDGE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: streak-u_8812-2026-11-25" \ -d '{ "appId": "pidgefit-ios", "channel": "push", "target": { "aliases": { "external_id": ["u_8812"] } }, "content": { "en": { "title": "Streak at risk", "body": "One workout keeps your 12-day streak.", "url": "pidgefit://today" } } }'Response 200
{ "id": "msg_01JD4W2F…", "status": "queued" }Each recipient’s result shows in the delivery log and as webhooks. See Push delivery outcomes.
Safety limit
Section titled “Safety limit”Sending more than 10× an app’s subscriber count within 15 minutes pauses sends and alerts owners.
Get a message
Section titled “Get a message”GET /api/v1/messages/{id}
{ "id": "msg_01JD4W2F…", "channel": "push", "status": "sending", "counts": { "targeted": 1, "delivered": 1, "failed": 0, "skipped": 0 } }List messages
Section titled “List messages”GET /api/v1/messages?limit=50&cursor={nextCursor} returns { "messages": [...], "nextCursor": … }.
Cancel a message
Section titled “Cancel a message”POST /api/v1/messages/{id}/cancel stops a scheduled message, or the part of a large send that hasn’t gone out.
Live Activities
Section titled “Live Activities”On iPhone, channel: "push" with liveActivity starts, updates or ends a Live Activity:
{ "appId": "pidgefit-ios", "channel": "push", "target": { "aliases": { "external_id": ["u_8812"] } }, "liveActivity": { "event": "update", "activityId": "run-2026-11-25", "contentState": { "distanceKm": 4.2 } }}event is start, update or end.