//Team Management

Team Management

This page documents the current verified team contract.

For new integrations, prefer the modern /api/organizations/ and /api/teams/ routes rather than older compatibility aliases.

Step 1: List Teams In An Organization

Endpoint: GET /api/organizations/:org_uuid/teams

~~~bash curl -X GET https://api.buttrbase.com/api/organizations/org-uuid-123/teams \ -H "Authorization: Bearer " ~~~

Output: ~~~json { "data": [ { "id": 1, "name": "Frontend Developers", "org_uuid": "org-uuid-123", "team_uuid": "team-uuid-abc", "status": true } ] } ~~~

Step 2: Create A Team

Endpoint: POST /api/teams

Input: ~~~json { "name": "Frontend Developers", "org_uuid": "org-uuid-123" } ~~~

~~~bash curl -X POST https://api.buttrbase.com/api/teams \ -H "Content-Type: application/json" \ -H "Authorization: Bearer " \ -d '{ "name": "Frontend Developers", "org_uuid": "org-uuid-123" }' ~~~

Output: ~~~json { "data": { "id": 1, "name": "Frontend Developers", "org_uuid": "org-uuid-123", "team_uuid": "team-uuid-abc", "status": true } } ~~~

Step 3: Add A User To The Team

Endpoint: POST /api/teams/:team_uuid/members

Input: ~~~json { "user_uuid": "user-uuid-abc" } ~~~

~~~bash curl -X POST https://api.buttrbase.com/api/teams/team-uuid-abc/members \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "user_uuid": "user-uuid-abc" }' ~~~

Output: ~~~json { "data": { "message": "User added to team successfully" } } ~~~

Step 4: List Team Members

Endpoint: GET /api/teams/:team_uuid/members

~~~bash curl -X GET https://api.buttrbase.com/api/teams/team-uuid-abc/members \ -H "Authorization: Bearer " ~~~

Output: ~~~json { "data": [ { "user_uuid": "user-uuid-abc", "username": "testuser", "email": "test@example.com", "role": "Admin" } ] } ~~~

Invite Flow Note

The team membership APIs use team_uuid, but the invite flow still expects the numeric internal team_id.

Typical invite flow:

1. Call GET /api/organizations/:org_uuid/teams 2. Read the numeric id from the team 3. Call POST /api/invitations