Quests Resource
Quests are a way for Discord to promote games and other content to users. Users can receive rewards for completing quests, such as redeemable codes, in-game items, or collectibles.
Quest Object
A sponsored quest.
Quest Structure
Field | Type | Description |
---|---|---|
id | snowflake | The ID of the quest |
config | quest config object | The configuration and metadata for the quest |
user_status | ?quest user status object | The user's quest progress, if it has been accepted |
targeted_content 1 | ?array[integer] | The content areas where the quest can be shown |
preview | boolean | Whether the quest is unreleased and in preview for Discord employees |
1 Some quest content areas may be dismissed using the Dismiss Quest Content endpoint.
Quest Config Structure
Field | Type | Description |
---|---|---|
quest_id | snowflake | The ID of the quest |
config_version | integer | Quest configuration version |
expires_at | ISO8601 timestamp | The expiry date of the quest |
stream_duration_requirement_minutes | integer | Duration (in minutes) the game must be streamed to redeem the quest's reward |
messages | quest messages object | Defines quest metadata (e.g, human-readable name, game title, publisher and reward redemption instructions) |
application_id | snowflake | The application ID of the game the quest is for |
application_name | string | The name of the quest's application |
get_game_link | string | The download link for the game |
rewards_config | quest rewards config object | Specifies rewards for the quest (e.g. collectibles) |
reward_code_platforms | array[integer] | The platforms that the reward code can be redeemed on |
reward_code_expires_at | ISO8601 timestamp | The expiration date for the received redeem codes |
colors | quest gradient object | The accent colors for the quest |
in_game_quest_config | ?unknown | An object that could hold configuration data for the game |
assets | quest assets object | Object that holds the quest's assets |
variants | array[integer] | The quest behavior variants enabled for the quest |
Quest Messages Structure
Field | Type | Description |
---|---|---|
quest_name | string | The name of the quest |
reward_name | string | The name of the quest's reward |
reward_name_with_article | string | The article variant of the reward name (e.g. "the Alien Cybernetics") |
reward_redemption_instructions_by_platform | array[string] | An array of instructions for redeeming the quest's reward per-platform |
game_title | string | The title of the game the quest is for |
game_publisher | string | The publisher of the game the quest is for |
Quest Rewards Config Structure
Field | Type | Description |
---|---|---|
assignment_method | integer | How the rewards are assigned |
rewards | array[quest reward object] | The possible rewards for the quest, ordered by tier (if applicable) |
Quest Reward Structure
Field | Type | Description |
---|---|---|
sku_id | snowflake | The ID of the SKU awarded |
tag | integer | The reward's type |
messages | quest reward messages object | Human-readable metadata for the reward |
asset? | string | The reward's media asset |
approximate_count? 1 | ?integer | An approximate count of how many users can claim the reward |
1 If the amount of users who claimed the awards exceeds this count, then all future claimers will be assigned the next reward tier in the list.
Quest Reward Messages Structure
Field | Type | Description |
---|---|---|
name | string | The reward's name |
name_with_article | string | The article variant of the name (e.g. a Cybernetic Headgear Decoration) |
reward_redemption_instructions_by_platform? | map[int, string] | The instrutions on redeeming the reward per-platform |
Quest Gradient Structure
A 2-point gradient with a primary
and secondary
color.
Field | Type | Description |
---|---|---|
primary | string | The hex-encoded primary color of the gradient |
secondary | string | The hex-encoded secondary color of the gradient |
Quest Assets Structure
An object holding CDN asset names.
Field | Type | Description |
---|---|---|
reward_tile | string | An image showing a preview of the reward |
hero | string | The quest's hero image |
quest_bar_hero | string | The hero image used in the quest popup that appears when launching the game before accepting the quest |
game_tile | string | The game's icon |
logotype | string | The game's logo |
Quest Config Version
The version of the quest configuration.
Value | Description |
---|---|
1 | Version 1 |
2 | Version 2 |
Quest Content Type
Areas where the quest can be shown in the Discord client.
Value | Name | Description | Dismissable |
---|---|---|---|
0 | GIFT_INVENTORY_SETTINGS_BADGE | This quest is shown as a badge in User Settings | Yes |
1 | QUEST_BAR | This quest is shown as a bar above the user popout | Yes |
2 | QUEST_INVENTORY_CARD | This quest is shown as a card in the user's gift inventory | No |
3 | QUESTS_EMBED | This quest is shown as an embed in chat | No |
4 | ACTIVITY_PANEL | This quest is shown in the Active Now page | Yes |
5 | QUEST_LIVE_STREAM | This quest is shown while watching a stream | Yes |
6 | MEMBERS_LIST | This quest is shown in the member list | No |
7 | QUEST_BADGE | This quest grants a profile badge on completion | No |
8 | GIFT_INVENTORY_FOR_YOU | This quest is featured in the user's gift inventory | No |
Quest Platform Type
Specifies the platforms that the quest reward can be redeemed on.
Value | Name | Description |
---|---|---|
0 | CROSS_PLATFORM | This reward can be redeemed on all platforms |
1 | XBOX | This reward can be redeemed on Xbox |
2 | PLAYSTATION | This reward can be redeemed on PlayStation |
3 | SWITCH | This reward can be redeemed on Nintendo Switch |
4 | PC | This reward can be redeemed on PC |
Quest Reward Assignment Method
The method used to assign the reward to a user.
Value | Name | Description |
---|---|---|
0 | ALL | All rewards are assigned to the user upon completion |
1 | TIERED | The rewards are assigned in tiers |
Quest Reward Type
The type of reward that the user will receive.
Value | Name | Description |
---|---|---|
1 | REWARD_CODE | The reward is a redeemable code |
2 | IN_GAME | The reward is automatically given to the user in the promoted game |
3 | COLLECTIBLE | The reward is a Discord collectible (e.g. an avatar decoration) |
Quest Variant
A behavioral variant for a quest.
Value | Name | Description |
---|---|---|
1 | POST_ENROLLMENT_CTA | The quest has a post-enrollment call-to-action |
2 | PLAYTIME_CRITERIA | The quest has a playtime criteria |
3 | QUEST_BAR_V2 | The quest uses the new quest bar design |
4 | EXCLUDE_MINORS | The quest is not shown to minors |
5 | EXCLUDE_RUSSIA | The quest is not shown in Russia |
Example Quest
{"id": "8206816794116096000","config": {"quest_id": "8206816794116096000","config_version": 1,"expires_at": "2077-01-01T11:59:59+00:00","stream_duration_requirement_minutes": 30,"messages": {"quest_name": "👽","reward_name": "Alien Cybernetics","reward_name_with_article": "the Alien Cybernetics","reward_redemption_instructions_by_platform": {"0": "To redeem, visit https://alien.studios/cyberalien/redeem"},"game_title": "Cyberalien 2077","game_publisher": "Alien Studios"},"application_id": "1242265603276800000","application_name": "Cyberalien 2077","get_game_link": "https://alien.studios/cyberalien/redeem","rewards_config": {"assignment_method": 1,"rewards": [{"sku_id": "12210381551199193606","tag": 3,"messages": {"name": "Cybernetic Headgear","name_with_article": "a Cybernetic Headgear Decoration"}}]},"reward_code_platforms": [0],"reward_code_expires_at": "2077-01-01T11:59:59+00:00","colors": {"primary": "#E944D4","secondary": "#5318A7"},"assets": {"reward_tile": "reward.webm","hero": "hero.png","quest_bar_hero": "quests_bar_hero.png","game_tile": "game_tile.png","logotype": "game_logotype.svg"},"in_game_quest_config": null,"variants": []},"user_status": {"user_id": "222069018507345921","quest_id": "8206816794116096000","enrolled_at": "2077-01-01T11:59:59+00:00","completed_at": "2077-01-01T11:59:59+00:00","claimed_at": "2077-01-01T11:59:59+00:00","claimed_tier": null,"last_stream_heartbeat_at": "2077-01-01T11:59:59+00:00","stream_progress_seconds": 1800,"dismissed_quest_content": 0,"progress": {}},"targeted_content": [],"preview": false}
Quest User Status Object
The user's quest progression.
Quest User Status Structure
Field | Type | Description |
---|---|---|
user_id | snowflake | The ID of the user |
quest_id | snowflake | The ID of the quest |
enrolled_at | ISO8601 timestamp | When the user accepted the quest |
completed_at | ?ISO8601 timestamp | When the user completed the quest |
claimed_at | ?ISO8601 timestamp | When the user claimed the quest's reward |
claimed_tier | ?integer | Which reward tier the user has claimed, if the quest's assignment_method is set to TIERED |
last_stream_heartbeat_at | ?ISO8601 timestamp | Timestamp of the latest stream heartbeat request |
stream_progress_seconds | ISO8601 timestamp | Duration (in seconds) the user has streamed the game for since the quest was accepted |
dismissed_quest_content | integer | The content areas the user has dismissed for the quest |
Dismissible Quest Content Flags
Dismissed quest content areas.
Value | Name | Description |
---|---|---|
1 << 0 | GIFT_INVENTORY_SETTINGS_BADGE | The user has dismissed the quest from User Settings |
1 << 1 | QUEST_BAR | The user has dismissed the quest from the Quest Bar |
1 << 2 | ACTIVITY_PANEL | The user has dismissed the quest from the Active Now page |
1 << 3 | QUEST_LIVE_STREAM | The user has dismissed the quest from the stream overlay |
Example Quest User Status
{"user_id": "222069018507345921","quest_id": "8206816794116096000","enrolled_at": "2077-01-01T11:59:59+00:00","completed_at": "2077-01-01T11:59:59+00:00","claimed_at": "2077-01-01T11:59:59+00:00","claimed_tier": null,"last_stream_heartbeat_at": "2077-01-01T11:59:59+00:00","stream_progress_seconds": 1800,"dismissed_quest_content": 0,"progress": {}}
Quest Reward Code Object
An object that holds the quest's reward code.
Quest Reward Code Structure
Field | Type | Description |
---|---|---|
quest_id | snowflake | The ID of the quest |
code | string | The redeem code |
platform | string | The platform this redeem code applies to |
user_id | snowflake | The ID of the user who this code belongs to |
claimed_at | ISO8601 timestamp | When the user claimed the quest's reward |
tier | integer | Which reward tier the code belongs to, if the quest's assignment_method is set to TIERED |
Example Quest Reward Code
{"quest_id": "8206816794116096000","code": "111-1111111","platform": 0,"user_id": "222069018507345921","claimed_at": "2077-01-01T18:41:29.706194+00:00","tier": null}
Quest Claimed Reward Object
Claimed rewards for the quest.
Quest Claimed Reward Structure
Field | Type | Description |
---|---|---|
claimed_at | ISO8601 timestamp | When the reward was claimed |
entitlements | array[entitlement object] | The entitlements the user received |
errors | array[JSON error] | An array of errors that have occured while claiming the reward |
Example Quest Claimed Reward
{"claimed_at": "2024-04-17T23:30:41.000321+00:00","entitlements": [{"id": "1230299425620885624","sku_id": "1226939756617793606","application_id": "1242265603276800000","user_id": "222069018507345921","deleted": false,"type": 10,"tenant_metadata": {},"gift_code_flags": 0,"promotion_id": null}],"errors": []}
Quest Platform Type
Platforms that the reward code can be redeemed on.
Value | Name | Description |
---|---|---|
0 | CROSS_PLATFORM | The code can be redeemed on all platforms |
1 | XBOX | The code can be redeemed on Xbox |
2 | PLAYSTATION | The code can be redeemed on PlayStation |
3 | SWITCH | The code can be redeemed on the Nintendo Switch |
4 | PC | The code can be redeemed on PC |
Endpoints
Get Available Quests
GET
/quests/@me
Returns a list of all available quests.
Accept Quest
POST
/quests/{quest.id}/enroll
Accepts a quest and returns a quest user status object.
JSON Params
Field | Type | Description |
---|---|---|
location | integer | The content location where the action was initiated |
Claim Quest Reward
POST
/quests/{quest.id}/claim-reward
Claims the quest's rewards, setting the completed_at
and claimed_at
fields of the quest user status to the current timestamp, and returns the claimed rewards.
JSON Params
Field | Type | Description |
---|---|---|
location | integer | The content location where the action was initiated |
platform | string | The platform to claim the reward for |
Get Quest Reward Code
POST
/quests/{quest.id}/reward-code
Retrieves the reward code for the specified platform and returns a quest reward code object.
JSON Params
Field | Type | Description |
---|---|---|
location | integer | The content location where the action was initiated |
platform | string | The platform to retrieve the code for |
Send Quest Heartbeat
POST
/quests/{quest.id}/heartbeat
Tells the server to update the last_stream_heartbeat
and stream_progress_seconds
fields. Used for keeping track of how long the stream has been running for, and for checking if the user has met the stream duration requirement. Returns a quest user status object.
JSON Params
Field | Type | Description |
---|---|---|
stream_key | string | The encoded key of the stream (e.g guild:169256939211980800:1050497861969793164:222069018507345921 ) |
terminal? | boolean | Whether this is the last heartbeat in the current stream's sequence |
Complete Quest
POST
/quests/{quest.id}/preview/complete
Forcefully completes the quest for the current user. Returns a quest user status object.
Reset Quest
DELETE
/quests/{quest.id}/preview/status
Resets the quest's status for the current user. Returns a quest user status object.
Dismiss Quest Content
POST
/quests/{quest.id}/dismissible-content/{quest_content_type}/dismiss
Dismisses the specified quest content area for the current user. Not all content areas can be dismissed. Returns a quest user status object.
Reset Quest Dismissibility
DELETE
/quests/{quest.id}/preview/dismissibility
Resets the dismissibility of the quest's content areas for the current user (sets the dismissed_quest_content
field to 0). Returns a quest user status object.