Skip to main content

Teams API

Manage team members and permissions for both affiliate agencies and brand teams. Requires Business tier or higher and team:manage scope.

List Team Members

curl https://api.affilync.com/api/teams/{team_id}/members \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"data": {
"members": [
{
"id": "mem_abc123",
"user_id": "usr_xyz789",
"role": "admin",
"status": "active",
"contribution_score": 95.5,
"total_earnings": "12450.00",
"join_date": "2026-01-15T10:00:00Z"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1
}
}
}

Invite Team Member

curl -X POST https://api.affilync.com/api/teams/{team_id}/invitations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"role": "editor",
"message": "Welcome to our team!"
}'

Available roles:

RolePermissionsDescription
ownerAll permissionsFull access, ownership transfer. Automatically assigned to team creator.
adminTeam management, campaigns, links, content, payments, analyticsFull administrative access except ownership transfer
managerCampaign and link creation/editing, member invitations, analyticsCan manage campaigns and invite team members
editorCampaign and link creation/editing, analytics, content creationCan create and edit content and campaigns
analystAnalytics view/export, link/campaign view, payments viewRead-only analytics and reporting access
viewerRead-only to all resourcesView-only access to dashboards and campaigns

Update Member Role

curl -X PATCH https://api.affilync.com/api/teams/{team_id}/members/{member_user_id}/role \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "role": "admin" }'

Remove Team Member

curl -X DELETE https://api.affilync.com/api/teams/{team_id}/members/{member_user_id} \
-H "Authorization: Bearer YOUR_TOKEN"

Get Pending Invitations

curl https://api.affilync.com/api/teams/invitations/pending \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"data": {
"invitations": [
{
"id": "inv_xyz789",
"team_id": "tm_abc123",
"team_name": "My Agency",
"email": "[email protected]",
"role": "editor",
"token": "...",
"expires_at": "2026-04-06T10:00:00Z",
"created_at": "2026-03-30T10:00:00Z"
}
]
}
}

Accept Invitation

curl -X POST https://api.affilync.com/api/teams/invitations/{token}/accept \
-H "Authorization: Bearer YOUR_TOKEN"

Team Performance Metrics

Get team-level performance data.

curl https://api.affilync.com/api/teams/{team_id}/performance \
-H "Authorization: Bearer YOUR_TOKEN"

Response (200):

{
"data": {
"performance": {
"total_clicks": 45200,
"total_conversions": 1890,
"total_revenue": "28450.00",
"avg_conversion_rate": 4.2
}
}
}

Team Collaboration Metrics

Get team collaboration and member engagement data.

curl https://api.affilync.com/api/teams/{team_id}/collaboration \
-H "Authorization: Bearer YOUR_TOKEN"

Member Contribution

Get individual member contribution over a time period.

curl "https://api.affilync.com/api/teams/{team_id}/members/{member_id}/contribution?period=30d" \
-H "Authorization: Bearer YOUR_TOKEN"

Query Parameters:

  • period — Time period: 7d, 30d, 90d, or all (default: 30d)

Subscription Limits

Team features and member limits depend on your subscription plan:

PlanTeam CreationMax Team Members
Free / StarterNot availableN/A
ProAvailable3
BusinessAvailable10
Agency / EnterpriseAvailableUnlimited

Note: Only Business tier and above can create and manage teams.