Update tenant membership
PATCH
/tenants/{id}/memberships/{user_email}
const url = 'https://api.muninx.com/tenants/example/memberships/agent%40example.com';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expected-team-ids":["example"],"team-ids":["example"],"agent-type":"human","auto-assign-tickets":true,"organization":"example","role":"admin","status":"active"}'};
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.muninx.com/tenants/example/memberships/agent%40example.com \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expected-team-ids": [ "example" ], "team-ids": [ "example" ], "agent-type": "human", "auto-assign-tickets": true, "organization": "example", "role": "admin", "status": "active" }'Partially updates a membership’s role, customer organization, staff agent type, auto-assignment setting, status, or team IDs. Team IDs apply only to staff. Supplying expected-team-ids enables conflict detection for concurrent team assignment changes.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Tenant organization ID
user_email
required
Request Body required
Section titled “Request Body required ”Membership updates
Media type application/json
object
expected-team-ids
Optional current team IDs for optimistic concurrency; mismatches return 409.
Array<string>
team-ids
Tenant-scoped team IDs for staff memberships.
Array<string>
agent-type
string
auto-assign-tickets
boolean
organization
string
role
string
status
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
team-ids
Tenant-scoped team IDs for staff memberships.
Array<string>
agent-type
string
auto-assign-tickets
boolean
email
string format: email
organization
string
role
string
status
string
team-id
string
tenant-id
string
Example
{}Problem+json
Media type application/json
object
key
additional properties
any
Example generated
{}Problem+json
Media type application/json
object
key
additional properties
any
Example generated
{}Problem+json
Media type application/json
object
key
additional properties
any
Example generated
{}Team assignments changed since expected-team-ids was read
Media type application/json
object
key
additional properties
any
Example generated
{}Problem+json
Media type application/json
object
key
additional properties
any
Example generated
{}Team validation is unavailable
Media type application/json
object
key
additional properties
any
Example generated
{}