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
FieldTypeDescription
idsnowflakeThe ID of the quest
configquest config objectThe configuration and metadata for the quest
user_status?quest user status objectThe user's quest progress, if it has been accepted
targeted_content 1?array[integer]The content areas where the quest can be shown
previewbooleanWhether 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
FieldTypeDescription
quest_idsnowflakeThe ID of the quest
config_versionintegerQuest configuration version
expires_atISO8601 timestampThe expiry date of the quest
stream_duration_requirement_minutesintegerDuration (in minutes) the game must be streamed to redeem the quest's reward
messagesquest messages objectDefines quest metadata (e.g, human-readable name, game title, publisher and reward redemption instructions)
application_idsnowflakeThe application ID of the game the quest is for
application_namestringThe name of the quest's application
get_game_linkstringThe download link for the game
rewards_configquest rewards config objectSpecifies rewards for the quest (e.g. collectibles)
reward_code_platformsarray[integer]The platforms that the reward code can be redeemed on
reward_code_expires_atISO8601 timestampThe expiration date for the received redeem codes
colorsquest gradient objectThe accent colors for the quest
in_game_quest_config?unknownAn object that could hold configuration data for the game
assetsquest assets objectObject that holds the quest's assets
variantsarray[integer]The quest behavior variants enabled for the quest
Quest Messages Structure
FieldTypeDescription
quest_namestringThe name of the quest
reward_namestringThe name of the quest's reward
reward_name_with_articlestringThe article variant of the reward name (e.g. "the Alien Cybernetics")
reward_redemption_instructions_by_platformarray[string]An array of instructions for redeeming the quest's reward per-platform
game_titlestringThe title of the game the quest is for
game_publisherstringThe publisher of the game the quest is for
Quest Rewards Config Structure
FieldTypeDescription
assignment_methodintegerHow the rewards are assigned
rewardsarray[quest reward object]The possible rewards for the quest, ordered by tier (if applicable)
Quest Reward Structure
FieldTypeDescription
sku_idsnowflakeThe ID of the SKU awarded
tagintegerThe reward's type
messagesquest reward messages objectHuman-readable metadata for the reward
asset?stringThe reward's media asset
approximate_count? 1?integerAn 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
FieldTypeDescription
namestringThe reward's name
name_with_articlestringThe 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.

FieldTypeDescription
primarystringThe hex-encoded primary color of the gradient
secondarystringThe hex-encoded secondary color of the gradient
Quest Assets Structure

An object holding CDN asset names.

FieldTypeDescription
reward_tilestringAn image showing a preview of the reward
herostringThe quest's hero image
quest_bar_herostringThe hero image used in the quest popup that appears when launching the game before accepting the quest
game_tilestringThe game's icon
logotypestringThe game's logo
Quest Config Version

The version of the quest configuration.

ValueDescription
1Version 1
2Version 2
Quest Content Type

Areas where the quest can be shown in the Discord client.

ValueNameDescriptionDismissable
0GIFT_INVENTORY_SETTINGS_BADGEThis quest is shown as a badge in User SettingsYes
1QUEST_BARThis quest is shown as a bar above the user popoutYes
2QUEST_INVENTORY_CARDThis quest is shown as a card in the user's gift inventoryNo
3QUESTS_EMBEDThis quest is shown as an embed in chatNo
4ACTIVITY_PANELThis quest is shown in the Active Now pageYes
5QUEST_LIVE_STREAMThis quest is shown while watching a streamYes
6MEMBERS_LISTThis quest is shown in the member listNo
7QUEST_BADGEThis quest grants a profile badge on completionNo
8GIFT_INVENTORY_FOR_YOUThis quest is featured in the user's gift inventoryNo
Quest Platform Type

Specifies the platforms that the quest reward can be redeemed on.

ValueNameDescription
0CROSS_PLATFORMThis reward can be redeemed on all platforms
1XBOXThis reward can be redeemed on Xbox
2PLAYSTATIONThis reward can be redeemed on PlayStation
3SWITCHThis reward can be redeemed on Nintendo Switch
4PCThis reward can be redeemed on PC
Quest Reward Assignment Method

The method used to assign the reward to a user.

ValueNameDescription
0ALLAll rewards are assigned to the user upon completion
1TIEREDThe rewards are assigned in tiers
Quest Reward Type

The type of reward that the user will receive.

ValueNameDescription
1REWARD_CODEThe reward is a redeemable code
2IN_GAMEThe reward is automatically given to the user in the promoted game
3COLLECTIBLEThe reward is a Discord collectible (e.g. an avatar decoration)
Quest Variant

A behavioral variant for a quest.

ValueNameDescription
1POST_ENROLLMENT_CTAThe quest has a post-enrollment call-to-action
2PLAYTIME_CRITERIAThe quest has a playtime criteria
3QUEST_BAR_V2The quest uses the new quest bar design
4EXCLUDE_MINORSThe quest is not shown to minors
5EXCLUDE_RUSSIAThe 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
FieldTypeDescription
user_idsnowflakeThe ID of the user
quest_idsnowflakeThe ID of the quest
enrolled_atISO8601 timestampWhen the user accepted the quest
completed_at?ISO8601 timestampWhen the user completed the quest
claimed_at?ISO8601 timestampWhen the user claimed the quest's reward
claimed_tier?integerWhich reward tier the user has claimed, if the quest's assignment_method is set to TIERED
last_stream_heartbeat_at?ISO8601 timestampTimestamp of the latest stream heartbeat request
stream_progress_secondsISO8601 timestampDuration (in seconds) the user has streamed the game for since the quest was accepted
dismissed_quest_contentintegerThe content areas the user has dismissed for the quest
Dismissible Quest Content Flags

Dismissed quest content areas.

ValueNameDescription
1 << 0GIFT_INVENTORY_SETTINGS_BADGEThe user has dismissed the quest from User Settings
1 << 1QUEST_BARThe user has dismissed the quest from the Quest Bar
1 << 2ACTIVITY_PANELThe user has dismissed the quest from the Active Now page
1 << 3QUEST_LIVE_STREAMThe 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
FieldTypeDescription
quest_idsnowflakeThe ID of the quest
codestringThe redeem code
platformstringThe platform this redeem code applies to
user_idsnowflakeThe ID of the user who this code belongs to
claimed_atISO8601 timestampWhen the user claimed the quest's reward
tierintegerWhich 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
FieldTypeDescription
claimed_atISO8601 timestampWhen the reward was claimed
entitlementsarray[entitlement object]The entitlements the user received
errorsarray[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.

ValueNameDescription
0CROSS_PLATFORMThe code can be redeemed on all platforms
1XBOXThe code can be redeemed on Xbox
2PLAYSTATIONThe code can be redeemed on PlayStation
3SWITCHThe code can be redeemed on the Nintendo Switch
4PCThe 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
FieldTypeDescription
locationintegerThe 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
FieldTypeDescription
locationintegerThe content location where the action was initiated
platformstringThe 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
FieldTypeDescription
locationintegerThe content location where the action was initiated
platformstringThe 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
FieldTypeDescription
stream_keystringThe encoded key of the stream (e.g guild:169256939211980800:1050497861969793164:222069018507345921)
terminal?booleanWhether 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.