Skip to main content

Teams API

Manage your team and members programmatically.

Endpoints Overview

MethodEndpointDescription
POST/api/teamsCreate a new team
GET/api/teamsGet all teams for current user
GET/api/teams/:idGet team by ID
PUT/api/teams/:idUpdate team settings
DELETE/api/teams/:idDelete team
GET/api/teams/membersList team members
POST/api/teams/members/inviteInvite new member
DELETE/api/teams/members/:idRemove member
PATCH/api/teams/members/:id/roleUpdate member role
GET/api/teams/invitations/myGet my pending invitations
POST/api/teams/invitations/:id/acceptAccept invitation
POST/api/teams/invitations/:id/rejectReject invitation
DELETE/api/teams/members/:id/invitationCancel invitation
GET/api/teams/activityGet team activity
note

All team endpoints require JWT authentication.


Create Team

POST /api/teams

Create a new team with the authenticated user as owner.

Request Body

FieldTypeRequiredDescription
namestringYesTeam name
slugstringNoURL-friendly team identifier

Response

{
"id": "team_abc123",
"name": "Acme Corporation",
"slug": "acme-corp",
"createdAt": "2024-06-01T00:00:00Z"
}

Get User Teams

GET /api/teams

Get all teams where the user is an owner or member, including their personal team.

Response

{
"data": [
{
"id": "team_abc123",
"name": "Acme Corporation",
"slug": "acme-corp",
"isPersonal": false,
"role": "owner",
"memberCount": 5,
"createdAt": "2024-06-01T00:00:00Z"
}
]
}

Example

curl https://api.renderdoc.dev/api/teams \
-H "Authorization: Bearer <jwt_token>"

Get Team by ID

GET /api/teams/:id

Get details about a specific team.

Path Parameters

ParameterTypeDescription
idstringTeam ID

Response

{
"id": "team_abc123",
"name": "Acme Corporation",
"slug": "acme-corp",
"memberCount": 5,
"createdAt": "2024-06-01T00:00:00Z"
}

Update Team

PUT /api/teams/:id

Update team settings. Only team owner can update.

Path Parameters

ParameterTypeDescription
idstringTeam ID

Request Body

FieldTypeRequiredDescription
namestringNoTeam name

Response

Returns the updated team object.

Example

curl -X PUT https://api.renderdoc.dev/api/teams/team_abc123 \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation Updated"
}'

Delete Team

DELETE /api/teams/:id

Soft delete a team. Only team owner can delete.

warning

Personal teams cannot be deleted via API - they are automatically deleted when the user account is deleted.

Path Parameters

ParameterTypeDescription
idstringTeam ID

Response

{
"message": "Team deleted successfully"
}

List Team Members

GET /api/teams/members

Get all members of the current user's team.

Response

{
"data": [
{
"id": "user_abc123",
"email": "[email protected]",
"name": "John Doe",
"role": "owner",
"joinedAt": "2024-06-01T00:00:00Z"
},
{
"id": "user_def456",
"email": "[email protected]",
"name": "Jane Smith",
"role": "admin",
"joinedAt": "2024-07-15T00:00:00Z"
}
]
}

Member Roles

RoleDescription
ownerFull access, can delete team
adminFull access except team deletion
memberCan create and use templates
viewerRead-only access

Example

curl https://api.renderdoc.dev/api/teams/members \
-H "Authorization: Bearer <jwt_token>"

Invite Member

POST /api/teams/members/invite

Send an invitation to join your team.

Request Body

FieldTypeRequiredDescription
emailstringYesEmail address to invite
rolestringNoRole to assign (default: member)

Request Example

{
"email": "[email protected]",
"role": "member"
}

Response

{
"id": "invite_abc123",
"email": "[email protected]",
"role": "member",
"status": "pending",
"expiresAt": "2025-01-22T00:00:00Z"
}

Remove Member

DELETE /api/teams/members/:id

Remove a member from your team. Only team owner can remove members.

Path Parameters

ParameterTypeDescription
idstringMember user ID

Response

{
"message": "Member removed successfully"
}

Update Member Role

PATCH /api/teams/members/:id/role

Change a member's role. Only team owner can update roles.

Path Parameters

ParameterTypeDescription
idstringMember user ID

Request Body

FieldTypeRequiredDescription
rolestringYesNew role: admin, member, or viewer

Response

Returns the updated member object.

Example

curl -X PATCH https://api.renderdoc.dev/api/teams/members/user_def456/role \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"role": "admin"
}'

Get My Invitations

GET /api/teams/invitations/my

Get all pending team invitations for the current user.

Response

{
"data": [
{
"id": "invite_abc123",
"teamId": "team_xyz789",
"teamName": "Acme Corporation",
"role": "member",
"invitedBy": "[email protected]",
"expiresAt": "2025-01-22T00:00:00Z"
}
]
}

Accept Invitation

POST /api/teams/invitations/:id/accept

Accept a pending team invitation.

Path Parameters

ParameterTypeDescription
idstringInvitation ID

Response

{
"message": "Invitation accepted successfully"
}

Reject Invitation

POST /api/teams/invitations/:id/reject

Reject a pending team invitation.

Path Parameters

ParameterTypeDescription
idstringInvitation ID

Response

{
"message": "Invitation rejected successfully"
}

Cancel Invitation

DELETE /api/teams/members/:id/invitation

Cancel a pending invitation. Only team owner can cancel.

Path Parameters

ParameterTypeDescription
idstringInvitation ID

Response

{
"message": "Invitation cancelled successfully"
}

Get Team Activity

GET /api/teams/activity

Get recent activity for the current user's team.

Response

{
"data": [
{
"type": "member_joined",
"user": "Jane Smith",
"timestamp": "2024-07-15T00:00:00Z"
},
{
"type": "template_created",
"template": "Invoice Template",
"user": "John Doe",
"timestamp": "2024-06-15T00:00:00Z"
}
]
}

Error Codes

CodeDescription
ERR_TEAM_001Team not found
ERR_TEAM_002A team with this slug already exists
ERR_TEAM_003You are not the owner of this team
ERR_TEAM_004Personal teams cannot be deleted directly
ERR_TEAM_005Personal team slug cannot be changed
ERR_TEAM_006This team is not a personal team
ERR_TEAM_007User is already a member of this team
ERR_TEAM_008An invitation has already been sent to this user
ERR_TEAM_009Invitation not found
ERR_TEAM_010This invitation has expired
ERR_TEAM_011Team member not found
ERR_TEAM_012You cannot remove yourself from the team

Related: Team Management | Users API