Loading...
Loading...
Invoke the `incidentio` CLI to drive the incident.io API — incidents, actions, follow-ups, alerts/alert sources/routes, escalations & on-call schedules, catalog (types/entries/resources), custom fields, severities, incident types/roles/statuses/timestamps, status pages (including creating and managing public pages, components, layout, subscribers, templates), workflows, users, teams, API keys, heartbeats, maintenance windows, and settings. Uses the public Bearer API (OpenAPI-generated commands) plus internal dashboard (cookie) commands generated from captured HARs, hand-curated internal endpoints, and a `raw` escape hatch for any un-codified path. Use whenever a task needs incident.io data or actions, such as "list our incidents", "create an incident", "show the on-call schedule", "build or manage a status page", "list status page subscribers", "tune a dashboard setting", or "hit an internal dashboard endpoint".
npx skill4agent add paymog/incidentio-cli incidentio-cliincidentiopaymog/incidentio-cliincidentiohttps://api.incident.ioapp.incident.io/settings/api-keysincidents.createincidentio auth set <api-key> # store it (chmod 600, ~/.config/incidentio/creds.json)
incidentio auth status # show masked key + last-updated
incidentio auth logout # clear stored credentials--api-key <key>$INCIDENT_API_KEYINCIDENT_API_KEYauth set401403incidents createincidentio list [filter] # every command (optionally filtered by substring)
incidentio list incidents # all verbs for the `incidents` resource
incidentio <resource> <verb> [flags]<resource> <verb>jq--raw| Flag | Meaning |
|---|---|
| API key for this call (else |
| path params: |
| query param, repeatable (incl. bracket filters — see below) |
| JSON request body from file (for POST/PUT) |
| inline JSON request body |
| set a body field, repeatable |
| print the raw response, no JSON formatting |
| ( |
--queryincidentio list <resource># incidents in the "live" status category, severity rank >= a given severity
incidentio incidents list --query 'status_category[one_of]=live' --query 'severity[gte]=<sev-id>'
# created within a date range (tilde-separated)
incidentio incidents list --query 'created_at[date_range]=2026-06-01~2026-06-30'
# any-of multiple modes
incidentio incidents list --query 'mode[one_of]=standard' --query 'mode[one_of]=retrospective'2026-06-04T00:00:00.000Zdate -u +%FT%T.000Zdate -u -d '30 days ago' +%FT%T.000Zincidentio listrawGETincidentio incidents list [--query status[one_of]=<id>] [--query page_size=50]
incidentio incidents show --id <id>
incidentio incidents create --body-json '{"name":"...","severity_id":"...","visibility":"public"}'
incidentio incidents edit --id <id> # edit fields/status of an incident
incidentio incidents import-postmortem-document --id <id>incidentio actions list --query incident_id=<id>
incidentio follow-ups list --query incident_id=<id>
incidentio follow-ups create --body-json '{"incident_id":"...","content":"..."}'
incidentio follow-ups connect-external-issue --id <id> --body-json '{...}'
incidentio incident-attachments list --query incident_id=<id>incidentio alerts list
incidentio alerts show --id <id>
incidentio alerts resolve --id <id>
incidentio alert-sources list
incidentio alert-routes list
incidentio alert-routes show --id <id>
incidentio alert-routes update --id <id> --body-json '{...}' # public API, no version field
incidentio alert-events create-http --alert-source-config-id <id> --body-json '{...}'
incidentio heartbeat ping --alert-source-config-id <id> # GET ping
# Alert route with incident-template custom-field binding (🍪 dashboard API)
# Rules:
# 1. version = current_version + 1 (optimistic concurrency — GET it first).
# 2. OMIT the `users` key from every escalation_config.escalation_targets entry;
# the GET payload carries an invalid users binding that PUT rejects. API restores it.
# 3. Custom-field bindings: static option OR navigation-expression reference.
# Static: array_value:[{reference:"",value:"<opt-id>",label:"<label>",sort_key:0}]
# Expression: array_value:[{reference:"expressions[\"<expr-ref>\"]"}]
# 4. Navigation expressions (derive component array from Service catalog attribute):
# Declare in top-level `expressions` array; bind by reference in custom_fields.
# merge_strategy: "first-wins" | "last-wins" | "append"
incidentio alert-routes show-route --id <route-id>
incidentio alert-routes update-route --id <route-id> --body-json '{
"version":4,
"escalation_config":{"escalation_targets":[
{"type":"schedule","id":"<sched-id>"}
]},
"incident_template":{
"custom_fields":[{
"custom_field_id":"<field-id>",
"merge_strategy":"first-wins",
"binding":{"array_value":[{"reference":"","value":"<option-id>","label":"<label>","sort_key":0}]}
}]
}}'
# With a catalog navigation expression (auto-derive Affected Components from alert Service):
incidentio alert-routes update-route-expr --id <route-id> --body-json '{
"version":5,
"expressions":[{
"id":"01EXPR001","label":"Affected Components","reference":"affected_components",
"returns":{"type":"CatalogEntry[\"<component-type-id>\"]","array":true},
"root_reference":"alert.attributes.<service-alert-attr-id>",
"operations":[{"operation_type":"navigate",
"returns":{"type":"CatalogEntry[\"<component-type-id>\"]","array":true},
"navigate":{"reference":"catalog_attribute[\"components\"]","reference_label":"Components"}}]
}],
"incident_template":{
"custom_fields":[{
"custom_field_id":"<affected-components-field-id>",
"merge_strategy":"first-wins",
"binding":{"array_value":[{"reference":"expressions[\"affected_components\"]"}]}
}]
}}'incidentio escalations list [--query status=active]
incidentio escalations create --body-json '{...}'
incidentio escalations cancel-escalation --id <id>
incidentio escalation-paths list
incidentio schedules list
incidentio schedules show --id <id>
incidentio schedule-entries list --schedule-id <id>
incidentio schedule-overrides list --schedule-id <id>
incidentio schedule-replicas list --schedule-id <id># Public API (Bearer)
incidentio catalog-types list
incidentio catalog-types show --id <type-id> # includes .schema.attributes[].id
incidentio catalog-types create --body-json '{...}'
incidentio catalog-types update-type-schema --id <id> --body-json '{...}'
incidentio catalog-entries list --query catalog_type_id=<id>
incidentio catalog-entries create --body-json '{...}' # simple entries
incidentio catalog-entries update --id <id> --body-json '{...}'
incidentio catalog-entries bulk-update-entries --body-json '{...}'
incidentio catalog-resources list
# Catalog entries with attribute_values (🍪 dashboard API — verified contract)
# Required body: catalog_type_id, name, external_id, attribute_values (pass {} when none)
# Attribute shapes:
# plain text: {"<attr-id>":{"value":"some text"}}
# catalog-relation: {"<attr-id>":{"array_value":["<entry-id>",...]}}
# intentional clear (create only): {"<attr-id>":{"value":null}}
# Get attribute IDs: incidentio catalog-types show --id <type-id> | jq '.catalog_type.schema.attributes[].id'
incidentio catalog-entries create-entry --body-json '{
"catalog_type_id":"<type-id>",
"name":"My Service",
"external_id":"my-service",
"attribute_values":{
"<attr-id>":{"value":"production"},
"<rel-attr-id>":{"array_value":["<related-entry-id>"]}
}}'
incidentio catalog-entries update-entry --id <entry-id> --body-json '{
"name":"My Service",
"attribute_values":{"<attr-id>":{"value":"staging"}}}'# Public API (Bearer)
incidentio custom-fields list
incidentio custom-fields create --body-json '{...}' # basic fields
incidentio custom-field-options list --query custom_field_id=<id>
incidentio severities list
incidentio incident-types list
incidentio incident-roles list
incidentio incident-statuses list
incidentio incident-timestamps list
# Catalog-backed multi-select custom field (🍪 dashboard API — supports catalog_type_id,
# field_mode, condition_groups not available in the public API)
# Required body: name, description, field_type:"multi_select", catalog_type_id, field_mode,
# dynamic_options, cannot_be_unset, options, condition_groups
incidentio custom-fields create-catalog-backed --body-json '{
"name":"Affected Services",
"description":"Which services are affected by this incident",
"field_type":"multi_select",
"catalog_type_id":"<catalog-type-id>",
"field_mode":"dashboard",
"dynamic_options":true,
"cannot_be_unset":false,
"options":[],
"condition_groups":[]}'# Read (Bearer public API)
incidentio status-pages list
incidentio status-pages show --status-page-id <id> # includes current_structure
incidentio status-page-incidents list --query status_page_id=<id>
incidentio status-page-maintenances list --query status_page_id=<id>
# Manage the page itself (🍪 internal — the public API cannot create pages/components)
# Simple page:
incidentio status-pages create --body-json '{"name":"Acme","subpath":"acme","theme":"light"}'
# Catalog-backed parent page with auto-generated sub-pages per catalog entry:
incidentio status-pages create --body-json '{
"name":"Acme","subpath":"acme","theme":"light",
"parent_page_options":{
"page_type":"parent",
"split_by_catalog_type_id":"<catalog-type-id>",
"split_by_component_attribute_id":"<component-attr-id>",
"sub_pages":[
{"defined_by_catalog_entry_id":"<entry-id>","name":"Team A","subpath":"team-a"}
]
}}'
# Update — name, subpath, support_label are ALL required even for a single-field change:
incidentio status-pages update --status-page-id <id> --body-json '{"name":"Acme","subpath":"acme","support_label":"Report a problem","allow_search_engine_indexing":false}'
incidentio status-page-components create --body-json '{"name":"API","status_page_id":"<id>"}'
incidentio status-page-components delete --id <component-id>
incidentio status-page-structures create --body-json '{"status_page_id":"<id>","items":[
{"group":{"name":"Core","display_aggregated_uptime":true,"hidden":false,"components":[
{"component_id":"<id>","display_uptime":true,"hidden":false}]}},
{"component":{"component_id":"<id>","display_uptime":true,"hidden":false}}]}'
# Audit subscribers / templates (🍪)
incidentio status-page-subscriptions --query status_page_id=<id>
incidentio status-page-templates --query status_page_id=<id>
# Retrospective status-page incident (Bearer) — bulk-import historical incidents
incidentio status-page-incidents create-status-page-retrospective-incident --body-json '{
"status_page_id":"<id>",
"name":"Elevated API latency",
"idempotency_key":"historical-2021-08-17",
"updates":[
{"incident_status":"investigating","message":"Looking into it.","published_at":"2021-08-17T13:28:57Z"},
{"incident_status":"resolved","message":"Fixed.","published_at":"2021-08-17T14:00:00Z",
"component_statuses":[{"component_id":"<id>","component_status":"operational"}]}
]}'status-page-structuresthemelightdarkcreate422 exceeded your allowancesplit_by_catalog_type_idsplit_by_component_attribute_idsub_pagesincidentio users list --query email=<email>
incidentio users show --id <id>
incidentio teams list
incidentio api-keys list
incidentio api-keys rotate --id <id>
# api-keys create/update accept optional `comments` string
# Workflows (public Bearer CRUD)
incidentio workflows list
incidentio workflows show --id <id>
incidentio workflows create --body-json '{...}' # public shape — see OpenAPI
incidentio workflows update --id <id> --body-json '{...}'
# Secrets store (public Bearer — prefer this for scripting)
# Create: {name, value, description?, owning_team_ids?}
# Rotate: {value} — bumps version; value never returned (only last_four_chars)
incidentio secrets list [--query team_ids=<id>]
incidentio secrets show --id <id> # includes versions[] history
incidentio secrets create --body-json '{"name":"pagerduty_token","value":"..."}'
incidentio secrets rotate --id <id> --body-json '{"value":"new-secret"}'
incidentio secrets update --id <id> --body-json '{"name":"pagerduty_token"}'
incidentio secrets delete --id <id>incidentio utilities identity # validate the key + show the identity
incidentio maintenancewindows list
incidentio ipallowlists show
incidentio telemetry update --id <id> --body-json '{...}'app.incident.io/api/*# devtools → Network → right-click any /api/ request → Copy as cURL
incidentio auth import '<paste curl>' # or: pbpaste | incidentio auth import
incidentio auth set-org 01G9XY4BZ7YGBPJ3K50NB30YXS # x-incident-organisation-id (auto-captured from the curl if present)listincidentio saved-views --query context=incidents # saved filter views
incidentio insights trends --query start_date=2026-06-01 --query end_date=2026-06-30
incidentio insights custom-dashboards
incidentio policies # policy list
incidentio policies update --id <id> --body-json '{...}' # flip run_on_private_incidents etc.
incidentio secrets list-internal # cookie twin of public secrets.*
incidentio workflows triggers # alert.updated|attached, scheduled, ...
incidentio workflows show-internal --id <id> # expands webhook.send signing params
incidentio workflows create-internal --body-json '{
"trigger":"alert.updated",
"workflow":{"name":"...","once_for":["alert"],"condition_groups":[],"steps":[],"expressions":[],
"runs_on_incident_modes":["standard"],"continue_on_step_error":false,
"runs_on_incidents":"newly_created","state":"draft","private_incident_scope":"none"}}'
incidentio policy-violations
incidentio incident-timelines timeline --incident-timeline <id> # full timeline
incidentio incident-timelines activity-log --incident-timeline <id> # activity log
incidentio debriefs incident-debriefs --query incident_id=<id>
incidentio incident-suggestions for-incident --query incident_id=<id> # AI suggestions
incidentio postmortems templates --query incident_id=<id>
incidentio schedule-reports
incidentio user-preferences
incidentio identity self # who am I + scopes (dashboard identity)401 "No authorization material"--org$INCIDENT_ORG_IDincidentio raw <METHOD> </path>incidentio raw GET /api/status_pages # cookie inferred (/api/*)
incidentio raw GET /v2/incidents --query page_size=1 # bearer inferred (else)
incidentio raw POST /api/status_pages --body-json '{}' # probe: 422 names required fields
incidentio raw PUT /api/settings/self --body-json '{...}' # tune a setting
incidentio raw DELETE /api/status_pages/<id> --auth cookie/api/*--auth cookie|bearerraw:paramincidentio raw POST /api/<thing> --body-json '{}'422 validation_errorsource.fieldCommandsrc/commands/manual-internal.tsbun run buildincidentio utilities identity | jq '.identity'incidentio incidents list --query 'status_category[one_of]=live' \
| jq '.incidents[] | {id, name, severity: .severity.name, status: .incident_status.name}'listpagination_meta.after--query after=<cursor>incidentio incidents list --query page_size=250 > first.json
AFTER=$(jq -r '.pagination_meta.after // empty' first.json)
[ -n "$AFTER" ] && incidentio incidents list --query page_size=250 --query "after=$AFTER" > second.jsonincidentio incidents create --body-json '{
"name": "API 5xx spike",
"severity_id": "<sev-id>",
"summary": "Elevated 5xx from the edge.",
"visibility": "public"
}' | jq '.incident.id'incidentio severities listincidentio incident-statuses listincidentio list schedules # shows list/create/show/update/delete + nested schedule-entries/overrides/replicas
incidentio list catalog-entries # shows create/create-entry (🍪)/update/update-entry (🍪)/...# 1. Get the catalog type's attribute IDs
incidentio catalog-types show --id <type-id> | jq '.catalog_type.schema.attributes[] | {id, name}'
# 2. Create an entry with attribute values
incidentio catalog-entries create-entry --body-json '{
"catalog_type_id":"<type-id>",
"name":"payments-service",
"external_id":"payments-service",
"attribute_values":{
"<team-attr-id>":{"array_value":["<team-catalog-entry-id>"]},
"<tier-attr-id>":{"value":"tier-1"}
}}'# 1. GET current route — capture version and escalation_targets (you'll need to strip `users`)
VERSION=$(incidentio alert-routes show-route --id <route-id> | jq '.version')
# 2. PUT with version+1. Two critical rules:
# a) version = $VERSION + 1 (optimistic concurrency)
# b) omit `users` from every escalation_config.escalation_targets entry
# (the GET payload has an invalid users binding the PUT rejects; API restores it after PUT)
incidentio alert-routes update-route --id <route-id> --body-json '{
"version":'$((VERSION+1))',
"name":"My Route",
"escalation_config":{"escalation_targets":[
{"type":"schedule","id":"<sched-id>"}
]},
"incident_template":{
"custom_fields":[{
"custom_field_id":"<field-id>",
"merge_strategy":"first-wins",
"binding":{"array_value":[{"reference":"","value":"<option-id>","label":"P1 - Critical","sort_key":0}]}
}]
}}'# 1. Find the IDs you need:
# - service-alert-attr-id: the alert source attribute ID for the Service field
# - component-type-id: catalog type ID for Components (incidentio catalog-types list)
# - affected-components-field-id: the incident custom field ID (incidentio custom-fields list)
VERSION=$(incidentio alert-routes show-route --id <route-id> | jq '.version')
# 2. PUT the route with an expression + expression-reference binding.
# Same rules: version+1, omit users from escalation_targets.
incidentio alert-routes update-route-expr --id <route-id> --body-json '{
"version":'$((VERSION+1))',
"escalation_config":{"escalation_targets":[{"type":"schedule","id":"<sched-id>"}]},
"expressions":[{
"id":"<expr-id>",
"label":"Affected Components",
"reference":"affected_components",
"returns":{"type":"CatalogEntry[\"<component-type-id>\"]","array":true},
"root_reference":"alert.attributes.<service-alert-attr-id>",
"operations":[{
"operation_type":"navigate",
"returns":{"type":"CatalogEntry[\"<component-type-id>\"]","array":true},
"navigate":{"reference":"catalog_attribute[\"components\"]","reference_label":"Components"}
}]
}],
"incident_template":{
"custom_fields":[{
"custom_field_id":"<affected-components-field-id>",
"merge_strategy":"first-wins",
"binding":{"array_value":[{"reference":"expressions[\"affected_components\"]"}]}
}]
}}'
# After a successful PUT the API echoes the expressions array back intact.root_referenceoperations[0].navigate.referenceincidentio catalog-types show --id <service-type-id>referenceexpressions["<reference>"]multi_selectcustom-fields create-catalog-backed# List triggers (🍪) — includes alert.updated, alert.attached, scheduled
incidentio workflows triggers | jq '.triggers[] | select(.name|test("alert|scheduled"))'
# Create an alert-triggered workflow (🍪). NOTE the split body: top-level `trigger`
# string + nested `workflow` object. Public `workflows create` uses a flatter shape.
incidentio workflows create-internal --body-json '{
"trigger":"alert.updated",
"workflow":{
"name":"Alert resolved webhook",
"once_for":["alert"],
"condition_groups":[],
"steps":[{
"id":"step1",
"name":"webhook.send",
"param_bindings":[
{"value":{"literal":"https://example.com/hook"}},
{"value":{"literal":"POST"}},
{"array_value":[{"literal":"Authorization: Bearer {{secrets.my_token}}"}]},
{"value":{"literal":"{\"ok\":true}"}},
{"value":{"literal":"<secret-id>"}},
{"value":{"literal":""}},
{"value":{"literal":"X-Signature"}}
]
}],
"expressions":[],
"runs_on_incident_modes":["standard"],
"continue_on_step_error":false,
"runs_on_incidents":"newly_created",
"state":"draft",
"private_incident_scope":"none"
}}'
# webhook.send param order (from show-internal): endpoint, method, headers
# (TemplatedText plain_single_line_with_secrets), body, signing_secret (type Secret),
# generated_signing_secret, signature_header_name (HMAC-SHA256).
# Prefer public `secrets create` for the signing secret when you have a Bearer key.# GET first — subjects/operations come back as expanded objects
incidentio policies | jq '.policies[] | {id,name,run_on_private_incidents}'
# PUT write shape differs: subject/operation are bare strings; follow_up needs due_date_config
incidentio policies update --id <id> --body-json '{
"enabled":true,
"name":"...",
"description":"...",
"policy_type":"follow_up",
"conditions":[{"conditions":[{"subject":"incident.severity","operation":"gte",
"param_bindings":[{"value":{"literal":"<sev-id>"}}]}]}],
"requirements":{"conditions":[{"conditions":[{"subject":"follow_up.status","operation":"not_one_of",
"param_bindings":[{"array_value":[{"literal":"outstanding"}]}]}]}]},
"run_on_private_incidents":true,
"due_date_config":{"incident_timestamp_id":"<ts-id>","days":{"value":{"literal":"30"}},
"calculation_type":"seven_days"}
}'src/commands/generated.tsdocs.incident.iobun run codegendocs.incident.io/llms.txt/openapi/tags/<tag>.json<resource> <verb>catalog-types update-typeupdate-type-schemaheartbeat pingping-postbun run buildbun run codegen:har <a.har> [b.har ...]createupdatedelete:paramgenerated-internal.tsapp.incident.io.har app.incident.io2.har app.incident.io3.harsrc/commands/manual-internal.tsnot authenticatedincidentio auth set <key>export INCIDENT_API_KEY=<key>HTTP 401HTTP 403needs a browser session401 "No authorization material"app.incident.io/api/*incidentio auth import <curl>auth set-org--orgHTTP 422source.field--body-json--query--setHTTP 429rate_limit.retry_afterunknown command<resource> <verb>incidentio list <resource>incidents list/create/show/update/deleteincidents editescalations cancel-escalationcatalog-entries bulk-update-entriesbun run codegen