Quest Protocol
  • Introduction
    • Welcome to Quest Protocol
    • Integrate & Partner with Quest
    • Use Cases
      • Creator Platforms
      • Gaming
      • NFT Marketplaces
      • Social Media DApps
      • DeFi
  • QUEST PLATFORM
    • Creating a Campaign
    • Audience Overview
    • User Profile
    • Discover Page
    • Perk Store
    • Integrations
    • Memberships
    • Segmentation & Targetting
    • AI Insights
  • QUEST PROTOCOL - SDKs & APIs
    • UI SDK Components
      • Embedded XP Points
      • Embedded in-dApp Guides
      • Embedded Web3 Search
      • Embedded Quests
    • Quest SDKs & APIs
      • User
      • Entity
      • Badge
      • Campaign
      • App Metric
      • Membership Card
      • Entity Tag
      • Membership Tier
      • Skill
      • Entity Credit Tier
      • Gem
      • Custom Reward
      • Entity Gem
      • Entity Alert
      • Entity Feature Flag
      • Entity Data contract
      • Entity Authentication Token
      • Event Metric Mapping
    • Data Engine
  • Website
  • Quest Thesis
Powered by GitBook
On this page
  1. QUEST PROTOCOL - SDKs & APIs
  2. Quest SDKs & APIs

Membership Card

PreviousApp MetricNextEntity Tag

Last updated 1 year ago

Get all membership cards of a user

get

This endpoint retrieves membership cards for a user.

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/mynfts HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "userId": "user123",
      "entityId": "entity123",
      "type": "STATIC_MEDIA",
      "membershipTier": 2,
      "runningXP": 500,
      "totalXP": 1000,
      "nftTokenId": "token123",
      "name": "NFT Name",
      "title": "NFT Title",
      "description": "NFT Description",
      "image": "https://example.com/nft/image.jpg",
      "animation_url": "https://example.com/nft/animation.mp4",
      "metadataIPFS": "ipfs://metadata123",
      "attributes": [
        {
          "display_type": "boost_percentage",
          "trait_type": "skill",
          "value": {
            "score": 85
          },
          "image": "https://example.com/badge/image.png",
          "item_type": "badge"
        }
      ],
      "createdAt": "2023-06-27T12:45:00Z"
    }
  ]
}

Get membership card details for an entity

get

This endpoint retrieves membership card details for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/mynfts HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "userId": "user123",
    "entityId": "entity123",
    "type": "STATIC_MEDIA",
    "membershipTier": 2,
    "runningXP": 500,
    "totalXP": 1000,
    "nftTokenId": "token123",
    "name": "NFT Name",
    "title": "NFT Title",
    "description": "NFT Description",
    "image": "https://example.com/nft/image.jpg",
    "animation_url": "https://example.com/nft/animation.mp4",
    "metadataIPFS": "ipfs://metadata123",
    "attributes": [
      {
        "display_type": "boost_percentage",
        "trait_type": "skill",
        "value": {
          "score": 85
        },
        "image": "https://example.com/badge/image.png",
        "item_type": "badge"
      }
    ],
    "createdAt": "2023-06-27T12:45:00Z"
  },
  "entity_data": {
    "id": "entity123",
    "entityURLAlias": "my-entity",
    "entityRecordIds": [
      "record1",
      "record2"
    ],
    "contracts": [
      "contract1",
      "contract2"
    ],
    "badgeContractAddress": "0x123abc",
    "dyNFTContractAddress": "0x456def",
    "themeContractAddress": "0x789ghi",
    "name": "My Entity",
    "openseaSlug": "my-entity-slug",
    "description": "This is my entity description.",
    "twitter": "myentity",
    "discord": "myentity#1234",
    "telegram": "myentity",
    "instagram": "myentity",
    "website": "https://myentity.com",
    "medium": "myentity",
    "imageUrl": "https://example.com/myentity.jpg",
    "bannerUrl": "https://example.com/myentity-banner.jpg",
    "isEnabled": false,
    "isPrivate": false,
    "chainSource": "OFF_CHAIN",
    "defaultDyNftThemeId": "0",
    "discordQuestWebhookURL": "https://example.com/discord-webhook",
    "modifiedAt": "2023-06-27T12:45:00Z",
    "createdAt": "2023-06-25T09:00:00Z",
    "plan": "FREE",
    "theme": {},
    "parentEntityId": "e-0000001"
  }
}

Recalculate users membership card

get

This endpoint recalculates a user's membership card.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/hidden/entities/{entityId}/recalculate-mynft HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true
}

Get all membership card themes for an entity

get

This endpoint retrieves all the membership card themes for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/themes HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "themeId": "theme123",
      "entityId": "entity123",
      "membershipTier": 2,
      "tokenId": "token123",
      "price": "0.1 ETH",
      "title": "Theme Title",
      "backgroundImage": "https://example.com/theme/background.jpg",
      "squareLogoImage": "https://example.com/theme/logo-square.png",
      "horizontalLogoImage": "https://example.com/theme/logo-horizontal.png",
      "backgroundColor": "#FFFFFF",
      "accentColor1": "#FF0000",
      "accentColor2": "#00FF00",
      "metadataIPFS": "ipfs://metadata123",
      "attributes": [
        {
          "display_type": "boost_percentage",
          "trait_type": "skill",
          "value": {
            "score": 85
          }
        }
      ],
      "createdAt": "2023-06-27T12:45:00Z"
    }
  ]
}

Get membership card themes details for an entity

get

This endpoint retrieves the membership card themes details for an entity.

Path parameters
entityIdstringRequired
themeIdstringRequired
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/themes/{themeId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "themeId": "theme123",
    "entityId": "entity123",
    "membershipTier": 2,
    "tokenId": "token123",
    "price": "0.1 ETH",
    "title": "Theme Title",
    "backgroundImage": "https://example.com/theme/background.jpg",
    "squareLogoImage": "https://example.com/theme/logo-square.png",
    "horizontalLogoImage": "https://example.com/theme/logo-horizontal.png",
    "backgroundColor": "#FFFFFF",
    "accentColor1": "#FF0000",
    "accentColor2": "#00FF00",
    "metadataIPFS": "ipfs://metadata123",
    "attributes": [
      {
        "display_type": "boost_percentage",
        "trait_type": "skill",
        "value": {
          "score": 85
        }
      }
    ],
    "createdAt": "2023-06-27T12:45:00Z"
  }
}

Get XP for a specific entity

get

Retrieve the XP (experience points) for a specific entity.

Path parameters
entityIdstringRequired

ID of the entity to get XP for

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Bad Request
application/json
401
Unauthorized error
application/json
404
Not Found
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/xp HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": 500
}

Get XP history for a user in a specific entity

get

Retrieve the XP history for a specific user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
pageintegerOptional

The page number for pagination (default: 1).

Default: 1
limitintegerOptional

The number of items per page (default: 20).

Default: 20
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/users/{userId}/xp-history HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "userId": "user123",
      "entityId": "entity456",
      "xp": 500,
      "title": "XP Gain",
      "createdAt": "2023-01-01T12:00:00Z"
    }
  ],
  "page": 1,
  "totalCount": 50,
  "totalPages": 3
}

Get XP leaderboard for a specific entity

get

Retrieve the XP leaderboard for a specific entity, showing users with the highest XP.

Path parameters
entityIdstringRequired

The ID of the entity.

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
pageintegerOptional

The page number for pagination (default: 1).

Default: 1
limitintegerOptional

The number of items per page (default: 20).

Default: 20
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/xp-leaderboard HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "userId": "user123",
      "imageUrl": "https://example.com/user123.jpg",
      "name": "John Doe",
      "runningXP": 500
    }
  ],
  "page": 1,
  "totalCount": 50,
  "totalPages": 3
}

Get user XP leaderboard rank

get

Retrieve the XP leaderboard rank for a specific user in a given entity. The response includes the user's position, threshold information, and whether the user is within the specified threshold.

Path parameters
entityIdstringRequired

The ID of the entity

userIdstringRequired

The ID of the user

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
thresholdinteger · max: 100Optional

The percentage threshold for XP

Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Bad Request
application/json
401
Unauthorized error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/users/{userId}/xp-leaderboard-rank HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "position": 1,
    "threshold": "5%",
    "isUserInThreshold": true
  }
}

Get all tags an entity

get

This endpoint retrieves all the tags of an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/tags HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "tagId": "tag-121",
    "tagName": "super-tag",
    "description": "This is our tag",
    "tagUsers": [
      "user-11",
      "user-33"
    ],
    "isPrivate": false
  }
}
  • POSTAdd running xp
  • GETGet Membership for user
  • POSTGet DynamicNft for user
  • GETGet all membership cards of a user
  • GETGet membership card details for an entity
  • GETRecalculate users membership card
  • GETGet all membership card themes for an entity
  • POSTAdd new theme for an entity
  • GETGet membership card themes details for an entity
  • POSTUpdate theme for an entity
  • POSTDelete theme for an entity
  • POSTset default theme for an entity
  • GETGet XP for a specific entity
  • POSTGet XP for multiple entities
  • GETGet XP history for a user in a specific entity
  • GETGet XP leaderboard for a specific entity
  • GETGet user XP leaderboard rank
  • GETGet all tags an entity

Get Membership for user

get

This endpoint allows get running xp for a user.

Path parameters
entityIdstringRequired
userIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
404
Client error
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/users/{userId}/xp HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": 1,
  "tier": 1,
  "xpThreshold": 1
}

Add running xp

post

This endpoint allows add running xp for a user.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
xpnumberOptionalExample: 10
forUserIdstringOptionalExample: user-123
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/add-xp HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "xp": 10,
  "forUserId": "user-123"
}
{
  "success": true
}

Get DynamicNft for user

post

This endpoint allows get Multiple DynamicNft for a user.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
userIdsstring[]OptionalExample: ["userid-123","userid-456"]
Responses
200
Successful response
application/json
400
Client error
application/json
401
Unauthorized error
application/json
404
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/users/xp HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 39

{
  "userIds": [
    "userid-123",
    "userid-456"
  ]
}
{
  "success": true,
  "data": [
    {
      "userId": "text",
      "entityId": "text",
      "type": "text",
      "membershipTier": 1,
      "runningXP": 1,
      "totalXP": 1,
      "nftTokenId": "text",
      "name": "text",
      "title": "text",
      "description": "text",
      "image": "text",
      "animation_url": "text",
      "metadataIPFS": "text",
      "attributes": [
        {
          "display_type": "text",
          "trait_type": "text",
          "value": "text",
          "image": "text",
          "item_type": "text"
        }
      ],
      "createdAt": "2025-05-25T00:30:39.806Z"
    }
  ]
}

Add new theme for an entity

post

This endpoint allows to add a new theme for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
membershipTiernumberRequiredExample: 10
titlestringRequiredExample: dummy-title
pricestringRequiredExample: 100 $
backgroundImageIPFSstringOptionalExample: image-ipfs
horizontalLogoImageIPFSstringOptionalExample: image-ipfs
squareLogoImageIPFSstringOptionalExample: image-ipfs
backgroundColorstringOptionalExample: red
accentColor1stringOptionalExample: red
accentColor2stringOptionalExample: red
metadataIPFSstringOptionalExample: ipfs
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/themes HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 256

{
  "membershipTier": 10,
  "title": "dummy-title",
  "price": "100 $",
  "backgroundImageIPFS": "image-ipfs",
  "horizontalLogoImageIPFS": "image-ipfs",
  "squareLogoImageIPFS": "image-ipfs",
  "backgroundColor": "red",
  "accentColor1": "red",
  "accentColor2": "red",
  "metadataIPFS": "ipfs"
}
{
  "success": true,
  "themeId": "theme-101"
}

Update theme for an entity

post

This endpoint allows to update a new theme for an entity.

Path parameters
entityIdstringRequired
themeIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
membershipTiernumberRequiredExample: 10
titlestringRequiredExample: dummy-title
pricestringRequiredExample: 100 $
backgroundImageIPFSstringRequiredExample: image-ipfs
horizontalLogoImageIPFSstringRequiredExample: image-ipfs
squareLogoImageIPFSstringRequiredExample: image-ipfs
backgroundColorstringOptionalExample: red
accentColor1stringOptionalExample: red
accentColor2stringOptionalExample: red
metadataIPFSstringOptionalExample: ipfs
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/themes/{themeId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 256

{
  "membershipTier": 10,
  "title": "dummy-title",
  "price": "100 $",
  "backgroundImageIPFS": "image-ipfs",
  "horizontalLogoImageIPFS": "image-ipfs",
  "squareLogoImageIPFS": "image-ipfs",
  "backgroundColor": "red",
  "accentColor1": "red",
  "accentColor2": "red",
  "metadataIPFS": "ipfs"
}
{
  "success": true
}

Delete theme for an entity

post

This endpoint allows to delete a theme for an entity.

Path parameters
entityIdstringRequired
themeIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
objectOptional
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/themes/{themeId}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "success": true
}

set default theme for an entity

post

This endpoint allows to set a default theme for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
themeIdstringRequiredExample: theme-101
Responses
200
Successful response
application/json
400
Client error
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/themes/default HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "themeId": "theme-101"
}
{
  "success": true
}

Get XP for multiple entities

post

Retrieve the XP (experience points) for multiple entities.

Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
entityIdsstring[]Required
Responses
200
Successful response
application/json
400
Bad Request
application/json
401
Unauthorized error
application/json
404
Not Found
application/json
500
Server error
application/json
post
POST /api/entities/xp HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "entityIds": [
    "text"
  ]
}
{
  "success": true,
  "data": [
    {
      "entityId": "entity123",
      "runningXP": 500
    }
  ]
}