Skip to content

Update member role API Reference

PATCH
/tenants/{tenant}/members/{email}
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.

tenant
required
string

Tenant name

email
required
string

Member email address (URL-encoded)

If-Match
string

ETag for optimistic locking

New role

Media type application/json
object
role
string
Example
readonly

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"
}