Update member role API Reference
PATCH
/tenants/{tenant}/members/{email}
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/members/alice%2540acme.com';const options = { method: 'PATCH', headers: { 'If-Match': '184920', Authorization: '<Authorization>', 'Content-Type': 'application/json' }, body: '{"role":"readonly"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.kupe.cloud/api/v1/tenants/acme/members/alice%2540acme.com \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --header 'If-Match: 184920' \ --data '{ "role": "readonly" }'Change the role of an existing tenant member. Roles control access: admin has full read-write access, readonly can only view resources.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
email
required
string
Member email address (URL-encoded)
Header Parameters
Section titled “ Header Parameters ” If-Match
string
ETag for optimistic locking
Request Body
Section titled “ Request Body ”New role
Media type application/json
object
role
string
Example
readonlyResponses
Section titled “ Responses ”Updated member
Media type application/json
object
email
string
role
string
Example
{ "email": "alice@acme.com", "role": "admin"}Validation error
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Admin access required
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Member not found
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}ETag mismatch
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}