---
title: "Create Custom Affiliate Link"
method: POST
path: "/public/create-custom-affiliate-link"
tags: ["Affiliate marketing"]
---

# Create Custom Affiliate Link

`POST /public/create-custom-affiliate-link`

Create a custom affiliate link for a specific digital product with commission percentage.

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 60 requests in a window of 1m.

## Request body

- object
  - `data` object[], required
    - `data` object, required
      - `userData` object, required — User data for the affiliate
        - `userId` string — The user ID of the affiliate
        - `userEmail` string — The email of the affiliate
      - `fermionDigitalProductId` string, required — The ID of the digital product for which to create the affiliate link
      - `commissionPercentage` number, required — The commission percentage for the affiliate link (1-99%)

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `affiliateLinkSlug` string, required — Slug of the affiliate link created. Visit your website like this to access affiliate link: yourwebsite.com/a/:slug
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.net/fermion/apis/fermion-backend-api.md) · [All operations](https://skmtc.net/fermion/apis/fermion-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fermion/fermion-backend-api/revisions/7ce364c8820b/schema)
