Webhook Event for Message Viewed

This event fires when a message's media (video or audio) player has been played back by someone. The person playing a message can be an identified logged-in user or an anonymous viewer.

This webhook follows the same logic as notifications for when a message is played. Some notes:

  • The webhook fires once per user playing a message.

  • The webhook fires once per user's session.

  • The webhook only fires if the message being played has an author (the message wasn't posted anonymously).

Examples:

  • If a logged-in user plays a message for the first time, this will fire the webhook. But if that same user plays the same message a 2nd time, it will not send an additional webhook for the 2nd play.

  • A non-logged-in visitor plays a message once, which fires the webhook. During the same browser session, this user presses play on the same message a 2nd time. This 2nd play does not fire an additional webhook.

Here is an example request body:

{
  "type": "message_played",
  "id": "abfe656b-cb51-4540-af32-a8e8b954221b",
  "occurred_at": "2022-04-01T14:25:48.585+00:00",
  "payload": {
    "message": {
      "id": 283,
      "conversation_title": "Conversation with emma casel",
      "message_type": "screencamera",
      "recorded_duration_seconds": 1,
      "message_url": "http://awesomecompany.clarityflow.com/c/conversation-with-emma-casel#message-283",
      "message_embed_url": "http://awesomecompany.clarityflow.com/embeds/messages/awesomecompany/283?conversation_slug=conversation-with-emma-casel",
      "text": "",
      "message_created_time": "2022-01-08 18:02:1641664979",
      "author": {
        "first_name": "User",
        "last_name": "Casel",
        "full_name": "User Casel",
        "email": "user@example.com"
      },
      "download_media_url": "https://zipmessage-production-input.s3.amazonaws.com/68u6m2jb5ydijz5oa4tk0ivm07hx?response-content-disposition=attachment%3B%20filename%3D%22recording.webm%22%3B%20filename%2A%3DUTF-8%27%27recording.webm&response-content-type=video%2Fwebm&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3ARUPDB3HFYUPVYV%2F20220701%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220701T201029Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=b8595e540eaf27dcd8c6e11c78d2e5bf9907e0e2932c6851f02a95e6aea9c4f0",
      "access_media_file": "https://zipmessage.com/330/download_media",
      "workflow": {}
    },
    "played_by": "anonymous"
  }
}

Last updated