PATCH Change workspace assignments together
/api/v1/members
Manage members across workspaces you own or administer. Only the submitted assignments change, atomically; revisions reject stale edits. Owners and admins have full access. Viewers and editors can use all groups or selected groups and separately enabled areas. Selected groups never reveal other monitors, their data or mixed results. New assignments default to Viewer, all groups and all areas in the member dialog. Each invitation link accepts its included workspaces together and requires the confirmed invited email. Changes require a fresh action-bound confirmation; admins may manage only other editors and viewers.
On this page
Access and permissions
Manage members across workspaces you own or administer. Only the submitted assignments change, atomically; revisions reject stale edits. Owners and admins have full access. Viewers and editors can use all groups or selected groups and separately enabled areas. Selected groups never reveal other monitors, their data or mixed results. New assignments default to Viewer, all groups and all areas in the member dialog. Each invitation link accepts its included workspaces together and requires the confirmed invited email. Changes require a fresh action-bound confirmation; admins may manage only other editors and viewers.
Browser session: __Host-mb_session cookie.
When using a browser session for a mutation, send the current CSRF token in X-CSRF-Token with the same-site cookie. OAuth consent uses its documented form field.
Parameters and headers
No path, query or additional request-header parameters.
Request body
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":false} | Yes | — |
| $.account_id | string; {"format":"uuid"} | Yes | — |
| $.assignments | array<MemberAssignment> | Yes | — |
| $.assignments[] | MemberAssignment | Yes | — |
| $.assignments[].areas | array<string; {"enum":["logs","incidents","maintenance","slos","reports","keys","usage"]}> | Yes | — |
| $.assignments[].areas[] | string; {"enum":["logs","incidents","maintenance","slos","reports","keys","usage"]} | Yes | — |
| $.assignments[].group_ids | array<string; {"format":"uuid"}>; {"maxItems":100} | Yes | — |
| $.assignments[].group_ids[] | string; {"format":"uuid"} | Yes | — |
| $.assignments[].group_mode | string; {"enum":["all","selected"]} | Yes | — |
| $.assignments[].revision | integer; {"minimum":0} | Yes | — |
| $.assignments[].role | string; {"enum":["admin","editor","viewer","remove"]} | Yes | — |
| $.assignments[].workspace_id | string; {"format":"uuid"} | Yes | — |
| $.confirmation | ActionConfirmation | Yes | — |
| $.confirmation.code | string; {"pattern":"^[0-9]{6}$"} | Yes | — |
| $.confirmation.id | string; {"format":"uuid"} | Yes | UUID of this resource. Keep the returned identifier for subsequent operations. |
Responses
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object | Yes | — |
| $.expires_at | string; {"format":"date-time"} | No | — |
| $.invitation_url | string; {"format":"uri"} | No | — |
| $.status | string | Yes | — |
| $.workspace_id | string; {"format":"uuid"} | No | — |
| Stable error codes |
|---|
| unauthorized |
| invalid_credential |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| forbidden |
| csrf |
| invalid_origin |
| workspace_scope |
| confirmation_required |
| invalid_confirmation |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| not_found |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| already_invited |
| version_conflict |
| idempotency_conflict |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| invalid_input |
| invalid_token |
| invalid_reference |
| invalid_action |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| member_limit |
| rate_limited |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
| Stable error codes |
|---|
| unavailable |
| feature_unavailable |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
Retries and asynchronous work
This change does not have a general retry guarantee. If the response is unclear, read the affected resource before trying again. Follow Retry-After waiting times and request new sign-in or action codes when they expire.
Request examples
Replace demo IDs, timestamps and placeholders with your own values. For a retry, keep the same IDs, time and content. These examples do not run requests on this page.
Keep login links, codes, cookies and keys private. Do not print them in logs or share them in support requests.
curl --fail-with-body --request PATCH --header @"$HOME/.config/metribeacon/headers.txt" --header 'Content-Type: application/json' --data-binary '{"account_id":"00000000-0000-4000-8000-000000000003","assignments":[{"workspace_id":"00000000-0000-4000-8000-000000000001","role":"viewer","revision":1,"group_mode":"all","group_ids":[],"areas":["logs","incidents","maintenance","slos","reports","keys","usage"]}],"confirmation":{"id":"00000000-0000-4000-8000-000000000002","code":"000000"}}' "https://metribeacon.com/api/v1/members"import json, os, urllib.request
request = urllib.request.Request("https://metribeacon.com/api/v1/members", method="PATCH", headers={"Cookie": os.environ["MB_COOKIE"], "X-CSRF-Token": os.environ["MB_CSRF"], "Content-Type": "application/json"}, data=json.dumps({'account_id': '00000000-0000-4000-8000-000000000003', 'assignments': [{'workspace_id': '00000000-0000-4000-8000-000000000001', 'role': 'viewer', 'revision': 1, 'group_mode': 'all', 'group_ids': [], 'areas': ['logs', 'incidents', 'maintenance', 'slos', 'reports', 'keys', 'usage']}], 'confirmation': {'id': '00000000-0000-4000-8000-000000000002', 'code': '000000'}}).encode())
with urllib.request.urlopen(request, timeout=30) as response:
print(json.load(response))const response = await fetch("https://metribeacon.com/api/v1/members", {method: "PATCH", credentials: "same-origin", headers: {"Content-Type": "application/json", "X-CSRF-Token": csrfToken}, body: JSON.stringify({"account_id":"00000000-0000-4000-8000-000000000003","assignments":[{"workspace_id":"00000000-0000-4000-8000-000000000001","role":"viewer","revision":1,"group_mode":"all","group_ids":[],"areas":["logs","incidents","maintenance","slos","reports","keys","usage"]}],"confirmation":{"id":"00000000-0000-4000-8000-000000000002","code":"000000"}})});
console.log(response.status, await response.json());package main
import ("fmt"; "net/http"; "os"; "time"; "strings")
func main() {
client := &http.Client{Timeout:30*time.Second}
request, err := http.NewRequest("PATCH", "https://metribeacon.com/api/v1/members", strings.NewReader("{\"account_id\":\"00000000-0000-4000-8000-000000000003\",\"assignments\":[{\"areas\":[\"logs\",\"incidents\",\"maintenance\",\"slos\",\"reports\",\"keys\",\"usage\"],\"group_ids\":[],\"group_mode\":\"all\",\"revision\":1,\"role\":\"viewer\",\"workspace_id\":\"00000000-0000-4000-8000-000000000001\"}],\"confirmation\":{\"code\":\"000000\",\"id\":\"00000000-0000-4000-8000-000000000002\"}}"))
if err != nil { panic(err) }
request.Header.Set("Cookie", os.Getenv("MB_COOKIE"))
request.Header.Set("X-CSRF-Token", os.Getenv("MB_CSRF"))
request.Header.Set("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil { panic(err) }; defer response.Body.Close(); fmt.Println(response.StatusCode)
}
Related guides
- HTTP API, OAuth and MCP
Find the user API endpoints, their permissions, fields, examples and response formats.
- GET List manageable members, invitations and changes
Manage members across workspaces you own or administer. Only the submitted assignments change, atomically; revisions reject stale edits. Owners and admins have full access. Viewers and editors can use all groups or selected groups and separately enabled areas. Selected groups never reveal other monitors, their data or mixed results. New assignments default to Viewer, all groups and all areas in the member dialog. Each invitation link accepts its included workspaces together and requires the confirmed invited email. Changes require a fresh action-bound confirmation; admins may manage only other editors and viewers.
- POST Accept a shared invitation link
Manage members across workspaces you own or administer. Only the submitted assignments change, atomically; revisions reject stale edits. Owners and admins have full access. Viewers and editors can use all groups or selected groups and separately enabled areas. Selected groups never reveal other monitors, their data or mixed results. New assignments default to Viewer, all groups and all areas in the member dialog. Each invitation link accepts its included workspaces together and requires the confirmed invited email. Changes require a fresh action-bound confirmation; admins may manage only other editors and viewers.
- POST Invite a member to several workspaces
Manage members across workspaces you own or administer. Only the submitted assignments change, atomically; revisions reject stale edits. Owners and admins have full access. Viewers and editors can use all groups or selected groups and separately enabled areas. Selected groups never reveal other monitors, their data or mixed results. New assignments default to Viewer, all groups and all areas in the member dialog. Each invitation link accepts its included workspaces together and requires the confirmed invited email. Changes require a fresh action-bound confirmation; admins may manage only other editors and viewers.