# FirstPromoter Docs - [Introduction](https://docs.firstpromoter.com/introduction.md): Turn Affiliate Marketing into Your Competitive Advantage - [How FirstPromoter works](https://docs.firstpromoter.com/how-it-works.md): Set up and manage your own affiliate program, no matter how simple or complex your affiliate scheme is. - [Quickstart](https://docs.firstpromoter.com/quickstart.md): Start building your awesome affiliate or referral program in minutes. - [Integrate Your Website](https://docs.firstpromoter.com/guides/integrate-your-website.md): Connect your website to FirstPromoter so clicks, sign-ups, and sales are tracked and attributed to the right affiliate. - [Tracking with fpr.js](https://docs.firstpromoter.com/guides/tracking-with-fprjs.md): Track clicks and referrals using the fpr.js scripts - [Tracking without fpr.js](https://docs.firstpromoter.com/guides/tracking-without-fprjs.md): Track affiliate leads and sales/payments using API calls - [Proxy Setup (Optional)](https://docs.firstpromoter.com/guides/proxy-setup.md): FirstPromoter Proxy Integration Guide for Bypassing Ad Blockers - [Deep Linking for Mobile Apps (Flutter, iOS, Android, React Native)](https://docs.firstpromoter.com/guides/mobile-deep-linking.md): Track affiliate referrals inside native mobile apps by capturing the referral ID from a deep link and reporting it to FirstPromoter's Tracking API. - [Mobile Attribution Providers (Branch.io, AppsFlyer, Adjust)](https://docs.firstpromoter.com/guides/mobile-attribution-providers.md): Use a deep linking/attribution provider to solve new-install (deferred) referral tracking on iOS and Android, and report the result to FirstPromoter. - [Embed the Dashboard & Auto-Login Promoters](https://docs.firstpromoter.com/advanced/embed-dashboard-login.md): Embed the full promoter dashboard inside your own app as an iframe and automatically sign promoters in — no separate URL, no credentials. - [Log Promoters Out of the Embedded Dashboard](https://docs.firstpromoter.com/advanced/embed-dashboard-logout.md): End a specific promoter's embedded dashboard session from your backend, or let promoters sign out from inside the iframe itself. - [FirstPromoter JavaScript Library (fpr.js)](https://docs.firstpromoter.com/script-docs/fpr-js-docs.md): This is a reference document for all the methods available in FirstPromoter's browser-side JavaScript Library, fpr.js - [Advanced use cases & examples](https://docs.firstpromoter.com/script-docs/advanced.md) - [Concepts & Key Terminologies](https://docs.firstpromoter.com/script-docs/concepts.md): List of concepts and key terminologies used in the documentation - [Stripe](https://docs.firstpromoter.com/integrations/billing/stripe.md): Connecting FirstPromoter with Stripe - [Chargebee](https://docs.firstpromoter.com/integrations/billing/chargebee.md): Connecting FirstPromoter with Chargebee - [Recurly](https://docs.firstpromoter.com/integrations/billing/recurly.md): Connecting FirstPromoter with Recurly - [Paddle](https://docs.firstpromoter.com/integrations/billing/paddle.md): Connecting FirstPromoter with Paddle - [Braintree](https://docs.firstpromoter.com/integrations/billing/braintree.md): Connecting FirstPromoter with Braintree - [API](https://docs.firstpromoter.com/integrations/billing/api.md): Tracking sales with API - [WordPress](https://docs.firstpromoter.com/integrations/tracking/platform/wordpress.md): Add FirstPromoter affiliate tracking to your WordPress website using our dedicated plugin. - [Highlevel](https://docs.firstpromoter.com/integrations/tracking/platform/highlevel.md): Adding FirstPromoter to Highlevel - [ClickFunnels](https://docs.firstpromoter.com/integrations/tracking/platform/clickfunnels.md): Adding FirstPromoter to your ClickFunnels website - [Payment Links](https://docs.firstpromoter.com/integrations/tracking/platform/stripe/payment-links.md): Adding FirstPromoter when using Stripe payment links - [Pricing Table](https://docs.firstpromoter.com/integrations/tracking/platform/stripe/pricing-table.md): Adding FirstPromoter when using Stripe pricing table - [Ghost](https://docs.firstpromoter.com/integrations/tracking/platform/ghost.md): Adding FirstPromoter to your Ghost Website - [Kajabi](https://docs.firstpromoter.com/integrations/tracking/platform/kajabi.md): Adding FirstPromoter to Kajabi - [ThriveCart](https://docs.firstpromoter.com/integrations/tracking/platform/thrivecart.md): Adding FirstPromoter to ThriveCart - [Samcart](https://docs.firstpromoter.com/integrations/tracking/platform/samcart.md): Adding FirstPromoter to Samcart - [Kartra](https://docs.firstpromoter.com/integrations/tracking/platform/kartra.md): Adding FirstPromoter to Kartra - [DropFunnels](https://docs.firstpromoter.com/integrations/tracking/platform/dropfunnels.md): Adding FirstPromoter to your DropFunnels website - [Calendly](https://docs.firstpromoter.com/integrations/tracking/platform/calendly.md): Working with FirstPromoter and Calendly - [Kickpages](https://docs.firstpromoter.com/integrations/tracking/platform/kickpages.md): Adding FirstPromoter to Kickpages - [Thinkific](https://docs.firstpromoter.com/integrations/tracking/platform/thinkific.md): Adding FirstPromoter to Thinkific - [Drop-in Scripts](https://docs.firstpromoter.com/integrations/tracking/platform/chargebee/drop-in-scripts.md): Integrating FirstPromoter with Chargebee Drop-in Scripts - [Hosted Pages](https://docs.firstpromoter.com/integrations/tracking/platform/chargebee/hosted-pages.md): Integrating FirstPromoter with Chargebee Hosted pages - [JavaScript Tracking](https://docs.firstpromoter.com/integrations/tracking/custom/js.md): Use our Javascript option to track clicks and sign-ups - [API Integration](https://docs.firstpromoter.com/integrations/tracking/custom/api.md): Track referrals server-side with the FirstPromoter Tracking API - [Django](https://docs.firstpromoter.com/integrations/tracking/custom/django.md): Adding FirstPromoter to your Django website - [PHP](https://docs.firstpromoter.com/integrations/tracking/custom/php.md): Adding FirstPromoter to your custom PHP website - [Ruby on Rails](https://docs.firstpromoter.com/integrations/tracking/custom/rails.md): Adding FirstPromoter to your Rails website - [Stripe Checkout](https://docs.firstpromoter.com/integrations/tracking/custom/stripe-checkout.md): Tracking using Stripe Checkout - [Paddle Checkout](https://docs.firstpromoter.com/integrations/tracking/custom/paddle-checkout.md): Tracking using Paddle Checkout - [Google Tag Manager](https://docs.firstpromoter.com/integrations/tracking/custom/gtm.md): Setting up your Main tracking script in Google Tag Manager (GTM) - [n8n node](https://docs.firstpromoter.com/automation/n8n-node.md): Integrate FirstPromoter n8n node in your workflow. - [Zapier](https://docs.firstpromoter.com/automation/zapier.md): Integrate FirstPromoter v2 with Zapier to connect your affiliate program to thousands of other apps. - [Make.com](https://docs.firstpromoter.com/automation/make.md): Integrate FirstPromoter v2 with Make (formerly Integromat) to automate your affiliate program alongside thousands of other apps. - [Webhooks v2 Overview](https://docs.firstpromoter.com/webhooks-v2/overview.md): Subscribe to real-time events from your FirstPromoter account with the new webhooks system. - [Event Types](https://docs.firstpromoter.com/webhooks-v2/event-types.md): All event types available for webhooks v2 subscriptions. - [Payload Structure](https://docs.firstpromoter.com/webhooks-v2/payload.md): The JSON payload sent to your webhook endpoint for every event. - [Delivery Tracking & Retries](https://docs.firstpromoter.com/webhooks-v2/deliveries.md): Monitor delivery attempts, understand retry behaviour, and manually retry failed deliveries. - [Non-Monetary Rewards](https://docs.firstpromoter.com/webhooks-v2/non-monetary-rewards.md): How to listen to webhook events and use the API to fulfill non-monetary rewards such as points, credits, and free months. - [MCP Server](https://docs.firstpromoter.com/mcp/overview.md): Connect AI tools like Claude and ChatGPT directly to your FirstPromoter account. - [Available Tools](https://docs.firstpromoter.com/mcp/tools.md): Full reference for every tool exposed by the FirstPromoter MCP server. - [Introduction](https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction.md): This is the public API documentation for FirstPromoter V2. - [Authentication](https://docs.firstpromoter.com/api-reference-v2/api-admin/authentication.md): How to authenticate your API - [List in progress batch processes.](https://docs.firstpromoter.com/api-reference-v2/api-admin/batches/list-inprogress-batch-processes.md): List batch processes that are in progress **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/batch_processes`
- [Show batch process](https://docs.firstpromoter.com/api-reference-v2/api-admin/batches/show-batch-process.md): Show details of a specific batch process **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/batch_processes/{id}`
- [Show progress](https://docs.firstpromoter.com/api-reference-v2/api-admin/batches/show-progress.md): Show progress of batch process. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/batch_processes/progress`
- [Tracking leads and sign-ups](https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/leads-and-signups.md): Capture a lead when they sign-up or fill an optin form. This endpoint is used to track leads and sign-ups. It's not for tracking the actual sales and commissions.

Sign-ups are tracked as leads in FirstPromoter so when a person referred by the promoter/affiliate signs up, a new referral… - [Tracking sales and commissions](https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/sales.md): Assign sales and commissions to your promoters. To track sales and generate commissions correctly, you need to use this API call each time a non-zero amount sale is processed in your system, even if it comes from a recurring charge or one-time charge. To avoid fraudulent sales, we don't use JS… - [Tracking refunds and negative commissions](https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/refund.md): The refund call is similar to the sale call. It works the same way, except that it generates negative commissions. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/track/refund`
- [Tracking cancellations](https://docs.firstpromoter.com/api-reference-v2/api-admin/tracking-api/cancellation.md): This call will mark the customer as cancelled and will decrease the MRR generated by them. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/track/cancellation`
- [Get available referrals](https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals/get-referrals.md): Get available referrals **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/referrals`
- [Get referral](https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals/get-referral.md): Get a specific referral **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/referrals/{id}`
- [Update referral](https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals/update-referral.md): Update a specific referral. The id can be a referral ID, email, uid, or username when used with the find_by parameter in the request body. **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/referrals/{id}`
- [Move referrals to promoter](https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals/move-referrals-to-promoter.md): With this endpoint you can move referrals to another promoter. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `… - [Delete referrals](https://docs.firstpromoter.com/api-reference-v2/api-admin/referrals/delete-referrals.md): With this endpoint you can delete referrals. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `faile… - [Get available promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/get-available-promoters.md): With this endpoint you can list all promoters. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/promoters`
- [Create promoter](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/create-promoter.md): With this endpoint you can create a promoter. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/company/promoters`
- [Get promoter details](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/get-promoter-details.md): With this endpoint you can get the details of a promoter. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/promoters/{id}`
- [Update promoter](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/update-promoter.md): With this endpoint you can update a promoter. **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/promoters/{id}`
- [Assign a parent promoter](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/assign-parent-promoter.md): With this endpoint you can assign a parent promoter to your promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_prog… - [Add promoters to campaign](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/add-promoter-to-campaign.md): With this endpoint you can add promoters to a campaign. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `complet… - [Move promoters to campaign](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/move-promoter-to-campaign.md): With this endpoint you can move promoters from one campaign to another. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_pro… - [Accept promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/accept-promoters.md): With this endpoint you can accept promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `faile… - [Reject promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/reject-promoters.md): With this endpoint you can reject promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `faile… - [Block promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/block-promoters.md): With this endpoint you can block promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed… - [Archive promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/archive-promoters.md): With this endpoint you can archive promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `fail… - [Restore promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoters/restore-unarchived-promoters.md): With this endpoint you can restore promoters. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `fail… - [Get available promoter campaigns](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoter-campaigns/get-available-promoter-campaigns.md): With this endpoint you can list all promoter campaigns. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/promoter_campaigns`
- [Update promoter campaign](https://docs.firstpromoter.com/api-reference-v2/api-admin/promoter-campaigns/update-promoter-campaign.md): With this endpoint you can update a promoter campaign. **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/promoter_campaigns/{id}`
- [Get all commissions](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/get-all-commissions.md): With this endpoint you can list all rewards and commissions assigned to a promotion, promoter, campaign or entire account using the API. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/commissions`
- [Create a commission](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/create-a-commission.md): With this endpoint you can create a commission. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/company/commissions`
- [Update a commission](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/update-a-commission.md): With this endpoint you can update a commission. **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/commissions/{id}`
- [Approve commissions](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/approve-commissions.md): With this endpoint you can approve commissions. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `fa… - [Deny commissions](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/deny-commissions.md): With this endpoint you can deny commissions. If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `faile… - [Mark nonmonetary commissions as fulfilled](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/mark-nonmonetary-commissions-as-fulfilled.md): With this endpoint you can mark nonmonetary commissions as fulfilled. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/company/commissions/mark_fulfilled`
- [Mark nonmonetary commissions as unfulfilled](https://docs.firstpromoter.com/api-reference-v2/api-admin/commissions/mark-nonmonetary-commissions-as-unfulfilled.md): With this endpoint you can mark nonmonetary commissions as unfulfilled. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/company/commissions/mark_unfulfilled`
- [Get promo codes](https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes/get-promo-codes.md): With this endpoint you can list all promo codes. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/promo_codes`
- [Get promo code by id](https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes/get-promo-code-by-id.md): With this endpoint you can get the details of a specific promo code. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/promo_codes/{id}`
- [Create promo code (Stripe Only)](https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes/create-promo-code.md): With this endpoint you can create a new promo code. **HTTP Request**
`POST https://api.firstpromoter.com/api/v2/company/promo_codes`
- [Update promo code by id](https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes/update-promo-code-by-id.md): Update promo code by id. Can not be updated if archived and ext_id present. **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/promo_codes/{id}`
- [Archive promo code by id](https://docs.firstpromoter.com/api-reference-v2/api-admin/promo-codes/archive-promo-code-by-id.md): Archive promo code by id. **HTTP Request**
`DELETE https://api.firstpromoter.com/api/v2/company/promo_codes/{id}`
- [Get all payouts](https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts/get-all-payouts.md): With this endpoint you can list all payouts. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/payouts`
- [Get payout stats](https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts/get-payout-stats.md): This endpoint returns statistics about payouts. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/payouts/stats`
- [Get due payout stats](https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts/get-due-payout-stats.md): This endpoint returns statistics about due payouts. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/payouts/due_stats`
- [Get all payouts grouped by promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/payouts/get-all-payouts-grouped-by-promoters.md): This endpoint returns all payouts but grouped by promoters. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters`
- [Get reports for campaigns](https://docs.firstpromoter.com/api-reference-v2/api-admin/reports/get-reports-for-campaigns.md): With this endpoint you can get the report data grouped by campaigns.**HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/reports/campaigns`
- [Get reports for overview](https://docs.firstpromoter.com/api-reference-v2/api-admin/reports/get-reports-for-overview.md): Get reports for overview **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/reports/overview`
- [Get reports for promoters](https://docs.firstpromoter.com/api-reference-v2/api-admin/reports/get-reports-for-promoters.md): With this endpoint you can get the report data grouped by promoters.**HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/reports/promoters`
- [Get reports for URLs](https://docs.firstpromoter.com/api-reference-v2/api-admin/reports/get-reports-for-urls.md): With this endpoint you can get the report data grouped by URLs.**HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/reports/urls`
- [Get reports for traffic sources](https://docs.firstpromoter.com/api-reference-v2/api-admin/reports/get-reports-for-traffic-sources.md): With this endpoint you can get the report data grouped by traffic sources. **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/reports/traffic_sources`
- [Introduction](https://docs.firstpromoter.com/introduction.md): Turn Affiliate Marketing into Your Competitive Advantage - [How FirstPromoter works](https://docs.firstpromoter.com/how-it-works.md): Set up and manage your own affiliate program, no matter how simple or complex your affiliate scheme is. - [Quickstart](https://docs.firstpromoter.com/quickstart.md): Start building your awesome affiliate or referral program in minutes. - [Integrate Your Website](https://docs.firstpromoter.com/guides/integrate-your-website.md): Connect your website to FirstPromoter so clicks, sign-ups, and sales are tracked and attributed to the right affiliate. - [Tracking with fpr.js](https://docs.firstpromoter.com/guides/tracking-with-fprjs.md): Track clicks and referrals using the fpr.js scripts - [Tracking without fpr.js](https://docs.firstpromoter.com/guides/tracking-without-fprjs.md): Track affiliate leads and sales/payments using API calls - [Proxy Setup (Optional)](https://docs.firstpromoter.com/guides/proxy-setup.md): FirstPromoter Proxy Integration Guide for Bypassing Ad Blockers - [Deep Linking for Mobile Apps (Flutter, iOS, Android, React Native)](https://docs.firstpromoter.com/guides/mobile-deep-linking.md): Track affiliate referrals inside native mobile apps by capturing the referral ID from a deep link and reporting it to FirstPromoter's Tracking API. - [Mobile Attribution Providers (Branch.io, AppsFlyer, Adjust)](https://docs.firstpromoter.com/guides/mobile-attribution-providers.md): Use a deep linking/attribution provider to solve new-install (deferred) referral tracking on iOS and Android, and report the result to FirstPromoter. - [Embed the Dashboard & Auto-Login Promoters](https://docs.firstpromoter.com/advanced/embed-dashboard-login.md): Embed the full promoter dashboard inside your own app as an iframe and automatically sign promoters in — no separate URL, no credentials. - [Log Promoters Out of the Embedded Dashboard](https://docs.firstpromoter.com/advanced/embed-dashboard-logout.md): End a specific promoter's embedded dashboard session from your backend, or let promoters sign out from inside the iframe itself. - [FirstPromoter JavaScript Library (fpr.js)](https://docs.firstpromoter.com/script-docs/fpr-js-docs.md): This is a reference document for all the methods available in FirstPromoter's browser-side JavaScript Library, fpr.js - [Advanced use cases & examples](https://docs.firstpromoter.com/script-docs/advanced.md) - [Concepts & Key Terminologies](https://docs.firstpromoter.com/script-docs/concepts.md): List of concepts and key terminologies used in the documentation - [Stripe](https://docs.firstpromoter.com/integrations/billing/stripe.md): Connecting FirstPromoter with Stripe - [Chargebee](https://docs.firstpromoter.com/integrations/billing/chargebee.md): Connecting FirstPromoter with Chargebee - [Recurly](https://docs.firstpromoter.com/integrations/billing/recurly.md): Connecting FirstPromoter with Recurly - [Paddle](https://docs.firstpromoter.com/integrations/billing/paddle.md): Connecting FirstPromoter with Paddle - [Braintree](https://docs.firstpromoter.com/integrations/billing/braintree.md): Connecting FirstPromoter with Braintree - [API](https://docs.firstpromoter.com/integrations/billing/api.md): Tracking sales with API - [WordPress](https://docs.firstpromoter.com/integrations/tracking/platform/wordpress.md): Add FirstPromoter affiliate tracking to your WordPress website using our dedicated plugin. - [Highlevel](https://docs.firstpromoter.com/integrations/tracking/platform/highlevel.md): Adding FirstPromoter to Highlevel - [ClickFunnels](https://docs.firstpromoter.com/integrations/tracking/platform/clickfunnels.md): Adding FirstPromoter to your ClickFunnels website - [Payment Links](https://docs.firstpromoter.com/integrations/tracking/platform/stripe/payment-links.md): Adding FirstPromoter when using Stripe payment links - [Pricing Table](https://docs.firstpromoter.com/integrations/tracking/platform/stripe/pricing-table.md): Adding FirstPromoter when using Stripe pricing table - [Ghost](https://docs.firstpromoter.com/integrations/tracking/platform/ghost.md): Adding FirstPromoter to your Ghost Website - [Kajabi](https://docs.firstpromoter.com/integrations/tracking/platform/kajabi.md): Adding FirstPromoter to Kajabi - [ThriveCart](https://docs.firstpromoter.com/integrations/tracking/platform/thrivecart.md): Adding FirstPromoter to ThriveCart - [Samcart](https://docs.firstpromoter.com/integrations/tracking/platform/samcart.md): Adding FirstPromoter to Samcart - [Kartra](https://docs.firstpromoter.com/integrations/tracking/platform/kartra.md): Adding FirstPromoter to Kartra - [DropFunnels](https://docs.firstpromoter.com/integrations/tracking/platform/dropfunnels.md): Adding FirstPromoter to your DropFunnels website - [Calendly](https://docs.firstpromoter.com/integrations/tracking/platform/calendly.md): Working with FirstPromoter and Calendly - [Kickpages](https://docs.firstpromoter.com/integrations/tracking/platform/kickpages.md): Adding FirstPromoter to Kickpages - [Thinkific](https://docs.firstpromoter.com/integrations/tracking/platform/thinkific.md): Adding FirstPromoter to Thinkific - [Drop-in Scripts](https://docs.firstpromoter.com/integrations/tracking/platform/chargebee/drop-in-scripts.md): Integrating FirstPromoter with Chargebee Drop-in Scripts - [Hosted Pages](https://docs.firstpromoter.com/integrations/tracking/platform/chargebee/hosted-pages.md): Integrating FirstPromoter with Chargebee Hosted pages - [JavaScript Tracking](https://docs.firstpromoter.com/integrations/tracking/custom/js.md): Use our Javascript option to track clicks and sign-ups - [API Integration](https://docs.firstpromoter.com/integrations/tracking/custom/api.md): Track referrals server-side with the FirstPromoter Tracking API - [Django](https://docs.firstpromoter.com/integrations/tracking/custom/django.md): Adding FirstPromoter to your Django website - [PHP](https://docs.firstpromoter.com/integrations/tracking/custom/php.md): Adding FirstPromoter to your custom PHP website - [Ruby on Rails](https://docs.firstpromoter.com/integrations/tracking/custom/rails.md): Adding FirstPromoter to your Rails website - [Stripe Checkout](https://docs.firstpromoter.com/integrations/tracking/custom/stripe-checkout.md): Tracking using Stripe Checkout - [Paddle Checkout](https://docs.firstpromoter.com/integrations/tracking/custom/paddle-checkout.md): Tracking using Paddle Checkout - [Google Tag Manager](https://docs.firstpromoter.com/integrations/tracking/custom/gtm.md): Setting up your Main tracking script in Google Tag Manager (GTM) - [Overview](https://docs.firstpromoter.com/webhooks/overview.md): Receive real-time events from your FirstPromoter account in your own webhook endpoint. - [Event Types](https://docs.firstpromoter.com/webhooks/event-types.md): All webhook events available in FirstPromoter, with their triggers and data payloads. - [Payload Structure](https://docs.firstpromoter.com/webhooks/payload.md): The JSON payload sent to your webhook endpoint for every v1 event. - [Delivery & Retries](https://docs.firstpromoter.com/webhooks/deliveries.md): How v1 webhook delivery works, retry behaviour, and the fulfilment_pending response protocol. - [Introduction](https://docs.firstpromoter.com/api-reference-v1/introduction.md): This is the public API documentation for FirstPromoter. - [Authentication](https://docs.firstpromoter.com/api-reference-v1/authentication.md): How to authenticate your API - [Tracking leads and sign-ups](https://docs.firstpromoter.com/api-reference-v1/tracking-api/leads-and-signups.md): Capture a lead when they sign-up or fill an optin form. This endpoint is used to track leads and sign-ups. It's not for tracking the actual sales and commissions.

Sign-ups are tracked as leads in FirstPromoter so when a person referred by the promoter/affiliate signs up, a new referral… - [Tracking sales and commissions](https://docs.firstpromoter.com/api-reference-v1/tracking-api/sales.md): Assign sales and commissions to your promoters. To track sales and generate commissions correctly, you need to use this API call each time a non-zero amount sale is processed in your system, even if it comes from a recurring charge or one-time charge. To avoid fraudulent sales, we don't use JS… - [Tracking refunds and negative commissions](https://docs.firstpromoter.com/api-reference-v1/tracking-api/refund.md): The refund call is similar to the sale call. It works the same way, except that it generates negative commissions.**HTTP Request**
`POST https://firstpromoter.com/api/v1/track/refund`
- [Tracking cancellations](https://docs.firstpromoter.com/api-reference-v1/tracking-api/cancellation.md): This call will mark the customer as cancelled and will decrease the MRR generated by him/her.**HTTP Request**
`POST https://firstpromoter.com/api/v1/track/cancellation`
- [Modify existing lead/customer](https://docs.firstpromoter.com/api-reference-v1/leads-api/update.md): Use this to update a lead/customer details from FirstPromoter using the API. You can find the lead either by `id`, `uid` or `email` **HTTP Request**
`PUT https://firstpromoter.com/api/v1/leads/update`
- [List leads/customers](https://docs.firstpromoter.com/api-reference-v1/leads-api/list.md): With this endpoint you can list all the leads and customers assigned to a promotion, promoter, campaign or entire account using the API. Pagination details are held on response headers. Add `--include` option on `curl` request to see the pagination details format and links to next pages.**HTTP Request**
`GET https://firstpromoter.com/api/v1/leads/show` - [Delete lead/customer](https://docs.firstpromoter.com/api-reference-v1/leads-api/delete.md): Remove a lead/customer from FirstPromoter using the API. You can find the referral either by `id` , `uid` or `email`. **HTTP Request**
`DELETE https://firstpromoter.com/api/v1/leads/delete`
- [Create a new promoter](https://docs.firstpromoter.com/api-reference-v1/promoters-api/create.md): Use this endpoint to create new promoters using the API. The response will return the newly added promoter as JSON. Probably the most important value from the response is `auth_token`, which is a unique key auto-generated on creation and can be used to automatically log in your promoters to their da… - [Modify existing promoter](https://docs.firstpromoter.com/api-reference-v1/promoters-api/update.md): You can identify promoters by: `id`, `email`, `cust_id`, `auth_token` or `ref_id`(referral id). You need to pass at least one of these parameters. - [List promoters](https://docs.firstpromoter.com/api-reference-v1/promoters-api/list.md): Use this endpoint to list your promoters using the API. The response will return the promoters as JSON array. Pagination details are held on response headers. Add `--include` option on `curl` request to see the pagination details format and links to next pages.**HTTP Request**
**HTTP Request**
`GET https://firstpromoter.com/api/v1/promoters/show`
- [Move/switch a promoter from one campaign to another](https://docs.firstpromoter.com/api-reference-v1/promoters-api/move-to-campaign.md): This endpoint will change the promoter's campaign to another one, keeping the referral ID the same (the affiliate won’t need to update the referral link). It serves the same function as moving the promoter to another campaign from the UI.More details on how it works can be found [here](https://help.… - [Add a promoter to a campaign](https://docs.firstpromoter.com/api-reference-v1/promoters-api/add-to-campaign.md): Use this endpoint to add a promoter to another campaign. Your promoter can have multiple campaigns to promote, each with its own referral link and referral ID.

You can identify promoters by `id`, `cust_id`, `auth_token`, `promoter_email` or `ref_id` (referral id). **HTTP Request** **HTTP Request**
`DELETE https://firstpromoter.com/api/v1/promoters/delete`
- [Create new reward](https://docs.firstpromoter.com/api-reference-v1/rewards-api/create.md): With this endpoint, you can assign a commission generated by a referral, and it will be recorded to the promoter who referred the lead/customer. You can find the referral by lead_id, email, or UID.

If the reward/commission is not generated by a lead/customer, you can assign it directly to a… - [List rewards and commissions](https://docs.firstpromoter.com/api-reference-v1/rewards-api/list.md): With this endpoint you can list all rewards and commissions assigned to a promotion, promoter, campaign or entire account using the API.Pagination details are held on response headers. Add `--include` option on `curl` request to see the pagination details format and links to next pages.… - [Update a reward or commission](https://docs.firstpromoter.com/api-reference-v1/rewards-api/update.md): You can use this endpoint to change the status of a reward or commission. You can identify the reward or commission by its id or the id of the event that generated the reward.For Stripe, Recurly and Chargebee subscription the `event_id` value is the Invoice id, for Stripe one time charges is t… - [List payouts](https://docs.firstpromoter.com/api-reference-v1/payouts-api/list.md): With this endpoint, you can list all payouts for a promoter, a campaign, or the entire account using the API. **HTTP Request**

`GET https://firstpromoter.com/api/v1/payouts/list`
- [Create a new payout](https://docs.firstpromoter.com/api-reference-v1/payouts-api/create.md): This call allows you to create a payout for a specific promoter for the entire unpaid amount. - [Change payouts status](https://docs.firstpromoter.com/api-reference-v1/payouts-api/update.md): This call allows you to change the status of the payout. For example, you can mark the payout as completed once it has been paid. - [Overview reports](https://docs.firstpromoter.com/api-reference-v1/reports-api/overview.md): With this endpoint you can get an overview across all your campaigns and promoters. Data is updated every `15 minutes`**HTTP Request**
`GET https://firstpromoter.com/api/v1/reports/overview`
- [Campaign reports](https://docs.firstpromoter.com/api-reference-v1/reports-api/campaign.md): With this endpoint you can get the report data grouped by campaigns. Data is updated every `15 minutes`**HTTP Request**
`GET https://firstpromoter.com/api/v1/reports/campaigns`
- [Promoter reports](https://docs.firstpromoter.com/api-reference-v1/reports-api/promoter.md): With this endpoint you can get the report data grouped by promoters. Data is updated once a day, at midnight. This endpoint supports pagination, similar to other endpoints, by passing `page` param.

If you want to iterate through all promoters, you **must start with** `page=1` and cont… ## OpenAPI Specs - [openapi-leads](/api-reference-v1/leads-api/openapi-leads.json) - [openapi-leads](/api-reference-v1/openapi-leads.json) - [openapi-payouts](/api-reference-v1/openapi-payouts.json) - [openapi-promoters](/api-reference-v1/openapi-promoters.json) - [openapi-reports](/api-reference-v1/openapi-reports.json) - [openapi-rewards](/api-reference-v1/openapi-rewards.json) - [openapi-tracking](/api-reference-v1/openapi-tracking.json) - [openapi-payouts](/api-reference-v1/payouts-api/openapi-payouts.json) - [openapi-promoters](/api-reference-v1/promoters-api/openapi-promoters.json) - [openapi-reports](/api-reference-v1/reports-api/openapi-reports.json) - [openapi-rewards](/api-reference-v1/rewards-api/openapi-rewards.json) - [openapi-tracking](/api-reference-v1/tracking-api/openapi-tracking.json) - [openapi-v2-batches](/api-reference-v2/api-admin/batches/openapi-v2-batches.json) - [openapi-v2-commissions](/api-reference-v2/api-admin/commissions/openapi-v2-commissions.json) - [openapi-v2-emails](/api-reference-v2/api-admin/openapi-v2-emails.json) - [openapi-v2-payouts](/api-reference-v2/api-admin/payouts/openapi-v2-payouts.json) - [openapi-v2-promocodes](/api-reference-v2/api-admin/promo-codes/openapi-v2-promocodes.json) - [openapi-v2-promoter-campaigns](/api-reference-v2/api-admin/promoter-campaigns/openapi-v2-promoter-campaigns.json) - [openapi-v2-promoters](/api-reference-v2/api-admin/promoters/openapi-v2-promoters.json) - [openapi-v2-referrals](/api-reference-v2/api-admin/referrals/openapi-v2-referrals.json) - [openapi-v2-reports](/api-reference-v2/api-admin/reports/openapi-v2-reports.json) - [openapi-v2-tracking](/api-reference-v2/api-admin/tracking-api/openapi-v2-tracking.json) - [openapi-v2-webhooks](/api-reference-v2/api-admin/webhooks/openapi-v2-webhooks.json) - [openapi-v2-asset-categories](/api-reference-v2/api-advanced/asset-categories-api/openapi-v2-asset-categories.json) - [openapi-v2-assets](/api-reference-v2/api-advanced/assets/openapi-v2-assets.json) - [openapi-v2-campaigns](/api-reference-v2/api-advanced/campaigns-api/openapi-v2-campaigns.json) - [openapi-v2-contract-documents](/api-reference-v2/api-advanced/contract-documents-api/openapi-v2-contract-documents.json) - [openapi-v2-contracts](/api-reference-v2/api-advanced/contracts-api/openapi-v2-contracts.json) - [openapi-v2-custom-referral-statuses](/api-reference-v2/api-advanced/custom-referral-statuses/openapi-v2-custom-referral-statuses.json) - [openapi-v2-referral-custom-status](/api-reference-v2/api-advanced/custom-referral-statuses/openapi-v2-referral-custom-status.json) - [openapi-v2-dashboard](/api-reference-v2/api-advanced/dashboard-api/openapi-v2-dashboard.json) - [openapi-v2-invoices](/api-reference-v2/api-advanced/invoices/openapi-v2-invoices.json) - [openapi-v2-payent-batches](/api-reference-v2/api-advanced/payments-batches/openapi-v2-payent-batches.json) - [openapi-v2-advanced-payout-methods](/api-reference-v2/api-advanced/payout-methods-api/openapi-v2-advanced-payout-methods.json) - [openapi-v2-advanced-products](/api-reference-v2/api-advanced/products-api/openapi-v2-advanced-products.json) - [openapi-v2-rewards](/api-reference-v2/api-advanced/rewards/openapi-v2-rewards.json) - [openapi-v2-affiliate-assets](/api-reference-v2/api-affiliate/assets/openapi-v2-affiliate-assets.json) - [openapi-v2-affiliate-campaigns](/api-reference-v2/api-affiliate/campaigns/openapi-v2-affiliate-campaigns.json) - [openapi-v2-affiliate-commissions](/api-reference-v2/api-affiliate/commissions/openapi-v2-affiliate-commissions.json) - [openapi-v2-affiliate-contract-documents](/api-reference-v2/api-affiliate/contract-documents/openapi-v2-affiliate-contract-documents.json) - [openapi-v2-affiliate-email-settings](/api-reference-v2/api-affiliate/email-settings/openapi-v2-affiliate-email-settings.json) - [openapi-v2-affiliate-payout-methods](/api-reference-v2/api-affiliate/payout-methods/openapi-v2-affiliate-payout-methods.json) - [openapi-v2-affiliate-payouts](/api-reference-v2/api-affiliate/payouts/openapi-v2-affiliate-payouts.json) - [openapi-v2-affiliate-promo-codes](/api-reference-v2/api-affiliate/promo-codes/openapi-v2-affiliate-promo-codes.json) - [openapi-v2-affiliate-promoter-campaigns](/api-reference-v2/api-affiliate/promoter-campaigns/openapi-v2-affiliate-promoter-campaigns.json) - [openapi-v2-affiliate-promoters](/api-reference-v2/api-affiliate/promoters/openapi-v2-affiliate-promoters.json) - [openapi-v2-affiliate-referral-links](/api-reference-v2/api-affiliate/referral-links/openapi-v2-affiliate-referral-links.json) - [openapi-v2-affiliate-referrals](/api-reference-v2/api-affiliate/referrals/openapi-v2-affiliate-referrals.json) - [openapi-v2-affiliate-reports](/api-reference-v2/api-affiliate/reports/openapi-v2-affiliate-reports.json) ## Optional - [API Reference](https://docs.firstpromoter.com/api-reference-v2/api-admin/introduction) - [Help Center](https://help.firstpromoter.com/en/) - [API Reference](https://docs.firstpromoter.com/api-reference-v1/introduction) - [Help Center](https://help.firstpromoter.com/en/)