Skip to content
MessagingPush campaigns

Messaging

Push campaigns

Wallet push campaigns, templates and alerts.

Pilotv1

Count the customers each push segment holds

GET/push/segments

Scopepush:read

Requires push:read and the plan's campaigns feature (403 FEATURE_REQUIRED otherwise; 404 while the push plugin is off for the business). The Campaigns screen's counts: customers who agreed to card updates and can be reached through a wallet, per segment, plus broadcast and everyone. A key limited to several branches or programs must name one with branchId and programId. Counts only: never a name or a phone.

Query

programIduuid
branchIduuid

Errors

  • 403FEATURE_REQUIRED
Request
curl "https://app.revisit.cards/v1/developer/push/segments" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "bc85fb18-4aa9-4ab9-910a-9ca5cd42e505",
  "success": true
}

Preview who an audience reaches

GET/push/reach

Scopepush:read

Requires push:read. The preview before a send: how many customers kind (broadcast, all, segment with segment, individual with comma-separated ref membership ids, location with a branch id in ref) reaches on Apple, Google and neither, and campaignsLeftToday of the business's 3 a day. Nothing is sent or reserved.

Query

kindenum
One of all, broadcast, segment, individual, location. Default "broadcast".
segmentenum
One of lapsed_7, lapsed, one_away, reward_ready, new_week, champions.
refstring
programIduuid
branchIduuid
Request
curl "https://app.revisit.cards/v1/developer/push/reach" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "9b9dfa06-3590-4b70-bacc-1686d512a093",
  "success": true
}

Read today's message ideas

GET/push/suggestions

Scopepush:read

Requires push:read. The ideas the composer proposes from live numbers (audience, title, message, rationale), best first.

Query

programIduuid
branchIduuid
Request
curl "https://app.revisit.cards/v1/developer/push/suggestions" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "e8a1bec1-9575-439b-9046-5bdb46e73b4e",
  "success": true
}

Read the numbers above the composer

GET/push/stats

Scopepush:read

Requires push:read. Campaigns sent today against the daily cap (3 a business), the per-pass daily limit (2), scheduled campaigns and customers.

Query

programIduuid
branchIduuid
Request
curl "https://app.revisit.cards/v1/developer/push/stats" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "a5dc1d53-a90f-45d9-8f06-f67aa91a816b",
  "success": true
}

List recent campaigns and where each stands

GET/push/campaigns

Scopepush:read

Requires push:read. Newest first, at most limit (50). Only campaigns of the branches and programs the key may use. Each carries a status (scheduled, queued, completed, canceled) and per-platform counts of queued, sent, skipped and failed; wallets report no delivery or read data.

Query

limitinteger
1 to 50. Default 20.
programIduuid
Request
curl "https://app.revisit.cards/v1/developer/push/campaigns" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "5e9d7739-fc3a-4ee5-a054-605474aec5e4",
  "success": true
}

Send or schedule a push campaign

POST/push/campaigns

Scopepush:write

Requires push:write. Runs the app's own send: the plan's campaigns feature, opt-outs (broadcast, segment and location reach only customers who agreed to card updates; all is the shop's explicit choice), the copy rules (no links), at most 3 campaigns a business a day (409 CAMPAIGN_LIMIT) and 2 notifications a pass a day (a pass already at the limit is skipped when the sender reaches it). Answers 202 with a stable campaignId and status: the sender runs as a bounded job, so read GET /push/campaigns/{id} for queued or completed. scheduledAt (a minute to 30 days ahead, not for segments) schedules it. A retried Idempotency-Key never creates a second campaign. 409 NO_RECIPIENTS when nobody can be notified. A test key sends nothing real: its campaign ends completed with every delivery skipped as test_workspace. Optional cta puts a button on the pass (preset kinds call, whatsapp, directions, social, website; shorteners and bad values are 422) and optional window shows the card on the lock screen between two times (Apple only, at most 14 days); each is 403 PLUGIN_DISABLED while its plugin switch is off, as in the app. Timed alerts are under /push/alerts.

Send an Idempotency-Key header. Safe to retry.

Body

audienceobjectRequired
audience.kindenumRequired
One of all, broadcast, segment, individual, location.
audience.segmentenum
One of lapsed_7, lapsed, one_away, reward_ready, new_week, champions.
audience.membershipIdsuuid[]
audience.branchIduuid
branchIduuid
messagestringRequired
programIduuid
scheduledAtdate-time
titlestringRequired
ctaobject
cta.kindenumRequired
One of call, whatsapp, directions, social, website.
cta.labelstring
cta.valuestringRequired
A phone for call and whatsapp, <lat>,<lng> for directions, an https address for social and website. 1 to 200 characters.
windowobject
window.startdate-timeRequired
window.enddate-timeRequired

Returns 202

campaignIduuidRequired
queuedintegerRequired
statusenumRequired
One of scheduled, queued, completed, canceled.

Errors

  • 409CAMPAIGN_LIMIT
  • 409NO_RECIPIENTS
  • 403PLUGIN_DISABLED
Request
curl -X POST "https://app.revisit.cards/v1/developer/push/campaigns" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Idempotency-Key: 5f0c2a8e-7b1d-4c3e-9a6f-0d4b8e47a0aa" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": {
      "kind": "all"
    },
    "message": "Your 10th chai is on us this week.",
    "title": "Weekend chai offer"
  }'
Response
{
  "data": {
    "campaignId": "59aed7f3-83e8-43d6-aa83-3d0f98813f1a",
    "queued": 0,
    "status": "scheduled"
  },
  "requestId": "826f1af9-7c02-45c9-bea8-d2950244e8df",
  "success": true
}

Read one campaign and its status

GET/push/campaigns/{id}

Scopepush:read

Requires push:read. An id of another business, another environment or outside the key's branches and programs is 404.

Path

iduuidRequired

Returns 200

audienceobjectRequired
audience.branchIdstring or nullRequired
audience.kindstringRequired
audience.segmentstring or nullRequired
branchIdstring or nullRequired
canceledAtstring or nullRequired
canceledReasonstring or nullRequired
createdAtstringRequired
iduuidRequired
messagestringRequired
platformsobjectRequired
platforms.appleobjectRequired
platforms.apple.failedintegerRequired
platforms.apple.queuedintegerRequired
platforms.apple.sentintegerRequired
platforms.apple.skippedintegerRequired
platforms.googleobjectRequired
platforms.google.failedintegerRequired
platforms.google.queuedintegerRequired
platforms.google.sentintegerRequired
platforms.google.skippedintegerRequired
programIdstring or nullRequired
scheduledAtstring or nullRequired
skippedReasonsstring[]Required
statusenumRequired
One of scheduled, queued, completed, canceled.
titlestring or nullRequired
Request
curl "https://app.revisit.cards/v1/developer/push/campaigns/e01b010d-2c65-48e1-83a0-acad79f8d3b4" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": {
    "audience": {
      "branchId": "5eff65d7-d01c-4bd3-b26a-3d06b21fd005",
      "kind": "segment",
      "segment": "lapsed"
    },
    "branchId": "5eff65d7-d01c-4bd3-b26a-3d06b21fd005",
    "canceledAt": null,
    "canceledReason": null,
    "createdAt": "2026-11-03T08:41:12.000Z",
    "id": "e01b010d-2c65-48e1-83a0-acad79f8d3b4",
    "message": "Your 10th chai is on us this week.",
    "platforms": {
      "apple": {
        "failed": 2,
        "queued": 0,
        "sent": 118,
        "skipped": 3
      },
      "google": {
        "failed": 2,
        "queued": 0,
        "sent": 118,
        "skipped": 3
      }
    },
    "programId": "d7595bbd-4342-41b4-9037-2e61a9f8403f",
    "scheduledAt": "2026-11-03T08:41:12.000Z",
    "skippedReasons": [
      "daily_limit"
    ],
    "status": "scheduled",
    "title": "Weekend chai offer"
  },
  "requestId": "c3804658-e4d5-4108-9b3a-27b929c1ec14",
  "success": true
}

Cancel a scheduled campaign

POST/push/campaigns/{id}/cancel

Scopepush:write

Requires push:write. Only before it goes out; 409 NOT_SCHEDULED once it went out or was canceled. A retried key replays the first answer.

Send an Idempotency-Key header. Safe to retry.

Path

iduuidRequired

Returns 200

audienceobjectRequired
audience.branchIdstring or nullRequired
audience.kindstringRequired
audience.segmentstring or nullRequired
branchIdstring or nullRequired
canceledAtstring or nullRequired
canceledReasonstring or nullRequired
createdAtstringRequired
iduuidRequired
messagestringRequired
platformsobjectRequired
platforms.appleobjectRequired
platforms.apple.failedintegerRequired
platforms.apple.queuedintegerRequired
platforms.apple.sentintegerRequired
platforms.apple.skippedintegerRequired
platforms.googleobjectRequired
platforms.google.failedintegerRequired
platforms.google.queuedintegerRequired
platforms.google.sentintegerRequired
platforms.google.skippedintegerRequired
programIdstring or nullRequired
scheduledAtstring or nullRequired
skippedReasonsstring[]Required
statusenumRequired
One of scheduled, queued, completed, canceled.
titlestring or nullRequired

Errors

  • 409NOT_SCHEDULED
Request
curl -X POST "https://app.revisit.cards/v1/developer/push/campaigns/e01b010d-2c65-48e1-83a0-acad79f8d3b4/cancel" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Idempotency-Key: 5f0c2a8e-7b1d-4c3e-9a6f-0d4b8e1cfdbc"
Response
{
  "data": {
    "audience": {
      "branchId": "5eff65d7-d01c-4bd3-b26a-3d06b21fd005",
      "kind": "segment",
      "segment": "lapsed"
    },
    "branchId": "5eff65d7-d01c-4bd3-b26a-3d06b21fd005",
    "canceledAt": null,
    "canceledReason": null,
    "createdAt": "2026-11-03T08:41:12.000Z",
    "id": "e01b010d-2c65-48e1-83a0-acad79f8d3b4",
    "message": "Your 10th chai is on us this week.",
    "platforms": {
      "apple": {
        "failed": 2,
        "queued": 0,
        "sent": 118,
        "skipped": 3
      },
      "google": {
        "failed": 2,
        "queued": 0,
        "sent": 118,
        "skipped": 3
      }
    },
    "programId": "d7595bbd-4342-41b4-9037-2e61a9f8403f",
    "scheduledAt": "2026-11-03T08:41:12.000Z",
    "skippedReasons": [
      "daily_limit"
    ],
    "status": "scheduled",
    "title": "Weekend chai offer"
  },
  "requestId": "95d575c2-0ea0-4892-b0b6-8b87721e574c",
  "success": true
}

List saved message templates

GET/push/templates

Scopepush:read

Requires push:read and a key with no branch or program limit (templates belong to the whole business).

Request
curl "https://app.revisit.cards/v1/developer/push/templates" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "78fec5d4-818e-49c1-bb06-b9c527f1f3d0",
  "success": true
}

Save a message template

POST/push/templates

Scopepush:write

Requires push:write and a whole-business key. Same copy rules and the same limit of 20 as the app. A retried key replays the first answer.

Send an Idempotency-Key header. Safe to retry.

Body

messagestringRequired
titlestringRequired
Request
curl -X POST "https://app.revisit.cards/v1/developer/push/templates" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Idempotency-Key: 5f0c2a8e-7b1d-4c3e-9a6f-0d4b8ea5ed6b" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Your 10th chai is on us this week.",
    "title": "Weekend chai offer"
  }'
Response
{
  "data": null,
  "requestId": "f05618cb-84f7-4874-a7f1-4c4dcc7f40f3",
  "success": true
}

Delete a saved template

DELETE/push/templates/{id}

Scopepush:write

Requires push:write and a whole-business key. 404 once it is gone.

Path

iduuidRequired
Request
curl -X DELETE "https://app.revisit.cards/v1/developer/push/templates/e01b010d-2c65-48e1-83a0-acad79f8d3b4" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
HTTP/1.1 204

List the timed alerts

GET/push/alerts

Scopepush:read

Requires push:read and a whole-business key. The same alerts the app lists, whoever made them.

Request
curl "https://app.revisit.cards/v1/developer/push/alerts" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "16e2e8b8-b727-4cdd-8b9c-3932591f098c",
  "success": true
}

Create a timed alert

POST/push/alerts

Scopepush:write

Requires push:write, an Idempotency-Key and a whole-business key. A message at a start time, once or daily, weekly or monthly, to everyone who agreed to card updates (broadcast), one segment or the customers near one branch; never a list of people. Each run is an ordinary campaign through the app's own rules (the plan, opt-outs, 3 campaigns a day, 2 notifications a pass a day); a run that cannot go out is recorded as the alert's lastStatus and the schedule moves on, and a run later than 2 hours after its time is skipped as missed. At most 10 alerts (409 ALERT_LIMIT). An alert made through the API runs as the integration, not as a person, and its audit rows name the application and key. cta is 403 PLUGIN_DISABLED while buttons are off.

Send an Idempotency-Key header. Safe to retry.

Body

audienceobjectRequired
audience.kindenumRequired
One of broadcast, segment, location.
audience.segmentenum
One of lapsed_7, lapsed, one_away, reward_ready, new_week, champions.
audience.branchIduuid
ctaobject
cta.kindenumRequired
One of call, whatsapp, directions, social, website.
cta.labelstring
cta.valuestringRequired
A phone for call and whatsapp, <lat>,<lng> for directions, an https address for social and website. 1 to 200 characters.
enabledboolean
Default true.
messagestringRequired
programIduuid
repeatenumRequired
One of once, daily, weekly, monthly.
startAtdate-timeRequired
titlestringRequired

Errors

  • 409ALERT_LIMIT
  • 403PLUGIN_DISABLED
Request
curl -X POST "https://app.revisit.cards/v1/developer/push/alerts" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Idempotency-Key: 5f0c2a8e-7b1d-4c3e-9a6f-0d4b8e098659" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": {
      "kind": "broadcast"
    },
    "message": "Your 10th chai is on us this week.",
    "repeat": "once",
    "startAt": "2026-11-03T08:41:12.000Z",
    "title": "Weekend chai offer"
  }'
Response
{
  "data": null,
  "requestId": "eb15fe57-a4fd-4d22-b291-e37d0f863d7d",
  "success": true
}

Change a timed alert

PUT/push/alerts/{id}

Scopepush:write

Requires push:write and a whole-business key. Replaces the alert's content; the next run is worked out again.

Path

iduuidRequired

Body

audienceobjectRequired
audience.kindenumRequired
One of broadcast, segment, location.
audience.segmentenum
One of lapsed_7, lapsed, one_away, reward_ready, new_week, champions.
audience.branchIduuid
ctaobject
cta.kindenumRequired
One of call, whatsapp, directions, social, website.
cta.labelstring
cta.valuestringRequired
A phone for call and whatsapp, <lat>,<lng> for directions, an https address for social and website. 1 to 200 characters.
enabledboolean
Default true.
messagestringRequired
programIduuid
repeatenumRequired
One of once, daily, weekly, monthly.
startAtdate-timeRequired
titlestringRequired
Request
curl -X PUT "https://app.revisit.cards/v1/developer/push/alerts/e01b010d-2c65-48e1-83a0-acad79f8d3b4" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": {
      "kind": "broadcast"
    },
    "message": "Your 10th chai is on us this week.",
    "repeat": "once",
    "startAt": "2026-11-03T08:41:12.000Z",
    "title": "Weekend chai offer"
  }'
Response
{
  "data": null,
  "requestId": "518fe66e-15cd-4dc2-bbd6-1cb9be164378",
  "success": true
}

Delete a timed alert

DELETE/push/alerts/{id}

Scopepush:write

Requires push:write and a whole-business key. Answers 204; an unknown or another business's alert is 404.

Path

iduuidRequired
Request
curl -X DELETE "https://app.revisit.cards/v1/developer/push/alerts/e01b010d-2c65-48e1-83a0-acad79f8d3b4" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
HTTP/1.1 204

Switch a timed alert on or off

PUT/push/alerts/{id}/enabled

Scopepush:write

Requires push:write and a whole-business key. Switching on resumes at the next run on the alert's own rhythm; a finished one-time alert is 409 ALERT_FINISHED.

Path

iduuidRequired

Body

enabledbooleanRequired

Errors

  • 409ALERT_FINISHED
Request
curl -X PUT "https://app.revisit.cards/v1/developer/push/alerts/e01b010d-2c65-48e1-83a0-acad79f8d3b4/enabled" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false
  }'
Response
{
  "data": null,
  "requestId": "7bd39a09-9af9-4ec6-8935-f0ed8305a91e",
  "success": true
}

Read the automatic milestone alert settings

GET/push/milestones

Scopepush:read

Requires push:read and a whole-business key. Every event with its stored settings over the defaults (off, English).

Request
curl "https://app.revisit.cards/v1/developer/push/milestones" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY"
Response
{
  "data": null,
  "requestId": "4c69dcc2-43d5-4e0d-b7a3-1ab0afdbcbf6",
  "success": true
}

Change the automatic milestone alert settings

PUT/push/milestones

Scopepush:write

Requires push:write and a whole-business key. Sets exactly the settings sent; the same copy rules as the app. Repeating it changes nothing.

Body

settingsobject[]Required
settings[].enabledbooleanRequired
settings[].eventenumRequired
One of one_away, reward_ready, reward_redeemed, reward_expiring.
settings[].languageenumRequired
One of en, banglish.
settings[].messagestring or nullRequired
settings[].titlestring or nullRequired
Request
curl -X PUT "https://app.revisit.cards/v1/developer/push/milestones" \
  -H "Authorization: Bearer $DEVELOPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": [
      {
        "enabled": false,
        "event": "one_away",
        "language": "en",
        "message": "Your 10th chai is on us this week.",
        "title": "Weekend chai offer"
      }
    ]
  }'
Response
{
  "data": null,
  "requestId": "cae82f24-0f0a-424d-9c72-fee1f468e03b",
  "success": true
}