Hang Quests API

The Quests API from Hang — 9 operation(s) for quests.

Operations 10

GET /v2/program-memberships/{program_membership_id}/quests/opt-ins Endpoint to retrieve all optIns for a program membership #
GET /v2/admin/quests Get all quests for program. #
POST /v2/program-memberships/{program_membership_id}/quests/{quest_id}/opt-in Opt a user into a quest. #
POST /opt-ins/{opt_in_id}/claim-quest-prize Claim the prize(s) associated with a Quest. #
POST /opt-ins/{opt_in_id}/claim-activity-prize Claim the prize(s) associated with an Activity. #
POST /v2/admin/quests/{quest_id}/quest-requirements Create a new quest requirement. #
GET /v2/admin/quests/{quest_id} Get quest by Id. #
PATCH /v2/admin/quests/{quest_id} Updates the quest with the provided fields. #
PATCH /v2/admin/quest-requirements/{quest_requirement_id} Update a quest requirement. #
DELETE /v2/program-memberships/{program_membership_id}/opt-ins/{opt_in_id} ONLY WORKS IN DEV/STAGING: Clear the Quest Status of a given Opt-In ID. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hang-quests-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hang-quests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hang Partner API (params in:formData) Activities Quests API
  description: '

    <p>The Partner API allows you to request various resources that can power your loyalty program.</p>

    &copy Hang 2023'
  version: 2023.09.07
  x-copyright: '&copy Hang 2023'
servers:
- url: /partner-api
security:
- ApiKeyAuth: []
tags:
- name: Quests
paths:
  /v2/program-memberships/{program_membership_id}/quests/opt-ins:
    get:
      tags:
      - Quests
      operationId: get_v2_program-memberships_program_membership_id_quests_opt-ins
      summary: Endpoint to retrieve all optIns for a program membership
      parameters:
      - name: program_membership_id
        in: path
        required: true
        description: the program membership id
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  opt_ins:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the OptIn object.
                        quest_id:
                          type: string
                          description: Unique identifier for the Quest object associated with this OptIn.
                        created_at:
                          type: number
                          description: When the OptIn was created, in epoch seconds.
                        updated_at:
                          type: number
                          description: When the OptIn was updated, in epoch seconds.
                        expires_at:
                          type: number
                          description: When the OptIn expires, in epoch seconds.
                        status:
                          type: string
                          enum:
                          - opted_in
                          - all_requirements_completed
                          - prize_claimed
                          - non_redeemable
                          description: The current status of the OptIn.
                        progress:
                          type: array
                          items:
                            type: object
                            properties:
                              activity_id:
                                type: string
                                description: Unique identifier for the Activity object.
                              value:
                                type: number
                                description: "Count of \"how far along\" the user is, depending on the activity,\n      e.g. a value of 4 could represent $4 spent or 4 referrals"
                              updated_at:
                                type: number
                                description: When progress was last made for this activity, in epoch seconds
                              fulfilled_at:
                                type: number
                                description: When the value surpasssed the required amount for the activity, in epoch seconds
                              prize_claimed_at:
                                type: number
                                description: When the prize for the activity was claimed, in epoch seconds
                            additionalProperties: false
                            required:
                            - activity_id
                            - value
                            - updated_at
                            - fulfilled_at
                            - prize_claimed_at
                      additionalProperties: false
                      required:
                      - id
                      - quest_id
                      - created_at
                      - updated_at
                      - expires_at
                      - status
                      - progress
                additionalProperties: false
                required:
                - opt_ins
      description: OptIns are user initiated and represent the acceptance of a Quest.
  /v2/admin/quests:
    get:
      tags:
      - Quests
      operationId: get_v2_admin_quests
      summary: Get all quests for program.
      parameters:
      - name: limit
        in: query
        description: Amount of quests to return (max 20).
        schema:
          type: number
      - name: offset
        in: query
        description: Index to start at.
        schema:
          type: number
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  quests:
                    type: array
                    items:
                      type: string
                  total_records:
                    type: number
                additionalProperties: false
                required:
                - quests
                - total_records
      description: ''
  /v2/program-memberships/{program_membership_id}/quests/{quest_id}/opt-in:
    post:
      tags:
      - Quests
      operationId: post_v2_program-memberships_program_membership_id_quests_quest_id_opt-in
      summary: Opt a user into a quest.
      parameters:
      - name: program_membership_id
        in: path
        required: true
        description: the user's program membership id
        schema:
          type: string
      - name: quest_id
        in: path
        required: true
        description: the ID for the quest being opted into
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  opt_in:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the OptIn object.
                      quest_id:
                        type: string
                        description: Unique identifier for the Quest object associated with this OptIn.
                      created_at:
                        type: number
                        description: When the OptIn was created, in epoch seconds.
                      updated_at:
                        type: number
                        description: When the OptIn was updated, in epoch seconds.
                      expires_at:
                        type: number
                        description: When the OptIn expires, in epoch seconds.
                      status:
                        type: string
                        enum:
                        - opted_in
                        - all_requirements_completed
                        - prize_claimed
                        - non_redeemable
                        description: The current status of the OptIn.
                      progress:
                        type: array
                        items:
                          type: object
                          properties:
                            activity_id:
                              type: string
                              description: Unique identifier for the Activity object.
                            value:
                              type: number
                              description: "Count of \"how far along\" the user is, depending on the activity,\n      e.g. a value of 4 could represent $4 spent or 4 referrals"
                            updated_at:
                              type: number
                              description: When progress was last made for this activity, in epoch seconds
                            fulfilled_at:
                              type: number
                              description: When the value surpasssed the required amount for the activity, in epoch seconds
                            prize_claimed_at:
                              type: number
                              description: When the prize for the activity was claimed, in epoch seconds
                          additionalProperties: false
                          required:
                          - activity_id
                          - value
                          - updated_at
                          - fulfilled_at
                          - prize_claimed_at
                    additionalProperties: false
                    required:
                    - id
                    - quest_id
                    - created_at
                    - updated_at
                    - expires_at
                    - status
                    - progress
                additionalProperties: false
                required:
                - opt_in
      description: OptIns are generally user initiated and represent the acceptance of a Quest.
  /opt-ins/{opt_in_id}/claim-quest-prize:
    post:
      tags:
      - Quests
      operationId: post_opt-ins_opt_in_id_claim-quest-prize
      summary: Claim the prize(s) associated with a Quest.
      parameters:
      - name: opt_in_id
        in: path
        required: true
        description: the id of the OptIn whose Quest's prize(s) is ready to be claimed.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  prize:
                    type: object
                    properties:
                      point_reward_value:
                        type: number
                        description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize.
                      sponsor_name:
                        type: string
                        description: Quest sponsor name.
                      lootbox:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the Lootbox object.
                          name:
                            type: string
                            description: Lootbox name.
                          description:
                            type: string
                            description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users.
                          background_gradient_start_color:
                            type: string
                          background_gradient_stop_color:
                            type: string
                          container_images:
                            type: object
                            properties:
                              box_together:
                                type: string
                              box_top:
                                type: string
                              box_bottom:
                                type: string
                            additionalProperties: false
                            required:
                            - box_together
                            - box_top
                            - box_bottom
                          lootbox_reward_choices:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: ID for lootbox reward choice.
                                title:
                                  type: string
                                  description: Title for lootbox reward choice.
                                subtitle:
                                  type: string
                                  description: Subtitle for lootbox reward choice.
                                category:
                                  type: string
                                  description: Category for lootbox reward choice.
                                point_reward_value:
                                  type: number
                                  description: Points for lootbox reward choice.
                                reward_uuid:
                                  type: string
                                  description: Reward UUID for lootbox reward choice.
                                image:
                                  type: string
                                  description: Image for lootbox reward choice.
                                probability:
                                  type: number
                                  description: Probability for lootbox reward choice.
                                reward:
                                  type: object
                                  properties:
                                    uuid:
                                      type: string
                                      description: Unique identifier for the Reward object.
                                    name:
                                      type: string
                                      description: Reward name.
                                    description:
                                      type: string
                                      description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
                                    image_url:
                                      type: string
                                      description: An absolute URL of the reward's image.
                                    terms_and_conditions:
                                      type: string
                                      description: Terms and condition for the rewards.
                                    metadata:
                                      type: object
                                      additionalProperties: true
                                      description: Set of key-value pairs that you can attach to a reward. This can be useful for storing additional information about the quest in a structured format.
                                  additionalProperties: false
                                  required:
                                  - uuid
                                  - name
                                  - description
                                  - image_url
                                  - terms_and_conditions
                                  - metadata
                              additionalProperties: false
                              required:
                              - id
                              - title
                              - subtitle
                              - category
                              - point_reward_value
                              - reward_uuid
                              - image
                              - probability
                              - reward
                          metadata:
                            type: object
                            additionalProperties: true
                            description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format.
                        additionalProperties: false
                        required:
                        - id
                        - name
                        - description
                        - background_gradient_start_color
                        - background_gradient_stop_color
                        - container_images
                        - lootbox_reward_choices
                        - metadata
                      reward:
                        type: object
                        properties:
                          uuid:
                            type: string
                            description: Unique identifier for the Reward object.
                          name:
                            type: string
                            description: Reward name.
                          description:
                            type: string
                            description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
                          image_url:
                            type: string
                            description: An absolute URL of the reward's image.
                          terms_and_conditions:
                            type: string
                            description: Terms and condition for the rewards.
                        additionalProperties: false
                        required:
                        - uuid
                        - name
                        - description
                        - image_url
                        - terms_and_conditions
                    additionalProperties: false
                    required:
                    - point_reward_value
                    - sponsor_name
                    - lootbox
                    - reward
                additionalProperties: false
                required:
                - prize
      description: Prizes can exist on both the Quest and Activity levels. Invoke this endpoint to claim the prizes at the Quest level.
  /opt-ins/{opt_in_id}/claim-activity-prize:
    post:
      tags:
      - Quests
      operationId: post_opt-ins_opt_in_id_claim-activity-prize
      summary: Claim the prize(s) associated with an Activity.
      parameters:
      - name: opt_in_id
        in: path
        required: true
        description: the id of the OptIn whose Activity's prize(s) is ready to be claimed.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  prize:
                    type: object
                    properties:
                      point_reward_value:
                        type: number
                        description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize.
                      sponsor_name:
                        type: string
                        description: Quest sponsor name.
                      lootbox:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier for the Lootbox object.
                          name:
                            type: string
                            description: Lootbox name.
                          description:
                            type: string
                            description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users.
                          background_gradient_start_color:
                            type: string
                          background_gradient_stop_color:
                            type: string
                          container_images:
                            type: object
                            properties:
                              box_together:
                                type: string
                              box_top:
                                type: string
                              box_bottom:
                                type: string
                            additionalProperties: false
                            required:
                            - box_together
                            - box_top
                            - box_bottom
                          lootbox_reward_choices:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: ID for lootbox reward choice.
                                title:
                                  type: string
                                  description: Title for lootbox reward choice.
                                subtitle:
                                  type: string
                                  description: Subtitle for lootbox reward choice.
                                category:
                                  type: string
                                  description: Category for lootbox reward choice.
                                point_reward_value:
                                  type: number
                                  description: Points for lootbox reward choice.
                                reward_uuid:
                                  type: string
                                  description: Reward UUID for lootbox reward choice.
                                image:
                                  type: string
                                  description: Image for lootbox reward choice.
                                probability:
                                  type: number
                                  description: Probability for lootbox reward choice.
                                reward:
                                  type: object
                                  properties:
                                    uuid:
                                      type: string
                                      description: Unique identifier for the Reward object.
                                    name:
                                      type: string
                                      description: Reward name.
                                    description:
                                      type: string
                                      description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
                                    image_url:
                                      type: string
                                      description: An absolute URL of the reward's image.
                                    terms_and_conditions:
                                      type: string
                                      description: Terms and condition for the rewards.
                                    metadata:
                                      type: object
                                      additionalProperties: true
                                      description: Set of key-value pairs that you can attach to a reward. This can be useful for storing additional information about the quest in a structured format.
                                  additionalProperties: false
                                  required:
                                  - uuid
                                  - name
                                  - description
                                  - image_url
                                  - terms_and_conditions
                                  - metadata
                              additionalProperties: false
                              required:
                              - id
                              - title
                              - subtitle
                              - category
                              - point_reward_value
                              - reward_uuid
                              - image
                              - probability
                              - reward
                          metadata:
                            type: object
                            additionalProperties: true
                            description: Set of key-value pairs that you can attach to a lootbox. This can be useful for storing additional information about the lootbox in a structured format.
                        additionalProperties: false
                        required:
                        - id
                        - name
                        - description
                        - background_gradient_start_color
                        - background_gradient_stop_color
                        - container_images
                        - lootbox_reward_choices
                        - metadata
                      reward:
                        type: object
                        properties:
                          uuid:
                            type: string
                            description: Unique identifier for the Reward object.
                          name:
                            type: string
                            description: Reward name.
                          description:
                            type: string
                            description: An arbitrary description attached to the Reward object. Often useful for displaying to users.
                          image_url:
                            type: string
                            description: An absolute URL of the reward's image.
                          terms_and_conditions:
                            type: string
                            description: Terms and condition for the rewards.
                        additionalProperties: false
                        required:
                        - uuid
                        - name
                        - description
                        - image_url
                        - terms_and_conditions
                    additionalProperties: false
                    required:
                    - point_reward_value
                    - sponsor_name
                    - lootbox
                    - reward
                additionalProperties: false
                required:
                - prize
      description: Prizes can exist on both the Quest and Activity levels. Invoke this endpoint to claim the prizes at the Activity level.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                activity_id:
                  type: string
                  description: the id of the Activity whose prize(s) you wish to claim
              required:
              - activity_id
          multipart/form-data:
            schema:
              type: object
              properties:
                activity_id:
                  type: string
                  description: the id of the Activity whose prize(s) you wish to claim
              required:
              - activity_id
  /v2/admin/quests/{quest_id}/quest-requirements:
    post:
      tags:
      - Quests
      operationId: post_v2_admin_quests_quest_id_quest-requirements
      summary: Create a new quest requirement.
      parameters:
      - name: quest_id
        in: path
        required: true
        description: the ID of the quest having a requirement added
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  quest_requirement:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the QuestRequirement object.
                      quest_id:
                        type: string
                        description: Unique identifier for the Quest object associated with this QuestRequirement.
                      created_at:
                        type: number
                        description: When the QuestRequirement was created, in epoch seconds.
                      description:
                        type: string
                        description: A description of the QuestRequirement.
                      value_threshold:
                        type: string
                        description: The Activity threshold (e.g. a value of 50 dollars spent) that customers need to meet in order to unlock the activity's prize.
                      order:
                        type: number
                        description: If present, the order in which the requirement must be completed.
                      check_in_interval_days:
                        type: number
                        description: If present, the cadence at which the user must perform the activity (e.g. a value of 3, with a value_threshold of 50 equates to spend $50 every 3 days).
                      image_url:
                        type: string
                        description: An absolute URL of the activity's image.
                      prize:
                        type: object
                        properties:
                          point_reward_value:
                            type: number
                            description: The amount of points, or any tier metric (e.g. xp, points, stars, etc), the user earns for claiming the prize.
                          sponsor_name:
                            type: string
                            description: Quest sponsor name.
                          lootbox:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Unique identifier for the Lootbox object.
                              name:
                                type: string
                                description: Lootbox name.
                              description:
                                type: string
                                description: An arbitrary description attached to the Lootbox object. Often useful for displaying to users.
                              background_gradient_start_color:
                                type: string
                              background_gradient_stop_color:
                                type: string
                              image_box_together_url:
                                type: string
                              reward_choices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      description: ID for lootbox reward choice.
                                    title:
                                      type: string
                                      description: Title for lootbox reward choice.
                                    subtitle:
                                      type: string
                                      description: Subtitle for lootbox reward choice.
                                    category:
                                      type: string
                                      description: Category for lootbox reward choice.
                                    point_reward_value:
                                      type: number
                                      description: Points for lootbox reward choice.
                                    reward_uuids:
                                      items:
                                        type: string
                                      type: array
                                      description: Reward UUIDs for the loot box reward choice.
                                    quantity:
                                      type: number
                                      description: Max amount of this loot box reward choice to be awarded.
                                    image:
                                      typ

# --- truncated at 32 KB (99 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hang/refs/heads/main/openapi/hang-quests-api-openapi.yml