Overview
Team endpoints manage the members of your Contox organization. Team members share access to projects based on their assigned roles and project visibility settings.
List team members
Retrieves all members of your team.
GET /api/team
Response
json
[
{
"id": "member_abc123",
"userId": "user_xyz789",
"name": "Jane Doe",
"email": "jane@example.com",
"role": "owner",
"joinedAt": "2025-01-15T10:30:00Z"
},
{
"id": "member_def456",
"userId": "user_uvw321",
"name": "John Smith",
"email": "john@example.com",
"role": "member",
"joinedAt": "2025-01-18T09:00:00Z"
}
]
Invite team member
Sends an invitation to add a new member to your team.
POST /api/team
Request body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address of the user to invite |
role | string | No | "admin" or "member" (default: "member") |
Example
bash
curl -X POST https://contox.dev/api/team \
-H "Authorization: Bearer contox_sk_yourkey" \
-H "Content-Type: application/json" \
-d '{"email": "newmember@example.com", "role": "member"}'
Response
json
{
"id": "member_ghi789",
"email": "newmember@example.com",
"role": "member",
"status": "invited",
"invitedAt": "2025-01-20T14:00:00Z"
}
Remove team member
Removes a member from your team.
DELETE /api/team/[memberId]
Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
memberId | string | Path | The member ID to remove |
Example
bash
curl -X DELETE https://contox.dev/api/team/member_def456 \
-H "Authorization: Bearer contox_sk_yourkey"
Response
Returns 204 No Content on success.
Roles and permissions
| Role | Description | Permissions |
|---|---|---|
owner | Team creator | Full access to all resources, billing, and team management |
admin | Team administrator | Manage projects, members, and settings |
member | Regular member | Read and write access to assigned projects |
See Team Collaboration Guide for detailed RBAC information.
Notes
- Only owners and admins can invite or remove team members
- The team owner cannot be removed
- Removing a member revokes their access to all team projects immediately
- Invited users receive an email and must accept the invitation
Next steps
- Team Collaboration Guide -- RBAC and collaboration patterns
- Projects -- Manage project-level access
- Dashboard Team -- Manage team in the UI