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:
| Role | Permissions | Description |
|---|---|---|
owner | All permissions | Full access, ownership transfer. Automatically assigned to team creator. |
admin | Team management, campaigns, links, content, payments, analytics | Full administrative access except ownership transfer |
manager | Campaign and link creation/editing, member invitations, analytics | Can manage campaigns and invite team members |
editor | Campaign and link creation/editing, analytics, content creation | Can create and edit content and campaigns |
analyst | Analytics view/export, link/campaign view, payments view | Read-only analytics and reporting access |
viewer | Read-only to all resources | View-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, orall(default:30d)
Subscription Limits
Team features and member limits depend on your subscription plan:
| Plan | Team Creation | Max Team Members |
|---|---|---|
| Free / Starter | Not available | N/A |
| Pro | Available | 3 |
| Business | Available | 10 |
| Agency / Enterprise | Available | Unlimited |
Note: Only Business tier and above can create and manage teams.