> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create campaign

> Create a new campaign and deploy it onchain



## OpenAPI

````yaml api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/campaigns
openapi: 3.1.1
info:
  title: Coinbase Commerce API
  description: API for processing payments on the PaymentEscrow smart contract protocol.
  version: v0.0.1
servers:
  - url: https://payments.coinbase.com
security: []
tags:
  - name: Payments
    description: >-
      Endpoints focused on handling payment transactions.


      This includes operations for authorizing funds without immediate capture,
      and capturing previously authorized funds directly via the PaymentEscrow
      smart contract protocol. The endpoints help ensure secure and controlled
      payment processing, including verifying signatures, and updating payment
      statuses.
  - name: Rewards
    description: >-
      Endpoints for managing reward operations.


      These endpoints allow you to independently allocate, distribute, send, and
      deallocate rewards on previously successful payment operations.
  - name: Campaigns
    description: >-
      Endpoints for managing reward campaigns.


      Create and manage campaigns that integrate with the Flywheel smart
      contract to provide reward functionality. Campaigns allow merchants to
      define reward structures with customizable parameters including reward
      percentages and maximum limits.
  - name: coinbase.engine.operator_api.v1.OperatorApiService
paths:
  /api/v1/campaigns:
    post:
      tags:
        - Campaigns
      summary: Create campaign
      description: Create a new campaign and deploy it onchain
      operationId: OperatorApiService_PostCampaign
      parameters:
        - schema:
            type: string
          name: x-idempotency-key
          description: Unique identifier to ensure request idempotency
          in: header
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                campaignType:
                  description: >-
                    Type of campaign. Defaults to CAMPAIGN_TYPE_CASHBACK_REWARDS
                    if not provided.
                  title: Campaign Type
                  examples:
                    - CAMPAIGN_TYPE_CASHBACK_REWARDS
                  type: string
                  enum:
                    - CAMPAIGN_TYPE_CASHBACK_REWARDS
                chainId:
                  type: integer
                  format: int32
                  description: Blockchain network identifier
                  title: Chain ID
                  examples:
                    - 8453
                maxRewardAmounts:
                  type: array
                  items:
                    type: object
                    properties:
                      tokenAddress:
                        type: string
                        description: >-
                          The token contract address for which this reward
                          amount limit applies
                        title: Token Address
                        examples:
                          - '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      amount:
                        type: string
                        description: >-
                          Maximum reward amount with two decimal places. Must be
                          between 0.01 and 100,000,000.
                        title: Amount
                        examples:
                          - '100.00'
                    description: Maximum reward amount for a specific token.
                    title: MaxRewardAmount
                    required:
                      - tokenAddress
                      - amount
                    examples:
                      - tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                        amount: '100.00'
                  description: >-
                    Optional list of maximum reward amounts for specific tokens.
                    Only applicable for CAMPAIGN_TYPE_CASHBACK_REWARDS.
                  title: Max Reward Amounts
                  examples:
                    - - tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                        amount: '100.00'
                maxRewardBps:
                  type: integer
                  format: int32
                  description: >-
                    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.
                  title: Max Reward BPS
                  examples:
                    - 1000
                ownerAddress:
                  type: string
                  description: Address that will own the campaign
                  title: Owner Address
                  examples:
                    - '0x1234567890123456789012345678901234567890'
                rewardBps:
                  type: integer
                  format: int32
                  description: >-
                    Reward percentage applied to the reward operations (1-10000,
                    cannot be 0). Only applicable for
                    CAMPAIGN_TYPE_CASHBACK_REWARDS.
                  title: Reward BPS
                  examples:
                    - 500
              required:
                - ownerAddress
                - chainId
                - rewardBps
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaignAddress:
                    type: string
                    description: The deployed campaign contract address
                    title: Campaign Address
                    examples:
                      - '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd'
                required:
                  - campaignAddress
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                  message:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        '@type':
                          type: string
                      additionalProperties: {}
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Authorization header using the Bearer scheme. Learn more about JWT
        tokens in the Coinbase Developer Portal.
      name: Authorization
      in: header

````