unPLUGDevelopers

Devices and messages API

Report a message event

POST/v1/members/me/messages/{id}/events

Records what the guest did with a full-screen message. Send impression as soon as it's on screen, button_tap when a button is tapped, and close when it's dismissed any other way. Each type is recorded once per message, so retries are safe. An impression also stops the fallback push for this message.

Permissions: Member token.

Request headers#

  • Idempotency-Keystring
    Any string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response with Idempotent-Replayed: true.
    Max Length 255

Path parameters#

  • idstring (uuid)Required
    The message id.

Request body#

  • typestringRequired
    impression, button_tap or close.
    One of impression, button_tap, close
  • buttonstring
    primary or secondary. Required for button_tap.
    One of primary, secondary

Response fields#

Returns 204 with no body.

Error descriptions#

400Bad request
invalid_param

Unknown type or button.

400Bad request
missing_param

: button is missing on a button_tap.

404Not found
not_found

No such message for this member.

Any endpoint can also return the common errors.