Update an agent team¶
Change a team’s name or description and validate its profile version.
PATCH https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-teams/{team_id}
Before you call this API¶
Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5; use the corresponding product API URL for a dedicated deployment.
Prepare product identity and object identifiers in the same environment.
Request¶
curl --request PATCH \
"$BASE_URL/workspaces/$WORKSPACE_ID/agent-teams/$TEAM_ID" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data '{"description":"","expected_version":1}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Path |
string |
Yes |
Current workspace ID; keep the product identity and headers in the same environment. |
|
Path |
string |
Yes |
Team ID from the team list or creation response. |
|
Body |
string or null |
No |
New name; if supplied, must be nonempty after trimming whitespace. |
|
Body |
string or null |
No |
New description; an empty string clears it. |
|
Body |
integer |
Yes |
Current team version, a positive integer. |
Supply at least name or description. Omission or null retains the old value; description=”” clears it. A blank name is rejected. Use team version. Concurrent membership changes can also cause conflicts; reread the current object.
Successful response¶
{
"code": 0,
"data": {
"id": "team-example",
"workspace_id": "workspace-example",
"owner_user_id": "user-example",
"name": "资料整理团队",
"status": "active",
"version": 2,
"membership_version": 2,
"created_at": "2026-11-12T01:00:00Z",
"updated_at": "2026-11-12T01:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
object |
HTTP 200. Returns the corresponding object. Confirm writes with the corresponding read action.
Error responses¶
Errors and concurrency handling distinguishes parameter, version, member/session state, and admission failures.