For the complete documentation index, see llms.txt. This page is also available as Markdown.

Campaign Rewards

Campaign-specific reward operations

Get campaign supply

get
/api/campaigns/{campaign_id}/supply

Retrieve supply information for a campaign

Path parameters
campaign_idstring · uuidRequired

Campaign ID

Responses
200

Campaign supply information

application/json
okbooleanOptionalExample: true
get/api/campaigns/{campaign_id}/supply
GET /api/campaigns/{campaign_id}/supply HTTP/1.1
Host: rewards.decentraland.org
Accept: */*
{
  "ok": true,
  "data": [
    {
      "campaign_id": "123e4567-e89b-12d3-a456-426614174000",
      "target": "0x1234567890123456789012345678901234567890",
      "value": "1",
      "group": "premium",
      "total": 1000,
      "remaining": 500
    }
  ]
}

Create campaign supply

post
/api/campaigns/{campaign_id}/supply

Add supply items to a campaign

Path parameters
campaign_idstring · uuidRequired

Campaign ID

Body
targetstring · addressRequired

Target contract

Example: 0x1234567890123456789012345678901234567890
valuestring · min: 1 · max: 128Required

Value in the contract

Example: 1
airdrop_typestring · enumRequired

Delivery strategy for the reward

Example: CollectionV2IssueTokenPossible values:
tokenstring · nullableOptional

Human-readable name

Example: Summer Hat
imagestring · uri · nullableOptional

Image URL

Example: https://example.com/image.png
supplyintegerOptional

Supply amount

Example: 1000
groupstring · nullableOptional

Supply group

Example: premium
priorityone ofOptional

Assignment priority

Example: 1
number · min: -2147483647 · max: 2147483647Optional
or
string · enumOptionalPossible values:
Responses
201

Supply created successfully

application/json
okbooleanOptionalExample: true
post/api/campaigns/{campaign_id}/supply
POST /api/campaigns/{campaign_id}/supply HTTP/1.1
Host: rewards.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 213

{
  "target": "0x1234567890123456789012345678901234567890",
  "value": "1",
  "airdrop_type": "CollectionV2IssueToken",
  "token": "Summer Hat",
  "image": "https://example.com/image.png",
  "supply": 1000,
  "group": "premium",
  "priority": 1
}
{
  "ok": true,
  "data": {
    "campaign_id": "123e4567-e89b-12d3-a456-426614174000",
    "target": "0x1234567890123456789012345678901234567890",
    "value": "1",
    "group": "premium",
    "total": 1000,
    "remaining": 500
  }
}

Remove campaign supply

patch
/api/campaigns/{campaign_id}/supply

Remove or update supply items from a campaign

Path parameters
campaign_idstring · uuidRequired

Campaign ID

Body
targetstring · addressRequired

Target contract

Example: 0x1234567890123456789012345678901234567890
valuestring · min: 1 · max: 128Required

Value in the contract

Example: 1
groupstring · nullableRequired

Supply group

Example: premium
supplyintegerOptional

Supply amount to remove

Example: 100
Responses
200

Supply updated successfully

application/json
okbooleanOptionalExample: true
patch/api/campaigns/{campaign_id}/supply
PATCH /api/campaigns/{campaign_id}/supply HTTP/1.1
Host: rewards.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "target": "0x1234567890123456789012345678901234567890",
  "value": "1",
  "group": "premium",
  "supply": 100
}
{
  "ok": true,
  "data": {
    "campaign_id": "123e4567-e89b-12d3-a456-426614174000",
    "target": "0x1234567890123456789012345678901234567890",
    "value": "1",
    "group": "premium",
    "total": 1000,
    "remaining": 500
  }
}

Get campaign key rewards

get
/api/campaigns/{campaign_id}/keys/{campaign_key_id}/rewards

Retrieve rewards for a specific campaign key

Path parameters
campaign_idstring · uuidRequired

Campaign ID

campaign_key_idstring · uuidRequired

Campaign Key ID

Query parameters
limitstringOptional

Maximum number of results per request

Default: 100
offsetstringOptional

Number of results to skip

Default: 0
Responses
200

Campaign key rewards

application/json
okbooleanOptionalExample: true
totalnumberOptional

Total number of rewards

get/api/campaigns/{campaign_id}/keys/{campaign_key_id}/rewards
GET /api/campaigns/{campaign_id}/keys/{campaign_key_id}/rewards HTTP/1.1
Host: rewards.decentraland.org
Accept: */*
{
  "ok": true,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "campaign_id": "123e4567-e89b-12d3-a456-426614174000",
      "campaign_key": "123e4567-e89b-12d3-a456-426614174000",
      "user": "0x1234567890123456789012345678901234567890",
      "status": "assigned",
      "chain_id": "137",
      "transaction_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
      "block_number": 12345678,
      "airdrop_type": "CollectionV2IssueToken",
      "target": "0x1234567890123456789012345678901234567890",
      "value": "1",
      "priority": 1,
      "group": "premium",
      "token": "Summer Hat",
      "image": "https://example.com/image.png",
      "rarity": "rare",
      "category": "hat",
      "from_referral": "0x1234567890123456789012345678901234567890",
      "payload": "0x1234567890abcdef",
      "signature": "0xabcdef1234567890",
      "expires_at": "2024-12-31T23:59:59Z",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "assigned_at": "2024-01-01T00:00:00Z"
    }
  ],
  "total": 1
}

Assign campaign reward

post
/api/campaigns/{campaign_id}/rewards

Assign a reward to a user for a specific campaign

Path parameters
campaign_idstring · uuidRequired

Campaign ID

Body
campaign_keystring · min: 1Required

Campaign key

Example: summer2024
beneficiarystring · addressRequired

User address to assign the reward to

Example: 0x1234567890123456789012345678901234567890
captcha_idstring · uuidOptional

Captcha identifier

Example: 123e4567-e89b-12d3-a456-426614174000
captcha_valuestring · min: 6 · max: 6Optional

Captcha value

Example: ABC123
catalyststring · uriOptional

Catalyst URL where the user is connected

Example: https://peer.decentraland.org
Responses
200

Campaign reward assigned successfully

application/json
okbooleanOptionalExample: true
post/api/campaigns/{campaign_id}/rewards
POST /api/campaigns/{campaign_id}/rewards HTTP/1.1
Host: rewards.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "campaign_key": "summer2024",
  "beneficiary": "0x1234567890123456789012345678901234567890",
  "captcha_id": "123e4567-e89b-12d3-a456-426614174000",
  "captcha_value": "ABC123",
  "catalyst": "https://peer.decentraland.org"
}
{
  "ok": true,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "campaign_id": "123e4567-e89b-12d3-a456-426614174000",
      "campaign_key": "123e4567-e89b-12d3-a456-426614174000",
      "user": "0x1234567890123456789012345678901234567890",
      "status": "assigned",
      "chain_id": "137",
      "transaction_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
      "block_number": 12345678,
      "airdrop_type": "CollectionV2IssueToken",
      "target": "0x1234567890123456789012345678901234567890",
      "value": "1",
      "priority": 1,
      "group": "premium",
      "token": "Summer Hat",
      "image": "https://example.com/image.png",
      "rarity": "rare",
      "category": "hat",
      "from_referral": "0x1234567890123456789012345678901234567890",
      "payload": "0x1234567890abcdef",
      "signature": "0xabcdef1234567890",
      "expires_at": "2024-12-31T23:59:59Z",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "assigned_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Claim campaign reward

post
/api/campaigns/{campaign_id}/claims

Claim rewards for a specific campaign

Path parameters
campaign_idstring · uuidRequired

Campaign ID

Body
beneficiarystring · addressRequired

User address to claim rewards for

Example: 0x1234567890123456789012345678901234567890
Responses
200

Campaign reward claimed successfully

application/json
okbooleanOptionalExample: true
post/api/campaigns/{campaign_id}/claims
POST /api/campaigns/{campaign_id}/claims HTTP/1.1
Host: rewards.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "beneficiary": "0x1234567890123456789012345678901234567890"
}
{
  "ok": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "user": "0x1234567890123456789012345678901234567890",
    "chain_id": "137",
    "contract": "0x1234567890123456789012345678901234567890",
    "transaction_payload": "0x1234567890abcdef",
    "transaction_payload_hash": "0xabcdef1234567890",
    "status": "claimed",
    "rewards": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "expires_at": "2024-12-31T23:59:59Z",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}

Last updated