List all messages
List all messages for the current environment. This API supports filtering by **channel**, **subscriberId**, and **transactionId**. This API returns a paginated list of messages.
List all messages for the current environment. This API supports filtering by channel, subscriberId, and transactionId. This API returns a paginated list of messages.
Authorization
secretKey API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".
In: header
Query Parameters
Channel type through which the message is sent
Value in
- "in_app"
- "email"
- "sms"
- "chat"
- "push"
Filter by exact context keys, order insensitive (format: "type:id")
010Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/messages?contextKeys=tenant%3Aorg-123&contextKeys=region%3Aus-east-1"{ "totalCount": 0, "hasMore": true, "data": [ { "_id": "string", "_templateId": "string", "_environmentId": "string", "_messageTemplateId": "string", "_organizationId": "string", "_notificationId": "string", "_subscriberId": "string", "subscriber": { "_id": "string", "firstName": "string", "lastName": "string", "email": "string", "phone": "string", "avatar": "string", "locale": "string", "channels": [ { "providerId": "slack", "integrationIdentifier": "string", "credentials": { "webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": [ "token1", "token2", "token3" ], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details" }, "_integrationId": "string" } ], "topics": [ "string" ], "isOnline": true, "lastOnlineAt": "string", "__v": 0, "data": {}, "timezone": "string", "subscriberId": "string", "_organizationId": "string", "_environmentId": "string", "deleted": true, "createdAt": "string", "updatedAt": "string" }, "template": { "_id": "string", "name": "string", "description": "string", "active": true, "draft": true, "preferenceSettings": { "email": true, "sms": false, "in_app": true, "chat": false, "push": true }, "critical": true, "tags": [ "string" ], "steps": [ { "_id": "string", "uuid": "string", "name": "string", "_templateId": "string", "active": true, "shouldStopOnFail": true, "template": {}, "filters": [ { "isNegated": true, "type": "BOOLEAN", "value": "AND", "children": [ { "field": "string", "value": "string", "operator": "LARGER", "on": "subscriber" } ] } ], "_parentId": "string", "metadata": { "amount": 0, "unit": "seconds", "digestKey": "string", "type": "regular", "backoff": true, "backoffAmount": 0, "backoffUnit": "seconds", "updateMode": true }, "replyCallback": { "active": true, "url": "string" }, "variants": [ { "_id": "string", "uuid": "string", "name": "string", "_templateId": "string", "active": true, "shouldStopOnFail": true, "template": {}, "filters": [ { "isNegated": true, "type": "BOOLEAN", "value": "AND", "children": [ { "field": "string", "value": "string", "operator": "LARGER", "on": "subscriber" } ] } ], "_parentId": "string", "metadata": { "amount": 0, "unit": "seconds", "digestKey": "string", "type": "regular", "backoff": true, "backoffAmount": 0, "backoffUnit": "seconds", "updateMode": true }, "replyCallback": { "active": true, "url": "string" } } ] } ], "_organizationId": "string", "_creatorId": "string", "_environmentId": "string", "triggers": [ { "type": "event", "identifier": "string", "variables": [ { "name": "string" } ], "subscriberVariables": [ { "name": "string" } ] } ], "_notificationGroupId": "string", "_parentId": "string", "deleted": true, "deletedAt": "string", "deletedBy": "string", "notificationGroup": { "_id": "string", "name": "string", "_environmentId": "string", "_organizationId": "string", "_parentId": "string" }, "data": {}, "workflowIntegrationStatus": {} }, "templateIdentifier": "string", "createdAt": "string", "deliveredAt": [ "string" ], "lastSeenDate": "string", "lastReadDate": "string", "content": [ { "type": "button", "content": "string", "url": "string", "styles": { "textAlign": "center" } } ], "transactionId": "string", "subject": "string", "channel": "in_app", "read": true, "seen": true, "snoozedUntil": "string", "email": "string", "phone": "string", "directWebhookUrl": "string", "providerId": "string", "deviceTokens": [ "string" ], "title": "string", "cta": { "type": "redirect", "data": { "url": "string" }, "action": { "status": "pending", "buttons": [ { "type": "primary", "content": "string", "resultContent": "string" } ], "result": { "payload": {}, "type": "primary" } } }, "_feedId": "string", "status": "sent", "errorId": "string", "errorText": "string", "payload": {}, "overrides": {}, "contextKeys": [ "tenant:org-123", "region:us-east-1" ] } ], "pageSize": 0, "page": 0}