v1

latestOpenAPI 3.0.12026-07-24210349345.4 KB
Message

Get Web Inbox user messages

get/api/v1/messages/getusermessages

Query parameters

CustomerIdstring
Example:Optimove

Customer Id

VisitorIdstring
Example:optimove

IsVisitor boolean

LocalTimenumber double
        Customer local time offset in minutes. Optional, defaults to 0 if not specified. This is the UTC
        offset of the customers timezone (typically identified from browser timezone) e.g. if customer is
        at +1 hour timezone then pass +60.
        


        This field is used for evaluating message expiry etc. Consistently passing 0 results in measuring all
        times as UTC rather than customer local timezone.
        
MaxMessagesinteger

Maximum amount of messages to return. Optional, defaults to 50 if not specified.

TenantIdinteger
Example:1

TenantId Id

BrandIdstring uuid
Example:f29e20e6-53eb-4a79-a004-09fe308d63de

Brand Id.

Response

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

idstring uuid

Entity Id

createdAtinteger

Time Entity created

updatedAtinteger nullable

Time Entity Updated

deletedAtinteger nullable

Time Entity Deleted

customerIdstring nullable

Customer or VisitorId if OptimobileInbox.DTO.Response.MessageResponse.IsVisitor is true i.e - not logged in.

isVisitorboolean

true if OptimobileInbox.DTO.Response.MessageResponse.CustomerId is a visitor i.e - not logged in.

templateIdinteger

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).

titlestring nullable

A Web Inbox message title

contentstring nullable

A Web Inbox message content

mediastring nullable

Media path that should be shown for the message

readAtinteger nullable

When the message was read by the user or null if it is unread.

urlstring nullable

A Web Inbox message URL

engagementIdstring nullable

A Web Inbox Engagement Id

payloadobject 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

campaignKind0 | 1 | 2

0 = None (No campaign (default).)

1 = Scheduled (Scheduled campaign.)

2 = Triggered (Triggered campaign.)

executionDateTimestring date-time nullable

A Web Inbox ExecutionDateTime

messageLayoutType0 | 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.)

expiryDatestring date-time nullable

This is expiry date for the message <example>2024-05-04</example>

containerIdstring nullable

The Container ID for the message <example>top-left</example>

Example response

[
  {
    "id": "a27139ca-86a3-43f1-836a-43e387df22bc",
    "createdAt": 1715094818678,
    "updatedAt": 17150948186585,
    "deletedAt": 17150948186595,
    "customerId": "213124312hhjkfjas999qw",
    "isVisitor": true,
    "templateId": 1978432878942,
    "title": "Your message title",
    "content": "Your message content",
    "media": "hjshdjkhjskd/hsgdjkhsdjhshdjhdshhas.jpg",
    "readAt": 1715094818678,
    "url": "www.optimove.com",
    "engagementId": "1234abcd",
    "payload": {
      "glow": "true",
      "balloons": "32"
    },
    "executionDateTime": "2024-01-01T13:39:27Z"
  }
]