Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Affiliates
  • Campaigns
    • Get All Campaigns
      GET
    • Get Campaign By ID
      GET
    • Create campaign
      POST
    • Update campaign
      PUT
    • Delete campaign
      DELETE
  • Affiliates
    • List affiliates
      GET
    • Get Affiliate By ID
      GET
    • Create Affiliate
      POST
    • Update Affiliate
      PUT
    • Delete Affiliate
      DELETE
  • Affiliate Links
    • Get Affiliate Link By Affiliate ID
      GET
    • Create Affiliate Link
      POST
    • Delete Affiliate Link
      DELETE
  • Comissions
    • Get All Commissions
      GET
    • Get Commission By ID
      GET
    • Create Commision
      POST
    • Update Commision
      PUT
    • Delete Commision
      DELETE
  • Referred Users
    • Get All Referred Users
      GET
    • Get Referred User by Email
      GET
    • Create Referred User
      POST
    • Update Referred User
      PUT
    • Delete Referred User
      DELETE
Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Affiliates

Create Affiliate

POST
/affiliates
Last modified:2025-12-29 12:45:15
Creates a new affiliate and associates them with a specified workspace and campaign.
This endpoint allows you to configure the affiliate’s basic profile information, payout preferences, and optional metadata at the time of creation.

Request

Header Params

Body Params application/json

Example
{
  "status": 201,
  "message": "Affiliate created successfully",
  "data": {
    "id": "c97169b9-9e05-4e98-b27d-e35fedd8f0e9",
    "email": "jane.doe@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "notes": "Affiliate onboarded via admin panel",
    "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
    "campaignId": "9112d17b-0c77-45ab-a82f-f963f135b63d",
    "payoutEmail": "jane.payout@example.com",
    "payoutMethod": "PAYPAL",
    "details": null,
    "isActive": true,
    "isBanned": false
  }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/affiliates' \
--header 'x-auth-referralstack: rs_live_e6761c15744c9be53be18802278fd3da751d03ce' \
--header 'Content-Type: application/json' \
--data-raw '{
  "status": 201,
  "message": "Affiliate created successfully",
  "data": {
    "id": "c97169b9-9e05-4e98-b27d-e35fedd8f0e9",
    "email": "jane.doe@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "notes": "Affiliate onboarded via admin panel",
    "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
    "campaignId": "9112d17b-0c77-45ab-a82f-f963f135b63d",
    "payoutEmail": "jane.payout@example.com",
    "payoutMethod": "PAYPAL",
    "details": null,
    "isActive": true,
    "isBanned": false
  }
}'

Responses

🟢201Success
application/json
Body

Example
{
    "status": 201,
    "message": "Affiliate created successfully",
    "data": {
        "id": "c97169b9-9e05-4e98-b27d-e35fedd8f0e9",
        "email": "jane.doe@example.com",
        "firstName": "Jane",
        "lastName": "Doe",
        "notes": "Affiliate onboarded via admin panel",
        "workspaceId": "5bb8cbe6-67dc-4b07-853e-7ca5454f8512",
        "campaignId": "9112d17b-0c77-45ab-a82f-f963f135b63d",
        "payoutEmail": "jane.payout@example.com",
        "payoutMethod": "PAYPAL",
        "details": null,
        "isActive": true,
        "isBanned": false,
        "totalOpens": 0,
        "totalClicks": 0,
        "totalSignups": 0,
        "totalEarnings": 0,
        "createdAt": "2025-12-29T07:08:49.605Z",
        "updatedAt": "2025-12-29T07:08:49.605Z"
    }
}
🟠400Bad request (Missing Values)
🟠401Unauthorized (Missing API Key)
Modified at 2025-12-29 12:45:15
Previous
Get Affiliate By ID
Next
Update Affiliate
Built with