Documentation / API · Devices / Plans POST Plans/api/v1/account/entitlements/resources/preview
Review active and package-paused resources. Owners may select allocations within existing allowances; only administrators may change grants. Changes require CSRF, the current revision, a matching one-use preview and explicit confirmation. Saved configurations and manual pauses remain intact.
On this page Access and permissions Parameters and headers Request body Responses Retries and asynchronous work Request examples Related guides Review active and package-paused resources. Owners may select allocations within existing allowances; only administrators may change grants. Changes require CSRF, the current revision, a matching one-use preview and explicit confirmation. Saved configurations and manual pauses remain intact.
Browser session: __Host-mb_session cookie.
Required machine permissions (scopes): config:write 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.
Field Location Type and limits Required Meaning workspace_id URL query string; {"format":"uuid"} No Limit the list to an accessible workspace.
Field Type and limits Required Meaning $ PlanAccessEdit Yes — $.revision string Yes — $.selected array<string; {"format":"uuid"}>; {"maxItems":10000} Yes — $.selected[] string; {"format":"uuid"} Yes — $.grants object No — $.preview_id string; {"format":"uuid"} No — $.confirm boolean No —
200 · Successful response. Header Type and limits Meaning Cache-Control string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. Content-Language string; {"enum":["en","de"]} Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. Referrer-Policy JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. Vary string Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. X-Content-Type-Options JSON; {"const":"nosniff"} The browser must use the declared content type. X-Frame-Options JSON; {"const":"DENY"} The response must not be embedded in a frame. X-Request-ID string Server-generated request identifier. Include this when reporting an error; inbound values are not trusted.
application/json
Field Type and limits Required Meaning $ PlanAccessView Yes — $.revision string No — $.entitlements AccountEntitlements No — $.entitlements.account_id string; {"format":"uuid"} Yes — $.entitlements.plan_id string; {"enum":["free","essentials","pro","business","enterprise"]} Yes — $.entitlements.revision integer Yes — $.entitlements.pending boolean Yes — $.entitlements.features object Yes — $.entitlements.grants object No — $.entitlements.usage object Yes — $.resources array<PlanResource> No — $.resources[] PlanResource Yes — $.resources[].id string No — $.resources[].name string No — $.resources[].kind string No — $.resources[].reason string No — $.resources[].selected boolean No — $.resources[].manual_pause boolean No — $.resources[].previous_interval integer; {"minimum":0} No — $.resources[].effective_interval integer; {"minimum":0} No — $.preview_id string; {"format":"uuid"} No —
401 · Request rejected. Inspect the stable problem code. Stable error codes invalid_credential unauthorized authentication_required
Header Type and limits Meaning Cache-Control string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. Content-Language string; {"enum":["en","de"]} Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. Referrer-Policy JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. Vary string Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. X-Content-Type-Options JSON; {"const":"nosniff"} The browser must use the declared content type. X-Frame-Options JSON; {"const":"DENY"} The response must not be embedded in a frame. X-Request-ID string Server-generated request identifier. Include this when reporting an error; inbound values are not trusted.
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 —
json Copy example
{
"code" : "demo" ,
"detail" : "Demo error detail; inspect the documented code." ,
"instance" : "demo" ,
"message" : "Demo error detail; inspect the documented code." ,
"message_key" : "errors.requestFailed" ,
"message_params" : {},
"request_id" : "00000000000000000000000000000000" ,
"status" : 401,
"title" : "Demo error" ,
"type" : "about:blank"
} 403 · Request rejected. Inspect the stable problem code. Stable error codes csrf insufficient_scope invalid_origin owner_required csrf_failed forbidden plan_limit
Header Type and limits Meaning Cache-Control string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. Content-Language string; {"enum":["en","de"]} Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. Referrer-Policy JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. Vary string Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. X-Content-Type-Options JSON; {"const":"nosniff"} The browser must use the declared content type. X-Frame-Options JSON; {"const":"DENY"} The response must not be embedded in a frame. X-Request-ID string Server-generated request identifier. Include this when reporting an error; inbound values are not trusted.
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 —
json Copy example
{
"code" : "demo" ,
"detail" : "Demo error detail; inspect the documented code." ,
"instance" : "demo" ,
"message" : "Demo error detail; inspect the documented code." ,
"message_key" : "errors.requestFailed" ,
"message_params" : {},
"request_id" : "00000000000000000000000000000000" ,
"status" : 403,
"title" : "Demo error" ,
"type" : "about:blank"
} 404 · Request rejected. Inspect the stable problem code. Stable error codes not_found
Header Type and limits Meaning Cache-Control string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. Content-Language string; {"enum":["en","de"]} Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. Referrer-Policy JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. Vary string Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. X-Content-Type-Options JSON; {"const":"nosniff"} The browser must use the declared content type. X-Frame-Options JSON; {"const":"DENY"} The response must not be embedded in a frame. X-Request-ID string Server-generated request identifier. Include this when reporting an error; inbound values are not trusted.
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 —
json Copy example
{
"code" : "demo" ,
"detail" : "Demo error detail; inspect the documented code." ,
"instance" : "demo" ,
"message" : "Demo error detail; inspect the documented code." ,
"message_key" : "errors.requestFailed" ,
"message_params" : {},
"request_id" : "00000000000000000000000000000000" ,
"status" : 404,
"title" : "Demo error" ,
"type" : "about:blank"
} 503 · Request rejected. Inspect the stable problem code. Stable error codes unavailable feature_unavailable
Header Type and limits Meaning Cache-Control string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. Content-Language string; {"enum":["en","de"]} Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. Referrer-Policy JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. Retry-After string; {"pattern":"^[0-9]+$"} Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics. Vary string Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. X-Content-Type-Options JSON; {"const":"nosniff"} The browser must use the declared content type. X-Frame-Options JSON; {"const":"DENY"} The response must not be embedded in a frame. X-Request-ID string Server-generated request identifier. Include this when reporting an error; inbound values are not trusted.
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 —
json Copy example
{
"code" : "demo" ,
"detail" : "Demo error detail; inspect the documented code." ,
"instance" : "demo" ,
"message" : "Demo error detail; inspect the documented code." ,
"message_key" : "errors.requestFailed" ,
"message_params" : {},
"request_id" : "00000000000000000000000000000000" ,
"status" : 503,
"title" : "Demo error" ,
"type" : "about:blank"
} 409 · The request cannot be completed. Inspect the stable problem code. Stable error codes preview_required plan_changed
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 —
422 · The request cannot be completed. Inspect the stable problem code. Stable error codes invalid_plan_access
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 —
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.
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.
shell Copy example
curl --proto "=https" --tlsv1.2 --fail- with -body --max-time 30 --request POST --header @ "$HOME/.config/metribeacon/headers.txt" --header "Content-Type: application/json" --data-binary '{"revision":"CURRENT_REVISION","selected":[],"grants":{}}' "https://metribeacon.com/api/v1/account/entitlements/resources/preview"
python Copy example
import json
from pathlib import Path
from urllib.request import Request, urlopen
headers=json.loads((Path.home()/ ".config/metribeacon/headers.json" ).read_text())
headers[ "Content-Type" ]= "application/json"
data=json.dumps({ 'revision' : 'CURRENT_REVISION' , 'selected' : [], 'grants' : {}}).encode()
request=Request( 'https://metribeacon.com/api/v1/account/entitlements/resources/preview' ,data=data,headers=headers,method= 'POST' )
with urlopen(request,timeout=10) as response:
print(response.status)
javascript Copy example
import {readFile} from "node:fs/promises" ;
import {homedir} from "node:os" ;
import {join} from "node:path" ;
const headers=JSON.parse(await readFile(join(homedir(), ".config/metribeacon/headers.json" ), "utf8" ));
headers[ "Content-Type" ]= "application/json" ;
const response=await fetch( "https://metribeacon.com/api/v1/account/entitlements/resources/preview" ,{method: "POST" ,headers,redirect: "manual" ,signal:AbortSignal.timeout(10000),body:JSON.stringify({ "revision" : "CURRENT_REVISION" , "selected" :[], "grants" :{}})});
console.log(response.status);
await response.body?.cancel();
go Copy example
package main
import ( "encoding/json" ; "fmt" ; "net/http" ; "os" ; "path/filepath" ; "time" ; "strings" )
func main(){
home,err:=os.UserHomeDir(); if err!=nil{panic( "local credentials unavailable" )}
raw,err:=os.ReadFile(filepath.Join(home, ".config/metribeacon/headers.json" )); if err!=nil{panic( "local credentials unavailable" )}
var headers map[string]string; if json.Unmarshal(raw,&headers)!=nil{panic( "invalid local headers" )}
req,err:=http.NewRequest( "POST" , "https://metribeacon.com/api/v1/account/entitlements/resources/preview" ,strings.NewReader(`{ "revision" : "CURRENT_REVISION" , "selected" :[], "grants" :{}}`)); if err!=nil{panic( "request setup failed" )}
for key,value:=range headers{req.Header.Set(key,value)}
req.Header.Set( "Content-Type" , "application/json" )
client:=&http.Client{Timeout:10*time.Second,CheckRedirect: func (*http.Request,[]*http.Request)error{ return http.ErrUseLastResponse}}
response,err:=client.Do(req); if err!=nil{panic( "request failed" )}; 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 PlansReview active and package-paused resources. Owners may select allocations within existing allowances; only administrators may change grants. Changes require CSRF, the current revision, a matching one-use preview and explicit confirmation. Saved configurations and manual pauses remain intact.
PATCH PlansReview active and package-paused resources. Owners may select allocations within existing allowances; only administrators may change grants. Changes require CSRF, the current revision, a matching one-use preview and explicit confirmation. Saved configurations and manual pauses remain intact.
GET PlansRead the resource owner’s effective package, explicit administrator grants and current UTC-month consumption. Workspace membership does not transfer your personal package. Pending changes grant no stale access. plan_required and plan_limit identify the blocked feature and, when applicable, limit and usage.