Add member API Reference
POST
/tenants/{tenant}/members
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/members';const options = { method: 'POST', headers: { 'If-Match': '184920', Authorization: '<Authorization>', 'Content-Type': 'application/json' }, body: '{"email":"alice@acme.com","role":"admin"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.kupe.cloud/api/v1/tenants/acme/members \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --header 'If-Match: 184920' \ --data '{ "email": "alice@acme.com", "role": "admin" }'Add a new member to the tenant. The email address must be unique within the tenant. The user will be able to authenticate via OIDC and access tenant resources based on their assigned role.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
Header Parameters
Section titled “ Header Parameters ” If-Match
string
ETag for optimistic locking
Request Body
Section titled “ Request Body ”Member to add
Media type application/json
object
email
Email address of the member to add
string
Example
alice@acme.com role
Role: admin (read-write) or readonly (read-only)
string
Example
adminResponses
Section titled “ Responses ”Member added
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 already exists
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"}