Create an affiliate program

POST https://api.tamio.com/v2/affiliate-programs/create

Creates a new affiliate program with commission structure, multilingual content, destination targeting, and payment methods.

When subscription_commission_type is set to repeating, the duration field is required and must be greater than 0.

Body Parameters

currency string*

ISO 4217 currency code for commission payments. Must be a currency enabled on your account.

commission_amount integer*

Fixed commission amount in the smallest currency unit (e.g. cents).

commission_percent number*

Percentage-based commission rate (0–100).

payout_delay integer

Days to wait before processing affiliate payouts.

subscription_commission_type string

How subscription commissions are handled:

  • once – commission on first payment only
  • forever – commission on all payments
  • repeating – commission for duration months (requires duration > 0)
onceforeverrepeating
duration integer

Duration in months for repeating commissions. Required and must be > 0 when subscription_commission_type is repeating.

first_takes_all string

Whether the first referring affiliate gets all commission credit.

enableddisabled
cookie_expiry integer

Days that affiliate tracking cookies remain valid (max 90).

payments array of string*

Supported payment method identifiers for affiliate payouts.

destinations array of string*

Country/region codes where the program is available.

is_public boolean

Whether the program is publicly visible to potential affiliates.

auto_approve boolean

Whether affiliate applications are automatically approved.

is_listed boolean

Whether the program appears in public program directories.

affiliate_notifications boolean

Whether to send email notifications to affiliates about program updates.

banners array of string

Array of banner asset UUIDs for affiliates to use in marketing.

products array of string

Array of product UUIDs included in this program.

languages object*

Multilingual content keyed by language code (e.g. en, de). Each entry requires label and description.

domain string

UUID of the domain/website associated with this program.

Example
{
  "commission_amount": 500,
  "commission_percent": 10.5,
  "languages": {
    "en": {
      "label": "My Program",
      "description": "A great affiliate program"
    }
  },
  "destinations": [
    "worldwide"
  ],
  "currency": "EUR",
  "payments": [
    "stripe"
  ]
}

Responses

200 Program created successfully

Program created successfully

status integer
program AffiliateProgram
400 Validation or business logic error. Returned when:
401 Missing or invalid API key
/affiliate-programs/create
1const response = await fetch("https://api.tamio.com/v2/affiliate-programs/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "program": {
    "object": "affiliate_program",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "label": "Premium Affiliate Program",
    "created_at": 1709500800,
    "currency": "EUR",
    "commission_amount": 500,
    "commission_percent": 0.1,
    "description": "string",
    "payout_delay": 30,
    "subscription_commission_type": "once",
    "destinations": [
      "worldwide"
    ],
    "payments": [
      "stripe"
    ],
    "payment_count": 0,
    "approved": true,
    "auto_approve": false,
    "is_active": true,
    "products": [],
    "languages": {},
    "domain": {},
    "signup_url": "string",
    "is_listed": false,
    "banners": [],
    "affiliates": 0,
    "sales": 0,
    "javascript_url": "string",
    "is_public": false,
    "cookie_expiry": 30,
    "first_takes_all": "enabled",
    "affiliate_notifications": false
  }
}