[POST] /api/v2/embedded-messages/get
This endpoint is used to get the messages for a customer or visitor for one or more containers. If you send a request with no body or an empty body, the API will return messages from all available containers.
Query Parameters
tenantId
(integer, required): Your tenant ID.brandId
(string, required): The ID of the specific brand you are targeting.customerId
(string, conditional): The ID for a known, registered customer. One ofcustomerId
orvisitorId
must be provided.visitorId
(string, conditional): The ID for an anonymous visitor. One ofcustomerId
orvisitorId
must be provided.localTime
(integer, optional): The user's current local time.
Request Body
The request body should be a JSON array of objects. Each object specifies a container to fetch messages from.
containerId
(string): The ID of the container (e.g., "Inbox").limit
(integer, optional): The maximum number of messages to return for this container. The default is 50.
Example Request Body:
[
{
"containerId": "Inbox",
"limit": 50
}
]
Responses
200 OK
- Success
200 OK
- SuccessOn a successful request, the API will return a 200 OK
status with a JSON object containing the messages.
The response object has a containers
key, which holds an object. In this object, each key is a containerId
, and its value is an array of message objects for that container.
Example Success Response:
{
"containers": {
"Inbox": [
{
"customerId": "opt__001",
"isVisitor": false,
"templateId": 1750942770520,
"title": "s",
"content": null,
"media": null,
"readAt": "2025-07-02T13:25:30.185Z",
"url": null,
"engagementId": null,
"payload": {},
"campaignKind": 2,
"executionDateTime": "2025-06-26T14:54:38.029773Z",
"messageLayoutType": 0,
"expiryDate": null,
"containerId": "Inbox",
"id": "484054ef-af30-4804-b8a6-4bcca6126bb9",
"createdAt": "1601-01-03T00:38:14.9678042Z",
"updatedAt": "2025-07-02T13:25:30.185Z"
}
]
}
}