Request
Authentication: required
CORS: Accessible from decentraland domains
|
campaign_id
| uuid | Campaign ID required
|
|
name
| string null | Name assigned to the campaign key |
assign_limit
| integer null | Limit the max amount of rewards the a key can assign to the same address minimum: 0
|
assign_group
| string null | Specify the group of the supply the key can assign to an address |
assign_target
| address null | Specify the contract target of the supply the key can assign to an address |
assign_value
| string null | Specify the contract value of the supply the key can assign to an address |
requires_captcha
| boolean | Requires the user to resolve a captcha challenge pre-generated with `/api/captcha` default: false
|
requires_authentication
| boolean null | Allow the key to assign rewards only if the assign request is sign by the beneficiary default: false
|
requires_catalyst
| boolean null | Allow the key to assign rewards only if the beneficiary is connected to a catalyst default: false
|
requires_position
| array null | Allow the key to assign rewards only if the beneficiary is in one of the listed positions uniqueItems: true
|
requires_position[]
| string | x,y position in world |
active_since
| date-time null | The moment from which the campaign key will start to give rewards default: null
|
active_until
| date-time null | The moment from which the campaign key stop start to give rewards default: null
|
Create a new Master key (can assign anything multiple times)
{}
Create a new Super key (can assign anythig but with a fixed limit)
{
"assign_limit": 1
}
Create a new key with that assing rewards from the group box_1
{
"assign_limit": 1,
"assign_group": "box_1"
}
Create a new key with that assing rewards with an specifict contract target
{
"assign_limit": 1,
"assign_target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3"
}
Create a new key with that assing rewards with an specifict contract target and value
{
"assign_limit": 1,
"assign_target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
"assign_value": "0"
}
Create a new key with that assing rewards with an specifict contract target and value
{
"assign_limit": 1,
"assign_target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
"assign_value": "0"
}
Create a new key that requires the user sign
{
"requires_authetication": true
}
Create a new key that requires the user to be connect into the world
{
"requires_catalyst": true
}
Create a new key that requires the user to be connect into the world and in an specifict position
{
"requires_catalyst": true,
"requires_position": [
"0,0",
"0,1",
"1,1",
"1,0"
]
}
Response
|
ok
| boolean | Define where the request was completed |
data
| object | |
data.id
| uuid | Campaign key ID |
data.campaign_id
| uuid | Campaign ID |
data.campaign_key
| string | Campaign secret |
data.assign_limit
| integer null | The limit of a rewards that can be assigned using this key to the same address default: null minimum: 0
|
data.assign_group
| string null | The group of rewards that can be assigned using this key default: null minLength: 1
|
data.assign_target
| address null | The contract target that can be assigned using this key default: null
|
data.assign_value
| string null | The contract value that can be assigned usign this key default: null
|
data.requires_captcha
| boolean | Requires the user to resolve a captcha challenge pre-generated with `/api/captcha` default: false
|
data.requires_authentication
| boolean | Requires the user sign to assign a reward usgin this key default: false
|
data.requires_catalyst
| boolean | Requires the user to be connected into the world to assign a reward usign this key default: false
|
data.requires_position
| array null | Requires the user to be in one position into the world to assign a reward usign this key default: null
|
data.requires_position[]
| string | |
data.enabled
| boolean | Define if this key can assign rewards default: true
|
data.created_at
| date-time | The time the key was created |
data.updated_at
| date-time | The time the key was last updated |
Status: 201
{
"ok": true,
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"campaign_id": "00000000-0000-0000-0000-000000000000",
"campaign_key": "eyJpZ...tm6QE=",
"assign_limit": 1,
"assign_group": null,
"assign_target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
"assign_value": "0",
"requires_captcha": true,
"requires_authetication": true,
"requires_catalyst": true,
"requires_position": [
"0,0",
"0,1",
"1,1",
"1,0"
],
"enabled": true,
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z"
}
}