Skip to main content
POST
/
api
/
v1
/
campaigns
Create campaign
curl --request POST \
  --url https://payments.coinbase.com/api/v1/campaigns \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "chainId": 123,
  "ownerAddress": "<string>",
  "rewardBps": 123,
  "campaignType": "CAMPAIGN_TYPE_CASHBACK_REWARDS",
  "maxRewardAmounts": [
    {
      "tokenAddress": "<string>",
      "amount": "<string>"
    }
  ],
  "maxRewardBps": 123
}
'
{
  "campaignAddress": "<string>"
}

Authorizations

Authorization
string
header
required

Authorization header using the Bearer scheme. Learn more about JWT tokens in the Coinbase Developer Portal.

Headers

x-idempotency-key
string
required

Unique identifier to ensure request idempotency

Body

application/json
chainId
integer<int32>
required

Blockchain network identifier

ownerAddress
string
required

Address that will own the campaign

rewardBps
integer<int32>
required

Reward percentage applied to the reward operations (1-10000, cannot be 0). Only applicable for CAMPAIGN_TYPE_CASHBACK_REWARDS.

campaignType
enum<string>

Type of campaign. Defaults to CAMPAIGN_TYPE_CASHBACK_REWARDS if not provided.

Available options:
CAMPAIGN_TYPE_CASHBACK_REWARDS
maxRewardAmounts
MaxRewardAmount · object[]

Optional list of maximum reward amounts for specific tokens. Only applicable for CAMPAIGN_TYPE_CASHBACK_REWARDS.

maxRewardBps
integer<int32>

Optional immutable maximum reward percentage applied to the smart contract (0-10000). Defaults to 10000 (no cap) if not provided. Only applicable for CAMPAIGN_TYPE_CASHBACK_REWARDS.

Response

A successful response.

campaignAddress
string
required

The deployed campaign contract address