unPLUGDevelopers

Devices and messages API

Get a message

GET/v1/members/me/messages/{id}

Returns one message by id. Call it when the guest taps a push with inapp: "1", using the push's message_id. The guest asked for this message, so it's returned even if they already saw a full-screen message today.

Permissions: Member token.

Path parameters#

  • idstring (uuid)Required
    The message_id from the push.

The response is a message object, the same as above.

Response fields#

Returns 200 with Message

  • idstring (uuid)
    Same as message_id in the push that carried it.
  • layoutstring
    full_image (the image fills the screen and carries the words) or image_and_text (image on top, then title, body and buttons).
    One of full_image, image_and_text
  • image_urlstring (uri)
    HTTPS image.
  • titlestringNullable
    Heading. For full_image, use it as the image's accessibility label.
  • bodystringNullable
    Text under the title.
  • The main button: label, action and url. action is open_screen (a link in your scheme or on your link domain), open_url (https, open in a browser) or close (url is null).
    Show attributesMessageButton
    • labelstring
    • actionstring
      One of open_screen, open_url, close
    • urlstringNullable
  • secondaryMessageButtonNullable
    Second button, same shape, or null.
  • offerobjectNullable
    An offer to show with the message, or null. code is a promo code to show; wallet_item_id is an offer already in the member's wallet; text is one line to show next to it.
    Show attributesHide attributes
    • codestringNullable
    • wallet_item_idstring (uuid)Nullable
    • textstring
  • displayobject
    never_during: screens where the message must not appear. Always includes checkout.
    Show attributesHide attributes
    • never_duringarray of string
  • created_atstring (date-time)
    When unPLUG created it.
  • expires_atstring (date-time)Nullable
    Don't show it after this.

Error descriptions#

404Not found
not_found

No such message for this member, or it has expired. Open the push's deep_link instead, or your home screen.

401Unauthorized
token_expired

Get a new member token and retry.

Any endpoint can also return the common errors.