---
title: "Get Web Inbox user messages"
method: GET
path: "/api/v1/messages/getusermessages"
tags: ["Message"]
---

# Get Web Inbox user messages

`GET /api/v1/messages/getusermessages`

## Request

- Base URL: `` (relative, and the document’s source URL is not known)
- URL: `/api/v1/messages/getusermessages`
- Auth: none declared

## Query parameters

- `CustomerId` string
- `VisitorId` string
- `LocalTime` number, double
- `MaxMessages` integer
- `TenantId` integer
- `BrandId` string, uuid

## Response `200`

If the request is successful, this response an array of user messages.

- MessageResponse[]
  - `id` string, uuid: Entity Id
  - `createdAt` integer: Time Entity created
  - `updatedAt` integer, nullable: Time Entity Updated
  - `deletedAt` integer, nullable: Time Entity Deleted
  - `customerId` string, nullable: Customer or VisitorId if OptimobileInbox.DTO.Response.MessageResponse.IsVisitor is true i.e - not logged in.
  - `isVisitor` boolean: true if OptimobileInbox.DTO.Response.MessageResponse.CustomerId is a visitor i.e - not logged in.
  - `templateId` integer: Id of the template that this message was created as an instance of or 0 if it was created through other means (e.g. directly with API).
  - `title` string, nullable: A Web Inbox message title
  - `content` string, nullable: A Web Inbox message content
  - `media` string, nullable: Media path that should be shown for the message
  - `readAt` integer, nullable: When the message was read by the user or null if it is unread.
  - `url` string, nullable: A Web Inbox message URL
  - `engagementId` string, nullable: A Web Inbox Engagement Id
  - `payload` object, nullable: Any custom data (JSON) that was configured in your template. Includes resolved personalization if personalization/conditional language was included in the source template. This exists to allow you to perform custom operations in frontend when designing your own UI for Web Inbox
  - `campaignKind` 0 | 1 | 2: 0 = None (No campaign (default).) 1 = Scheduled (Scheduled campaign.) 2 = Triggered (Triggered campaign.)
  - `executionDateTime` string, date-time, nullable: A Web Inbox ExecutionDateTime
  - `messageLayoutType` 0 | 1: Describes a frontend layout option for OptimobileInbox.Entity.IMessage / OptimobileInbox.Entity.IInboxTemplate. Different layouts can be mixed and matched with the same inbox. Typically this is user defined i.e. by the marketer creating the template. 0 - small 1 - large 0 = Small (Small layout. The picture appears next to the text.) 1 = Large (Large layout. The picture takes up the whole width of the message with the text below.)
  - `expiryDate` string, date-time, nullable: This is expiry date for the message <example>2024-05-04</example>
  - `containerId` string, nullable: The Container ID for the message <example>top-left</example>

## Other responses

- `400`: Bad Request
- `401`: This response will be returned if the request is not authorized to access this resource.
- `404`: This response will be returned if the request is invalid or missing required information.
- `500`: This response will be returned if there is an error in the system that prevents the operation from being completed.

---

[API](https://skmtc.dev/optimove/apis/optimobile-web-inbox-api.md) - [All operations](https://skmtc.dev/optimove/apis/optimobile-web-inbox-api/llms.txt) - [OpenAPI document](https://skmtc.dev/optimove/apis/optimobile-web-inbox-api/revisions/845cb0ac67dc?raw)
