unPLUGDevelopers

Devices and messages API

Report a message event from your server

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

The same as Report a message event, for a server-to-server integration. Each type is recorded once per message, so retries are safe.

Permissions: Secret key with members:write.

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 member id.
  • message_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.

404Not found
not_found

No such member or message.

Any endpoint can also return the common errors.