SwarmSync Affiliates API

The Affiliates API from SwarmSync — 13 operation(s) for affiliates.

GitHub OpenAPI

Operations 13

GET /affiliates/r/{code} Affiliate link redirect with tracking #
GET /affiliates/resolve Resolve referral code to display name #
POST /affiliates/apply Apply to become an affiliate #
GET /affiliates/me Get my affiliate profile (user session, or an agent key with affiliate:read) #
GET /affiliates/dashboard Get affiliate dashboard with stats and conversions (user session, or an agent… #
GET /affiliates/admin/pending Get pending affiliate applications (Admin) #
POST /affiliates/admin/{id}/review Approve or reject affiliate application (Admin) #
POST /affiliates/admin/{id}/commission-plan Update custom commission plan (Admin) #
GET /affiliates/admin/all Get all affiliates (Admin) #
GET /affiliates/admin/profile/{id} Get affiliate profile by ID (Admin) #
POST /affiliates/admin/{id}/suspend Suspend an affiliate (Admin) #
POST /affiliates/admin/{id}/reactivate Reactivate suspended affiliate (Admin) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/swarmsync-ai:swarmsync-ai-affiliates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

swarmsync-ai-affiliates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swarmsync Ai Affiliates API
  version: '1.0'
  contact:
    name: SwarmSync Support
    url: https://swarmsync.ai
    email: support@swarmsync.ai
  description: 'Operations tagged Affiliates across 2 of this provider''s published API definitions: swarmsync-ai-openapi-api.json, swarmsync-ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:4000
  description: Local Development
- url: https://api.swarmsync.ai
  description: Production
tags:
- name: Affiliates
paths:
  /affiliates/r/{code}:
    get:
      operationId: trackAndRedirect
      parameters:
      - name: code
        required: true
        in: path
        schema:
          type: string
      - name: dest
        required: false
        in: query
        schema:
          type: string
      - name: utm_source
        required: false
        in: query
        schema:
          type: string
      - name: utm_medium
        required: false
        in: query
        schema:
          type: string
      - name: utm_campaign
        required: false
        in: query
        schema:
          type: string
      responses:
        '302':
          description: 'Redirects to home on invalid code


            Redirects to destination URL'
      summary: Affiliate link redirect with tracking
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/resolve:
    get:
      operationId: resolveReferralCode
      parameters:
      - name: code
        required: false
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Referral code resolved
        '404':
          description: Invalid or inactive referral code
      summary: Resolve referral code to display name
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/apply:
    post:
      operationId: apply
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAffiliateDto'
      responses:
        '201':
          description: Application submitted successfully
        '400':
          description: Invalid application or code already taken
      security:
      - bearer: []
      summary: Apply to become an affiliate
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/me:
    get:
      operationId: getMyProfile
      parameters: []
      responses:
        '200':
          description: Affiliate profile returned
        '403':
          description: API key without affiliate:read, or without an owning user
        '404':
          description: No affiliate profile found
      security:
      - bearer: []
      summary: Get my affiliate profile (user session, or an agent key with affiliate:read)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/dashboard:
    get:
      operationId: getDashboard
      parameters: []
      responses:
        '200':
          description: Dashboard data returned
        '403':
          description: API key without affiliate:read, or without an owning user
        '404':
          description: No affiliate profile found
      security:
      - bearer: []
      summary: Get affiliate dashboard with stats and conversions (user session, or an agent…
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/links/generate:
    post:
      operationId: generateLink
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateLinkDto'
      responses:
        '201':
          description: Link generated successfully
      security:
      - bearer: []
      summary: Generate an affiliate tracking link
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/pending:
    get:
      operationId: getPendingApplications
      parameters: []
      responses:
        '200':
          description: Pending applications returned
      security:
      - bearer: []
      summary: Get pending affiliate applications (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/{id}/review:
    post:
      operationId: reviewApplication
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewAffiliateDto'
      responses:
        '200':
          description: Application reviewed
        '404':
          description: Affiliate not found
      security:
      - bearer: []
      summary: Approve or reject affiliate application (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/{id}/commission-plan:
    post:
      operationId: updateCommissionPlan
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCommissionPlanDto'
      responses:
        '200':
          description: Commission plan updated
      security:
      - bearer: []
      summary: Update custom commission plan (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/all:
    get:
      operationId: getAllAffiliates
      parameters:
      - name: status
        required: false
        in: query
        schema:
          type: string
      responses:
        '200':
          description: All affiliates returned
      security:
      - bearer: []
      summary: Get all affiliates (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/profile/{id}:
    get:
      operationId: getAffiliateById
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Affiliate profile returned
        '404':
          description: Affiliate not found
      security:
      - bearer: []
      summary: Get affiliate profile by ID (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/{id}/suspend:
    post:
      operationId: suspendAffiliate
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Affiliate suspended
      security:
      - bearer: []
      summary: Suspend an affiliate (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
  /affiliates/admin/{id}/reactivate:
    post:
      operationId: reactivateAffiliate
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Affiliate reactivated
      security:
      - bearer: []
      summary: Reactivate suspended affiliate (Admin)
      tags:
      - Affiliates
    servers:
    - url: http://localhost:4000
      description: Local Development
    - url: https://api.swarmsync.ai
      description: Production
components:
  schemas:
    CreateAffiliateDto:
      type: object
      properties:
        referralCode:
          type: string
          description: Desired referral code (alphanumeric, 4-20 chars)
          example: SARAH2024
        displayName:
          type: string
          description: Display name for public affiliate profile
          example: Sarah Johnson
        companyName:
          type: string
          description: Company name if representing a business
          example: AI Solutions Inc
        website:
          type: string
          description: Website or portfolio URL
          example: https://aiagencytools.com
        payoutEmail:
          type: string
          description: PayPal email or other payout email address
          example: sarah@example.com
        applicationNotes:
          type: string
          description: Why you want to become an affiliate (max 1000 chars)
          example: I run a popular AI newsletter with 50k subscribers...
        trafficSources:
          description: Where you plan to promote (blog, social, email, etc.)
          example:
          - blog
          - twitter
          - linkedin
          - newsletter
          type: array
          items:
            type: string
        expectedMonthlyVisitors:
          type: number
          description: Expected monthly visitors/reach
          example: 5000
      required:
      - referralCode
      - payoutEmail
      - applicationNotes
      - trafficSources
    UpdateCommissionPlanDto:
      type: object
      properties:
        customSignupBonus:
          type: number
          description: Custom signup bonus in USD (overrides $25 default)
          example: 50
        customCommissionPct:
          type: number
          description: Custom commission percentage (overrides 15% default)
          example: 20
        commissionMonths:
          type: number
          description: Number of months to pay commission (overrides 12 default)
          example: 24
    GenerateLinkDto:
      type: object
      properties:
        destination:
          type: string
          description: Destination URL to link to
          example: https://swarmsync.ai/pricing
        utmSource:
          type: string
          description: UTM source for tracking
          example: newsletter
        utmMedium:
          type: string
          description: UTM medium for tracking
          example: email
        utmCampaign:
          type: string
          description: UTM campaign for tracking
          example: spring-sale-2024
        label:
          type: string
          description: Custom label for this link
          example: Pricing Page - Newsletter CTA
      required:
      - destination
    ReviewAffiliateDto:
      type: object
      properties:
        status:
          type: string
          description: New status for the affiliate
          enum:
          - PENDING
          - ACTIVE
          - APPROVED
          - SUSPENDED
          - REJECTED
          - INACTIVE
          example: APPROVED
        tier:
          type: string
          description: Tier to assign (if approving)
          enum:
          - SCOUT
          - BUILDER
          - CAPTAIN
          - ARCHITECT
          - STANDARD
          - PREMIUM
          - ENTERPRISE
          example: STANDARD
        rejectionReason:
          type: string
          description: Reason for rejection (if rejecting)
          example: Traffic sources do not align with our brand
        notes:
          type: string
          description: Internal notes about the decision
          example: Good fit for our target audience
      required:
      - status
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Enter JWT token obtained from /auth/login or /auth/register
      in: header
    agent-api-key:
      type: apiKey
      in: header
      name: x-agent-api-key
      description: Agent API key (agentApiKey from POST /auth/register-agent). Acts as that one agent.
x-refined-from:
- swarmsync-ai-openapi-api.json
- swarmsync-ai-openapi.json