Remove a team member¶
Remove an agent member from a team.
DELETE https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-teams/{team_id}/members/{agent_workspace_id}/{agent_id}
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Prepare product identity and object identifiers in the same environment.
Request¶
curl --request DELETE \
"$BASE_URL/workspaces/$WORKSPACE_ID/agent-teams/$TEAM_ID/members/$AGENT_WORKSPACE_ID/$AGENT_ID?expected_membership_version=2" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Path |
string |
Yes |
Current Workspace ID, consistent with the product identity and request headers in the same environment. |
|
Path |
string |
Yes |
Team ID from the team list or creation response. |
|
Path |
string |
Yes |
Definition workspace ID of the member agent. |
|
Path |
string |
Yes |
Member agent ID. |
|
Query |
integer |
Yes |
Current team membership_version, a positive integer. |
Use membership_version, not team version. Retain the member’s defining workspace. Only applicable agents in the current or system workspace are allowed, not arbitrary other tenants. Read the team and members again after writing.
Successful response¶
{
"code": 0,
"data": {
"id": "team-example",
"workspace_id": "workspace-example",
"owner_user_id": "user-example",
"name": "资料整理团队",
"status": "active",
"version": 1,
"membership_version": 3,
"created_at": "2026-11-12T01:00:00Z",
"updated_at": "2026-11-12T01:00:00Z",
"description": "整理与核对资料"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
object |
HTTP 200. Returns the corresponding object; confirm writes with the corresponding read operation.
Error response¶
Errors and concurrency handling distinguishes parameter, version, member/conversation state, and admission failures.