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

workspace_id

Path

string

Yes

Current workspace ID; keep the product identity and headers in the same environment.

team_id

Path

string

Yes

Team ID from the team list or creation response.

name

Body

string or null

No

New name; if supplied, must be nonempty after trimming whitespace.

description

Body

string or null

No

New description; an empty string clears it.

expected_version

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

code

integer

0 on success.

data

object

Corresponding response 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.

Last updated on