Campaign
This endpoint retrieves all the active campaigns.
The page number of expected set of documents.
1
The limit of the number of documents each page.
10
The API key for authentication
test
The secret key for authentication
test-secret
GET /api/quests HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
Accept: */*
{
"success": true,
"data": {
"questId": "quest123",
"entityId": "entity123",
"eligibilityCriterias": [
"criteria1",
"criteria2"
],
"rewards": [
"reward1",
"reward2"
],
"title": "My campaign",
"description": "This is my campaign description.",
"imageURL": "https://example.com/campaign-image.jpg",
"endsAt": "2023-06-30T23:59:59Z",
"isDeleted": false,
"hasReferral": false,
"referralXP": 50,
"visibility": "LIMITED",
"status": "ACTIVE",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"theme": {},
"minXPThreshold": 50,
"createdAt": "2023-06-27T12:45:00Z"
}
}
This endpoint retrieves all the active campaigns of a specific entity.
The page number of expected set of documents.
1
The limit of the number of documents each page.
10
The API key for authentication
test
The secret key for authentication
test-secret
GET /api/entities/{entityId}/quests HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
Accept: */*
{
"success": true,
"data": {
"questId": "quest123",
"entityId": "entity123",
"eligibilityCriterias": [
"criteria1",
"criteria2"
],
"rewards": [
"reward1",
"reward2"
],
"title": "My campaign",
"description": "This is my campaign description.",
"imageURL": "https://example.com/campaign-image.jpg",
"endsAt": "2023-06-30T23:59:59Z",
"isDeleted": false,
"hasReferral": false,
"referralXP": 50,
"visibility": "LIMITED",
"status": "ACTIVE",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"theme": {},
"minXPThreshold": 50,
"createdAt": "2023-06-27T12:45:00Z"
}
}
This endpoint allows to create a campaign.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
The Id of the user performing the request.
dummy-userid
Title of this campaign
Description of this campaign
https://www.myimage.com
72000
false
POST /api/entities/{entityId}/quests HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
userid: dummy-userid
Content-Type: application/json
Accept: */*
Content-Length: 392
{
"title": "Title of this campaign",
"description": "Description of this campaign",
"imageURL": "https://www.myimage.com",
"endsAt": 72000,
"hasReferral": false,
"theme": {},
"eligibilityCriterias": [
{
"type": "USER_INPUT_TEXT",
"data": {
"title": "Enter your name",
"xp": 20,
"frequency": "ONCE"
}
}
],
"rewards": [
{
"type": "REWARD_BADGE",
"title": "Dummy badge",
"imageIPFS": "ipfs-hash",
"description": "badge description"
}
]
}
{
"success": true,
"qid": "campaign-202"
}
This endpoint retrieves the details of a specific campaign.
The Id of the user performing the request.
dummy-userid
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
The API key for authentication
test
The secret key for authentication
test-secret
GET /api/entities/{entityId}/quests/{questId} HTTP/1.1
Host: api.questprotocol.xyz
userid: dummy-userid
token: dummy-token
apikey: test
Accept: */*
{
"success": true,
"data": {
"questId": "quest123",
"entityId": "entity123",
"eligibilityCriterias": [
"criteria1",
"criteria2"
],
"rewards": [
"reward1",
"reward2"
],
"title": "My campaign",
"description": "This is my campaign description.",
"imageURL": "https://example.com/campaign-image.jpg",
"endsAt": "2023-06-30T23:59:59Z",
"isDeleted": false,
"hasReferral": false,
"referralXP": 50,
"visibility": "LIMITED",
"status": "ACTIVE",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"theme": {},
"minXPThreshold": 50,
"createdAt": "2023-06-27T12:45:00Z"
},
"eligibilityData": [
{
"data": {
"criteriaId": "criteria123",
"questId": "quest123",
"label": "Criteria Label",
"xp": 50,
"dependentCriterias": [
"dependent1",
"dependent2"
],
"requiresApproval": true,
"frequency": "DAILY",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"criteriaType": "TWITTER_LIKE_POST",
"createdAt": "2023-06-27T12:45:00Z"
},
"completed": true,
"isLocked": false,
"unfinishedCriteriaIds": [
"criteria1",
"criteria2"
],
"userAnswer": [
"answer1",
"answer2"
]
}
],
"allCriteriasCompleted": true,
"claimStatus": true,
"totalClaimed": 2,
"rewards": [
{
"badgeId": "badge123",
"entityId": "entity123",
"badgeContractTokenId": "token123",
"name": "My Badge",
"imageIPFS": "https://example.com/badge-image.jpg",
"description": "This is my badge description.",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"isEnabled": true,
"visibility": "LIMITED",
"type": "DISCORD",
"typeData": {
"key1": "value1",
"key2": "value2"
},
"proofType": "Type A",
"endsAt": 1678900000,
"remainingCount": 5,
"createdBy": "user123",
"createdAt": "2023-06-27T12:45:00Z"
}
]
}
This endpoint retrieves the campaign summary.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/summary HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"summary": {
"quest": {
"questId": "quest123",
"entityId": "entity123",
"eligibilityCriterias": [
"criteria1",
"criteria2"
],
"rewards": [
"reward1",
"reward2"
],
"title": "My campaign",
"description": "This is my campaign description.",
"imageURL": "https://example.com/campaign-image.jpg",
"endsAt": "2023-06-30T23:59:59Z",
"isDeleted": false,
"hasReferral": false,
"referralXP": 50,
"visibility": "LIMITED",
"status": "ACTIVE",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"theme": {},
"minXPThreshold": 50,
"createdAt": "2023-06-27T12:45:00Z"
},
"answers": [
{
"question": "What is your name ?",
"answers": [
{
"userAnswer": [
"jon"
],
"userId": "u-1234",
"name": "Jon",
"imageUrl": "image-ipfs-hash"
}
]
}
],
"questStats": [
{
"viewCount": 10,
"claimCount": 5,
"date": "2023-06-27T12:45:00Z",
"entityId": "e-101010",
"questId": "q-101010",
"createdAt": "2023-06-27T12:45:00Z",
"updatedAt": "2023-06-27T12:45:00Z"
}
]
}
}
This endpoint allows an admin to update a campaign.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
Title of this campaign
Description of this campaign
https://www.myimage.com
72000
false
[{"type":"REWARD_BADGE","title":"Dummy badge","imageIPFS":"ipfs-hash","description":"badge description"}]
ec-101
r-101
POST /api/entities/{entityId}/quests/{questId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 466
{
"title": "Title of this campaign",
"description": "Description of this campaign",
"imageURL": "https://www.myimage.com",
"endsAt": 72000,
"hasReferral": false,
"theme": {},
"eligibilityCriterias": [
{
"type": "USER_INPUT_TEXT",
"data": {
"title": "Enter your name",
"xp": 20,
"frequency": "ONCE"
}
}
],
"rewards": [
{
"type": "REWARD_BADGE",
"title": "Dummy badge",
"imageIPFS": "ipfs-hash",
"description": "badge description"
}
],
"eligibilityCriteriaIdsToDelete": [
"ec-101"
],
"rewardIdsToDelete": [
"r-101"
]
}
{
"success": true
}
This endpoint allows an admin to delete a campaign.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
POST /api/entities/{entityId}/quests/{questId}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
{
"success": true,
"message": "Campaign deleted successfully"
}
This endpoint allows users to verify an eligibility criteria.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
criteria-123
["answer1","answer2"]
POST /api/entities/{entityId}/quests/{questId}/verify HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"criteriaId": "criteria-123",
"answers": [
"answer1",
"answer2"
]
}
{
"success": true
}
This endpoint allows a user to claim rewards.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
user-123
referal-code
POST /api/entities/{entityId}/quests/{questId}/claim HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"userId": "user-123",
"referralCode": "referal-code"
}
{
"success": true
}
This endpoint allows a user to claim rewards.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
user-123
referal-code
POST /api/entities/{entityId}/quests/{questId}/claim-multiple HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 118
{
"userId": "user-123",
"referralCode": "referal-code",
"questIds": [
"text"
],
"addToDynamicNFT": true,
"failedClaims": [
"text"
]
}
{
"success": true
}
This endpoint allows ato get or set a new refereal code associated with a campaign and user.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/users/{userId}/referralcode HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"referralCode": "referal-code"
}
This endpoint retreives multiple campaigns
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/multiple-quests HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"quests": [
{
"questId": "quest123",
"entityId": "entity123",
"eligibilityCriterias": [
"criteria1",
"criteria2"
],
"rewards": [
"reward1",
"reward2"
],
"title": "My campaign",
"description": "This is my campaign description.",
"imageURL": "https://example.com/campaign-image.jpg",
"endsAt": "2023-06-30T23:59:59Z",
"isDeleted": false,
"hasReferral": false,
"referralXP": 50,
"visibility": "LIMITED",
"status": "ACTIVE",
"xp": 100,
"skills": [
{
"skillId": "skill1",
"score": 80
},
{
"skillId": "skill2",
"score": 60
}
],
"theme": {},
"minXPThreshold": 50,
"createdAt": "2023-06-27T12:45:00Z"
}
],
"page": 5,
"totalPages": 25,
"totalQuests": 100
}
This endpoint allows users to verify an eligibility criteria.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
xhy1245
1
POST /api/entities/{entityId}/quests/{questId}/verify-all HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"referralCode": "xhy1245",
"criterias": [
{
"criteriaId": "exm-1233",
"answer": [
"option1",
"option3"
]
}
],
"userId": "1",
"session": ""
}
{
"success": true,
"failedCriterias": [
"criteriasId1",
"criteriasId2"
]
}
This endpoint retrieves the referal leaderboard stats.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/referraldashboard HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"userId": "user-123",
"name": "jon-doe",
"count": 10
}
}
Retrieve eligibility criteria for a specific quest associated with an entity.
The ID of the entity.
The ID of the quest.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/criterias HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"questId": "quest-123",
"entityId": "entity-456",
"eligibilityCriterias": [
"criteria-789"
],
"rewards": [
[
"XP",
"Badge"
]
],
"title": "Explore the Unknown",
"description": "Embark on a journey to discover hidden treasures.",
"imageURL": "https://example.com/images/quest.png",
"endsAt": "2023-12-31T23:59:59Z"
}
}
Create multiple default quests for a specified entity.
The ID of the entity for which quests are created.
POST /api/entities/{entityId}/default-multi-quest HTTP/1.1
Host: api.questprotocol.xyz
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"defaultIds": [
"defaultId1",
"defaultId2"
]
}
{
"success": true,
"data": [
{
"success": true,
"id": "exm-id",
"title": "title",
"description": "description",
"imageURL": "www.questlabs.ai",
"endsAt": "text"
}
]
}
This endpoint allows users to create a default quest for the specified entity.
The ID of the entity for which the quest will be created.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
The ID of the default quest (optional).
default-id
POST /api/entities/{entityId}/default-quest HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"defaultId": "default-id"
}
{
"success": true,
"data": {
"success": true,
"id": "q-123"
}
}
This endpoint allows users to set the status of a quest.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
ACTIVE
Possible values: POST /api/entities/{entityId}/quests/{questId}/setstatus HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"status": "ACTIVE"
}
{
"success": true
}
This endpoint allows users to get submissions for a quest.
1
10
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/submissions HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": [
{
"decryptedEmail": "[email protected]",
"usersReferred": 3,
"referredBy": "[email protected]",
"submittedAt": "2023-12-11T12:34:56Z",
"userId": "123",
"referralCode": "abc123"
}
],
"totalDocuments": 20,
"totalPages": 2
}
This endpoint allows users to get answers for a quest.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/answers HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"answers": [
{
"userId": "123",
"name": "John Doe",
"imageUrl": "https://example.com/image.jpg",
"session": "session123",
"question1": "Answer 1",
"question2": "Answer 2"
}
],
"questions": [
"Question 1",
"Question 2"
]
}
}
This endpoint allows users to get a new session for eligibility criteria.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/new-session HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": "1635869520123-123e4567-e89b-12d3-a456-426614174001"
}
This endpoint allows users to create a metric-based quest.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
Title of the quest
exam-title
Description of the quest
exam-desc
End date of the quest
Auto claim rewards flag
Repeat rewards based on metric count flag
Additional metadata for the quest
Priority of the quest (1-5)
POST /api/entities/{entityId}/metric-quests HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 300
{
"title": "exam-title",
"description": "exam-desc",
"metric": {
"metricId": "text",
"metricType": "threshold",
"threshold": 1,
"autoClaimRewards": true,
"repeatRewardsBasedOnMetricCount": true
},
"rewards": [
{}
],
"endsAt": "text",
"autoClaimRewards": true,
"repeatRewardsBasedOnMetricCount": true,
"metadata": {},
"priority": 1
}
{
"success": true,
"questId": "q-123e4567-e89b-12d3-a456-426614174000"
}
Retrieves detailed information about a metric-based quest, including quest details, rewards, and user progress.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/metric-quests/{questId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"quest": {
"questId": "text",
"entityId": "text",
"title": "text",
"description": "text",
"imageURL": "text",
"endsAt": "text",
"status": "text",
"xp": 1,
"skills": [
{
"name": "text",
"skillId": "text",
"score": 1
}
]
},
"rewards": [
{
"rewardId": "text"
}
],
"progressPercent": 1,
"metricDetails": {
"metricId": "text",
"entityId": "text",
"metricType": "text",
"threshold": 1,
"autoClaimRewards": true,
"repeatRewardsBasedOnMetricCount": true
},
"claimStatus": true
}
}
Last updated