In-App Messages

Manage in-application messaging including read status and message routing.

List In-App Messages

GET /v1/in-app-messages

List app messages of the current account.

Query Parameters:

  • pageSize (integer, optional): How many elements per page (1-100, default: 50)
  • pageNumber (integer, optional): Current page number (default: 1)
  • sortField (string, optional): Field to sort by (id, createdAt, default: createdAt)
  • sortDirection (string, optional): Sort direction (ASC, DESC, default: ASC)
  • unread (boolean, optional): Filter for unread messages only (default: false)

Response (200 OK):

{
    "content": [
        {
            "id": "msg-123e4567-e89b-12d3-a456-426614174000",
            "html": "<div class='notification'><h3>Welcome!</h3><p>Welcome to your new dashboard. Click here to get started with your first project.</p></div>",
            "redirectRoute": "/projects/create",
            "createdAt": "2024-01-20T10:00:00Z",
            "readAt": null,
            "unreadAt": null
        },
        {
            "id": "msg-987f6543-e21c-34d5-b678-537725285111",
            "html": "<div class='alert alert-info'><h3>System Maintenance</h3><p>Scheduled maintenance will occur on Sunday at 2 AM UTC.</p></div>",
            "redirectRoute": "/system/status",
            "createdAt": "2024-01-19T14:30:00Z",
            "readAt": "2024-01-19T15:45:00Z",
            "unreadAt": null
        },
        {
            "id": "msg-456a7890-b12c-45d6-e789-648836396222",
            "html": "<div class='notification success'><h3>Update Available</h3><p>A new version of the application is available. Update now for the latest features.</p></div>",
            "redirectRoute": "/settings/updates",
            "createdAt": "2024-01-18T09:15:00Z",
            "readAt": "2024-01-18T09:20:00Z",
            "unreadAt": "2024-01-20T08:00:00Z"
        }
    ],
    "page": {
        "size": 3,
        "pageSize": 50,
        "pageNumber": 1,
        "totalElements": 3,
        "totalPages": 1
    }
}

Response (400 Bad Request):

{
    "message": "Invalid Paging Arguments",
    "traceId": "09f9aa68-4d89-465b-8d6d-41490fff7727"
}

Update In-App Message

PUT /v1/in-app-messages/{id}

Update an in-app message (typically used to mark as read/unread).

Path Parameters:

  • id (string, required): Message UUID

Request Body:

{
    "readAt": "2024-01-20T16:30:00Z"
}

Or to mark as unread:

{
    "unreadAt": "2024-01-20T16:30:00Z"
}

Response (200 OK):

{
    "id": "msg-123e4567-e89b-12d3-a456-426614174000",
    "html": "<div class='notification'><h3>Welcome!</h3><p>Welcome to your new dashboard. Click here to get started with your first project.</p></div>",
    "redirectRoute": "/projects/create",
    "createdAt": "2024-01-20T10:00:00Z",
    "readAt": "2024-01-20T16:30:00Z",
    "unreadAt": null
}

Response (422 Unprocessable Entity):

{
    "message": "The given data failed to pass validation.",
    "traceId": "09f9aa68-4d89-465b-8d6d-41490fff7727",
    "errors": {
        "readAt": ["Invalid date format"],
        "unreadAt": ["Cannot set both readAt and unreadAt simultaneously"]
    }
}