PUT Approve a source and optional historical import
/api/v1/status-pages/{id}/sources
Authenticated page administration with active-session, ownership, page-role and CSRF checks. Sources, members, domains, delivery rules and whole-page withdrawal require the owner. Editors save drafts; publishers release approved content. version detects parallel edits. Public delivery acknowledges matching publication revisions before publication or revocation is complete.
On this page
Access and permissions
Authenticated page administration with active-session, ownership, page-role and CSRF checks. Sources, members, domains, delivery rules and whole-page withdrawal require the owner. Editors save drafts; publishers release approved content. version detects parallel edits. Public delivery acknowledges matching publication revisions before publication or revocation is complete.
Browser session: __Host-mb_session cookie.
Machine management credentials in Authorization: Bearer. Check the permissions (scopes) required by the operation.
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
| Field | Location | Type and limits | Required | Meaning |
|---|---|---|---|---|
| id | Path | string; {"format":"uuid"} | Yes | UUID of the status page resource |
| X-CSRF-Token | Header | string | No | For browser sessions, must match the __Host-mb_csrf cookie and the current session. Not required for an Authorization: Bearer management credential. |
Request body
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":false} | Yes | — |
| $.alarm_id | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | string; {"const":""} | No | — |
| $.alarm_id (oneOf 1) | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | No | UUID of an existing alarm rule for the selected source monitor. Required for alarm sources. |
| $.alarm_id (oneOf 2) | string; {"const":""} | No | — |
| $.approve_history | boolean | No | — |
| $.history_from | string; {"format":"date-time"} | No | — |
| $.kind | string; {"enum":["http","run","contact","state","metric","alarm"]} | Yes | Source type: http for HTTP availability, run for job/workflow status, contact for heartbeat, state for boolean/enum, metric for numeric series, alarm for an alarm rule. state/metric require series_id; alarm requires alarm_id. public_id references an existing editorial component or metric. |
| $.monitor_id | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | Yes | UUID of the existing source monitor in an authorized workspace. Use an ID returned by monitors; do not generate a new ID. |
| $.public_id | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | Yes | UUID of an editorial component, group, metric or record. Generate a fresh UUID for a new item; reuse the saved ID when updating it. This is not a monitor or series ID. |
| $.series_id | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | string; {"const":""} | No | — |
| $.series_id (oneOf 1) | string; {"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"} | No | UUID of an existing series belonging to the selected source monitor. Use an ID returned by series; required for state and metric sources. |
| $.series_id (oneOf 2) | string; {"const":""} | No | — |
| $.state_mapping | object | No | — |
| $ (allOf 1) | JSON | No | — |
| $ (allOf 2) | JSON | No | — |
Responses
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object; {"additionalProperties":true} | Yes | — |
| Stable error codes |
|---|
| status_page_operation |
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 |
|---|
| status_page_operation |
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 |
|---|
| status_page_operation |
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 |
|---|
| status_page_operation |
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 |
|---|
| status_page_operation |
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 |
|---|
| status_page_operation |
| status_pages_disabled |
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 --request PUT --cookie '__Host-mb_session=SESSION; __Host-mb_csrf=CSRF' --header 'X-CSRF-Token: CSRF' --header 'Content-Type: application/json' --data '{"public_id":"22222222-2222-4222-8222-222222222222","kind":"contact","monitor_id":"33333333-3333-4333-8333-333333333333","series_id":"","alarm_id":"","state_mapping":{},"approve_history":false}' 'https://metribeacon.com/api/v1/status-pages/11111111-1111-4111-8111-111111111111/sources'import requests
payload = {'public_id': '22222222-2222-4222-8222-222222222222', 'kind': 'contact', 'monitor_id': '33333333-3333-4333-8333-333333333333', 'series_id': '', 'alarm_id': '', 'state_mapping': {}, 'approve_history': False}
response = requests.request("PUT","https://metribeacon.com/api/v1/status-pages/11111111-1111-4111-8111-111111111111/sources",cookies={"__Host-mb_session":"SESSION","__Host-mb_csrf":"CSRF"},headers={"X-CSRF-Token":"CSRF"},json=payload)
response.raise_for_status()const payload = {"public_id":"22222222-2222-4222-8222-222222222222","kind":"contact","monitor_id":"33333333-3333-4333-8333-333333333333","series_id":"","alarm_id":"","state_mapping":{},"approve_history":false};
const response = await fetch("https://metribeacon.com/api/v1/status-pages/11111111-1111-4111-8111-111111111111/sources", {signal:AbortSignal.timeout(10000),method:"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json","X-CSRF-Token":csrf},body:JSON.stringify(payload)});
if (!response.ok) throw new Error(String(response.status));package main
import (
"fmt"
"net/http"
"time"
"strings"
)
func main() {
if err := requestStatus(); err != nil { panic("request failed; credentials and response omitted") }
}
func requestStatus() error {
req, err := http.NewRequest("PUT", "https://metribeacon.com/api/v1/status-pages/11111111-1111-4111-8111-111111111111/sources", strings.NewReader(`{"public_id":"22222222-2222-4222-8222-222222222222","kind":"contact","monitor_id":"33333333-3333-4333-8333-333333333333","series_id":"","alarm_id":"","state_mapping":{},"approve_history":false}`))
if err != nil { return err }
req.AddCookie(&http.Cookie{Name:"__Host-mb_session",Value:"SESSION"})
req.AddCookie(&http.Cookie{Name:"__Host-mb_csrf",Value:"CSRF"})
req.Header.Set("X-CSRF-Token","CSRF")
req.Header.Set("Content-Type","application/json")
client := &http.Client{Timeout: 10*time.Second}
response, err := client.Do(req)
if err != nil { return err }
defer response.Body.Close()
fmt.Println(response.StatusCode)
return nil
}
Related guides
- HTTP API, OAuth and MCP
Find the user API endpoints, their permissions, fields, examples and response formats.
- GET List owner-approved monitor sources
Authenticated page administration with active-session, ownership, page-role and CSRF checks. Sources, members, domains, delivery rules and whole-page withdrawal require the owner. Editors save drafts; publishers release approved content. version detects parallel edits. Public delivery acknowledges matching publication revisions before publication or revocation is complete.
- DELETE Revoke an approved source and erase its public projections
Authenticated page administration with active-session, ownership, page-role and CSRF checks. Sources, members, domains, delivery rules and whole-page withdrawal require the owner. Editors save drafts; publishers release approved content. version detects parallel edits. Public delivery acknowledges matching publication revisions before publication or revocation is complete.
- DELETE Revoke or delete public delivery
Authenticated page administration with active-session, ownership, page-role and CSRF checks. Sources, members, domains, delivery rules and whole-page withdrawal require the owner. Editors save drafts; publishers release approved content. version detects parallel edits. Public delivery acknowledges matching publication revisions before publication or revocation is complete.