Create or update an agreement
An agreement between the company and a partner: which revenue counts (customers attributed to the partner, or all customers, optionally limited to products), the tiers by contract month (for example 15 % in months 1–12, then 5 %), and from when. Terms are frozen once made; to change them, make a new agreement. Scope partner:commissions:write.
apiKey partner:commissions:writeAuthorizationBearer <ab_…>An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.
Scope: partner:commissions:write
source*Source^[a-z0-9][a-z0-9_-]{0,49}$external_ref*External Ref^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$AlphaCount-Version?stringThe API version to use. Default: the current one.
application/json- body
PUT /commission-agreements/by-ref/{source}/{ref}. The terms count on
create only — a running agreement's terms are frozen (409 on change).
accrue_from?|nullanchor?|nullapplies_to?|nullcontract_reference?|nullend_date?|nullname?|nullpartner_ref*Partner Ref^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$product_ids?array<>|nullproduct_numbers?array<string>|nullstart_date*Start Datedatetiers?array<>|nullOK
application/json- response
accrue_from*|Revenue paid before this day earns nothing here.
anchor*Anchor"attribution_start""first_paid_revenue"applies_to*Applies To"attributed_customers""all_customers"basis*Basiscondition_id*string|nullcontract_reference*string|nullend_date*|nullexternal_ref*string|nullexternal_source*string|nullid*Idname*string|nullpartner_id*Partner Idpartner_name*string|nullproduct_ids*array<string>start_date*Start Datedatestatus*Statustiers*array<>curl -X PUT 'https://app.alphacount.ai/api/partner/v1/commission-agreements/by-ref/string/string' \ -H 'Authorization: Bearer ab_...' \ -H 'Content-Type: application/json' \ -d '{ "partner_ref": "lernlink", "start_date": "2026-01-01", "tiers": [ { "from_month": 1, "percent": 15, "to_month": 12 }, { "from_month": 13, "percent": 5, "to_month": null } ]}'{ "accrue_from": null, "anchor": "attribution_start", "applies_to": "attributed_customers", "basis": "paid_net", "condition_id": null, "contract_reference": null, "end_date": null, "external_ref": "lernlink-2026", "external_source": "alphalearn", "id": "00000000-0000-4000-8000-000000000001", "name": "lern.link GmbH", "partner_id": "00000000-0000-4000-8000-000000000002", "partner_name": "lern.link GmbH", "product_ids": [], "start_date": "2026-01-01", "status": "active", "tiers": [ { "from_month": 1, "percent": 15, "to_month": 12 }, { "from_month": 13, "percent": 5, "to_month": null } ]}