curl --request PATCH \
--url "https://api.nixflex.com/v1/organisation/members/11111111-1111-4111-8111-111111111111" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data-binary @request-154.json
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.organisation.setRole("11111111-1111-4111-8111-111111111111", "admin");
// Keep private responses out of logs and AI conversations.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.organisation.set_role('11111111-1111-4111-8111-111111111111', 'admin')
# Save the documented JSON fields privately as request-154.json first.
nixflex organisation setRole 11111111-1111-4111-8111-111111111111 --body '@request-154.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "update_organisation_member_role",
"arguments": {
"user_id": "11111111-1111-4111-8111-111111111111",
"role": "admin",
"confirm": true
}
}
{
"user_id": "11111111-1111-4111-8111-111111111111",
"state": "active",
"live_disconnect_pending": false
}
Organisation
Change an organisation role
Change a non-Owner Nixflex member to Admin or Member using Owner authority. Review the resulting permissions before saving the role.
PATCH
/
organisation
/
members
/
{id}
curl --request PATCH \
--url "https://api.nixflex.com/v1/organisation/members/11111111-1111-4111-8111-111111111111" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data-binary @request-154.json
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.organisation.setRole("11111111-1111-4111-8111-111111111111", "admin");
// Keep private responses out of logs and AI conversations.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.organisation.set_role('11111111-1111-4111-8111-111111111111', 'admin')
# Save the documented JSON fields privately as request-154.json first.
nixflex organisation setRole 11111111-1111-4111-8111-111111111111 --body '@request-154.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "update_organisation_member_role",
"arguments": {
"user_id": "11111111-1111-4111-8111-111111111111",
"role": "admin",
"confirm": true
}
}
{
"user_id": "11111111-1111-4111-8111-111111111111",
"state": "active",
"live_disconnect_pending": false
}
FIXED · organisation Owner manages keys, transfer and closure. Admin can manage ordinary resources, billing and Activity. Member can read ordinary resources.
NOT OFFERED → do this instead · organisation An Admin cannot manage another Admin or take ownership by editing a role. Use the Owner’s personal session and the ownership transfer workflow.
YOU CAN CHANGE · organisation Invite a colleague with a permitted role. The recipient claims the invitation.
SCOPE · organisation Use invitations to grant access to the same business resources. Review team activity under the relevant organisation.
Read the compact AI rules
Change a non-Owner member to Admin or Member. Only Owner authority may change roles. This is not an ownership transfer.
Send a JSON object.
A 200 response has live_disconnect_pending=false. A 202 response means the membership change committed but live disconnection remains unconfirmed. Neither status promises AI hand-back or ends an ongoing human call. Recheck access and current membership before retrying.
Method: PATCH ·
Success: 200 / 202 ·
Scope: Owning account
The important part
- Check the actor’s role and the target’s current role first.
- Owner protections still apply; a client must not work around a refused role change.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET for server-side organisation API-key authority, or a verified personal dashboard Bearer session. The shared API key has Owner authority for these methods; keep it server-side. A personal session is checked against current membership and MFA. Personal access is Owner only. The service must have organisations enabled; otherwise these routes return 404. Personal invitation acceptance, leaving and ownership transfer are separate dashboard flows and are not API-key methods. Send Content-Type: application/json.
Request fields
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
id (path) | string | Yes | None | UUID identifier. Format: uuid. |
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
role | string | Yes | None | New role; owner is not allowed. Allowed: "admin", "member". |
Response fields
200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.
| Field | Type | Meaning |
|---|---|---|
user_id | string | UUID identifier. Format: uuid. |
state | string | Resulting membership state. Value: "active". |
live_disconnect_pending | boolean | True when the membership change committed but live disconnection is unconfirmed. |
Example request
Examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. KeepNIXFLEX_API_KEY in your private process environment. The cURL example uses Bash. Use approved owned fixtures and keep configuration responses private. Python shows sync usage; AsyncNixflex uses the same method with async with and await. Configure the existing MCP installation for the same account at https://api.nixflex.com. Save the request JSON fields from the example below in request-154.json privately before using cURL or CLI; replace fixture credentials only in that private file. Review the target and payload before this write.
request-154.json
{
"role": "admin"
}
curl --request PATCH \
--url "https://api.nixflex.com/v1/organisation/members/11111111-1111-4111-8111-111111111111" \
--header "Authorization: Bearer $NIXFLEX_API_KEY" \
--header "Content-Type: application/json" \
--data-binary @request-154.json
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.organisation.setRole("11111111-1111-4111-8111-111111111111", "admin");
// Keep private responses out of logs and AI conversations.
import os
from nixflex import Nixflex
with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
result = c.organisation.set_role('11111111-1111-4111-8111-111111111111', 'admin')
# Save the documented JSON fields privately as request-154.json first.
nixflex organisation setRole 11111111-1111-4111-8111-111111111111 --body '@request-154.json' --confirm --json --base-url "https://api.nixflex.com"
{
"name": "update_organisation_member_role",
"arguments": {
"user_id": "11111111-1111-4111-8111-111111111111",
"role": "admin",
"confirm": true
}
}
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"user_id": "11111111-1111-4111-8111-111111111111",
"state": "active",
"live_disconnect_pending": false
}
Errors
Failures return anerror object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 404 | not_found | Organisation routes are not enabled on this service. | Check deployment availability; do not retry unchanged. |
| 503 | organisation_unavailable | The organisation action could not be confirmed. | Refresh the current state before trying again. |
| 403 | permission_denied | The current personal role does not allow this action. | Use an authorised personal session; do not share the organisation key. |
| 403 | membership_revoked | The personal membership has ended. | Sign in again or contact the Owner. |
| 401 | invalid_token | The personal session is invalid or expired. | Sign in with your own login again. |
| 503 | auth_unavailable | The personal session could not be verified. | Retry the read later; reconcile uncertain changes. |
| 400 | invalid_id | The path ID is not a UUID. | Correct the request before retrying. |
| 409 | membership_unavailable | The target is not an active member. | Correct the request before retrying. |
| 409 | last_owner | The Owner cannot be removed or demoted through this route. | Use the personal ownership-transfer flow. |
| 400 | invalid_role | Choose admin or member. | Correct the request before retrying. |
| 400 | invalid_json | The JSON body could not be parsed. | Correct the request before retrying. |
| 413 | payload_too_large | The request body is too large. | Reduce the request body. |
| 401 | unauthorized | The credential is missing or invalid. | Check the full account credential. |
| 429 | rate_limit_exceeded | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |
Retry and idempotency
No idempotency key is accepted. After a timeout or 503, read the current team or organisation state before repeating the action. Invitation creation and resend can send email and consume quota; never replay them blindly.Related endpoints
Authorizations
Body
application/json