Docs
What an agent can do
Every MCP tool: what it does, whether it reads or writes, whether it asks you first, and what it takes.
Everything the dashboard does, an agent can do through Affiligato’s MCP server: 187 tools. A tool runs the dashboard’s own action, with the same permissions, and the audit log names the agent. Write tools need an approval with write access. Tools marked asks first show you what they will do and wait for your yes: in your MCP client when it supports forms (MCP 2026-07-28), otherwise on a confirmation page in the dashboard.
Amounts are in minor units of the program currency (1000 is 10.00); percentages are in basis points (3000 is 30%). Lists answer 100 items at a time with next_cursor, and take filter to keep the items whose fields equal the values given.
This page is generated from the server’s own tool list.
Setup
connect_domain
Put the partner page on the merchant’s own domain in one call. The first call creates it and, while its DNS record is missing, answers with a page for the person (URL elicitation): one click at their DNS provider where it supports Affiligato through Domain Connect, else the record with a live check. Call again once they are done; it answers active with the address. Clients without URL elicitation get the record and the page in the message. This needs Production: Test mode refuses a custom domain, and the partner page stays on its Affiligato address (partner_link) until then.
Write. Takes hostname (optional).
connect_stripe
How this program connects to Stripe, in order: do lists the steps. When the Stripe App is set up for live programs, it comes first: the person opens stripe_app.url in a browser and installs it, with no key to copy. Otherwise, and for a program billing through the Stripe account that owns the app (microcompanies, LLC), the webhook: create_stripe_webhook makes it with a restricted Stripe key the person deletes afterwards, or webhook.cli is the stripe CLI command to run.
Read. Takes nothing.
create_stripe_webhook
Create this program’s Stripe webhook endpoint in the merchant’s Stripe account and save its signing secret, in one step. Give a restricted key (rk_test_… for a test program, rk_live_… for live) with Webhook Endpoints: Write; it is used for this call only and never stored. An endpoint already posting to this program is replaced; no other endpoint is touched.
Write. Takes stripe_key (optional).
footer_badge
The “Affiliates by Affiligato” footer badge: the light and dark lines to paste into the site’s footer, linking to Affiligato with this program counted.
Read. Takes nothing.
get_program
The affiliate program in brief: its name, commission terms, cookie window, hold period, payout minimum, whether it is live or a test program or a demo, production (false while it is in Test mode, until its owner subscribes), and portal_url, the page where partners sign up. get_program_details answers everything the dashboard shows.
Read. Takes nothing.
go_live
Whether the live program can take real referrals, and what it still needs: the tag on the live site, billing connected and, for a program in Test mode, the plan that switches it to Production. production is false while it is in Test mode: partners can join and commissions are recorded, but payouts, partner email, custom domains and API keys wait. It reports the live program only. site_partner_domain, when not null, is a hostname the site links to that points at Affiligato but is not connected: follow its do.
Read. Takes nothing.
install_snippet
The script tag for the site, where it goes in a framework, and the lines that report a signup and pass the referral to checkout. A test program gives the tag with data-affiligato-test.
Read. Takes consent (optional), cookie_domain (optional), framework (optional).
list_programs
The programs the person who approved this agent owns or administers, which one this connection reaches, and how to reach another.
Read. Takes nothing.
partner_link
The partner page, where people sign up as partners: its address, and a “Become a partner” link to put on the site (in the footer, the navigation or a partners page).
Read. Takes label (optional).
save_stripe_webhook_secret
Save the signing secret (whsec_…) of the Stripe webhook endpoint that posts to this program, so its events are verified.
Write. Takes secret (optional).
set_portal_branding
Set the partner page’s logo and brand colour. from_website: true reads them from the site: its touch icon as the logo, and the most saturated colour of its theme colour and icon as the brand colour. brand_color (#rrggbb) and logo_url (https) set them directly and win over what the site says. The logo is copied into Affiligato and served from it; the colour is darkened until white button text passes WCAG AA (4.5:1), and the answer reports the contrast and any adjustment.
Write. Takes brand_color (optional), from_website (optional), logo_url (optional).
set_portal_domain
Serve the partner page on the merchant’s own domain, e.g. partners.example.com. Answers the one DNS record to add at their DNS provider (a CNAME, DNS only: not proxied on Cloudflare) and the state: pending_dns until the record is seen, issuing_certificate, then active. verify_portal_domain checks again. Every program also has <slug>.affiligato.com without this. This needs Production: Test mode refuses a custom domain, and the partner page stays on its Affiligato address (partner_link) until then.
Write. Takes hostname (optional).
setup_plan
The steps production needs, in order: who does each (agent, person or both), the tool for it, and whether it is done. next is the first step not done that is not optional. Until the live site or billing is set up, optional offers a rehearsal on a test program once; it is never required.
Read. Takes nothing.
simulate
Optional rehearsal, on a test program only (pass test_program: true, once create_test_program made one): record a click, a signup and a payment through a partner, as the site and billing would, and answer the commission they earn. The rows are marked simulated and never count toward verify_install or go_live.
Write. Takes amount (optional), email (optional).
use_program
Pick which of the person’s programs this connection reaches, by its id from list_programs, when it reaches none yet: every tool then acts on it. A connection picks once; create_program picks the program it makes.
Read. Takes program_id.
verify_install
Where the program is in its setup, the same steps the dashboard shows: the tag, billing, the partner page, then the first visit, signup and payment; the first step not done and what to do. Pass page_url to check a page of the site: finding the tag there (and its consent call when the tag waits) marks the tag done. site_partner_domain, when not null, is a hostname the site links to that points at Affiligato but is not connected to this program (visitors get an error): follow its do.
Read. Takes page_url (optional).
verify_portal_domain
Where the partner page’s custom domain is now: pending_dns (add or fix the CNAME, DNS only), issuing_certificate (Cloudflare saw it and is issuing the certificate, usually minutes), active (live; url is the partner page), or failed.
Read. Takes nothing.
Audit log
list_audit_log
The audit log: every change made to the program, by whom (people and agents) and when, newest first; before (epoch ms) pages back.
Read. Takes before (optional), cursor (optional), filter (optional).
Bulk changes
bulk_update_commissions
Approve or reverse many commissions at once by id (from list_commissions).
Write, asks first. Takes action, commissionIds.
bulk_update_partners
Change many partners at once by id: their status, or the group they are in (groupId, null for none).
Write, asks first. Takes affiliateIds, groupId (optional), status (optional).
Commission rules
create_commission_rule
Add a commission rule: a reward (percent in basis points or flat in minor units, optionally tiered) for payments or signups matching conditions (groups, tags, products, countries, first or recurring payment, minimum amount), with caps and hold days.
Write. Takes conditions, name, reward, capPerCustomer (optional), capPerProduct (optional), productCaps (optional), prorate (optional), groups (optional), holdDays (optional), moveToGroup (optional), trigger (optional).
create_rule_from_template
Add a commission rule from a template (list_rule_templates).
Write. Takes templateId.
delete_commission_rule
Delete a commission rule by id.
Write, asks first. Takes ruleId.
duplicate_commission_rule
Copy a commission rule by id, as a new rule that starts off.
Write. Takes ruleId.
list_commission_rules
The program’s commission rules, in the order they apply, and the overrides.
Read. Takes nothing.
list_rule_templates
Commission rule templates to start from.
Read. Takes cursor (optional), filter (optional).
preview_commission
What a sample payment would pay under the current terms and rules; with affiliateId, on that partner’s own terms.
Read. Takes affiliateId (optional), sample.
set_link_terms
Set or clear (terms null) special commission terms for one partner link.
Write. Takes linkId, terms.
set_partner_terms
Set or clear (terms null) special commission terms for one partner.
Write. Takes affiliateId, terms.
set_second_level
Pay partners a share of what the partners they recruited earn, in basis points (1000 is 10%; 0 turns it off).
Write. Takes bps.
update_commission_rule
Change a commission rule: its reward, conditions, caps, hold, or whether it is on.
Write. Takes active (optional), conditions (optional), name (optional), reward (optional), ruleId, capPerCustomer (optional), capPerProduct (optional), productCaps (optional), prorate (optional), groups (optional), holdDays (optional), moveToGroup (optional), trigger (optional).
Commissions
adjust_commissions
Change unpaid commissions’ amounts: add an amount, scale by a percentage, set an amount, or set to a percentage of the payment they came from. Amounts in minor units; percentages in basis points (3000 is 30%).
Write, asks first. Takes commissionIds, mode, value.
create_boost
Start a boost: extra commission for the chosen partners between startsAt and endsAt (epoch ms). With announce, every partner it covers is emailed.
Write, asks first. Takes affiliateIds, announce, endsAt, kind, name, startsAt, value.
delete_boost
End and delete a boost by id (from list_boosts).
Write, asks first. Takes boostId.
delete_commissions
Delete unpaid commissions by id.
Write, asks first. Takes commissionIds.
grant_commissions
Add one commission to every approved partner a filter selects (a group, a tag, or all). batchId names the grant, so sending it twice adds nothing the second time.
Write, asks first. Takes amount, batchId, groupId (optional), note, tag (optional).
list_boosts
The program’s boosts: a raised commission for some partners for a while.
Read. Takes cursor (optional), filter (optional).
set_commission_status
Move unpaid commissions to pending, approved or rejected, in any direction. A rejected commission counts for nothing until moved back.
Write, asks first. Takes commissionIds, status.
Customers
list_leads
Leads partners submitted that wait for review, oldest first.
Read. Takes cursor (optional), filter (optional).
remove_customer
Take a referred customer out of the program: their referral goes, their unpaid commissions are reversed.
Write, asks first. Takes referralId.
review_lead
Accept a pending lead, which then earns like any referral, or reject it with a note.
Write. Takes referralId, accept, note.
set_customer_suspended
Suspend a referred customer, so their payments credit nobody, or reinstate them.
Write, asks first. Takes referralId, suspended.
Domains
add_portal_domain
Add a custom domain for the partner page (e.g. partners.example.com) and answer the DNS records it needs. connect_domain does this and waits for it to go live. This needs Production: Test mode refuses a custom domain, and the partner page stays on its Affiligato address (partner_link) until then.
Write. Takes hostname.
add_sender_domain
Add a domain to send partner emails from (e.g. example.com) and answer the DNS records it needs. This needs Production: Test mode refuses a custom domain, and partner email waits for Production too.
Write. Takes domain.
change_partner_page_address
Change the program’s own partner-page address, the part before the portal domain (slug: lower-case letters, digits and hyphens, 3 to 40). The old address keeps forwarding and stays the program’s; the test program follows with -test.
Write, asks first. Takes slug.
list_domains
The partner-page domain and the sending domain, each with its records and whether it is live, asking the provider again about any not yet live.
Read. Takes nothing.
remove_domain
Remove the partner-page domain (kind portal) or the sending domain (kind sender).
Write, asks first. Takes kind.
Fraud
clear_fraud_hold
Let a commission held for review approve on its own again.
Write. Takes commissionId.
get_fraud_settings
The program’s fraud rules: banned ad words, paid-ad blocking, signups per IP, self-referrals.
Read. Takes nothing.
list_fraud_flags
Commissions held for fraud review, with why each was flagged.
Read. Takes cursor (optional), filter (optional).
save_fraud_settings
Fraud rules: banned words in partners’ ads, blocking paid ads on the brand, suspending partners whose ads break the rules, signups per IP, and rejecting self-referrals.
Write. Takes adsAutoSuspend, bannedWords, blockPaidAds, ipSignupLimit, rejectSelfReferrals.
Groups
create_group
Make a partner group: its own commission terms, coupon and payout minimum. A private group takes only partners invited into it (invite_partner with groupId); anyone else on its link is refused. Answers its joinUrl on the program’s partner page.
Write. Takes autoApprove (optional), commission, coupon (optional), description (optional), descriptions (optional), name, payoutMinimum (optional), private (optional).
delete_group
Delete a group by id; its partners move to the program’s own terms.
Write, asks first. Takes groupId.
list_groups
The program’s groups: their terms, whether private, how many partners, and each one’s joinUrl.
Read. Takes cursor (optional), filter (optional).
update_group
Change a group’s name, terms, coupon, payout minimum or privacy.
Write. Takes autoApprove (optional), commission, coupon (optional), description (optional), descriptions (optional), name, payoutMinimum (optional), private (optional), groupId.
Imports
import_program
Move the program over from another affiliate platform with the merchant’s API credentials for it: partners (each keeps the referral codes they already shared), their customers and their commissions (paid ones are never paid again). Answers runId; import_status follows it. Running it again updates what the last run made.
Write, asks first. Takes credentials, source, store (optional).
import_status
Where an import stands: queued, running (and its phase), done or failed; what it created, updated and skipped, and every skipped row with why.
Read. Takes runId.
list_import_sources
The platforms a program can be imported from, and the credentials each needs.
Read. Takes cursor (optional), filter (optional).
list_imports
Every import run of this program, newest first.
Read. Takes cursor (optional), filter (optional).
verify_import_credentials
Check credentials for another platform before importing: the account they reach and its stores.
Write. Takes credentials, source.
Integrations
create_api_key
Create a secret API key for the site’s server (signups from the server, API v2): read (default), or write to also change the program through MCP. The whole key is answered only this once: put it straight into the host’s secret store, e.g. wrangler secret put AFFILIGATO_API_KEY or vercel env add AFFILIGATO_API_KEY. revoke_api_key revokes it.
Write. Takes name, scope (optional).
get_integrations
The billing integrations: which are connected (Stripe, Paddle, Chargebee, RevenueCat) and their webhook addresses.
Read. Takes nothing.
get_warehouse_export
The data warehouse export: where it goes and when it last ran.
Read. Takes nothing.
integration_logs
Every provider webhook and API write of the last 30 days, newest first, optionally searched.
Read. Takes search (optional), cursor (optional), filter (optional).
list_api_keys
The program’s API keys: name, access, prefix, and when each was last used.
Read. Takes cursor (optional), filter (optional).
remove_warehouse_export
Stop the data warehouse export.
Write, asks first. Takes nothing.
revoke_api_key
Revoke an API key by id; anything using it stops working at once.
Write, asks first. Takes keyId.
rotate_chargebee_secret
A fresh password for Chargebee’s webhook basic auth, answered once; the old one stops working.
Write, asks first. Takes nothing.
rotate_revenuecat_secret
A new authorization header value for RevenueCat’s webhook, answered once; the old one stops working.
Write, asks first. Takes nothing.
set_paddle_classic_key
Save the Paddle Classic public key that verifies its webhooks.
Write. Takes publicKey.
set_paddle_secret
Save the Paddle Billing webhook secret that verifies its webhooks.
Write. Takes secret.
set_warehouse_export
Export the program’s data to an S3-compatible bucket (url, region and access keys) every day.
Write. Takes accessKeyId, region, secretAccessKey, url.
Links and codes
create_promo_code
Give a partner a promotion code customers type at checkout (with its discount, or an existing coupon id at Stripe, Paddle or Chargebee); sales with it credit the partner.
Write. Takes affiliateId, code, discount (optional), provider (optional), providerId (optional), stripeId (optional).
delete_promo_code
Delete a promotion code by id; sales with it stop crediting its partner.
Write, asks first. Takes promoId.
get_program_coupon
The coupon every partner’s link gives the customers they send, if any.
Read. Takes nothing.
list_links
Every partner’s links: their codes, destinations and clicks.
Read. Takes cursor (optional), filter (optional).
list_promo_codes
Every partner’s promotion codes, their discounts and uses.
Read. Takes cursor (optional), filter (optional).
set_program_coupon
Set or clear the coupon every partner’s link gives the customers they send.
Write. Takes coupon.
Messages and resources
add_resource_link
Share a resource that lives elsewhere (a drive folder, a video, a brand page) with every partner, a group or one partner.
Write. Takes affiliateId (optional), folder (optional), groupId (optional), title, url.
delete_announcement
Delete an announcement by id, from every partner’s notifications.
Write, asks first. Takes announcementId.
delete_automation
Delete an automated email by id.
Write, asks first. Takes automationId.
delete_resource
Delete a shared resource by id.
Write, asks first. Takes resourceId.
list_announcements
The program’s announcements, newest first, with how many partners read each.
Read. Takes cursor (optional), filter (optional).
list_automations
The program’s automated partner emails and the built-in nudges.
Read. Takes cursor (optional), filter (optional).
list_email_campaigns
Email campaigns to partners: drafts, scheduled and sent, with their counts.
Read. Takes cursor (optional), filter (optional).
list_resources
Resources shared with partners: files and links, with who sees each.
Read. Takes cursor (optional), filter (optional).
post_announcement
Post a message to every partner’s notification center.
Write, asks first. Takes body, title.
release_email_campaign
Send a draft or scheduled email campaign now, or schedule a draft (sendAt, epoch ms).
Write, asks first. Takes campaignId, sendAt (optional).
save_automation
Create an automated email to partners (on joining, first referral, first commission, or no clicks for some days), or change one with automationId.
Write. Takes active, automationId (optional), body, delayMinutes, name, noClicksDays, subject, trigger.
send_email_campaign
Email partners in a segment (all, a group, a tag, or a status): now, at sendAt (epoch ms), or kept as a draft with draft true.
Write, asks first. Takes body, draft (optional), segment, sendAt (optional), subject.
set_builtin_emails
Turn the built-in partner emails on or off: the nudge to inactive partners and the weekly summary.
Write. Takes nudgeInactive, weeklySummary.
upload_resource
Upload a file partners can download (contentBase64, with its fileName and contentType), for every partner, a group or one partner.
Write. Takes affiliateId (optional), folder (optional), groupId (optional), contentBase64, contentType, fileName, title.
Partners
add_commission
Add an approved one-off commission to a partner, such as a bonus; amount in minor units, negative to take some back, with the reason the partner sees.
Write, asks first. Takes affiliateId, amount, reason.
get_partner
One partner: profile, status, group, links, codes, referrals, commissions, payouts and totals.
Read. Takes affiliateId.
import_partners_csv
Bring partners over from a CSV (email, name, optionally their old code, company and website): they join approved, in groupId if given, and are emailed only with notify.
Write, asks first. Takes csv, groupId (optional), notify.
invite_partner
Invite a partner by email, approved, optionally into a group (groupId from list_groups, the way into a private group); emails them their link and the partner page.
Write. Takes email, groupId (optional), name.
list_partners
Partners, newest first, by status, group, tag or a search of name and email, with each one’s numbers.
Read. Takes groupId (optional), search (optional), status (optional), tag (optional), cursor (optional), filter (optional).
set_partner_tags
Set a partner’s tags: free labels a commission rule or a campaign can match.
Write. Takes affiliateId, tags.
update_partner
Change a partner: move them to a group (groupId, null for none), set their payout minimum, status, note, or Stripe customer id.
Write, asks first. Takes affiliateId, groupId (optional), note (optional), payoutMinimum (optional), status (optional), stripeCustomerId (optional).
update_partner_profile
Edit a partner’s profile as they would: company, website, landing page, socials.
Write. Takes company (optional), landingPage (optional), socials, website (optional), affiliateId.
Payouts
approve_payout_run
Approve a managed payout run that has no invoice to wait for, so it is paid.
Write, asks first. Takes runId.
create_payout_run
Gather the payouts ready to send into a managed payout run.
Write, asks first. Takes nothing.
delete_payout
Delete an unpaid payout; its commissions are approved again.
Write, asks first. Takes payoutId.
export_payout_file
Pending payouts as a CSV for a payout method (bank, PayPal or Wise) to upload.
Read. Takes method (optional).
generate_all_payouts
Create payouts from approved commissions in the program this connection reaches.
Write, asks first. Takes programIds (optional).
generate_payouts
Create payouts from approved commissions: for a group, a partner, a date range (YYYY-MM-DD), or all; bypassMinimum pays below the minimum.
Write, asks first. Takes affiliateId (optional), bypassMinimum (optional), from (optional), groupId (optional), to (optional).
get_payout_run
One payout run: its payouts, totals and state.
Read. Takes runId.
get_rewards
How partners are rewarded: cash, or credit on their own subscription, and the friend coupon.
Read. Takes nothing.
import_paid_csv
Record payouts made outside Affiligato: each CSV line names a partner and an amount, and their oldest approved commissions are marked paid up to it.
Write, asks first. Takes csv.
list_payout_invoices
Invoices for managed payout runs: what to pay Affiligato before a run is paid.
Read. Takes nothing.
list_payout_runs
The program’s payout runs, newest first.
Read. Takes nothing.
mark_payouts_paid
Mark pending payouts paid: chosen ones by id, one payout method’s, or all.
Write, asks first. Takes method (optional), payoutIds (optional).
mark_payouts_sending
Mark pending payouts as being sent, so they read as processing until marked paid.
Write. Takes method (optional), payoutIds (optional).
remove_commission_from_payout
Pull one commission out of an unpaid payout; it stays approved and waits for the next payout.
Write. Takes commissionId.
remove_from_payout_run
Take a payout out of a draft run before it is confirmed.
Write. Takes payoutId.
set_payout_day
The day of the month payouts are prepared on, or null for by hand.
Write. Takes day.
set_payout_mode
Who pays partners: managed (Affiligato pays them from runs you fund) or manual (you pay and mark them paid).
Write, asks first. Takes mode.
set_payout_term
NET terms for managed payouts: a month’s run is confirmed this many days after it ends.
Write. Takes termDays.
set_rewards
Reward partners in cash or in credit on their own subscription (with a Stripe key for credit), and the coupon their friends get.
Write. Takes friendCoupon, kind, stripeApiKey (optional).
Program
can_create_program
Whether the person who approved this agent can create another program now: refusal is null when create_program will run, else the reason in words (their plan, and what to do in Billing).
Read. Takes nothing.
check_partner_page_address
Whether a partner-page address (slug: lower-case letters, digits and hyphens, 3 to 40) can be had for a new program: refusal is null when it can, else why (Affiligato keeps it, another program uses it, or its shape).
Read. Takes slug.
create_payouts
Create a payout for every partner whose approved commissions reach the payout minimum, and tell them.
Write, asks first. Takes nothing.
create_program
Create a program for the person who approved this agent. Ask the person one at a time, in their own words, offering each default: 1. the website partners send people to (default: the site this codebase serves, proposed by you); 2. the program name partners see (default: the product’s name); 3. the commission (default: 30% of each payment for 12 months: {kind percent, value 3000, recurringMonths 12}); 4. how long a click counts toward a referral (cookie window) (default: 60 days); 5. how long a commission waits before it can be paid, to cover refunds (hold) (default: 30 days); 6. the smallest payout (default: 50.00 in the program’s currency (payoutMinimum 5000; currency usd)). Then call create_program with the answers and autoApprove true. A connection that reaches no program yet reaches this one from then on; one that already reaches a program keeps it. For other terms for some partners of the same program, use create_group.
Write. Takes autoApprove, commission, cookieDays, currency, holdDays, name, payoutMinimum, slug (optional), websiteUrl.
export_payouts_csv
Pending payouts as a CSV, for paying them by hand.
Read. Takes nothing.
get_program_details
The program: its name, terms, cookie window, hold, payout minimum, setup state, partner-page address, the caller’s role, and its test program id if it has one.
Read. Takes nothing.
import_referrals_csv
Bring over customers partners referred before the program moved here: a CSV with a partner (code or email) and the customer’s email or billing id per row.
Write, asks first. Takes csv.
list_all_partners
Every partner with their numbers, as the dashboard’s partner pickers list them.
Read. Takes cursor (optional), filter (optional).
list_commissions
Every commission with its partner, amount (minor units), status and payout; filter by status or affiliateId.
Read. Takes cursor (optional), filter (optional).
list_payouts
Every payout with its partner, amount, status and method; filter by status.
Read. Takes cursor (optional), filter (optional).
list_referrals
Every referred signup and customer, with its partner and when they paid first.
Read. Takes cursor (optional), filter (optional).
mark_payout_paid
Mark one payout paid, when it was paid outside Affiligato.
Write, asks first. Takes payoutId.
program_stats
Program totals: partners, clicks, signups, customers, revenue and commissions by status.
Read. Takes nothing.
set_partner_status
Approve, reject, suspend or set a partner pending, as the dashboard does: the partner is emailed about it.
Write, asks first. Takes affiliateId, status.
suggest_partner_page_address
The partner-page address to offer a new program: its website’s own name (past www, subdomains and the public suffix), else its name, then with -partners, then numbered, so it is free now.
Read. Takes name, website.
tax_export
What each US partner with a W-9 was paid in a calendar year, for 1099-NEC filing (last four TIN digits only).
Read. Takes year.
update_program
Change the program: name, website, commission terms, cookie days, hold days, payout minimum (minor units), auto-approve, or the Stripe webhook secret.
Write, asks first. Takes autoApprove (optional), commission (optional), cookieDays (optional), holdDays (optional), name (optional), payoutMinimum (optional), websiteUrl (optional), stripeWebhookSecret (optional).
Reports
analytics_overview
Clicks, signups, customers, revenue and commission per day between from and to (YYYY-MM-DD), for the overview chart.
Read. Takes from, to.
breakdown_report
Clicks, signups, customers and revenue by country, device, browser, source, link, promotion code, campaign or month, between from and to (YYYY-MM-DD).
Read. Takes by, from, groupId (optional), tag (optional), to, cursor (optional), filter (optional).
customer_journey
One referred customer’s path: the click, the signup, and every payment.
Read. Takes referralId.
fraud_report
Possible fraud: partners referring themselves or their own company, or whose sales come back.
Read. Takes cursor (optional), filter (optional).
get_report_subscription
The person’s own emailed report on this program: weekly or monthly, if any.
Read. Takes cursor (optional), filter (optional).
list_activity
The program’s latest happenings, newest first: joins, signups and commissions.
Read. Takes cursor (optional), filter (optional).
list_customers
Every referred customer, with what they paid and where they stand.
Read. Takes cursor (optional), filter (optional).
live_activity
What happened in the last minutes: clicks, signups and sales as they arrive.
Read. Takes cursor (optional), filter (optional).
partner_report
Every partner’s clicks, customers, revenue and commission between from and to (YYYY-MM-DD).
Read. Takes from, to, cursor (optional), filter (optional).
subscribe_report
Email the person a weekly or monthly report on the program, optionally to Slack too.
Write. Takes cadence, slackUrl (optional).
unsubscribe_report
Stop the person’s emailed report on the program.
Write. Takes nothing.
Settings
get_settings
The program’s settings: branding, join rules, tracking, attribution, visibility, payouts, notifications and analytics.
Read. Takes nothing.
list_program_emails
Every email the program sends partners, with its text and whether it is on.
Read. Takes language (optional), cursor (optional), filter (optional).
publish_terms
Mark the program’s terms changed: every partner accepts them again.
Write, asks first. Takes nothing.
save_branding
The partner page’s brand colour, logo, headline, description and terms link. set_portal_branding can read them from the website.
Write. Takes brandColor, logoUrl, portalDescription, portalHeadline, termsUrl.
save_program_email
Save the program’s own subject and body for one partner email; nulls restore the default.
Write. Takes language (optional), body, kind, subject.
send_test_email
Send one partner email, filled with sample values, to the person who approved the agent.
Write. Takes language (optional), kind.
set_analytics
The Google Analytics measurement id for the partner page, or null for none.
Write. Takes gaMeasurementId.
set_attribution
Who gets the credit (first or last partner) and how many days a lead stays its partner’s, and whether leads are reviewed.
Write. Takes attribution, leadDays, leadReview.
set_conversions
Whether commission is earned on the payment before tax or after.
Write. Takes excludeTax.
set_customer_visibility
How much partners see of the customers they referred: email, email and name, or masked.
Write. Takes customerVisibility.
set_join_rules
Who may join: application questions, blocked countries, business emails only.
Write. Takes blockedCountries, businessEmailOnly, questions.
set_notifications
Which events email the program’s team: new partners, sales, payouts.
Write. Takes notify.
set_payout_settings
Payout settings: hold days, the payout minimum (minor units) and the payout methods partners may choose.
Write. Takes holdDays, payoutMethods, payoutMinimum.
set_program_paused
Pause or resume the program; a paused program records no clicks or commissions and takes no new partners.
Write, asks first. Takes paused.
set_tracking
Tracking options: the referral parameter, partners submitting leads, and counting only commissioned referrals.
Write. Takes allowLeads (optional), commissionedOnly (optional), referralParam (optional).
Team
invite_teammate
Add a teammate by email as admin or member; they are emailed an invitation.
Write. Takes email, role.
list_team
The program’s owner and teammates, with their roles.
Read. Takes cursor (optional), filter (optional).
remove_teammate
Remove a teammate by id (from list_team); they lose access at once.
Write, asks first. Takes memberId.
set_teammate_role
Make a teammate an admin or a member.
Write, asks first. Takes memberId, role.
Test program
create_test_program
Create the program’s test program, a copy for rehearsing with test payments; tools reach it with test_program: true. Optional: setup goes straight to production.
Write. Takes nothing.
reset_test_program
Empty the test program: its partners, clicks and commissions go.
Write, asks first. Takes nothing.
Transactions
export_transactions_csv
Every transaction as a CSV, with its customer, partner and commission.
Read. Takes nothing.
import_transactions_csv
Import past payments from a CSV (id, customer_email or customer_id, amount in major units, currency, paid_at, optional product_id), each credited like a live payment.
Write, asks first. Takes csv.
list_transactions
Payments, newest first: by partner, status (credited, excluded, unattributed), date range (epoch ms) or search.
Read. Takes from (optional), partnerId (optional), search (optional), status (optional), to (optional), cursor (optional), filter (optional).
record_transaction
Record a payment the billing provider never reported (amount in minor units, paidAt YYYY-MM-DD, the customer by email or id); it credits like a live one.
Write, asks first. Takes amount, currency, customerId (optional), email (optional), paidAt, productIds (optional), sourceId (optional).
remove_transaction
Remove a transaction, reversing its commission while still unpaid.
Write, asks first. Takes transactionId.
rerun_transaction
Recompute a payment’s commission under today’s terms and rules, replacing its unpaid commission.
Write. Takes transactionId.
Webhooks
create_webhook
Send events (partner, referral, commission, payout) to a URL; answers the endpoint and its signing secret, once.
Write. Takes events, url.
delete_webhook
Delete a webhook endpoint by id.
Write, asks first. Takes endpointId.
list_webhook_deliveries
The latest webhook deliveries across endpoints, newest first, with their status.
Read. Takes cursor (optional), filter (optional).
list_webhooks
The program’s webhook endpoints and their events.
Read. Takes cursor (optional), filter (optional).
retry_webhook_delivery
Send a failed or stuck webhook delivery again, with a fresh set of tries.
Write. Takes deliveryId.
reveal_webhook_secret
The signing secret of one webhook endpoint, to verify its deliveries; lists never carry it.
Write, asks first. Takes endpointId.
test_webhooks
Send a ping event to every webhook endpoint, to check it receives and verifies.
Write. Takes nothing.
Your Affiligato plan
billing_checkout_link
A Stripe link for the person to start an Affiligato plan (starter, growth or pro), or to move to another one. With no plan it is Stripe Checkout; with a plan it is Stripe’s page confirming the change on the subscription they have, with the prorated amount, so nobody pays for two. Give the link to the person: they pay, never the agent.
Write. Takes plan.
billing_portal_link
A link to the Stripe billing portal for the person’s Affiligato subscription: invoices, card, cancel. Give it to the person.
Write. Takes nothing.
billing_status
The person’s Affiligato plan: which plan, its limits, and this month’s usage against them.
Read. Takes nothing.
claim_badge_starter
Limited time: Starter at $0 while the “Affiliates by Affiligato” badge is in the footer of the program’s site. Put footer_badge’s line in the site’s footer first, then give the person this link: they add a card in Stripe Checkout and agree to the terms there, and nothing is charged. A paying Starter account gets the $0 price on its subscription at once (url is null).
Write. Takes nothing.
confirm_checkout
After the person paid in Stripe Checkout, apply their plan from the checkout session (sessionId, cs_…), so the program switches to Production at once.
Write. Takes sessionId.
refresh_billing
After the person confirmed a plan change on Stripe’s page, read their plan from Stripe, so Billing and the plan limits show the new plan at once.
Write. Takes nothing.