Remove Team Member
DELETE /teams/{team_id}/members/{user_id}
DELETE /teams/{team_id}/members/{user_id}Interactive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Path Parameters
Team ID within the organization.
uuidUser ID of the team member.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "$AISIX_CP/teams/$TEAM_ID/members/$USER_ID" \ -H "Authorization: Bearer $AISIX_TOKEN"Removed
{
"deleted": true,
"team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Authenticated request is not permitted.
{
"error": {
"code": "CUSTOM_KEY_DISABLED",
"message": "custom API key values are disabled for this organization"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}The removal would leave the team without a lead.
{
"error": {
"code": "LAST_LEAD",
"message": "team must have at least one lead; promote another member to lead first"
}
}Complete operation details and schema variants
DELETE /teams/{team_id}/members/{user_id}
Remove Team Member
Take a member off the team. The organization membership is
untouched. A team must keep at least one lead, so removing the
last one is refused.
Parameters
team_id(path, string, required): Team ID within the organization.user_id(path, string, required): User ID of the team member.
Responses
-
200: Removed -
deleted(boolean, required): -
team_id(string, required): -
user_id(string, required): -
400: Request body or parameters failed validation. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
401: Missing or invalid bearer. Response fields (application/json): identical toDELETE /teams/{team_id}/members/{user_id}, response 400 above. -
403: Authenticated request is not permitted. Response fields (application/json): identical toDELETE /teams/{team_id}/members/{user_id}, response 400 above. -
404: Resource not found. Response fields (application/json): identical toDELETE /teams/{team_id}/members/{user_id}, response 400 above. -
409: The removal would leave the team without a lead. Response fields (application/json): identical toDELETE /teams/{team_id}/members/{user_id}, response 400 above.
cURL
curl -X DELETE '$AISIX_CP/teams/{team_id}/members/{user_id}' -H 'Authorization: Bearer $AISIX_TOKEN'