MetriBeacon
Menu

POST Send points, states, events or a heartbeat with an explicitly authorized machine credential. Uses the existing telemetry validation, quotas, deduplication and alarm pipeline. A concrete monitor is required. Run start and completion use the existing events contract. The runtime write gate must be enabled; ingest endpoints still accept only device keys.

/api/v1/automation/telemetry/{kind}

Send points, states, events or a heartbeat with an explicitly authorized machine credential. Uses the existing telemetry validation, quotas, deduplication and alarm pipeline. A concrete monitor is required. Run start and completion use the existing events contract. The runtime write gate must be enabled; ingest endpoints still accept only device keys.

On this page

Access and permissions

Send points, states, events or a heartbeat with an explicitly authorized machine credential. Uses the existing telemetry validation, quotas, deduplication and alarm pipeline. A concrete monitor is required. Run start and completion use the existing events contract. The runtime write gate must be enabled; ingest endpoints still accept only device keys.

Machine management credentials in Authorization: Bearer. Check the permissions (scopes) required by the operation.

Parameters and headers

FieldLocationType and limitsRequiredMeaning
kindPathstring; {"enum":["points","states","events","heartbeat"]}YesTelemetry kind; heartbeat has no body.
device_idURL querystring; {"format":"uuid"}NoConcrete monitor UUID, required for heartbeat; batches may supply device_id in JSON.

Request body

FieldType and limitsRequiredMeaning
$Batch | StateBatch | EventBatchYes—
$ (oneOf 1)BatchNo—
$ (oneOf 1).batch_idstring; {"format":"uuid"}YesClient-generated UUID identifying this submission. Reuse measurement IDs and the exact payload on retries.
$ (oneOf 1).device_idstring; {"format":"uuid"}NoOptional monitor scope; if provided, it must belong to the write key.
$ (oneOf 1).pointsarray<Point>; {"maxItems":1000,"minItems":1}Yes—
$ (oneOf 1).points[]PointYes—
$ (oneOf 1).points[].idstring; {"format":"uuid"}YesUUID of this resource. Keep the returned identifier for subsequent operations.
$ (oneOf 1).points[].measured_atstring; {"format":"date-time"}YesObservation timestamp supplied by the device in UTC; follow the permitted past and future window.
$ (oneOf 1).points[].series_idstring; {"format":"uuid"}YesUUID of the measurement series belonging to the authorized device.
$ (oneOf 1).points[].valuenumber; {"format":"double"}Yes—
$ (oneOf 2)StateBatchNo—
$ (oneOf 2).batch_idstring; {"format":"uuid"}YesClient-generated UUID identifying this submission. Reuse measurement IDs and the exact payload on retries.
$ (oneOf 2).device_idstring; {"format":"uuid"}NoTarget device UUID. Required for shared keys, implicit for one selected device. Header and body targets must match.
$ (oneOf 2).pointsarray<StatePoint>; {"maxItems":1000,"minItems":1}Yes—
$ (oneOf 2).points[]StatePointYes—
$ (oneOf 2).points[].idstring; {"format":"uuid"}YesUUID of this resource. Keep the returned identifier for subsequent operations.
$ (oneOf 2).points[].measured_atstring; {"format":"date-time"}YesObservation timestamp supplied by the device in UTC; follow the permitted past and future window.
$ (oneOf 2).points[].series_idstring; {"format":"uuid"}YesUUID of the measurement series belonging to the authorized device.
$ (oneOf 2).points[].valueboolean | string; {"maxLength":128}Yes—
$ (oneOf 2).points[].value (oneOf 1)booleanNo—
$ (oneOf 2).points[].value (oneOf 2)string; {"maxLength":128}No—
$ (oneOf 3)EventBatchNo—
$ (oneOf 3).batch_idstring; {"format":"uuid"}YesClient-generated UUID identifying this submission. Reuse measurement IDs and the exact payload on retries.
$ (oneOf 3).device_idstring; {"format":"uuid"}NoTarget device UUID. Required for shared keys, implicit for one selected device. Header and body targets must match.
$ (oneOf 3).eventsarray<TextEvent>; {"maxItems":1000,"minItems":1}Yes—
$ (oneOf 3).events[]TextEventYes—
$ (oneOf 3).events[].idstring; {"format":"uuid"}YesUUID of this resource. Keep the returned identifier for subsequent operations.
$ (oneOf 3).events[].labelsobjectNoCollector events use at most ten labels: source, type, series_id, component_id, parameter_key, change_kind, old_status, new_status, and optional JSON-encoded old_value / new_value for Boolean or Enum states. change_kind is collection_status, state_value or counter_reset. Missing values were not transmitted; collection recovery does not confirm service health. Existing event size limits apply.
$ (oneOf 3).events[].measured_atstring; {"format":"date-time"}YesObservation timestamp supplied by the device in UTC; follow the permitted past and future window.
$ (oneOf 3).events[].messagestring; {"maxLength":2048}Yes—
$ (oneOf 3).events[].runRunEventNo—
$ (oneOf 3).events[].run.duration_msinteger; {"format":"int64","maximum":604800000,"minimum":0}NoOptional client-reported duration on completion
$ (oneOf 3).events[].run.exit_codeinteger; {"maximum":4294967295,"minimum":-2147483648}NoNative Unix or Windows process exit status. Unix signal exits are represented as 128 plus signal; Windows statuses retain their native value.
$ (oneOf 3).events[].run.idstring; {"format":"uuid"}YesUnique run ID within the account
$ (oneOf 3).events[].run.scheduled_forstring; {"format":"date-time"}NoOnly on start; exact scheduled UTC timestamp for overlapping tolerance windows
$ (oneOf 3).events[].run.statusstring; {"enum":["started","succeeded","failed","aborted"]}Yes—
$ (oneOf 3).events[].severitystring; {"enum":["info","warning","critical"]}YesSeverity value from the listed vocabulary.

Responses

HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/json

FieldType and limitsRequiredMeaning
$object; {"additionalProperties":true}Yes—
Stable error codes
invalid_credential
unauthorized
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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"
}
Stable error codes
csrf
insufficient_scope
invalid_origin
machine_required
device_scope
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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"
}
Stable error codes
feature_unavailable
unavailable
not_found
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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"
}
Stable error codes
invalid_mcp_token_request
invalid_json
device_scope
device_required
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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": 422,
  "title": "Demo error",
  "type": "about:blank"
}
Stable error codes
mcp_token_limit
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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": 429,
  "title": "Demo error",
  "type": "about:blank"
}
Stable error codes
feature_unavailable
unavailable
HeaderType and limitsMeaning
Cache-Controlstring; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"}Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation.
Content-Languagestring; {"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-PolicyJSON; {"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-Afterstring; {"pattern":"^[0-9]+$"}Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics.
VarystringResponses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie.
X-Content-Type-OptionsJSON; {"const":"nosniff"}The browser must use the declared content type.
X-Frame-OptionsJSON; {"const":"DENY"}The response must not be embedded in a frame.
X-Request-IDstringServer-generated request identifier. Include this when reporting an error; inbound values are not trusted.

application/problem+json

FieldType and limitsRequiredMeaning
$ProblemYes—
$.codestringYesStable machine-readable error code
$.detailstringYesShort localized explanation without internal error details
$.instancestringYesUnique relative identifier /api/v1/requests/{request_id}; not a retrievable resource
$.messagestringYesTemporarily identical to detail for existing clients
$.message_keystringYesStable translation key for changing the displayed language without another request
$.message_paramsobject; {"additionalProperties":true}YesNamed, safely rendered message parameters; never arbitrary HTML
$.request_idstring; {"pattern":"^[0-9a-f]{32}$"}YesServer-generated diagnostic identifier. It contains no login token or credential.
$.statusinteger; {"maximum":599,"minimum":400}Yes—
$.titlestringYesLocalized HTTP status title
$.typestring; {"const":"about:blank"}Yes—
json
{
  "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"
}

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.

shell
curl --silent --show-error --request POST --header @"$HOME/.config/metribeacon/headers.txt" --header "Content-Type: application/json" --data-binary '{"batch_id":"00000000-0000-4000-8000-000000000001","device_id":"00000000-0000-4000-8000-000000000002","points":[{"id":"00000000-0000-4000-8000-000000000003","series_id":"00000000-0000-4000-8000-000000000004","measured_at":"2026-10-02T12:00:00Z","value":42}]}' "https://metribeacon.com/api/v1/automation/telemetry/points"
python
import json
from pathlib import Path
import urllib.request
headers = dict(line.split(": ", 1) for line in (Path.home()/".config/metribeacon/headers.txt").read_text().splitlines())
headers["Content-Type"] = "application/json"
request = urllib.request.Request('https://metribeacon.com/api/v1/automation/telemetry/points', data='{"batch_id":"00000000-0000-4000-8000-000000000001","device_id":"00000000-0000-4000-8000-000000000002","points":[{"id":"00000000-0000-4000-8000-000000000003","series_id":"00000000-0000-4000-8000-000000000004","measured_at":"2026-10-02T12:00:00Z","value":42}]}'.encode() if '{"batch_id":"00000000-0000-4000-8000-000000000001","device_id":"00000000-0000-4000-8000-000000000002","points":[{"id":"00000000-0000-4000-8000-000000000003","series_id":"00000000-0000-4000-8000-000000000004","measured_at":"2026-10-02T12:00:00Z","value":42}]}' else None, headers=headers, method='POST')
with urllib.request.urlopen(request, timeout=20) as response:
    print(response.status)
javascript
import {readFileSync} from "node:fs";
import {homedir} from "node:os";
const headers=Object.fromEntries(readFileSync(homedir()+"/.config/metribeacon/headers.txt","utf8").trim().split("\n").map(line=>{const i=line.indexOf(": ");return [line.slice(0,i),line.slice(i+2)]}));
headers["Content-Type"]="application/json";
const response=await fetch("https://metribeacon.com/api/v1/automation/telemetry/points",{method:"POST",headers,body:"{\"batch_id\":\"00000000-0000-4000-8000-000000000001\",\"device_id\":\"00000000-0000-4000-8000-000000000002\",\"points\":[{\"id\":\"00000000-0000-4000-8000-000000000003\",\"series_id\":\"00000000-0000-4000-8000-000000000004\",\"measured_at\":\"2026-10-02T12:00:00Z\",\"value\":42}]}"});
console.log(response.status);
go
package main
import ("fmt";"net/http";"os";"strings";"time")
func main(){
 home,_:=os.UserHomeDir(); headers,_:=os.ReadFile(home+"/.config/metribeacon/headers.txt")
 request,_:=http.NewRequest("POST","https://metribeacon.com/api/v1/automation/telemetry/points",strings.NewReader("{\"batch_id\":\"00000000-0000-4000-8000-000000000001\",\"device_id\":\"00000000-0000-4000-8000-000000000002\",\"points\":[{\"id\":\"00000000-0000-4000-8000-000000000003\",\"series_id\":\"00000000-0000-4000-8000-000000000004\",\"measured_at\":\"2026-10-02T12:00:00Z\",\"value\":42}]}"))
 for _,line:=range strings.Split(strings.TrimSpace(string(headers)),"\n"){name,value,ok:=strings.Cut(line,": ");if ok{request.Header.Set(name,value)}}
 request.Header.Set("Content-Type","application/json")
 client:=&http.Client{Timeout:20*time.Second};response,err:=client.Do(request);if err!=nil{panic(err)};defer response.Body.Close();fmt.Println(response.StatusCode)
}