ApiResourcesAffiliate Program

Replace affiliate program configuration

Atomically replace affiliate settings and the complete product-variant restriction set.

Product-specific percentage commissions use commission.percentage. Fixed commissions use integer USD cents in commission.amount_usd_cents.

PUT
/v2/affiliate-program

Authorization

bearerAuth storeAuth
AuthorizationBearer <token>

Provide your SellApp API key as a bearer token.

In: header

X-STORE<token>

Select the SellApp store for this API request.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://sell.app/api/v2/affiliate-program" \  -H "Content-Type: application/json" \  -d '{    "enabled": true,    "settings": {      "auto_approve_affiliates": false,      "minimum_payout": "25",      "commission": {        "type": "percentage",        "amount": "20"      },      "referrer_type": "first_referrer",      "tracking_length": 30,      "subscription_commission": true,      "enabled_specific_products": true,      "payout_methods": [        "PAYPAL"      ],      "enable_hub": false    },    "products": [      {        "id": 42,        "enabled": true,        "commission": {          "type": "percentage",          "amount": "25"        }      }    ]  }'
{
  "data": {
    "id": 12,
    "enabled": true,
    "settings": {
      "auto_approve_affiliates": false,
      "minimum_payout": "25",
      "commission": {
        "type": "percentage",
        "amount": "20"
      },
      "referrer_type": "first_referrer",
      "tracking_length": 30,
      "subscription_commission": true,
      "enabled_specific_products": true,
      "payout_methods": [
        "PAYPAL"
      ],
      "enable_hub": false
    },
    "products": [
      {
        "id": 42,
        "product_id": 9,
        "product_title": "Writing community",
        "variant_title": "Monthly access",
        "enabled": true,
        "commission": {
          "type": "percentage",
          "percentage": "25",
          "amount_usd_cents": null
        }
      }
    ],
    "created_at": "2026-07-12T12:00:00Z",
    "updated_at": "2026-07-12T12:00:00Z"
  }
}
{
  "message": "Unauthenticated."
}
{
  "message": "This action is unauthorized."
}
{
  "message": "The given data was invalid.",
  "errors": {
    "data": [
      "The data field is required."
    ]
  }
}