unPLUGDevelopers

Devices and messages API

Report a push open

POST/v1/members/me/push_opens

Records that the guest tapped a push, on the notification or one of its buttons. Call it on every tap, then route the guest. A repeat of the same open is recorded once.

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

Request body#

  • message_idstring (uuid)Required
    message_id from the push payload.
  • opened_atstring (date-time)Required
    When the guest tapped, from the device clock.
  • buttonstring
    primary or secondary when a button was tapped. Leave it out for a tap on the notification.
    One of primary, secondary

Response fields#

Returns 204 with no body.

Error descriptions#

400Bad request
missing_param

: message_id or opened_at is missing.

400Bad request
invalid_param

: button isn't primary or secondary.

404Not found
not_found

No such message for this member.

Any endpoint can also return the common errors.