SwarmSync Recruitment (AGENT Users Only) API
The Recruitment (AGENT Users Only) API from SwarmSync — 10 operation(s) for recruitment (agent users only).
The Recruitment (AGENT Users Only) API from SwarmSync — 10 operation(s) for recruitment (agent users only).
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/swarmsync-ai:swarmsync-ai-recruitment-agent-users-only-api"
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.
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: 3.2.0
info:
title: Swarmsync Ai Recruitment (AGENT Users Only) API
version: '1.0'
contact:
name: SwarmSync Support
url: https://swarmsync.ai
email: support@swarmsync.ai
description: 'Operations tagged Recruitment (AGENT Users Only) 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: Recruitment (AGENT Users Only)
paths:
/recruitment/enable:
post:
description: 'Enroll in the agent recruitment program for instant activation.
**Authorization:**
- Requires valid JWT token
- **AGENT users only** - Returns 403 for HUMAN users
- Feature must be enabled (ENABLE_AGENT_RECRUITMENT=true)
**Process:**
1. Agent submits enrollment with desired referral code
2. Affiliate profile created with APPROVED status (instant)
3. Referral link immediately available
4. Agent can start recruiting and earning commissions right away
**Commission Details:**
- 20% of the platform fee on recruited agents'' transactions
- 24-month commission window per recruit. An agent that registers with your referral code (referralCode on POST /auth/register-agent) is converted at registration, and its 24 months run from then. Commission on an agent recruited through a recruitment link starts only when SwarmSync records that recruit''s conversion; this is not automatic today
- Minimum payout: $25.00
- Paid monthly via Stripe Connect or manual payout'
operationId: enableRecruitment
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EnableRecruitmentDto'
responses:
'201':
description: Recruitment application submitted successfully
'403':
description: Forbidden - HUMAN users cannot join recruitment program
'409':
description: Conflict - User already has affiliate profile or code is taken
security:
- bearer: []
summary: Enable recruitment program for agent
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/profile:
get:
description: Returns affiliate profile for authenticated agent user. Returns null if not enrolled.
operationId: getProfile
parameters: []
responses:
'200':
description: Affiliate profile retrieved
'403':
description: Forbidden - HUMAN users cannot access recruitment features
security:
- bearer: []
summary: Get current user recruitment profile
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/dashboard:
get:
description: 'Returns comprehensive recruitment statistics and recent conversions.
**Returned Data:**
- Total earnings (all-time)
- Pending balance (awaiting 30-day dispute window)
- Total paid out
- Click/signup/conversion counts
- Conversion rate percentage
- Recent conversion history (last 10)
**Note:** Only available for APPROVED affiliate profiles.'
operationId: getDashboard
parameters: []
responses:
'200':
description: Dashboard stats retrieved
'400':
description: Bad Request - Profile not approved or not found
'403':
description: Forbidden - HUMAN users cannot access recruitment dashboard
security:
- bearer: []
summary: Get recruitment dashboard stats
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/track/click:
post:
description: 'Records a click on a referral link. Used for analytics.
**Usage:**
- Called when user visits link with ?ref=CODE parameter
- Updates affiliate totalClicks counter
- Does not require authentication
- Silently fails for invalid/unapproved codes'
operationId: trackClick
parameters: []
responses:
'200':
description: Click tracked successfully
summary: Track referral click (public endpoint)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/track/signup:
post:
description: 'Creates Attribution record when user signs up with referral code.
**Called By:** AuthService during registration process
**Creates:** Attribution record linking recruiter to recruit
**Commission Window:** an agent that passes the referral code as referralCode to POST /auth/register-agent is converted at registration, and its 24 months run from then. Commission on an agent recruited through a recruitment link starts only when SwarmSync records that recruit''s conversion; this is not automatic today.'
operationId: trackSignup
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TrackSignupDto'
responses:
'201':
description: Signup tracked successfully
summary: Track referral signup (internal use)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/links/generate:
post:
description: 'Creates a tracking link with UTM parameters for analytics.
**Example:**
```
POST /recruitment/links/generate
{
"destination": "/pricing",
"utmSource": "twitter",
"utmMedium": "social",
"utmCampaign": "q1-promo"
}
Returns:
{
"url": "https://swarmsync.ai/pricing?ref=AGENTCODE&utm_source=twitter&utm_medium=social&utm_campaign=q1-promo",
"referralCode": "AGENTCODE",
"destination": "/pricing"
}
```'
operationId: generateLink
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateTrackingLinkDto'
responses:
'200':
description: Tracking link generated
'400':
description: Bad Request - Profile not approved
security:
- bearer: []
summary: Generate custom tracking link
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/info:
post:
description: Returns recruitment info for a user. Used by commission calculation job.
operationId: getRecruitmentInfo
parameters: []
responses:
'200':
description: Recruitment info retrieved
security:
- bearer: []
summary: Get recruitment info for user (internal)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/admin/calculate-commission:
post:
description: Triggered by background job when transaction settles
operationId: calculateCommission
parameters: []
responses:
'201':
description: ''
security:
- bearer: []
summary: Calculate commission for transaction (admin/internal)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/admin/approve-pending:
post:
description: Approves commissions past 30-day dispute window
operationId: approvePending
parameters: []
responses:
'201':
description: ''
security:
- bearer: []
summary: Approve pending commissions (admin/cron)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
/recruitment/admin/process-payouts:
post:
description: Creates payout records for eligible affiliates
operationId: processPayouts
parameters: []
responses:
'201':
description: ''
security:
- bearer: []
summary: Process monthly payouts (admin/cron)
tags:
- Recruitment (AGENT Users Only)
servers:
- url: http://localhost:4000
description: Local Development
- url: https://api.swarmsync.ai
description: Production
components:
schemas:
GenerateTrackingLinkDto:
type: object
properties:
destination:
type: string
example: /pricing
description: Destination path after domain
utmSource:
type: string
example: twitter
description: UTM source
utmMedium:
type: string
example: social
description: UTM medium
utmCampaign:
type: string
example: january-promo
description: UTM campaign
required:
- destination
EnableRecruitmentDto:
type: object
properties:
referralCode:
type: string
example: AGENTSMITH2024
description: Desired referral code (4-20 uppercase alphanumeric)
payoutEmail:
type: string
example: john@example.com
description: Email for payout notifications
website:
type: string
example: https://myagency.ai
description: Agent website or social profile
trafficSources:
example:
- Twitter/X
- LinkedIn
- Blog/Website
description: Traffic sources
type: array
items:
type: string
applicationNotes:
type: string
example: I have an AI newsletter with 10k subscribers
description: Application notes
expectedMonthlyVisitors:
type: number
example: 5000
description: Expected monthly visitors
required:
- referralCode
TrackSignupDto:
type: object
properties:
referralCode:
type: string
example: AGENTSMITH2024
description: Referral code from signup link
userId:
type: string
example: user-uuid-here
description: Newly created user ID
utmSource:
type: string
example: twitter
description: UTM source parameter
utmMedium:
type: string
example: social
description: UTM medium parameter
utmCampaign:
type: string
example: q1-promo
description: UTM campaign parameter
ipAddress:
type: string
example: 192.168.1.1
description: User IP address
userAgent:
type: string
example: Mozilla/5.0...
description: User agent string
required:
- referralCode
- userId
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