Make a team member a lead or a member
Owners and admins. A lead administers every agent whose managing team this is, from their next request; a member works with those agents and does not administer them. People join a team as member. A person not in the team is 404; a disabled member is 409 MEMBER_DISABLED with nothing written. Writes a set_team_member_role receipt naming the person, unless the role is unchanged (receipt_id null).
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSession__Host-werft_session<token>For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.
team_id*stringThe team's id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuiduser_id*stringThe member's user id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
role*string"lead""member"The team after the change.
application/json- response
team*receipt_id*|nullcurl -X PATCH 'https://example.com/v1/teams/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "role": "lead"}'{ "team": { "id": "019a0000-0000-7000-8000-00000000b0a1", "workspace_id": "9d2c4e61-8a3b-4f70-b1e5-6c0a7d3f2b98", "name": "research admins", "member_count": 2, "created_by": "3e7f1a90-5c2d-4b8e-8f61-2a9d0c4b7e35", "created_at": "2026-10-23T09:00:00Z", "revision": 3 }, "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}