getMessages
GET/messages
Get all Messages in a paginated listing, sorted by ascending createdAt
.
Request
Query Parameters
Possible values: >= 1
Default value: 1
The page number in a paginated listing.
Possible values: >= 1
and <= 20
Default value: 20
The number of items to return on each page.
Filter Messages to only include those with a createdAt
timestamp strictly greater than createdAfter
. Useful for polling and batch processing; iterate over all Messages, and filter each request by createdAt
of the latest processed Message.
Possible values: [processed
, unprocessed
]
Filter Messages to only include/exclude those with a processedAt
timestamp. Useful for processing.
Possible values: [true
, false
]
Filter to only return external
or internal
Messages
Possible values: [ONBOARDINGONE
, ONBOARDINGTWO
, UPSELLAUTOSAVEONE
, UPSELLAUTOSAVETWO
, UPSELLAUTOSAVETHREE
, REACTIVATIONONE
, REACTIVATIONTWO
, REACTIVATIONTHREE
, WELLBEINGQUESTIONONE
]
Responses
- 200
All messages in a paginated listing.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
messages
object[]
Possible values: [Message
]
user
object
required
translatedTitle
object
translatedBody
object
required
image
object
Image URL
translatedAlt
object
Height of the image in pixels.
Width of the image in pixels.
Possible values: [ONBOARDINGONE
, ONBOARDINGTWO
, UPSELLAUTOSAVEONE
, UPSELLAUTOSAVETWO
, UPSELLAUTOSAVETHREE
, REACTIVATIONONE
, REACTIVATIONTWO
, REACTIVATIONTHREE
, WELLBEINGQUESTIONONE
]
meta
object
URL for the next page.
The total count of items.
The number of returned items on this page.
The number of pages.
Index of the first item on this page (starting from 1).
Index of the last item on this page.
{
"messages": [
{
"id": "11785037-908d-41f5-875c-ceea9fb5c2f5",
"type": "Message",
"user": {
"type": "User",
"id": "cb66889a-8a8b-4d6b-81a3-fcf2340e838a",
"externalId": "usr_12345"
},
"translatedTitle": {
"en": "Save more toward Electric Car"
},
"translatedBody": {
"en": "Save every day, week or month without having to think about it. Go to Impact Finance in the app to try automatic savehacks."
},
"image": {
"src": "https://assets.dreams.enterprises/rails/.../image.jpg",
"translatedAlt": {
"en": "Your Dream"
},
"height": 144,
"width": 144
},
"cta": "/dreams/de2706a8-6853-479a-9b61-ed9d1c91010d/marketplace",
"createdAt": "2023-05-07T14:21:56.123Z",
"processedAt": "2023-05-07T15:21:56.123Z",
"external": true
}
],
"meta": true
}