PUT/api/v2/targets/{id}/memberships/{identity_id}
members:manageAPI token
Update an identity's role and scopes for a target. The request body (dto.TargetMembershipUpdateRequest) requires a role. Scopes are optional and, when omitted, the existing scopes are preserved (send an explicit array to replace them, or an empty array to clear).
Parameters
Path2 required of 2
idstringpathrequired
Target ID (UUID)
identity_idstringpathrequired
Identity ID (UUID)
Request body application/json · TargetMembershipUpdateRequest
Membership update request
Required1 of 2 fields
rolestringrequired
Organization role. "member" is a deprecated alias of "user".
adminusermemberviewerOptional1 field
scopesarray of string
If omitted, existing scopes are preserved. To replace scopes send an explicit scopes array (empty to clear).
Responses
200
OK
TargetMembershipResponse · 6 fields
created_atstring
identity_idstring
instance_idstring
Instance membership returns instance_id per OpenAPI spec
rolesarray of string
scopesarray of string
updated_atstring
Common errors: 400 401 403 404 409 413 429 503 504. They mean the same for every operation, see Errors.