POST
/api/captcha

Create a new captcha challenge

Request

CORS: Accessible from decentraland domains

Response

Body
ok
boolean
Define where the request was completed
data
object
data.id
uudi
Captcha unique identifier
data.width
number
Width of the image
data.height
number
Height of the image
data.image
string
Data URL representation of the image
data.expires_at
date-time
The moment in which the captcha is no longer valid
GET
/api/campaigns

Get campaigns

Request

Authentication: required

CORS: Accessible from decentraland domains

Query params
status
filter by the status of campaigns
"Enabled"
The campaign is enabled
"Disable"
The campaign is disabled
limit
uint
limit the maximun number of result of each request
default: "25"
offset
uint
excludes the first number of results
default: "0"

Response

Body
ok
boolean
Define where the request was completed
data
array
Campaign list
data[]
object
Campaign
data[].id
uuid
Campaign ID
data[].name
string
Campaign name
data[].enabled
boolean
Define if the campaign is enabled to give rewards
data[].active_since
date-time
null
The moment from which the campaign will start to give rewards
data[].active_until
date-time
null
The moment from which the campaign stop start to give rewards
data[].created_at
data-time
The time the campaign was created
data[].updated_at
data-time
The moment the campaign was last updated
total
number
Total amount of campaigns according to filter
Status: 200
{
  "ok": true,
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "address": "0x0000000000000000000000000000000000000000",
      "name": "CAMPAIGN_NAME",
      "enabled": true,
      "active_since": "2020-01-01T00:00:00.000Z",
      "active_until": "2030-01-01T00:00:00.000Z",
      "created_at": "2020-01-01T00:00:00.000Z",
      "updated_at": "2020-01-01T00:00:00.000Z"
    }
  ],
  "total": 1
}
POST
/api/campaigns

Create a new campaign

Request

Authentication: required

CORS: Accessible from decentraland domains

Body
name
string
The name of the new campaign
required
minLength: 3
chain_id
137
80001
1
3
The chain id in which campaigns run
enabled
boolean
Define if the campaign is enabled to give rewards
default: true
max_gas
number
null
Max gas fee able to expend per transaction
default: 200
active_since
date-time
null
The moment from which the campaign will start to give rewards
default: null
active_until
date-time
null
The moment from which the campaign stop start to give rewards
default: null
New campaign
{
  "name": "CAMPAIGN_NAME",
  "enabled": true,
  "active_since": "2020-01-01T00:00:00.000Z",
  "active_until": "2030-01-01T00:00:00.000Z"
}

Response

Body
ok
boolean
Define where the request was completed
data
object
Campaign
data.id
uuid
Campaign ID
data.name
string
Campaign name
data.enabled
boolean
Define if the campaign is enabled to give rewards
data.active_since
date-time
null
The moment from which the campaign will start to give rewards
data.active_until
date-time
null
The moment from which the campaign stop start to give rewards
data.created_at
data-time
The time the campaign was created
data.updated_at
data-time
The moment the campaign was last updated
Status: 201
{
  "ok": true,
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "address": "0x0000000000000000000000000000000000000000",
    "name": "CAMPAIGN_NAME",
    "enabled": true,
    "active_since": "2020-01-01T00:00:00.000Z",
    "active_until": "2030-01-01T00:00:00.000Z",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
GET
/api/campaigns/{campaign_id}

Get campaign by ID

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required

Response

Body
ok
boolean
Define where the request was completed
data
object
Campaign
data.id
uuid
Campaign ID
data.name
string
Campaign name
data.enabled
boolean
Define if the campaign is enabled to give rewards
data.active_since
date-time
null
The moment from which the campaign will start to give rewards
data.active_until
date-time
null
The moment from which the campaign stop start to give rewards
data.created_at
data-time
The time the campaign was created
data.updated_at
data-time
The moment the campaign was last updated
Status: 201
{
  "ok": true,
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "address": "0x0000000000000000000000000000000000000000",
    "name": "CAMPAIGN_NAME",
    "enabled": true,
    "active_since": "2020-01-01T00:00:00.000Z",
    "active_until": "2030-01-01T00:00:00.000Z",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
PATCH
/api/campaigns/{campaign_id}

Update a campaign

Request

Authentication: required

CORS: Accessible from decentraland domains

Body
name
string
The name of the new campaign
minLength: 3
chain_id
137
80001
1
3
The chain id in which campaigns run
enabled
boolean
Define if the campaign is enabled to give rewards
default: true
max_gas
number
null
Max gas fee able to expend per transaction
default: 200
active_since
date-time
null
The moment from which the campaign will start to give rewards
default: null
active_until
date-time
null
The moment from which the campaign stop start to give rewards
default: null
Status: 201
{
  "name": "CAMPAIGN_NAME",
  "enabled": true,
  "active_since": "2020-01-01T00:00:00.000Z",
  "active_until": "2030-01-01T00:00:00.000Z"
}

Response

Body
ok
boolean
Define where the request was completed
data
object
Campaign
data.id
uuid
Campaign ID
data.name
string
Campaign name
data.enabled
boolean
Define if the campaign is enabled to give rewards
data.active_since
date-time
null
The moment from which the campaign will start to give rewards
data.active_until
date-time
null
The moment from which the campaign stop start to give rewards
data.created_at
data-time
The time the campaign was created
data.updated_at
data-time
The moment the campaign was last updated
Status: 201
{
  "ok": true,
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "address": "0x0000000000000000000000000000000000000000",
    "name": "CAMPAIGN_NAME",
    "enabled": true,
    "active_since": "2020-01-01T00:00:00.000Z",
    "active_until": "2030-01-01T00:00:00.000Z",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
GET
/api/campaigns/keys

List campaign keys using its own secret

Request

Authentication: required

CORS: Accessible from decentraland domains

Query params
campaign_key
array
List of campaign secret
campaign_key[]
string
Campaign secret
GET /api/campaigns/keys?campaign_key=eyJpZ...tm6QE=

Response

Body
ok
boolean
Define where the request was completed
data
array
Campaign key list
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: 200
{
  "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"
    }
  ]
}
GET
/api/campaigns/{campaign_id}/keys

Get all kesy for a campaign

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required

Response

Body
ok
boolean
Define where the request was completed
data
array
Campaign key list
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: 200
{
  "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"
    }
  ]
}
POST
/api/campaigns/{campaign_id}/keys

Create a new Campaign key

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
Body
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

Body
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"
  }
}
GET
/api/campaigns/{campaign_id}/keys/{campaign_key_id}

Get a campaign key using its id

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
campaign_key_id
uuid
Campaign key ID
required

Response

Body
ok
boolean
Define where the request was completed
data
array
Campaign key list
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"
  }
}
PATCH
/api/campaigns/{campaign_id}/keys/{campaign_key_id}

Update a new Campaign key usign its Is

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
Body
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
Assign a new limit to a key
{
  "assign_limit": 1
}
Change a the assignation rule form group to a target, value pair
{
  "assign_group": null,
  "assign_target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
  "assign_value": "0"
}
Update a key to require the user sign, connected to the world and in a position
{
  "requires_authetication": true,
  "requires_catalyst": true,
  "requires_position": [
    "0,0",
    "0,1",
    "1,1",
    "1,0"
  ]
}

Response

Body
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"
  }
}
GET
/api/campaigns/{campaign_id}/key/{campaign_key_id}/rewards

Get rewards from campaign_id and campaign_key

Request

URL
campaign_id
uuid
Campaign ID
required
campaign_key_id
uuid
Campaign key ID
required
Query params
limit
uint
limit the maximun number of result of each request
default: "100"
offset
uint
excludes the first number of results
default: "0"
GET /api/campaigns/00000000-0000-0000-0000-000000000000/key/00000000-0000-0000-0000-000000000000/rewards&limit=1

Response

Body
ok
boolean
Define where the request was completed
data
array
List of rewards
data[]
object
Reward
data[].id
uuid
Reward ID
data[].campaign_id
uuid
ID of the campaign in which it was assigned this reward
data[].campaign_key
uuid
ID of the key with which it was assigned this reward
data[].user
address
User assigned to this reward
data[].status
The delivery status of this rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
data[].chain_id
137
80001
1
3
The chain id in which the reward exists
data[].transaction_hash
string
null
Hash of the transaction in which the reward was sent
data[].block_number
integer
null
Hash of the transaction in which the reward was sent
data[].airdrop_type
"CollectionV2IssueToken"
Delivery strategy for this reward
data[].target
address
Target contract for the reward
data[].value
string
Value in the contract for the reward
data[].priority
number
Assign priority for the reward
data[].group
string
null
Assign group for the reward
data[].token
string
Human-readable name for the reward
data[].image
uri
Image that visually represents this reward
data[].created_at
date-time
the time the reward was created
data[].updated_at
date-time
The time the reward was last updated
data[].assigned_at
date-time
The time the reward was assigned
total
number
Total amount of rewards according to filter
{
  "ok": true,
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "user": "0x0000000000000000000000000000000000000000",
      "campaign_id": "00000000-0000-0000-0000-000000000000",
      "campaign_key": "00000000-0000-0000-0000-000000000000",
      "status": "assigned",
      "chain_id": 137,
      "airdrop_type": "CollectionV2IssueToken",
      "target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
      "value": "0",
      "group": null,
      "priority": 2144355453,
      "transaction_id": null,
      "transaction_hash": null,
      "token": "Polygon sunglasses",
      "image": "https://peer.decentraland.zone/lambdas/collections/contents/urn:decentraland:mumbai:collections-v2:0x7434a847c5e1ff250db456c55f99d1612e93d6a3:0/thumbnail",
      "assigned_at": "2021-09-24T01:30:16.770Z",
      "created_at": "2021-09-24T01:25:14.534Z",
      "updated_at": "2021-09-24T01:25:14.534Z"
    }
  ],
  "total": 1
}
POST
/api/campaigns/{campaign_id}/rewards
(deprecated)

Assign reward to a beneficiary

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
Body
campaign_key
string
Campaign key
required
minLength: 1
beneficiary
address
User addres to assign the reward (not required for signed requests)
captcha_id
uuid
Captcha identifier generated using the `/capthcha` endpoint
captcha_value
string
Value of the captcha specified by the user
minLength: 6
maxLength: 6
catalyst
uri
Catalyst url where the user is connected (required if the campaign key is configured with requires_catalyst)
assign_target
address
Assign rewards with this target contract (only master and super keys)
assign_value
string
Assign rewards with this value (only if assign_target is present, only master and super keys)
minLength: 1
assign_group
string
Assign rewards with this group (only master and super keys)
minLength: 1
assign a reward
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000"
}
Assign only if the user is connected to a catalyst
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "catalyst": "https://peer.decentraland.org"
}
Assign only if the user resolves the captcha correctly
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "captcha_id": "00000000-0000-0000-0000-000000000000",
  "captcha_value": "XXXXXX"
}
assign a particular reward (only master keys)
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "assign_target": "0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4",
  "assign_value": "100"
}
assign a reward from a particular group (only master keys)
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "group": "box_1"
}

Response

Body
ok
boolean
Define where the request was completed
data
object
Reward
data.id
uuid
Reward ID
data.campaign_id
uuid
ID of the campaign in which it was assigned this reward
data.campaign_key
uuid
ID of the key with which it was assigned this reward
data.user
address
User assigned to this reward
data.status
The delivery status of this rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
data.chain_id
137
80001
1
3
The chain id in which the reward exists
data.transaction_hash
string
null
Hash of the transaction in which the reward was sent
data.block_number
integer
null
Hash of the transaction in which the reward was sent
data.airdrop_type
"CollectionV2IssueToken"
Delivery strategy for this reward
data.target
address
Target contract for the reward
data.value
string
Value in the contract for the reward
data.priority
number
Assign priority for the reward
data.group
string
null
Assign group for the reward
data.token
string
Human-readable name for the reward
data.image
uri
Image that visually represents this reward
data.created_at
date-time
the time the reward was created
data.updated_at
date-time
The time the reward was last updated
data.assigned_at
date-time
The time the reward was assigned
Status: 201
{
  "ok": true,
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "user": "0x0000000000000000000000000000000000000000",
      "campaign_id": "00000000-0000-0000-0000-000000000000",
      "campaign_key": "00000000-0000-0000-0000-000000000000",
      "status": "assigned",
      "chain_id": 137,
      "airdrop_type": "CollectionV2IssueToken",
      "target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
      "value": "0",
      "group": null,
      "priority": 2144355453,
      "transaction_id": null,
      "transaction_hash": null,
      "token": "Polygon sunglasses",
      "image": "https://peer.decentraland.zone/lambdas/collections/contents/urn:decentraland:mumbai:collections-v2:0x7434a847c5e1ff250db456c55f99d1612e93d6a3:0/thumbnail",
      "assigned_at": "2021-09-24T01:30:16.770Z",
      "created_at": "2021-09-24T01:25:14.534Z",
      "updated_at": "2021-09-24T01:25:14.534Z"
    }
  ]
}
Status: 201 (no stock)
{
  "ok": true,
  "data": []
}

Errors

Body
ok
false
Whenever the request was succesfully completed
code
string
Unique identifier for an error
"bad_request"
Invalid data was sent to de server
"beneficiary_invalid"
Beneficiary is missing or diferent to the one that sign the request
"user_address_not_connected"
User is not connected to de catalyst (this will be check only is campaign_key is configured with requires_catalyst)
"user_address_position"
User is not connected in the correct position (this will be check only is campaign_key is configured with requires_position)
"campaign_disabled"
Campaign is disabled
"campaign_uninitiated"
"campaign_finished"
Camnpaign is out of the activation date
"campaign_invalid"
Campaign doen't exists
"campaign_key_disabled"
Campaign key is disabled
"campaign_key_uninitiated"
"campaign_key_finished"
Camnpaign key is out of the activation date
"campaign_key_invalid"
Campaign key is invalid
"catalyst_invalid"
Catalyst is not listed in the DAO (this will be check only is campaign_key is configured with requires_catalyst)
"catalyst_unreachable"
Catalyst can't be reached (this will be check only is campaign_key is configured with requires_catalyst)
"sign_required"
Request wasn't signed (this will be check only is `campaign_key` is configured with requires_authetication)
"captcha_required"
Request doesn't include captcha fields (`captcha_id` and `captha_value)
"captcha_invalid"
Captcha cloudn't be validated bacause the data is invalid or becuase was already used
error
string
null
Whenever an error occurs, this property will include a message telling what happened
data
object
Whenever an error includes more details, they will be included in this property
Status: 400 (Bad Request)
{
  "ok": false,
  "code": "bad_request",
  "error": "Invalid data was sent to the server"
}
GET
/api/campaigns/{campaign_id}/transactions

Get campaigns transactions

Request

Authentication: required

CORS: Accessible from decentraland domains

Query params
limit
uint
limit the maximun number of result of each request
default: "100"
offset
uint
excludes the first number of results
default: "0"

Response

Body
ok
boolean
Define where the request was completed
data
array
List of Collection Transaction
data[]
object
Collection Transaction
data[].id
uuid
Collection transaction ID
data[].campaign_id
uuid
ID of the campaign for the transaction
data[].status
The delivery status of this transaction
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
"confirmed"
The reward was sent and the transaction was minted successfully
data[].chain_id
137
80001
1
3
The chain id in which the transaction exists
data[].campaign_address
address
Campaign address for this transaction
data[].transaction_hash
string
null
Hash of the transaction
data[].nonce
integer
null
Nonce of the transaction
data[].retries
integer
Number of times the transaction has been retried.
data[].error
boolean
Indicates if there is been at least one error during the transaction. Resets to "false" once the transaction succeeds.
data[].error_message
string
null
Latest error message associated with the failed transaction
data[].created_at
date-time
the time the reward was created
data[].updated_at
date-time
The time the reward was last updated
total
number
Total amount of collection transaction according to filter
Status: 200
{
  "ok": true,
  "data": [
    {
      "id": "b8dec45f-6d10-4b91-af94-78f4b5a16b8d",
      "campaign_id": "00000000-0000-0000-0000-000000000000",
      "chain_id": 137,
      "campaign_address": "0x0000000000000000000000000000000000000000",
      "collection": "0xa4a345afb8fa378cdabc68e83e1a578c810f0abb",
      "status": "success",
      "transaction_hash": "0x2cada07f086372cad55a3defa44d1b945e67b488bfe2cb288787bda1ba8f94b8",
      "nonce": 2,
      "created_at": "2022-08-11 10:09:35.426",
      "updated_at": "2022-08-11 10:11:43.555"
    }
  ],
  "total": 1
}
GET
/api/campaigns/{campaign_id}/users

Get all users with access to a campaign

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required

Response

Body
ok
boolean
Define where the request was completed
data
array
User list
data[]
object
User
data[].campaign_id
uuid
Campaign ID
data[].user
address
User ethereum address
data[].role
User role
"owner"
can add/remove/see users, add/remove/see supply and add/remove/see keys
"collaborator"
can see users, add/remove/see supply and add/remove/see keys
"developer"
can see users, see supply and see keys
"viewer"
can see users and supply
data[].created_at
date-time
the time the user was created
data[].updated_at
date-time
The time the user was last updated
Status: 201
{
  "ok": true,
  "data": [
    {
      "campaign_id": "00000000-0000-0000-0000-000000000000",
      "user": "0x0000000000000000000000000000000000000000",
      "role": "owner",
      "created_at": "2020-01-01T00:00:00.000Z",
      "updated_at": "2020-01-01T00:00:00.000Z"
    }
  ]
}
POST
/api/campaigns/{campaign_id}/users

Grant access to a campaign

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
Body
user
address
User ethereum address
required
role
Define the actions that a user can perform in the campaign.
required
"owner"
can add/remove/see users, add/remove/see supply and add/remove/see keys
"collaborator"
can see users, add/remove/see supply and add/remove/see keys
"developer"
can see users, see supply and see keys
"viewer"
can see users and supply
Gran access
{
  "user": "0x0000000000000000000000000000000000000000",
  "role": "owner"
}

Response

Body
ok
boolean
Define where the request was completed
data
object
User
data.campaign_id
uuid
Campaign ID
data.user
address
User ethereum address
data.role
User role
"owner"
can add/remove/see users, add/remove/see supply and add/remove/see keys
"collaborator"
can see users, add/remove/see supply and add/remove/see keys
"developer"
can see users, see supply and see keys
"viewer"
can see users and supply
data.created_at
date-time
the time the user was created
data.updated_at
date-time
The time the user was last updated
Status: 201
{
  "ok": true,
  "data": {
    "campaign_id": "00000000-0000-0000-0000-000000000000",
    "user": "0x0000000000000000000000000000000000000000",
    "role": "owner",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
GET
/api/campaigns/{campaign_id}/users/{user}

Get a user with access to a campaign by Address

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
user
address
required

Response

Body
ok
boolean
Define where the request was completed
data
object
Campaign
data.id
uuid
Campaign ID
data.name
string
Campaign name
data.enabled
boolean
Define if the campaign is enabled to give rewards
data.active_since
date-time
null
The moment from which the campaign will start to give rewards
data.active_until
date-time
null
The moment from which the campaign stop start to give rewards
data.created_at
data-time
The time the campaign was created
data.updated_at
data-time
The moment the campaign was last updated
Status: 200
{
  "ok": true,
  "data": {
    "campaign_id": "00000000-0000-0000-0000-000000000000",
    "user": "0x0000000000000000000000000000000000000000",
    "role": "owner",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
PATCH
/api/campaigns/{campaign_id}/users/{user}

Update user role by Address

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
user
address
required
Body
role
Define the actions that a user can perform in the campaign.
required
"owner"
can add/remove/see users, add/remove/see supply and add/remove/see keys
"collaborator"
can see users, add/remove/see supply and add/remove/see keys
"developer"
can see users, see supply and see keys
"viewer"
can see users and supply

Response

Body
ok
boolean
Define where the request was completed
data
object
Campaign
data.id
uuid
Campaign ID
data.name
string
Campaign name
data.enabled
boolean
Define if the campaign is enabled to give rewards
data.active_since
date-time
null
The moment from which the campaign will start to give rewards
data.active_until
date-time
null
The moment from which the campaign stop start to give rewards
data.created_at
data-time
The time the campaign was created
data.updated_at
data-time
The moment the campaign was last updated
Status: 201
{
  "ok": true,
  "data": {
    "campaign_id": "00000000-0000-0000-0000-000000000000",
    "user": "0x0000000000000000000000000000000000000000",
    "role": "owner",
    "created_at": "2020-01-01T00:00:00.000Z",
    "updated_at": "2020-01-01T00:00:00.000Z"
  }
}
GET
/api/rewards

Get rewards

Request

Authentication: required

CORS: Accessible from decentraland domains

Query params
status
string
filter by the delivery status of rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
limit
uint
limit the maximun number of result of each request
default: "100"
offset
uint
excludes the first number of results
default: "0"

Response

Body
ok
boolean
Define where the request was completed
data
array
List of rewards
data[]
object
Reward
data[].id
uuid
Reward ID
data[].campaign_id
uuid
ID of the campaign in which it was assigned this reward
data[].campaign_key
uuid
ID of the key with which it was assigned this reward
data[].user
address
User assigned to this reward
data[].status
The delivery status of this rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
data[].chain_id
137
80001
1
3
The chain id in which the reward exists
data[].transaction_hash
string
null
Hash of the transaction in which the reward was sent
data[].block_number
integer
null
Hash of the transaction in which the reward was sent
data[].airdrop_type
"CollectionV2IssueToken"
Delivery strategy for this reward
data[].target
address
Target contract for the reward
data[].value
string
Value in the contract for the reward
data[].priority
number
Assign priority for the reward
data[].group
string
null
Assign group for the reward
data[].token
string
Human-readable name for the reward
data[].image
uri
Image that visually represents this reward
data[].created_at
date-time
the time the reward was created
data[].updated_at
date-time
The time the reward was last updated
data[].assigned_at
date-time
The time the reward was assigned
total
number
Total amount of rewards according to filter
Status: 200
{
  "ok": true,
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "user": "0x0000000000000000000000000000000000000000",
    "campaign_id": "00000000-0000-0000-0000-000000000000",
    "campaign_key": "00000000-0000-0000-0000-000000000000",
    "status": "assigned",
    "chain_id": 137,
    "airdrop_type": "CollectionV2IssueToken",
    "target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
    "value": "0",
    "group": null,
    "priority": 2144355453,
    "transaction_id": null,
    "transaction_hash": null,
    "token": "Polygon sunglasses",
    "image": "https://peer.decentraland.zone/lambdas/collections/contents/urn:decentraland:mumbai:collections-v2:0x7434a847c5e1ff250db456c55f99d1612e93d6a3:0/thumbnail",
    "assigned_at": "2021-09-24T01:30:16.770Z",
    "created_at": "2021-09-24T01:25:14.534Z",
    "updated_at": "2021-09-24T01:25:14.534Z"
  },
  "total": 1
}
POST
/api/rewards

Assign reward to a beneficiary

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
campaign_id
uuid
Campaign ID
required
Body
campaign_key
string
Campaign key
required
minLength: 1
beneficiary
address
User addres to assign the reward (not required for signed requests)
captcha_id
uuid
Captcha identifier generated using the `/capthcha` endpoint
captcha_value
string
Value of the captcha specified by the user
minLength: 6
maxLength: 6
catalyst
uri
Catalyst url where the user is connected (required if the campaign key is configured with requires_catalyst)
assign_target
address
Assign rewards with this target contract (only master and super keys)
assign_value
string
Assign rewards with this value (only if assign_target is present, only master and super keys)
minLength: 1
assign_group
string
Assign rewards with this group (only master and super keys)
minLength: 1
assign a reward
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000"
}
Assign only if the user is connected to a catalyst
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "catalyst": "https://peer.decentraland.org"
}
Assign only if the user resolves the captcha correctly
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "captcha_id": "00000000-0000-0000-0000-000000000000",
  "captcha_value": "XXXXXX"
}
assign a particular reward (only master keys)
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "assign_target": "0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4",
  "assign_value": "100"
}
assign a reward from a particular group (only master keys)
{
  "campaign_key": "eyJpZ...tm6QE=",
  "beneficiary": "0x0000000000000000000000000000000000000000",
  "group": "box_1"
}

Response

Body
ok
boolean
Define where the request was completed
data
object
Reward
data.id
uuid
Reward ID
data.campaign_id
uuid
ID of the campaign in which it was assigned this reward
data.campaign_key
uuid
ID of the key with which it was assigned this reward
data.user
address
User assigned to this reward
data.status
The delivery status of this rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
data.chain_id
137
80001
1
3
The chain id in which the reward exists
data.transaction_hash
string
null
Hash of the transaction in which the reward was sent
data.block_number
integer
null
Hash of the transaction in which the reward was sent
data.airdrop_type
"CollectionV2IssueToken"
Delivery strategy for this reward
data.target
address
Target contract for the reward
data.value
string
Value in the contract for the reward
data.priority
number
Assign priority for the reward
data.group
string
null
Assign group for the reward
data.token
string
Human-readable name for the reward
data.image
uri
Image that visually represents this reward
data.created_at
date-time
the time the reward was created
data.updated_at
date-time
The time the reward was last updated
data.assigned_at
date-time
The time the reward was assigned
Status: 201
{
  "ok": true,
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "user": "0x0000000000000000000000000000000000000000",
      "campaign_id": "00000000-0000-0000-0000-000000000000",
      "campaign_key": "00000000-0000-0000-0000-000000000000",
      "status": "assigned",
      "chain_id": 137,
      "airdrop_type": "CollectionV2IssueToken",
      "target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
      "value": "0",
      "group": null,
      "priority": 2144355453,
      "transaction_id": null,
      "transaction_hash": null,
      "token": "Polygon sunglasses",
      "image": "https://peer.decentraland.zone/lambdas/collections/contents/urn:decentraland:mumbai:collections-v2:0x7434a847c5e1ff250db456c55f99d1612e93d6a3:0/thumbnail",
      "assigned_at": "2021-09-24T01:30:16.770Z",
      "created_at": "2021-09-24T01:25:14.534Z",
      "updated_at": "2021-09-24T01:25:14.534Z"
    }
  ]
}
Status: 201 (no stock)
{
  "ok": true,
  "data": []
}

Errors

Body
ok
false
Whenever the request was succesfully completed
code
string
Unique identifier for an error
"bad_request"
Invalid data was sent to de server
"beneficiary_invalid"
Beneficiary is missing or diferent to the one that sign the request
"user_address_not_connected"
User is not connected to de catalyst (this will be check only is campaign_key is configured with requires_catalyst)
"user_address_position"
User is not connected in the correct position (this will be check only is campaign_key is configured with requires_position)
"campaign_disabled"
Campaign is disabled
"campaign_uninitiated"
"campaign_finished"
Camnpaign is out of the activation date
"campaign_invalid"
Campaign doen't exists
"campaign_key_disabled"
Campaign key is disabled
"campaign_key_uninitiated"
"campaign_key_finished"
Camnpaign key is out of the activation date
"campaign_key_invalid"
Campaign key is invalid
"catalyst_invalid"
Catalyst is not listed in the DAO (this will be check only is campaign_key is configured with requires_catalyst)
"catalyst_unreachable"
Catalyst can't be reached (this will be check only is campaign_key is configured with requires_catalyst)
"sign_required"
Request wasn't signed (this will be check only is `campaign_key` is configured with requires_authetication)
"captcha_required"
Request doesn't include captcha fields (`captcha_id` and `captha_value)
"captcha_invalid"
Captcha cloudn't be validated bacause the data is invalid or becuase was already used
error
string
null
Whenever an error occurs, this property will include a message telling what happened
data
object
Whenever an error includes more details, they will be included in this property
Status: 400 (Bad Request)
{
  "ok": false,
  "code": "bad_request",
  "error": "Invalid data was sent to the server"
}
GET
/api/rewards/{reward_id}

Get a reward using its ID

Request

Authentication: required

CORS: Accessible from decentraland domains

URL
reward_id
uuid
required

Response

Body
ok
boolean
Define where the request was completed
data
object
Reward
data.id
uuid
Reward ID
data.campaign_id
uuid
ID of the campaign in which it was assigned this reward
data.campaign_key
uuid
ID of the key with which it was assigned this reward
data.user
address
User assigned to this reward
data.status
The delivery status of this rewards
"assigned"
The reward was assigned but it was not sent yet
"sending"
The reward was sent and we are waiting for the transaction to be minted
"success"
The reward was sent and the transaction was minted, but could be reverted by the network
"rejected"
There was a critical error with this reward an can not be sent
data.chain_id
137
80001
1
3
The chain id in which the reward exists
data.transaction_hash
string
null
Hash of the transaction in which the reward was sent
data.block_number
integer
null
Hash of the transaction in which the reward was sent
data.airdrop_type
"CollectionV2IssueToken"
Delivery strategy for this reward
data.target
address
Target contract for the reward
data.value
string
Value in the contract for the reward
data.priority
number
Assign priority for the reward
data.group
string
null
Assign group for the reward
data.token
string
Human-readable name for the reward
data.image
uri
Image that visually represents this reward
data.created_at
date-time
the time the reward was created
data.updated_at
date-time
The time the reward was last updated
data.assigned_at
date-time
The time the reward was assigned
Status: 200
{
  "ok": true,
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "user": "0x0000000000000000000000000000000000000000",
    "campaign_id": "00000000-0000-0000-0000-000000000000",
    "campaign_key": "00000000-0000-0000-0000-000000000000",
    "status": "assigned",
    "chain_id": 137,
    "airdrop_type": "CollectionV2IssueToken",
    "target": "0x7434a847c5e1ff250db456c55f99d1612e93d6a3",
    "value": "0",
    "group": null,
    "priority": 2144355453,
    "transaction_id": null,
    "transaction_hash": null,
    "token": "Polygon sunglasses",
    "image": "https://peer.decentraland.zone/lambdas/collections/contents/urn:decentraland:mumbai:collections-v2:0x7434a847c5e1ff250db456c55f99d1612e93d6a3:0/thumbnail",
    "assigned_at": "2021-09-24T01:30:16.770Z",
    "created_at": "2021-09-24T01:25:14.534Z",
    "updated_at": "2021-09-24T01:25:14.534Z"
  }
}