Webhook Events Payload

This document details the webhook events sent by our system, including their payload structures and descriptions of each field.

reward-table-rewards-awarded

Payload Structure:

{
    "id": "76f574bd-c986-40a2-84fe-5e551fdfe375",
    "event": "reward-table-rewards-awarded",
    "data": {
        "reward_transaction_id": "reward-transaction-id",
        "reward_item_id": "reward-item-uuid",
        "reward_item_amount": 100,
        "reward_item_balance": 1000,
        "reward_action_id": "action-uuid",
        "reward_action_key": "play-game",
        "reward_table_id": "table-uuid",
        "client_id": "client-id",
        "profile_id": "profile-uuid",
        "profile_custom_id": "custom-id"
    },
    "created_at": "2024-09-02T12:34:56Z"
}

Field Descriptions:

FieldTypeDescription
idstringUnique identifier for the webhook event.
eventstringThe event type.
reward_transaction_idstringUnique ID of the reward transaction.
reward_item_idstringUnique ID of the reward item.
reward_item_amountnumberAmount of the reward item awarded.
reward_item_balancenumberRemaining balance of the reward item.
reward_action_idstringUnique ID of the action that triggered the reward.
reward_action_keystringKey of the action that triggered the reward.
reward_table_idstringID of the reward table.
client_idstringID of the client associated with the reward.
profile_idstringID of the profile receiving the reward.
profile_custom_idstringCustom identifier for the profile.
created_atstringTimestamp when the event was created.

badge-awarded

Payload Structure:

{
    "id": "76f574bd-c986-40a2-84fe-5e551fdfe375",
    "event": "badge-awarded",
    "data": {
        "badge_id": "badge-id",
        "earned_badge_id": "earned_badge_id",
        "badge_title": "Badge Title",
        "description": "Badge Description",
        "reward_item_id": "reward-item-id",
        "reward_item_name": "Reward Item Name",
        "reward_item_threshold": 10,
        "image_url": "https://example.com/image.png",
        "client_id": "client-id",
        "profile_id": "profile-uuid",
        "profile_custom_id": "custom-id"
    },
    "created_at": "2024-09-02T12:34:56Z"
}

Field Descriptions:

FieldTypeDescription
idstringUnique identifier for the webhook event.
eventstringThe event type.
badge_idstringUnique ID of the badge.
earned_badge_idstringID of the earned badge instance.
badge_titlestringTitle of the badge.
descriptionstringDescription of the badge.
reward_item_idstringID of the reward item associated with the badge.
reward_item_namestringName of the reward item.
reward_item_thresholdnumberThreshold value for the reward item.
image_urlstringURL of the badge image.
client_idstringID of the client associated with the badge.
profile_idstringID of the profile receiving the badge.
profile_custom_idstringCustom identifier for the profile.
created_atstringTimestamp when the event was created.

user-quest-task-progressed

Payload Structure:

{
    "id": "f5967a2f-6fae-4801-9708-189ec59200c9",
    "event": "user-quest-task-progressed",
    "data": {
        "user_quest_task_id": "38a70a0a-c578-4a86-a178-410d8ba58415",
        "user_quest_id": "5998109b-403a-4e88-b38b-1cc98bce9b9e",
        "quest_task_id": "e60c13a4-fe32-4798-b803-4db143355d00",
        "quest_id": "82c81919-c413-41c7-94a8-927040197e27",
        "custom_increment": null,
        "custom_progress": null,
        "client_id": "client-id",
        "profile_id": "profile-id",
        "nickname": "Composed Keeper"
    },
    "created_at": "2024-12-18T12:40:32.993163+00:00"
}

Field Descriptions:

FieldTypeDescription
idstringUnique identifier for the webhook event.
eventstringThe event type.
user_quest_task_idstringID of the user quest task.
user_quest_idstringID of the user quest.
quest_task_idstringID of the quest task.
quest_idstringID of the quest.
custom_incrementnumberCustom increment applied to task progress.
custom_progressnumberCustom progress value set for the task.
client_idstringID of the client.
profile_idstringID of the profile.
nicknamestringNickname of the profile.
created_atstringTimestamp when the event was created.

user-quest-task-completed

Payload Structure:

{
    "id": "e92490c7-934a-477e-9423-62832263bb83",
    "event": "user-quest-task-completed",
    "data": {
        "user_quest_task_id": "65427b29-5b53-4452-9f79-dda23b4051fa",
        "user_quest_id": "e7ca598c-0feb-4385-9a83-525b5bff01b5",
        "quest_task_id": "74006b3b-5b86-4798-9a57-7b0a654b7515",
        "quest_id": "48402f0c-ea5f-4d3f-bedc-e754ec21f1d8",
        "created_at": "2024-12-18T12:28:24Z",
        "completed_at": "2024-12-18T12:40:04Z",
        "status": "completed",
        "progress": 3,
        "client_id": "client-id",
        "profile_id": "profile-id",
        "nickname": "Composed Keeper"
    },
    "created_at": "2024-12-18T12:41:24.826896+00:00"
}

Field Descriptions:

FieldTypeDescription
idstringUnique identifier for the webhook event.
eventstringThe event type.
user_quest_task_idstringID of the user quest task.
user_quest_idstringID of the user quest.
quest_task_idstringID of the quest task.
quest_idstringID of the quest.
created_atstringTimestamp when the event was created.
completed_atstringTimestamp when the task was completed.
statusstringStatus of the task.
progressnumberProgress made on the task.
client_idstringID of the client.
profile_idstringID of the profile.
nicknamestringNickname of the profile.

user-quest-completed

Payload Example:

{
  "id": "0abc42d4-6520-47f4-9896-5a485642d4a7",
  "event": "user-quest-completed",
  "data": {
    "user_quest_id": "e7ca598c-0feb-4385-9a83-525b5bff01b5",
    "profile_id": "5f724202-246d-439b-8250-527bed44b6c9",
    "quest_id": "48402f0c-ea5f-4d3f-bedc-e754ec21f1d8",
    "quest_task_ids": ["74006b3b-5b86-4798-9a57-7b0a654b7515"],
    "created_at": "2024-12-18T12:28:24Z",
    "completed_at": "2024-12-18T12:40:04Z",
    "active_until": null,
    "timer_expired": false,
    "user_quest_task_ids": ["65427b29-5b53-4452-9f79-dda23b4051fa"],
    "status": "completed",
    "rewards_status": "unclaimed",
    "rewards_claimed_at": null,
    "client_id": "8PqSNDgIVHnXuJuGte1HdvOjOqhCFE1ZCR3qhqaS",
    "nickname": "Composed Keeper"
  },
  "created_at": "2024-12-18T12:41:24.825620+00:00"
}

Field Descriptions:

Field NameTypeDescription
idstringUnique identifier for the event.
eventstringEvent type (user-quest-completed).
data.user_quest_idstringUnique identifier for the user quest.
data.profile_idstringUnique identifier for the user profile.
data.quest_idstringUnique identifier for the quest.
data.quest_task_idsarrayList of unique quest task identifiers associated with this quest.
data.created_atdatetimeTimestamp indicating when the user quest was created.
data.completed_atdatetimeTimestamp indicating when the user quest was completed.
data.active_untildatetimeIndicates until when the quest was active (if applicable).
data.timer_expiredbooleanIndicates if the quest timer expired.
data.user_quest_task_idsarrayList of unique user quest task identifiers completed for this quest.
data.statusstringStatus of the quest completion (e.g., completed).
data.rewards_statusstringStatus of rewards (e.g., unclaimed).
data.rewards_claimed_atdatetimeTimestamp when rewards were claimed (if applicable).
data.client_idstringClient-specific identifier.
data.nicknamestringNickname of the user.
created_atdatetimeTimestamp when the event was created.

user-quest-reward-awarded

Payload Example:

{
  "id": "7ff896cd-ac8d-4923-95ae-faf162ad2d1e",
  "event": "user-reward-awarded",
  "data": {
    "reward_transaction_id": "7815655b-03ef-4bb3-8c53-916512bff80c",
    "reward_item_id": "4c7bd24e-e0eb-4e07-8472-72e4f52ec4ae",
    "reward_action_key": "poll-voted",
    "reward_action_id": "3bb7b84a-5bcc-4539-bb52-c36b5d410d03",
    "client_id": "8PqSNDgIVHnXuJuGte1HdvOjOqhCFE1ZCR3qhqaS",
    "reward_item_amount": 100,
    "profile_id": "5f724202-246d-439b-8250-527bed44b6c9",
    "profile_custom_id": "[email protected]",
    "reward_item_balance": 260,
    "nickname": "Composed Keeper"
  },
  "created_at": "2024-12-18T13:31:03.927324+00:00"
}

Field Descriptions:

Field NameTypeDescription
idstringUnique identifier for the event.
eventstringEvent type (user-reward-awarded).
data.reward_transaction_idstringUnique identifier for the reward transaction.
data.reward_item_idstringUnique identifier for the reward item.
data.reward_action_keystringKey representing the action associated with the reward.
data.reward_action_idstringUnique identifier for the action associated with the reward.
data.client_idstringClient-specific identifier.
data.reward_item_amountintegerAmount of reward items awarded.
data.profile_idstringUnique identifier for the user profile.
data.profile_custom_idstringCustom identifier for the user profile.
data.reward_item_balanceintegerCurrent balance of the reward item.
data.nicknamestringNickname of the user.
created_atdatetimeTimestamp when the event was created.

Notes

  1. All id fields are UUIDs (Universally Unique Identifiers).
  2. Timestamps follow the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
  3. Additional events will follow a similar structure and will be documented as they are added.