Inbox Cards API
Inbox cards are a message center inside your app or website: a persistent feed per person, with a title, a body, an image, an optional button or link, a pinned flag and an expiry. Marketers send cards from an Inbox card campaign or from a journey's Inbox card step; the SDKs read the feed and report what the person does with each card.
You rarely call these endpoints yourself - every Joryio SDK does (getCards(), markCardRead, dismissCard...). They are documented here for custom clients and for debugging.
All endpoints on this page are relative to the base URL: https://api-eu1.joryio.com/api - see API Overview. They authenticate with the app's SDK key (X-SDK-Key), exactly like in-app sync.
Availability
Inbox cards are switched on for your organization by Joryio. Until they are, POST /v1/in-app/cards answers the normal empty feed (cards: [], unreadCount: 0) - never an error, so the inbox shows its empty state - and a card's read / clicked / dismissed sent to /v1/in-app/track is accepted and dropped. Saving or launching an Inbox card campaign, and activating a journey with an Inbox card step, answer 403 with "code": "FEATURE_NOT_ENABLED". Contact Joryio support to have them switched on.
Read the feed
POST /v1/in-app/cards
{
"userId": "customer-42",
"anonymousId": "a-6f0c...",
"sessionId": "s-1",
"trackingConsent": "granted",
"capabilities": ["cards"],
"limit": 20,
"cursor": null,
"etag": null
}
| Field | |
|---|---|
userId, anonymousId, externalId, sessionId | The same identity fields as in-app sync |
limit | Page size, 1-50 (default 20) |
cursor | nextCursor of the previous page |
etag | The etag of the feed you hold: when nothing changed the answer is notModified: true with no cards |
trackingConsent | granted, denied or pending. denied - or no visitor id at all - answers an empty feed with reason: "unconsented" |
Answer:
{
"success": true,
"evaluatedAt": "2026-11-21T10:00:00.000Z",
"etag": "k3J9...",
"cards": [
{
"id": "0b7e7c1a-4c55-4d8e-9a43-3f1f7d0c2a11",
"campaignId": "6f0c1b2a-0000-4000-8000-000000000001",
"variantId": "v1",
"title": "Free shipping this weekend",
"body": "On every order, no minimum.",
"imageUrl": "https://cdn.example.com/weekend.png",
"buttonText": "Shop now",
"url": "https://shop.example.com/sale",
"pinned": true,
"createdAt": "2026-11-20T09:12:00.000Z",
"expiresAt": "2026-12-20T09:12:00.000Z",
"read": false,
"clicked": false,
"deliveryToken": "eyJvIjoi..."
}
],
"unreadCount": 3,
"nextCursor": null,
"ttlSeconds": 300,
"stateScope": "server"
}
- Order: pinned cards first, then newest first.
unreadCountcounts the whole feed, not this page - use it for a badge.urlis an http(s) address or the app's own deep link (myapp://...); anything else is never sent.buttonText: nullmeans no button - the card itself opensurl.stateScope:server- read, clicked and dismissed are kept per person on the server and are the same on every device.device- an anonymous visitor: they get only the cards whose audience they match, and the device keeps what they read and dismissed.- Who gets the server inbox: a person named by their external id (
userId/externalId). When the app uses SDK Authentication, the verified subject must be that same person; otherwise the request gets the device feed. A value shaped like a Joryio profile id never names anyone. success: falsewithreason: "evaluation_error": keep the feed you have. Over 20 requests per minute from one device the answer is HTTP 429 - keep the feed you have and retry later.- A device may serve the feed from its cache for
ttlSeconds. The SDKs refresh at most once every 30 seconds, on app foreground after the cache expires, onrefreshCards(), and on the silent pushjry_sync: "cards"that a journey's Inbox card step sends.
Report what the person did
Each report is the ordinary in-app track call, POST /v1/in-app/track (or /v1/in-app/track/batch), with the card's deliveryToken and an action:
action | Means | Event |
|---|---|---|
viewed | The card was on screen (the SDKs' feed views send it when half the card was visible for a second) | in_app.displayed |
read | The person read the card | in_app.card_read |
clicked | The person tapped the card or its button - also marks it read | in_app.clicked |
dismissed | The person removed the card from their feed | in_app.dismissed |
{ "deliveryToken": "eyJvIjoi...", "action": "read", "sessionId": "s-1" }
The token names the card and the person, so no campaignId or user id is needed and a token can only change its own card. Each action is recorded once per card. A dismissed card never comes back to that person.
Retention and privacy
- A card expires at its campaign's expiry (a date, or a number of days after it reached the person - 30 by default). Expired and dismissed cards are deleted every day.
- A GDPR erasure deletes the person's cards; a data export includes them.
- Card text is rendered for the person who receives it (their first name in their own feed); reports show counts only.
Related
- Placements API - the same SDK key, identity and link rules, for named spots inside a screen
- Tracking events - the in-app event family