Members
Endpoint to list team members.
Args: team_id: ID of the team for which to list the members. user: The authenticated user. rbac: RBAC component. db: The DB session.
Returns: List of team members.
Successful Response
Team assignment model.
Validation Error
GET /teams/{team_id}/members HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"user": {
"password": "text",
"password_expired": true,
"name": "text",
"avatar_url": "text",
"company": "text",
"job_title": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"username": "text",
"email": "text",
"oauth_provider": "text",
"oauth_id": "text",
"is_active": true,
"is_superuser": false,
"is_service_account": false,
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"password_changed_at": "2026-01-01T00:00:00.000Z",
"is_onboarded": false
},
"invitation": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"inviting_user_id": "123e4567-e89b-12d3-a456-426614174000",
"email": "name@gmail.com",
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"expiration_date": "2026-01-01T00:00:00.000Z",
"state": "pending",
"auto_accept": false
}
}
]Endpoint to add a team member.
Args: team_id: ID of the team to which to add a member. user_id: ID of the user to add to the team. invitation_id: ID of the invitation to add to the team. user: The authenticated user. rbac: RBAC component. db: The DB session. organization_manager: Organization manager.
Raises: ValueError: If both or None of user_id and invitation_id are specified. IllegalOperationError: If the user/invitation is not part of the teams organization.
Successful Response
Validation Error
POST /teams/{team_id}/members HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Endpoint to remove a member from a team.
Args: team_id: ID of the team from which to remove the user. user_id: ID of the user to remove from the team. invitation_id: ID of the invitation to remove from the team. user: The authenticated user. rbac: RBAC component. db: The DB session.
Raises: ValueError: If both or None of user_id and invitation_id are specified.
Successful Response
Validation Error
DELETE /teams/{team_id}/members HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?