{
  "openapi": "3.1.0",
  "info": {
    "title": "Flashduty Open API",
    "description": "Public HTTP API for the Flashduty incident management platform — incidents, notification templates, channels, schedules, monitors, RUM, and platform administration. Every operation is authenticated with an `app_key` query parameter issued from the Flashduty console under Account → APP Keys. Responses follow a uniform envelope: `{ request_id, data }` on success, `{ request_id, error }` on failure.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.flashcat.cloud",
      "description": "Flashduty Open API"
    }
  ],
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "On-call/Incidents",
      "description": ""
    },
    {
      "name": "On-call/Channels",
      "description": ""
    },
    {
      "name": "On-call/Alerts",
      "description": "Search, inspect, and act on alerts. Manage card views and alert processing pipelines."
    },
    {
      "name": "On-call/Integrations",
      "description": ""
    },
    {
      "name": "On-call/IM integrations",
      "description": "IM integration queries, such as which integrations have war room enabled."
    },
    {
      "name": "On-call/Schedules",
      "description": ""
    },
    {
      "name": "On-call/Calendars",
      "description": ""
    },
    {
      "name": "On-call/Notification templates",
      "description": ""
    },
    {
      "name": "On-call/Alert enrichment",
      "description": "Custom fields, enrichment rules, and data mapping (schema, data, API)."
    },
    {
      "name": "On-call/Analytics",
      "description": ""
    },
    {
      "name": "On-call/Status pages",
      "description": ""
    },
    {
      "name": "Monitors/Alert rules",
      "description": "Create, manage, and export monitor alert rules. Query rule counters and audit history."
    },
    {
      "name": "Monitors/Data sources",
      "description": "Manage monitoring data sources used by alert rules to query metrics."
    },
    {
      "name": "Monitors/Rule sets",
      "description": "Manage shared rule sets (rulesets) in the Monitors rule repository. Rulesets can be shared publicly or within an account."
    },
    {
      "name": "Platform/Members",
      "description": ""
    },
    {
      "name": "Platform/Teams",
      "description": ""
    },
    {
      "name": "Platform/Roles & permissions",
      "description": ""
    },
    {
      "name": "Platform/Audit logs",
      "description": "Search and retrieve account operation audit logs."
    },
    {
      "name": "Monitors/Diagnostics",
      "description": "Diagnostic and query endpoints used by Flashduty AI SRE — ad-hoc data source queries, log/metric diagnostics, and target-side tool invocation."
    },
    {
      "name": "Platform/Account",
      "description": "Account profile and settings"
    },
    {
      "name": "AI SRE/MCP servers",
      "description": "MCP (Model Context Protocol) server management."
    },
    {
      "name": "AI SRE/A2A agents",
      "description": "A2A (agent-to-agent) remote agent management."
    },
    {
      "name": "On-call/Changes",
      "description": ""
    },
    {
      "name": "AI SRE/Skills",
      "description": "AI SRE agent skill management."
    },
    {
      "name": "AI SRE/Sessions",
      "description": "AI SRE agent session history — list, inspect, and export transcripts."
    },
    {
      "name": "Monitors/Monitor utilities",
      "description": "Monitors service activation and data preview utilities."
    },
    {
      "name": "AI SRE/Automations"
    },
    {
      "name": "RUM/Applications",
      "description": "Manage Real User Monitoring (RUM) applications."
    },
    {
      "name": "RUM/Data query",
      "description": "Run RUM analytics queries over event data."
    },
    {
      "name": "RUM/Issues",
      "description": "Query and manage RUM error tracking issues and preset severity rules."
    },
    {
      "name": "RUM/Facets",
      "description": "Query RUM facet fields and their value distributions for building analytics filters."
    },
    {
      "name": "RUM/Sourcemaps",
      "description": "Manage and query RUM sourcemap files for browser, Android, and iOS error symbolication."
    }
  ],
  "paths": {
    "/incident/list": {
      "post": {
        "operationId": "incidentList",
        "summary": "List incidents",
        "description": "Query a paginated list of incidents with filters by channel, severity, status, responder, and time range.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-list",
          "metadata": {
            "sidebarTitle": "List incidents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 88,
                    "has_next_page": true,
                    "search_after_ctx": "69da451ef77b1b51f40e83eb",
                    "items": [
                      {
                        "incident_id": "69da451ef77b1b51f40e83ee",
                        "account_id": 2451002751131,
                        "channel_id": 2551105804131,
                        "integration_id": 2490562293131,
                        "integration_ids": [
                          2490562293131
                        ],
                        "integration_types": [
                          "monit.alert"
                        ],
                        "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "equals_md5": "",
                        "start_time": 1775912219,
                        "end_time": 0,
                        "last_time": 1775969819,
                        "ack_time": 0,
                        "close_time": 0,
                        "creator_id": 0,
                        "closer_id": 0,
                        "owner_id": 0,
                        "incident_status": "Critical",
                        "incident_severity": "Critical",
                        "progress": "Triggered",
                        "title": "CPU usage high - web-server-01",
                        "description": "",
                        "ai_summary": "",
                        "impact": "",
                        "root_cause": "",
                        "resolution": "",
                        "num": "0E83EE",
                        "frequency": "frequent",
                        "created_at": 1775912222,
                        "updated_at": 1775972145,
                        "snoozed_before": 0,
                        "group_method": "n",
                        "ever_muted": false,
                        "labels": {
                          "check": "cpu_usage_high",
                          "resource": "web-server-01",
                          "env": "production"
                        },
                        "fields": {},
                        "assigned_to": {
                          "person_ids": [
                            2476444212131
                          ],
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "assign",
                          "assigned_at": 1775972128,
                          "id": "MvQfH9Dc8eNS8k79jmrWn6",
                          "escalate_rule_name": ""
                        },
                        "alert_cnt": 1,
                        "active_alert_cnt": 1,
                        "alert_event_cnt": 17,
                        "responders": [
                          {
                            "person_id": 2476444212131,
                            "assigned_at": 1775972128,
                            "acknowledged_at": 0
                          }
                        ],
                        "account_name": "",
                        "account_locale": "",
                        "account_time_zone": "",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                        "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                        "integration_type": "monit.alert",
                        "post_mortem_id": "",
                        "images": null,
                        "manual_overrides": [
                          "title"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListIncidentsRequest"
              },
              "example": {
                "start_time": 1711900800,
                "end_time": 1712000000,
                "progress": "Triggered,Processing",
                "incident_severity": "Critical,Warning",
                "channel_ids": [
                  2551105804131
                ],
                "limit": 20,
                "p": 1
              }
            }
          }
        }
      }
    },
    "/incident/info": {
      "post": {
        "operationId": "incidentInfo",
        "summary": "Get incident detail",
        "description": "Retrieve detailed information for a single incident including timeline, alerts, responders and custom fields.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-info",
          "metadata": {
            "sidebarTitle": "Get incident detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentInfo"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "incident_id": "69da451ef77b1b51f40e83ee",
                    "account_id": 2451002751131,
                    "channel_id": 2551105804131,
                    "integration_id": 2490562293131,
                    "integration_ids": [
                      2490562293131
                    ],
                    "integration_types": [
                      "monit.alert"
                    ],
                    "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                    "equals_md5": "",
                    "start_time": 1775912219,
                    "end_time": 0,
                    "last_time": 1775969819,
                    "ack_time": 0,
                    "close_time": 0,
                    "creator_id": 0,
                    "closer_id": 0,
                    "owner_id": 0,
                    "incident_status": "Critical",
                    "incident_severity": "Critical",
                    "progress": "Triggered",
                    "title": "CPU usage high - web-server-01",
                    "description": "",
                    "ai_summary": "",
                    "impact": "",
                    "root_cause": "",
                    "resolution": "",
                    "num": "0E83EE",
                    "frequency": "frequent",
                    "created_at": 1775912222,
                    "updated_at": 1775972145,
                    "snoozed_before": 0,
                    "group_method": "n",
                    "ever_muted": false,
                    "labels": {
                      "check": "cpu_usage_high",
                      "resource": "web-server-01",
                      "env": "production"
                    },
                    "fields": {},
                    "assigned_to": {
                      "person_ids": [
                        2476444212131
                      ],
                      "escalate_rule_id": "000000000000000000000000",
                      "layer_idx": 0,
                      "type": "assign",
                      "assigned_at": 1775972128,
                      "id": "MvQfH9Dc8eNS8k79jmrWn6",
                      "escalate_rule_name": ""
                    },
                    "alert_cnt": 1,
                    "active_alert_cnt": 1,
                    "alert_event_cnt": 17,
                    "responders": [
                      {
                        "person_id": 2476444212131,
                        "assigned_at": 1775972128,
                        "acknowledged_at": 0
                      }
                    ],
                    "account_name": "",
                    "account_locale": "",
                    "account_time_zone": "",
                    "channel_name": "Ops Channel",
                    "channel_status": "enabled",
                    "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                    "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                    "integration_type": "monit.alert",
                    "post_mortem_id": "",
                    "images": null,
                    "manual_overrides": [
                      "title"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncidentInfoRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee"
              }
            }
          }
        }
      }
    },
    "/incident/list-by-ids": {
      "post": {
        "operationId": "incidentListByIds",
        "summary": "List incidents by IDs",
        "description": "Retrieve multiple incidents by their IDs in a single request.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-list-by-ids",
          "metadata": {
            "sidebarTitle": "List incidents by IDs"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/IncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "incident_id": "69da451ef77b1b51f40e83ee",
                        "account_id": 2451002751131,
                        "channel_id": 2551105804131,
                        "integration_id": 2490562293131,
                        "integration_ids": [
                          2490562293131
                        ],
                        "integration_types": [
                          "monit.alert"
                        ],
                        "dedup_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "equals_md5": "",
                        "start_time": 1775912219,
                        "end_time": 0,
                        "last_time": 1775969819,
                        "ack_time": 0,
                        "close_time": 0,
                        "creator_id": 0,
                        "closer_id": 0,
                        "owner_id": 0,
                        "incident_status": "Critical",
                        "incident_severity": "Critical",
                        "progress": "Triggered",
                        "title": "CPU usage high - web-server-01",
                        "description": "",
                        "ai_summary": "",
                        "impact": "",
                        "root_cause": "",
                        "resolution": "",
                        "num": "0E83EE",
                        "frequency": "frequent",
                        "created_at": 1775912222,
                        "updated_at": 1775972145,
                        "snoozed_before": 0,
                        "group_method": "n",
                        "ever_muted": false,
                        "labels": {},
                        "fields": {},
                        "assigned_to": {
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "",
                          "assigned_at": 0,
                          "id": "",
                          "escalate_rule_name": ""
                        },
                        "alert_cnt": 1,
                        "active_alert_cnt": 1,
                        "alert_event_cnt": 17,
                        "responders": [],
                        "account_name": "",
                        "account_locale": "",
                        "account_time_zone": "",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "detail_url": "https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee",
                        "silence_url": "https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee",
                        "integration_type": "monit.alert",
                        "post_mortem_id": "",
                        "images": null,
                        "manual_overrides": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListIncidentsByIdsRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee",
                  "69da451ef77b1b51f40e83ef"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/alert/list": {
      "post": {
        "operationId": "incidentAlertList",
        "summary": "List alerts of incident",
        "description": "List all alerts merged into a specific incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- Set `include_events=true` only when you need a preview of each alert's raw events.\n- Event previews are capped at the 20 newest events per alert. Use `POST /alert/event/list` for a full paginated event history.\n- `event_cnt` still reports the total number of raw events merged into each alert.",
          "href": "/en/api-reference/on-call/incidents/incident-alert-list",
          "metadata": {
            "sidebarTitle": "List alerts of incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListIncidentAlertsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "alert_id": "69da451df77b1b51f40e83de",
                        "integration_id": 2490562293131,
                        "data_source_id": 2490562293131,
                        "channel_id": 2551105804131,
                        "account_id": 2451002751131,
                        "description": "",
                        "title": "CPU usage high - web-server-01",
                        "title_rule": "",
                        "alert_key": "100128:prom-10.99.1.107:A:1579244238440766834:anydata",
                        "alert_severity": "Critical",
                        "alert_status": "Critical",
                        "start_time": 1775912219,
                        "last_time": 1775969819,
                        "end_time": 0,
                        "labels": {
                          "check": "cpu_usage_high",
                          "resource": "web-server-01"
                        },
                        "ever_muted": false,
                        "created_at": 1775912221,
                        "updated_at": 1775969821,
                        "integration_name": "FlashMonit",
                        "integration_type": "monit.alert",
                        "integration_ref_id": "a_2451002751131",
                        "channel_name": "Ops Channel",
                        "channel_status": "enabled",
                        "responder_name": "",
                        "responder_email": "",
                        "incident": {
                          "incident_id": "69da451ef77b1b51f40e83ee",
                          "title": "CPU usage high - web-server-01",
                          "progress": "Triggered"
                        },
                        "event_cnt": 17,
                        "images": null,
                        "data_source_name": "FlashMonit",
                        "data_source_type": "monit.alert",
                        "data_source_ref_id": "a_2451002751131",
                        "events": [
                          {
                            "event_id": "69da451df77b1b51f40e83df",
                            "alert_id": "69da451df77b1b51f40e83de",
                            "title": "CPU usage > 90%",
                            "event_severity": "Critical",
                            "event_status": "Critical",
                            "event_time": 1712650000,
                            "labels": {
                              "host": "web-01"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListIncidentAlertsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "is_active": true,
                "limit": 100,
                "p": 1,
                "include_events": true
              }
            }
          }
        }
      }
    },
    "/incident/feed": {
      "post": {
        "operationId": "incidentFeed",
        "summary": "Get incident timeline",
        "description": "Retrieve the timeline feed for a specific incident, including state changes, comments and system events.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-feed",
          "metadata": {
            "sidebarTitle": "Get incident timeline"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListIncidentFeedResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": true,
                    "items": [
                      {
                        "ref_id": "69da451ef77b1b51f40e83ee",
                        "type": "i_new",
                        "detail": {
                          "severity": "Critical",
                          "title": "CPU usage high - web-server-01"
                        },
                        "account_id": 2451002751131,
                        "creator_id": 0,
                        "created_at": 1775912222661,
                        "updated_at": 1775912222661
                      },
                      {
                        "ref_id": "69da451ef77b1b51f40e83ee",
                        "type": "i_notify",
                        "detail": {
                          "rid": "5e9ccfabcd154b41a0005fd0f52b674b",
                          "msg_id": "naFudJYCawBWsChdV6ErPH",
                          "fire_type": "fire",
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "by": "email",
                          "persons": [
                            {
                              "person_id": 2476444212131
                            }
                          ]
                        },
                        "account_id": 2451002751131,
                        "creator_id": 0,
                        "created_at": 1775972130174,
                        "updated_at": 1775972130174
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListIncidentFeedRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/incident/past/list": {
      "post": {
        "operationId": "incidentPastList",
        "summary": "List past incidents",
        "description": "List historical incidents related to the current incident for reference during triage.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **20 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-past-list",
          "metadata": {
            "sidebarTitle": "List past incidents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPastIncidentsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPastIncidentsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "limit": 5
              }
            }
          }
        }
      }
    },
    "/incident/create": {
      "post": {
        "operationId": "incidentCreate",
        "summary": "Create incident",
        "description": "Manually create a new incident and assign responders.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-create",
          "metadata": {
            "sidebarTitle": "Create incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateIncidentResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "incident_id": "69db2ef1a0fe7db6448b14f1",
                    "title": "API test incident for docs"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIncidentRequest"
              },
              "example": {
                "incident_severity": "Critical",
                "title": "Database connection timeout on prod-db-01",
                "channel_id": 2551105804131,
                "assigned_to": {
                  "person_ids": [
                    2476444212131
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/incident/ack": {
      "post": {
        "operationId": "incidentAck",
        "summary": "Acknowledge incident",
        "description": "Acknowledge an incident to indicate you are actively working on it.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-ack",
          "metadata": {
            "sidebarTitle": "Acknowledge incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AckIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/unack": {
      "post": {
        "operationId": "incidentUnack",
        "summary": "Unacknowledge incident",
        "description": "Remove the acknowledge status from an incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-unack",
          "metadata": {
            "sidebarTitle": "Unacknowledge incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnackIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/resolve": {
      "post": {
        "operationId": "incidentResolve",
        "summary": "Resolve incident",
        "description": "Mark an incident as resolved.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-resolve",
          "metadata": {
            "sidebarTitle": "Resolve incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "root_cause": "Memory leak in the connection pool caused by a missing cleanup call.",
                "resolution": "Deployed hotfix v2.3.1 and restarted the affected service."
              }
            }
          }
        }
      }
    },
    "/incident/reopen": {
      "post": {
        "operationId": "incidentReopen",
        "summary": "Reopen incident",
        "description": "Reopen a previously resolved incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-reopen",
          "metadata": {
            "sidebarTitle": "Reopen incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "reason": "Monitoring detected the issue recurred after the initial fix."
              }
            }
          }
        }
      }
    },
    "/incident/snooze": {
      "post": {
        "operationId": "incidentSnooze",
        "summary": "Snooze incident",
        "description": "Temporarily snooze notifications for an incident until a specified time.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-snooze",
          "metadata": {
            "sidebarTitle": "Snooze incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnoozeIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "minutes": 60
              }
            }
          }
        }
      }
    },
    "/incident/wake": {
      "post": {
        "operationId": "incidentWake",
        "summary": "Wake incident",
        "description": "Cancel the snooze on an incident and resume notifications.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-wake",
          "metadata": {
            "sidebarTitle": "Wake incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WakeIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/merge": {
      "post": {
        "operationId": "incidentMerge",
        "summary": "Merge incidents",
        "description": "Merge one or more incidents into a target incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-merge",
          "metadata": {
            "sidebarTitle": "Merge incidents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeIncidentsRequest"
              },
              "example": {
                "source_incident_ids": [
                  "69da451ef77b1b51f40e83ef",
                  "69da451ef77b1b51f40e83f0"
                ],
                "target_incident_id": "69da451ef77b1b51f40e83ee",
                "comment": "Merging related database connectivity incidents into one."
              }
            }
          }
        }
      }
    },
    "/incident/disable-merge": {
      "post": {
        "operationId": "incidentDisableMerge",
        "summary": "Disable incident merge",
        "description": "Disable automatic merging for a specific incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-disable-merge",
          "metadata": {
            "sidebarTitle": "Disable incident merge"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableIncidentMergeRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/reset": {
      "post": {
        "operationId": "incidentReset",
        "summary": "Update incident fields",
        "description": "Update one or more editable fields of an incident in a single call, including title, description, impact, root cause, resolution, and severity. At least one field must be provided.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-reset",
          "metadata": {
            "sidebarTitle": "Update incident fields"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIncidentFieldsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "title": "Database connection timeout - prod-db-01 primary",
                "incident_severity": "Critical"
              }
            }
          }
        }
      }
    },
    "/incident/remove": {
      "post": {
        "operationId": "incidentRemove",
        "summary": "Delete an incident",
        "description": "Permanently delete an incident and all associated data.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-remove",
          "metadata": {
            "sidebarTitle": "Delete an incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ]
              }
            }
          }
        }
      }
    },
    "/incident/comment": {
      "post": {
        "operationId": "incidentComment",
        "summary": "Add comment to incident",
        "description": "Add a text comment to the incident timeline.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-comment",
          "metadata": {
            "sidebarTitle": "Add comment to incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentIncidentRequest"
              },
              "example": {
                "incident_ids": [
                  "69da451ef77b1b51f40e83ee"
                ],
                "comment": "Identified the root cause. Rolling back the deployment now."
              }
            }
          }
        }
      }
    },
    "/incident/assign": {
      "post": {
        "operationId": "incidentAssign",
        "summary": "Assign incident",
        "description": "Dispatch an incident to a specific escalation level or responder.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-assign",
          "metadata": {
            "sidebarTitle": "Assign incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignIncidentRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "assigned_to": {
                  "person_ids": [
                    2476444212131
                  ],
                  "type": "assign"
                }
              }
            }
          }
        }
      }
    },
    "/incident/responder/add": {
      "post": {
        "operationId": "incidentResponderAdd",
        "summary": "Add incident responder",
        "description": "Add a responder to an existing incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-responder-add",
          "metadata": {
            "sidebarTitle": "Add incident responder"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddIncidentResponderRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "person_ids": [
                  2476444212131,
                  2476444212132
                ]
              }
            }
          }
        }
      }
    },
    "/incident/field/reset": {
      "post": {
        "operationId": "incidentFieldReset",
        "summary": "Update incident custom field",
        "description": "Update a custom field value on an incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-field-reset",
          "metadata": {
            "sidebarTitle": "Update incident custom field"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetIncidentFieldRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "field_name": "affected_service",
                "field_value": "payment-service"
              }
            }
          }
        }
      }
    },
    "/incident/custom-action/do": {
      "post": {
        "operationId": "incidentCustomActionDo",
        "summary": "Execute custom action",
        "description": "Execute a custom action configured for an incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-custom-action-do",
          "metadata": {
            "sidebarTitle": "Execute custom action"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DoIncidentCustomActionResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "message": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DoIncidentCustomActionRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131
              }
            }
          }
        }
      }
    },
    "/incident/war-room/detail": {
      "post": {
        "operationId": "incidentWarRoomDetail",
        "summary": "Get war room detail",
        "description": "Retrieve the war room configuration and members for an incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-war-room-detail",
          "metadata": {
            "sidebarTitle": "Get war room detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WarRoom"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000",
                    "chat_name": "Incident #0E83EE war room",
                    "share_link": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetWarRoomDetailRequest"
              },
              "example": {
                "integration_id": 2490562293131,
                "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/list": {
      "post": {
        "operationId": "incidentWarRoomList",
        "summary": "List war rooms",
        "description": "List all war rooms associated with an incident.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-war-room-list",
          "metadata": {
            "sidebarTitle": "List war rooms"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWarRoomsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListWarRoomsRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/create": {
      "post": {
        "operationId": "incidentWarRoomCreate",
        "summary": "Create war room",
        "description": "Create a war room channel for collaborative incident response.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-war-room-create",
          "metadata": {
            "sidebarTitle": "Create war room"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WarRoom"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "chat_id": "oc_a0553eda9014c2de1b3a8f75b4e0c000",
                    "chat_name": "Incident #0E83EE war room",
                    "share_link": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarRoomRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131,
                "add_observers": true
              }
            }
          }
        }
      }
    },
    "/incident/war-room/delete": {
      "post": {
        "operationId": "incidentWarRoomDelete",
        "summary": "Delete war room",
        "description": "Delete an incident war room.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-war-room-delete",
          "metadata": {
            "sidebarTitle": "Delete war room"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteWarRoomRequest"
              },
              "example": {
                "incident_id": "69da451ef77b1b51f40e83ee",
                "integration_id": 2490562293131
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/info": {
      "get": {
        "operationId": "incidentPostMortemInfo",
        "summary": "Get post-mortem",
        "description": "Retrieve a post-mortem report by its `post_mortem_id`. List reports via `/incident/post-mortem/list` first — each row carries the incident it covers — then fetch the full report here by that id.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-post-mortem-info",
          "metadata": {
            "sidebarTitle": "Get post-mortem"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "meta": {
                      "account_id": 2451002751131,
                      "title": "Postmortem1",
                      "status": "published",
                      "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                      "template_id": "post_mortem_default_tmpl_en-us",
                      "incident_ids": [
                        "69bb9233331067560c718ecd"
                      ],
                      "media_count": 0,
                      "author_ids": [
                        2477273692131
                      ],
                      "team_id": 2477033058131,
                      "channel_id": 3047621227131,
                      "is_private": false,
                      "channel_name": "Ops Channel",
                      "created_at_seconds": 1773900354,
                      "updated_at_seconds": 1773909012
                    },
                    "basics": {
                      "incidents_highest_severity": "Warning",
                      "incidents_earliest_start_seconds": 1761133512,
                      "incidents_latest_close_seconds": 1761133632,
                      "incidents_total_duration_seconds": 120,
                      "responders": [
                        {
                          "person_id": 3790925372131,
                          "assigned_at": 1761133515,
                          "acknowledged_at": 0
                        }
                      ]
                    },
                    "content": {
                      "content": "{\"type\":\"doc\",\"content\":[]}"
                    },
                    "follow_ups": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "post_mortem_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs."
          }
        ]
      }
    },
    "/incident/post-mortem/list": {
      "post": {
        "operationId": "incidentPostMortemList",
        "summary": "List post-mortems",
        "description": "List post-mortem reports with optional filters.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-post-mortem-list",
          "metadata": {
            "sidebarTitle": "List post-mortems"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPostMortemsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "has_next_page": false,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "title": "Postmortem1",
                        "status": "published",
                        "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                        "template_id": "post_mortem_default_tmpl_en-us",
                        "incident_ids": [
                          "69bb9233331067560c718ecd"
                        ],
                        "media_count": 0,
                        "author_ids": [
                          2477273692131
                        ],
                        "team_id": 2477033058131,
                        "channel_id": 3047621227131,
                        "is_private": false,
                        "channel_name": "Ops Channel",
                        "created_at_seconds": 1773900354,
                        "updated_at_seconds": 1773909012
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPostMortemsRequest"
              },
              "example": {
                "status": "published",
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/delete": {
      "post": {
        "operationId": "incidentPostMortemDelete",
        "summary": "Delete post-mortem",
        "description": "Delete a post-mortem report.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/incident-post-mortem-delete",
          "metadata": {
            "sidebarTitle": "Delete post-mortem"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletePostMortemRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e"
              }
            }
          }
        }
      }
    },
    "/channel/info": {
      "post": {
        "operationId": "channelInfo",
        "summary": "Get channel detail",
        "description": "Retrieve detailed information for a specific channel.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-info",
          "metadata": {
            "sidebarTitle": "Get channel detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "channel_id": 1001,
                    "channel_name": "Production Alerts",
                    "status": "enabled",
                    "team_id": 10
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelInfoRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/list": {
      "post": {
        "operationId": "channelList",
        "summary": "List channels",
        "description": "List channels accessible to the current user with optional filters.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-list",
          "metadata": {
            "sidebarTitle": "List channels"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListChannelsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 42,
                    "has_next_page": true,
                    "items": [
                      {
                        "channel_id": 1001,
                        "channel_name": "Production Alerts",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListChannelsRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/channel/infos": {
      "post": {
        "operationId": "channelInfos",
        "summary": "Batch get channels",
        "description": "Retrieve multiple channels by their IDs.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-infos",
          "metadata": {
            "sidebarTitle": "Batch get channels"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "channel_id": 1001,
                        "channel_name": "Production Alerts",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelInfosRequest"
              },
              "example": {
                "channel_ids": [
                  1001,
                  1002
                ]
              }
            }
          }
        }
      }
    },
    "/channel/create": {
      "post": {
        "operationId": "channelCreate",
        "summary": "Create channel",
        "description": "Create a new channel for incident management.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-create",
          "metadata": {
            "sidebarTitle": "Create channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ChannelCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "channel_id": 6294542005131,
                    "channel_name": "API Test Channel"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelRequest"
              },
              "example": {
                "team_id": 3521074710131,
                "channel_name": "Production Alerts",
                "description": "Handles all production environment alerts",
                "group": {
                  "method": "p",
                  "time_window": 10,
                  "window_type": "tumbling"
                },
                "auto_resolve_timeout": 86400,
                "auto_resolve_mode": "trigger"
              }
            }
          }
        }
      }
    },
    "/channel/update": {
      "post": {
        "operationId": "channelUpdate",
        "summary": "Update channel",
        "description": "Update an existing channel's configuration and settings.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-update",
          "metadata": {
            "sidebarTitle": "Update channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpdateChannelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "external_report_token": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannelRequest"
              },
              "example": {
                "channel_id": 1001,
                "channel_name": "Production Alerts (v2)",
                "description": "Updated description"
              }
            }
          }
        }
      }
    },
    "/channel/delete": {
      "post": {
        "operationId": "channelDelete",
        "summary": "Delete channel",
        "description": "Delete a channel and all associated configuration.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-delete",
          "metadata": {
            "sidebarTitle": "Delete channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/enable": {
      "post": {
        "operationId": "channelEnable",
        "summary": "Enable channel",
        "description": "Enable a disabled channel to resume incident routing.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-enable",
          "metadata": {
            "sidebarTitle": "Enable channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/disable": {
      "post": {
        "operationId": "channelDisable",
        "summary": "Disable channel",
        "description": "Disable a channel to stop incident routing without deleting it.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-disable",
          "metadata": {
            "sidebarTitle": "Disable channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelIDRequest"
              },
              "example": {
                "channel_id": 3521074710131
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/list": {
      "post": {
        "operationId": "channelSilenceRuleList",
        "summary": "List silence rules",
        "description": "List all silence rules configured for a channel.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-list",
          "metadata": {
            "sidebarTitle": "List silence rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListSilenceRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Silence Info alerts",
                        "description": "",
                        "from_incident_id": "000000000000000000000000",
                        "time_filters": [],
                        "time_filter": {
                          "start_time": 1773388800,
                          "end_time": 1773414000
                        },
                        "filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "is_directly_discard": true,
                        "status": "enabled",
                        "rule_id": "69b3c426b4a6f5abf1f54873",
                        "updated_by": 3790925372131,
                        "created_at": 1773388838,
                        "updated_at": 1773388838,
                        "is_effective": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/create": {
      "post": {
        "operationId": "channelSilenceRuleCreate",
        "summary": "Create silence rule",
        "description": "Create a silence rule to suppress notifications matching specified conditions.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-create",
          "metadata": {
            "sidebarTitle": "Create silence rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f66a0fe7db6448b1503",
                    "rule_name": "Test silence rule"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSilenceRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Maintenance window silence",
                "description": "Silence all Info alerts during planned maintenance",
                "time_filter": {
                  "start_time": 1773388800,
                  "end_time": 1773414000
                },
                "filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Info"
                      ]
                    }
                  ]
                ],
                "is_directly_discard": false
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/update": {
      "post": {
        "operationId": "channelSilenceRuleUpdate",
        "summary": "Update silence rule",
        "description": "Update an existing silence rule configuration.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-update",
          "metadata": {
            "sidebarTitle": "Update silence rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSilenceRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34cd",
                "rule_name": "Mute during maintenance",
                "time_filter": {
                  "start_time": 1710000000,
                  "end_time": 1710086400
                },
                "filters": [
                  [
                    {
                      "key": "labels.service",
                      "oper": "IN",
                      "vals": [
                        "billing"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/delete": {
      "post": {
        "operationId": "channelSilenceRuleDelete",
        "summary": "Delete silence rule",
        "description": "Delete a silence rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-delete",
          "metadata": {
            "sidebarTitle": "Delete silence rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/enable": {
      "post": {
        "operationId": "channelSilenceRuleEnable",
        "summary": "Enable silence rule",
        "description": "Enable a disabled silence rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-enable",
          "metadata": {
            "sidebarTitle": "Enable silence rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/silence/rule/disable": {
      "post": {
        "operationId": "channelSilenceRuleDisable",
        "summary": "Disable silence rule",
        "description": "Disable a silence rule without deleting it.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-silence-rule-disable",
          "metadata": {
            "sidebarTitle": "Disable silence rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/list": {
      "post": {
        "operationId": "channelInhibitRuleList",
        "summary": "List inhibit rules",
        "description": "List all inhibit rules configured for a channel.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-list",
          "metadata": {
            "sidebarTitle": "List inhibit rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListInhibitRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Suppress downstream alerts",
                        "description": "",
                        "source_filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "target_filters": [
                          [
                            {
                              "key": "severity",
                              "oper": "IN",
                              "vals": [
                                "Info"
                              ]
                            }
                          ]
                        ],
                        "equals": [
                          "data_source_id",
                          "labels._account_id"
                        ],
                        "is_directly_discard": false,
                        "status": "enabled",
                        "rule_id": "69bcc630b9e63df36603e425",
                        "updated_by": 3790925372131,
                        "created_at": 1773979184,
                        "updated_at": 1773979184
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/create": {
      "post": {
        "operationId": "channelInhibitRuleCreate",
        "summary": "Create inhibit rule",
        "description": "Create an inhibit rule to suppress lower-priority alerts when higher-priority ones are firing.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-create",
          "metadata": {
            "sidebarTitle": "Create inhibit rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f69a0fe7db6448b1504",
                    "rule_name": "Test inhibit rule"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInhibitRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Suppress Info when Critical fires",
                "description": "When a Critical alert fires, suppress matching Info alerts",
                "equals": [
                  "labels.cluster",
                  "labels.service"
                ],
                "source_filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Critical"
                      ]
                    }
                  ]
                ],
                "target_filters": [
                  [
                    {
                      "key": "severity",
                      "oper": "IN",
                      "vals": [
                        "Info"
                      ]
                    }
                  ]
                ],
                "is_directly_discard": false
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/update": {
      "post": {
        "operationId": "channelInhibitRuleUpdate",
        "summary": "Update inhibit rule",
        "description": "Update an existing inhibit rule configuration.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-update",
          "metadata": {
            "sidebarTitle": "Update inhibit rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInhibitRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34ce",
                "rule_name": "Suppress downstream",
                "equals": [
                  "labels.cluster"
                ]
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/delete": {
      "post": {
        "operationId": "channelInhibitRuleDelete",
        "summary": "Delete inhibit rule",
        "description": "Delete an inhibit rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-delete",
          "metadata": {
            "sidebarTitle": "Delete inhibit rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/enable": {
      "post": {
        "operationId": "channelInhibitRuleEnable",
        "summary": "Enable inhibit rule",
        "description": "Enable a disabled inhibit rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-enable",
          "metadata": {
            "sidebarTitle": "Enable inhibit rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/inhibit/rule/disable": {
      "post": {
        "operationId": "channelInhibitRuleDisable",
        "summary": "Disable inhibit rule",
        "description": "Disable an inhibit rule without deleting it.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-inhibit-rule-disable",
          "metadata": {
            "sidebarTitle": "Disable inhibit rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/list": {
      "post": {
        "operationId": "channelUnsubscribeRuleList",
        "summary": "List drop rules",
        "description": "List drop rules for a channel.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-list",
          "metadata": {
            "sidebarTitle": "List drop rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListDropRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 5967964835131,
                        "priority": 0,
                        "rule_name": "Drop test alerts",
                        "description": "",
                        "filters": [
                          [
                            {
                              "key": "data_source_id",
                              "oper": "IN",
                              "vals": [
                                "6113996590131"
                              ]
                            }
                          ]
                        ],
                        "status": "enabled",
                        "rule_id": "69bcc530b9e63df36603e421",
                        "updated_by": 3790925372131,
                        "created_at": 1773978928,
                        "updated_at": 1773978928
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/create": {
      "post": {
        "operationId": "channelUnsubscribeRuleCreate",
        "summary": "Create drop rule",
        "description": "Create a drop rule to filter out unwanted alerts before they become incidents.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-create",
          "metadata": {
            "sidebarTitle": "Create drop rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f6ba0fe7db6448b1505",
                    "rule_name": "Test drop rule"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDropRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "Drop test environment alerts",
                "description": "Discard all alerts from the test environment before they create incidents",
                "filters": [
                  [
                    {
                      "key": "labels.env",
                      "oper": "IN",
                      "vals": [
                        "test",
                        "dev"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/update": {
      "post": {
        "operationId": "channelUnsubscribeRuleUpdate",
        "summary": "Update drop rule",
        "description": "Update an existing drop rule configuration.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-update",
          "metadata": {
            "sidebarTitle": "Update drop rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDropRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34cf",
                "rule_name": "Drop test alerts",
                "filters": [
                  [
                    {
                      "key": "labels.env",
                      "oper": "IN",
                      "vals": [
                        "test"
                      ]
                    }
                  ]
                ]
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/delete": {
      "post": {
        "operationId": "channelUnsubscribeRuleDelete",
        "summary": "Delete drop rule",
        "description": "Delete a drop rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-delete",
          "metadata": {
            "sidebarTitle": "Delete drop rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/enable": {
      "post": {
        "operationId": "channelUnsubscribeRuleEnable",
        "summary": "Enable drop rule",
        "description": "Enable a disabled drop rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-enable",
          "metadata": {
            "sidebarTitle": "Enable drop rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/unsubscribe/rule/disable": {
      "post": {
        "operationId": "channelUnsubscribeRuleDisable",
        "summary": "Disable drop rule",
        "description": "Disable a drop rule without deleting it.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/channels/channel-unsubscribe-rule-disable",
          "metadata": {
            "sidebarTitle": "Disable drop rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/info": {
      "post": {
        "operationId": "channelEscalateRuleInfo",
        "summary": "Get escalation rule detail",
        "description": "Retrieve detailed information for a specific escalation rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-info",
          "metadata": {
            "sidebarTitle": "Get escalation rule detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EscalateRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "channel_id": 6193426913131,
                    "priority": 0,
                    "aggr_window": 0,
                    "rule_name": "Default",
                    "description": "",
                    "layers": [
                      {
                        "max_times": 1,
                        "notify_step": 10,
                        "target": {
                          "person_ids": [
                            3790925372131
                          ],
                          "by": {
                            "follow_preference": true
                          },
                          "webhooks": null
                        },
                        "escalate_window": 30,
                        "force_escalate": false
                      }
                    ],
                    "time_filters": [],
                    "filters": [],
                    "status": "enabled",
                    "template_id": "6321aad26c12104586a88916",
                    "rule_id": "69bd0ce95a238693176c1d66",
                    "updated_by": 3790925372131,
                    "created_at": 1773997289,
                    "updated_at": 1773997289
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34d0"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/list": {
      "post": {
        "operationId": "channelEscalateRuleList",
        "summary": "List escalation rules",
        "description": "List all escalation rules for a channel.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-list",
          "metadata": {
            "sidebarTitle": "List escalation rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListEscalationRulesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "channel_id": 6193426913131,
                        "priority": 0,
                        "aggr_window": 0,
                        "rule_name": "Default",
                        "description": "",
                        "layers": [
                          {
                            "max_times": 1,
                            "notify_step": 10,
                            "target": {
                              "person_ids": [
                                3790925372131
                              ],
                              "by": {
                                "follow_preference": true
                              },
                              "webhooks": null
                            },
                            "escalate_window": 30,
                            "force_escalate": false
                          }
                        ],
                        "time_filters": [],
                        "filters": [],
                        "status": "enabled",
                        "template_id": "6321aad26c12104586a88916",
                        "rule_id": "69bd0ce95a238693176c1d66",
                        "updated_by": 3790925372131,
                        "created_at": 1773997289,
                        "updated_at": 1773997289
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelScopedListRequest"
              },
              "example": {
                "channel_id": 1001
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/create": {
      "post": {
        "operationId": "channelEscalateRuleCreate",
        "summary": "Create escalation rule",
        "description": "Create an escalation rule defining who gets notified and when during an incident.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-create",
          "metadata": {
            "sidebarTitle": "Create escalation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "69db2f72a0fe7db6448b1506",
                    "rule_name": "Test escalation rule"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEscalationRuleRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_name": "On-call escalation",
                "template_id": "6321aad26c12104586a88916",
                "description": "Notify primary on-call, then escalate to secondary after 30 minutes",
                "layers": [
                  {
                    "target": {
                      "person_ids": [
                        3790925372131
                      ],
                      "by": {
                        "follow_preference": true
                      }
                    },
                    "max_times": 3,
                    "notify_step": 10,
                    "escalate_window": 30,
                    "force_escalate": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/update": {
      "post": {
        "operationId": "channelEscalateRuleUpdate",
        "summary": "Update escalation rule",
        "description": "Update an existing escalation rule configuration.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-update",
          "metadata": {
            "sidebarTitle": "Update escalation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEscalationRuleRequest"
              },
              "example": {
                "channel_id": 1001,
                "rule_id": "6621b23f4a2c5e0012ab34d0",
                "template_id": "6621b23f4a2c5e0012ab34d1",
                "rule_name": "Default escalation",
                "layers": [
                  {
                    "target": {
                      "person_ids": [
                        42
                      ],
                      "by": {
                        "critical": [
                          "voice"
                        ],
                        "warning": [
                          "sms"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/delete": {
      "post": {
        "operationId": "channelEscalateRuleDelete",
        "summary": "Delete escalation rule",
        "description": "Delete an escalation rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-delete",
          "metadata": {
            "sidebarTitle": "Delete escalation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/enable": {
      "post": {
        "operationId": "channelEscalateRuleEnable",
        "summary": "Enable escalation rule",
        "description": "Enable a disabled escalation rule.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-enable",
          "metadata": {
            "sidebarTitle": "Enable escalation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/channel/escalate/rule/disable": {
      "post": {
        "operationId": "channelEscalateRuleDisable",
        "summary": "Disable escalation rule",
        "description": "Disable an escalation rule without deleting it.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/channel-escalate-rule-disable",
          "metadata": {
            "sidebarTitle": "Disable escalation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRuleIDRequest"
              },
              "example": {
                "channel_id": 3521074710131,
                "rule_id": "6621b23f4a2c5e0012ab34cd"
              }
            }
          }
        }
      }
    },
    "/route/info": {
      "post": {
        "operationId": "routeInfo",
        "summary": "Get routing rule detail",
        "description": "Retrieve the routing rule configuration for a specific integration. Returns null when the integration has no routing rule configured.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/route-info",
          "metadata": {
            "sidebarTitle": "Get routing rule detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RouteItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 6113996590131,
                    "cases": [
                      {
                        "if": [
                          {
                            "key": "labels.check",
                            "oper": "IN",
                            "vals": [
                              "cpu.idle<20%"
                            ]
                          }
                        ],
                        "channel_ids": [
                          2533748993131
                        ],
                        "fallthrough": false,
                        "routing_mode": "standard"
                      },
                      {
                        "if": [
                          {
                            "key": "severity",
                            "oper": "IN",
                            "vals": [
                              "Warning"
                            ]
                          }
                        ],
                        "channel_ids": null,
                        "fallthrough": false,
                        "routing_mode": "name_mapping",
                        "name_mapping_label": "labels.service"
                      }
                    ],
                    "default": {
                      "channel_ids": [
                        3521074710131
                      ]
                    },
                    "status": "enabled",
                    "version": 6,
                    "updated_by": 3790925372131,
                    "creator_id": 3790925372131,
                    "created_at": 1774606136,
                    "updated_at": 1774606136
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteInfoRequest"
              },
              "example": {
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/route/list": {
      "post": {
        "operationId": "routeList",
        "summary": "List routing rules",
        "description": "Return routing rules for the specified integrations. Integrations without a configured rule are omitted from the response.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/route-list",
          "metadata": {
            "sidebarTitle": "List routing rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListRoutesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 6113996590131,
                        "cases": [
                          {
                            "if": [
                              {
                                "key": "labels.check",
                                "oper": "IN",
                                "vals": [
                                  "cpu.idle<20%"
                                ]
                              }
                            ],
                            "channel_ids": [
                              2533748993131
                            ],
                            "fallthrough": false,
                            "routing_mode": "standard"
                          }
                        ],
                        "default": {
                          "channel_ids": [
                            3521074710131
                          ]
                        },
                        "status": "enabled",
                        "version": 6,
                        "updated_by": 3790925372131,
                        "creator_id": 3790925372131,
                        "created_at": 1774606136,
                        "updated_at": 1774606136
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListRoutesRequest"
              },
              "example": {
                "integration_ids": [
                  6113996590131,
                  6113996590132
                ]
              }
            }
          }
        }
      }
    },
    "/route/upsert": {
      "post": {
        "operationId": "routeUpsert",
        "summary": "Upsert routing rule",
        "description": "Create or update routing rules for an integration to direct alerts to specific channels. At least one of `cases` or `default` must be provided.",
        "tags": [
          "On-call/Channels"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/channels/route-upsert",
          "metadata": {
            "sidebarTitle": "Upsert routing rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRouteRequest"
              },
              "example": {
                "integration_id": 6113996590131,
                "cases": [
                  {
                    "if": [
                      {
                        "key": "severity",
                        "oper": "IN",
                        "vals": [
                          "Critical"
                        ]
                      }
                    ],
                    "channel_ids": [
                      3521074710131
                    ],
                    "fallthrough": false,
                    "routing_mode": "standard"
                  }
                ],
                "default": {
                  "channel_ids": [
                    3521074710131
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/alert/list": {
      "post": {
        "operationId": "alert-read-list",
        "summary": "List alerts",
        "description": "Return a cursor-paginated list of alerts matching the given filters.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Both `start_time` and `end_time` are required Unix epoch seconds. Maximum span is 31 days.\n- Use `search_after_ctx` from the previous response to fetch the next page.\n- Results are filtered by the caller's channel data-access permissions.\n- Set `is_active` to `true` to retrieve only active (firing) alerts; `false` to retrieve resolved alerts.",
          "href": "/en/api-reference/on-call/alerts/alert-read-list",
          "metadata": {
            "sidebarTitle": "List alerts"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "search_after_ctx": "",
                    "items": [
                      {
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "integration_id": 10001,
                        "channel_id": 20001,
                        "account_id": 10023,
                        "title": "CPU usage > 90%",
                        "alert_severity": "Critical",
                        "alert_status": "Critical",
                        "start_time": 1712650000,
                        "last_time": 1712655000,
                        "end_time": 0,
                        "labels": {
                          "host": "web-01"
                        },
                        "ever_muted": false,
                        "created_at": 1712650000,
                        "updated_at": 1712655000,
                        "integration_name": "Prometheus",
                        "integration_type": "prometheus",
                        "channel_name": "Production",
                        "event_cnt": 3
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertListRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "is_active": true
              }
            }
          }
        }
      }
    },
    "/alert/info": {
      "post": {
        "operationId": "alert-read-info",
        "summary": "Get alert detail",
        "description": "Return the full details of a single alert by its ID, including its associated incident and event count.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- `alert_id` is an ObjectID hex string returned by `POST /alert/list` or `POST /alert-event/list`.",
          "href": "/en/api-reference/on-call/alerts/alert-read-info",
          "metadata": {
            "sidebarTitle": "Get alert detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "alert_id": "663a1b2c3d4e5f6789abcdef",
                    "title": "CPU usage > 90%",
                    "alert_severity": "Critical",
                    "alert_status": "Critical",
                    "start_time": 1712650000,
                    "event_cnt": 3
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertInfoRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef"
              }
            }
          }
        }
      }
    },
    "/alert/list-by-ids": {
      "post": {
        "operationId": "alert-read-list-by-ids",
        "summary": "List alerts by IDs",
        "description": "Return the details of multiple alerts by their IDs in a single request.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All provided `alert_ids` must belong to the caller's account; any invalid ID causes the entire request to fail.",
          "href": "/en/api-reference/on-call/alerts/alert-read-list-by-ids",
          "metadata": {
            "sidebarTitle": "List alerts by IDs"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU usage > 90%"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertListByIDsRequest"
              },
              "example": {
                "alert_ids": [
                  "663a1b2c3d4e5f6789abcdef"
                ]
              }
            }
          }
        }
      }
    },
    "/alert/event/list": {
      "post": {
        "operationId": "alert-read-event-list",
        "summary": "List events for an alert",
        "description": "Return raw events for an alert with cursor or page-number pagination.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are newest-first by default. Set `asc=true` to read events oldest-first.\n- Use `limit` with `search_after_ctx` from the previous response to fetch the next page.\n- Classic page-number pagination is also supported with `p`, but `p * limit` must stay within 10,000 records.\n- Each alert can accumulate a large raw event history; prefer cursor pagination for hot alerts.",
          "href": "/en/api-reference/on-call/alerts/alert-read-event-list",
          "metadata": {
            "sidebarTitle": "List events for an alert"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertEventListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 57,
                    "has_next_page": true,
                    "search_after_ctx": "663a1b2c3d4e5f6789abc001",
                    "items": [
                      {
                        "event_id": "663a1b2c3d4e5f6789abc001",
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU usage > 90%",
                        "event_severity": "Critical",
                        "event_status": "Critical",
                        "event_time": 1712650000,
                        "labels": {
                          "host": "web-01"
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertEventListRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef",
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/alert/feed": {
      "post": {
        "operationId": "alert-read-feed",
        "summary": "List alert activity feed",
        "description": "Return the activity feed (comments, state changes, merges, silence events) for a single alert, with page-based pagination.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Use `p` (page number, starting at 1) and `limit` (max 100, default 20) for pagination.\n- Set `asc` to `true` for chronological order.\n- Use `types` to filter by specific feed types (e.g. `alert_comment`, `alert_merge`).",
          "href": "/en/api-reference/on-call/alerts/alert-read-feed",
          "metadata": {
            "sidebarTitle": "List alert activity feed"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertFeedResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": false,
                    "items": [
                      {
                        "ref_id": "663a1b2c3d4e5f6789abcdef",
                        "type": "alert_comment",
                        "detail": {
                          "comment": "Investigating now."
                        },
                        "creator_id": 80011,
                        "created_at": 1712651000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertFeedRequest"
              },
              "example": {
                "alert_id": "663a1b2c3d4e5f6789abcdef",
                "limit": 20,
                "asc": false
              }
            }
          }
        }
      }
    },
    "/alert/merge": {
      "post": {
        "operationId": "alert-write-merge",
        "summary": "Merge alerts into an incident",
        "description": "Associate one or more alerts with an existing incident. If a source alert previously belonged to a different incident and that incident becomes empty after the merge, it will be automatically closed.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- All `alert_ids` and the `incident_id` must belong to the caller's account.\n- Optionally set `title` and `owner_id` to update the target incident at the same time.",
          "href": "/en/api-reference/on-call/alerts/alert-write-merge",
          "metadata": {
            "sidebarTitle": "Merge alerts into an incident"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertMergeRequest"
              },
              "example": {
                "alert_ids": [
                  "663a1b2c3d4e5f6789abcdef"
                ],
                "incident_id": "663a000000000000deadbeef"
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/info": {
      "post": {
        "operationId": "alert-read-pipeline-info",
        "summary": "Get alert pipeline",
        "description": "Return the alert processing pipeline configured for a specific integration.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- Returns `null` data if no pipeline has been configured for the given integration.\n- Requires the caller to have access to the integration.",
          "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-info",
          "metadata": {
            "sidebarTitle": "Get alert pipeline"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertPipelineItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 10001,
                    "rules": [
                      {
                        "kind": "severity_reset",
                        "if": null,
                        "settings": {
                          "severity": "Warning"
                        }
                      }
                    ],
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertPipelineInfoRequest"
              },
              "example": {
                "integration_id": 10001
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/list": {
      "post": {
        "operationId": "alert-read-pipeline-list",
        "summary": "List alert pipelines",
        "description": "Return the alert processing pipelines configured for multiple integrations.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |\n\n## Usage\n\n- All `integration_ids` must be accessible to the caller.",
          "href": "/en/api-reference/on-call/alerts/alert-read-pipeline-list",
          "metadata": {
            "sidebarTitle": "List alert pipelines"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertPipelineListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 10001,
                        "rules": [],
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1712000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertPipelineListRequest"
              },
              "example": {
                "integration_ids": [
                  10001,
                  10002
                ]
              }
            }
          }
        }
      }
    },
    "/alert/pipeline/upsert": {
      "post": {
        "operationId": "alert-write-pipeline-upsert",
        "summary": "Create or update alert pipeline",
        "description": "Set the alert processing pipeline for an integration. Replaces the existing configuration entirely.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Maximum 50 rules per pipeline.\n- Each rule has a `kind` (one of `title_reset`, `description_reset`, `severity_reset`, `alert_drop`, `alert_inhibit`), an optional `if` filter, and `settings` specific to the kind.\n- The `alert_inhibit` kind requires the Standard license or higher.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alerts/alert-write-pipeline-upsert",
          "metadata": {
            "sidebarTitle": "Create or update alert pipeline"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertPipelineUpsertRequest"
              },
              "example": {
                "integration_id": 10001,
                "rules": [
                  {
                    "kind": "severity_reset",
                    "if": null,
                    "settings": {
                      "severity": "Warning"
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/alert-event/list": {
      "post": {
        "operationId": "alert-event-read-list",
        "summary": "List raw alert events",
        "description": "Return a cursor-paginated list of raw alert events across all alerts, with filtering by integration, channel, time range, and severity.",
        "tags": [
          "On-call/Alerts"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) |\n\n## Usage\n\n- Results are filtered by the caller's channel data-access permissions.\n- `severities` is a comma-separated string, e.g. `\"Critical,Warning\"`.",
          "href": "/en/api-reference/on-call/alerts/alert-event-read-list",
          "metadata": {
            "sidebarTitle": "List raw alert events"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertEventGlobalListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "event_id": "663a1b2c3d4e5f6789abc001",
                        "alert_id": "663a1b2c3d4e5f6789abcdef",
                        "title": "CPU usage > 90%",
                        "event_severity": "Critical",
                        "event_time": 1712650000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertEventGlobalListRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "severities": "Critical"
              }
            }
          }
        }
      }
    },
    "/webhook/history/list": {
      "post": {
        "operationId": "webhookHistoryList",
        "summary": "List webhook delivery history",
        "description": "List the delivery history for outbound webhook notifications.",
        "tags": [
          "On-call/Integrations"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/integrations/webhook-history-list",
          "metadata": {
            "sidebarTitle": "List webhook delivery history"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWebhookHistoryResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 5321026051131,
                        "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                        "webhook_type": "alert",
                        "event_type": "a_update",
                        "channel_id": 2551105804131,
                        "ref_id": "69da3f0ef77b1b51f40e83cc",
                        "endpoint": "https://example.com/webhook",
                        "attempt": 1,
                        "duration": 132,
                        "status": "success",
                        "status_code": 200,
                        "event_time": "2026-04-12T13:31:11.357472+08:00"
                      }
                    ],
                    "search_after_ctx": "eyJldmVudF90aW1lIjoiMjAyNi0wNC0xMlQxMzoxNToyNi4zODI1NDcrMDg6MDAiLCJldmVudF9pZCI6IjIwMjYwNDEybUdzeFAzZHJwRmZzNFpDUWQycFNEcCJ9",
                    "total": 346
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListWebhookHistoryRequest"
              },
              "example": {
                "limit": 20,
                "start_time": 1775116800000,
                "end_time": 1775203200000,
                "integration_id": 6113996590131,
                "status": "success"
              }
            }
          }
        }
      }
    },
    "/webhook/history/detail": {
      "post": {
        "operationId": "webhookHistoryDetail",
        "summary": "Get webhook delivery detail",
        "description": "Retrieve the detailed payload and response for a specific webhook delivery attempt.",
        "tags": [
          "On-call/Integrations"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/integrations/webhook-history-detail",
          "metadata": {
            "sidebarTitle": "Get webhook delivery detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/WebhookHistoryDetail"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 5321026051131,
                    "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                    "webhook_type": "alert",
                    "event_type": "a_update",
                    "channel_id": 2551105804131,
                    "ref_id": "69da3f0ef77b1b51f40e83cc",
                    "request_headers": "{\"Content-Type\":\"application/json\"}",
                    "request_body": "{\"event_type\":\"a_update\",\"event_id\":\"d789d65951c0532ea9b6a1d99b707054\"}",
                    "endpoint": "https://example.com/webhook",
                    "attempt": 1,
                    "duration": 132,
                    "status": "success",
                    "status_code": 200,
                    "response_headers": "{\"Content-Type\":\"application/json\"}",
                    "response_body": "{\"ok\":true}",
                    "event_time": "2026-04-12T13:31:11.357472+08:00",
                    "ref_title": "High CPU Usage on host-01",
                    "channel_name": "Production Alerts"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetWebhookHistoryDetailRequest"
              },
              "example": {
                "event_id": "20260412Xatt9hrXsgmFkBR78WF655",
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/schedule/create": {
      "post": {
        "operationId": "scheduleCreate",
        "summary": "Create schedule",
        "description": "Create a new on-call schedule (escalation rule schedule).",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-create",
          "metadata": {
            "sidebarTitle": "Create schedule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleIDResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schedule_id": 6294534917601
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_name": "Production On-Call",
                "description": "Primary on-call rotation for the production team",
                "team_id": 4291079133131,
                "layers": [
                  {
                    "layer_name": "Layer 1",
                    "name": "Layer 1",
                    "mode": 0,
                    "weight": 0,
                    "hidden": 0,
                    "groups": [
                      {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      },
                      {
                        "group_name": "B",
                        "name": "B",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2476123212131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      }
                    ],
                    "rotation_unit": "day",
                    "rotation_value": 1,
                    "rotation_duration": 86400,
                    "handoff_time": 0,
                    "enable_time": 1712000000,
                    "expire_time": 0,
                    "restrict_mode": 0,
                    "restrict_start": 0,
                    "restrict_end": 0,
                    "restrict_periods": [],
                    "day_mask": {
                      "repeat": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ]
                    },
                    "fair_rotation": false,
                    "mask_continuous_enabled": false
                  }
                ],
                "notify": {
                  "advance_in_time": 300,
                  "fixed_time": null,
                  "by": {
                    "follow_preference": true,
                    "personal_channels": null
                  },
                  "webhooks": null
                }
              }
            }
          }
        }
      }
    },
    "/schedule/update": {
      "post": {
        "operationId": "scheduleUpdate",
        "summary": "Update schedule",
        "description": "Update an existing on-call schedule. Provide schedule_id to identify the schedule.",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-update",
          "metadata": {
            "sidebarTitle": "Update schedule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_id": 2001,
                "schedule_name": "Production On-Call (Updated)",
                "description": "Updated primary on-call rotation",
                "team_id": 4291079133131
              }
            }
          }
        }
      }
    },
    "/schedule/preview": {
      "post": {
        "operationId": "schedulePreview",
        "summary": "Preview schedule",
        "description": "Preview the coverage generated by a schedule configuration without persisting it. The request accepts the same body as create/update plus a required start/end window (max 45 days).",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-preview",
          "metadata": {
            "sidebarTitle": "Preview schedule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": null,
                    "name": null,
                    "account_id": 0,
                    "group_id": null,
                    "disabled": null,
                    "create_at": 0,
                    "create_by": 0,
                    "update_at": 0,
                    "update_by": 0,
                    "layers": [
                      {
                        "account_id": 0,
                        "name": "Layer 1",
                        "schedule_id": 0,
                        "hidden": 0,
                        "mode": 0,
                        "weight": 0,
                        "groups": [
                          {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2451002751131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          },
                          {
                            "group_name": "B",
                            "name": "B",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2476123212131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          }
                        ],
                        "rotation_duration": 86400,
                        "handoff_time": 0,
                        "enable_time": 1775980800,
                        "expire_time": 0,
                        "restrict_mode": 0,
                        "restrict_start": 0,
                        "restrict_end": 0,
                        "restrict_periods": [],
                        "day_mask": {
                          "repeat": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ]
                        },
                        "create_at": 0,
                        "create_by": 0,
                        "update_at": 0,
                        "update_by": 0,
                        "layer_name": "Layer 1",
                        "fair_rotation": false,
                        "layer_start": 1775980800,
                        "layer_end": null,
                        "rotation_unit": "day",
                        "rotation_value": 1,
                        "mask_continuous_enabled": false
                      }
                    ],
                    "schedule_layers": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2451002751131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          },
                          {
                            "start": 1776096000,
                            "end": 1776182400,
                            "group": {
                              "group_name": "B",
                              "name": "B",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2476123212131
                                  ]
                                }
                              ],
                              "start": 1776096000,
                              "end": 1776182400
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "final_schedule": {
                      "layer_name": "",
                      "name": "",
                      "mode": 0,
                      "schedules": [
                        {
                          "start": 1776009600,
                          "end": 1776096000,
                          "group": {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2451002751131
                                ]
                              }
                            ],
                            "start": 1776009600,
                            "end": 1776096000
                          },
                          "index": 0
                        }
                      ]
                    },
                    "start": 1775980800,
                    "end": 1776240000,
                    "notify": null,
                    "schedule_id": 0,
                    "schedule_name": null,
                    "team_id": null,
                    "description": null,
                    "layer_schedules": null,
                    "status": null,
                    "cur_oncall": null,
                    "next_oncall": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpsertRequest"
              },
              "example": {
                "schedule_name": "Preview Schedule",
                "start": 1712000000,
                "end": 1712086400,
                "layers": [
                  {
                    "layer_name": "Layer 1",
                    "name": "Layer 1",
                    "mode": 0,
                    "weight": 0,
                    "hidden": 0,
                    "groups": [
                      {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 0,
                        "end": 0
                      }
                    ],
                    "rotation_unit": "day",
                    "rotation_value": 1,
                    "rotation_duration": 86400,
                    "handoff_time": 0,
                    "enable_time": 1712000000,
                    "expire_time": 0,
                    "restrict_mode": 0,
                    "restrict_start": 0,
                    "restrict_end": 0,
                    "restrict_periods": [],
                    "day_mask": {
                      "repeat": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ]
                    },
                    "fair_rotation": false,
                    "mask_continuous_enabled": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/schedule/delete": {
      "post": {
        "operationId": "scheduleDelete",
        "summary": "Delete schedules",
        "description": "Delete one or more on-call schedules by ID.",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-delete",
          "metadata": {
            "sidebarTitle": "Delete schedules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleIDsBodyRequest"
              },
              "example": {
                "schedule_ids": [
                  2001
                ]
              }
            }
          }
        }
      }
    },
    "/schedule/info": {
      "post": {
        "operationId": "scheduleInfo",
        "summary": "Get schedule info",
        "description": "Return details of an on-call schedule including the computed schedule layers for the requested time window (max 45 days).",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-info",
          "metadata": {
            "sidebarTitle": "Get schedule info"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 5789640530410,
                    "name": "test-000001",
                    "account_id": 2451002751131,
                    "group_id": 4291079133131,
                    "disabled": 0,
                    "create_at": 1766110836,
                    "create_by": 2476123212131,
                    "update_at": 1775205795,
                    "update_by": 2476123212131,
                    "layers": [
                      {
                        "account_id": 2451002751131,
                        "name": "Layer 1",
                        "schedule_id": 5789640530410,
                        "hidden": 0,
                        "mode": 0,
                        "weight": 0,
                        "groups": [
                          {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  3122470302131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          },
                          {
                            "group_name": "B",
                            "name": "B",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  2659460982131
                                ]
                              }
                            ],
                            "start": 0,
                            "end": 0
                          }
                        ],
                        "rotation_duration": 86400,
                        "handoff_time": 0,
                        "enable_time": 1767542400,
                        "expire_time": 0,
                        "restrict_mode": 0,
                        "restrict_start": 0,
                        "restrict_end": 0,
                        "restrict_periods": [],
                        "day_mask": {
                          "repeat": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ]
                        },
                        "create_at": 1775205795,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layer_name": "Layer 1",
                        "fair_rotation": false,
                        "layer_start": 1767542400,
                        "layer_end": null,
                        "rotation_unit": "day",
                        "rotation_value": 1,
                        "mask_continuous_enabled": false
                      }
                    ],
                    "schedule_layers": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    3122470302131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          },
                          {
                            "start": 1776096000,
                            "end": 1776182400,
                            "group": {
                              "group_name": "B",
                              "name": "B",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    2659460982131
                                  ]
                                }
                              ],
                              "start": 1776096000,
                              "end": 1776182400
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "final_schedule": {
                      "layer_name": "",
                      "name": "",
                      "mode": 0,
                      "schedules": [
                        {
                          "start": 1776009600,
                          "end": 1776096000,
                          "group": {
                            "group_name": "A",
                            "name": "A",
                            "members": [
                              {
                                "role_id": 0,
                                "person_ids": [
                                  3122470302131
                                ]
                              }
                            ],
                            "start": 1776009600,
                            "end": 1776096000
                          },
                          "index": 0
                        }
                      ]
                    },
                    "notify": {
                      "advance_in_time": 300,
                      "fixed_time": null,
                      "by": {
                        "follow_preference": false,
                        "personal_channels": [
                          "email"
                        ]
                      },
                      "webhooks": [
                        {
                          "type": "feishu_app",
                          "settings": {
                            "token": "",
                            "alias": "",
                            "data_source_id": 5427276014131,
                            "chat_ids": [
                              "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                            ],
                            "verify_token": "",
                            "sign_secret": ""
                          }
                        }
                      ]
                    },
                    "schedule_id": 5789640530410,
                    "schedule_name": "test-000001",
                    "team_id": 4291079133131,
                    "description": "abc",
                    "layer_schedules": [
                      {
                        "layer_name": "Layer 1",
                        "name": "Layer 1",
                        "mode": 0,
                        "schedules": [
                          {
                            "start": 1776009600,
                            "end": 1776096000,
                            "group": {
                              "group_name": "A",
                              "name": "A",
                              "members": [
                                {
                                  "role_id": 0,
                                  "person_ids": [
                                    3122470302131
                                  ]
                                }
                              ],
                              "start": 1776009600,
                              "end": 1776096000
                            },
                            "index": 0
                          }
                        ]
                      }
                    ],
                    "status": 0,
                    "cur_oncall": {
                      "start": 1775972040,
                      "end": 1776009600,
                      "group": {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              2451002751131
                            ]
                          }
                        ],
                        "start": 1775972040,
                        "end": 1776009600
                      },
                      "update_at": 0,
                      "weight": 0,
                      "index": 0
                    },
                    "next_oncall": {
                      "start": 1776009600,
                      "end": 1776096000,
                      "group": {
                        "group_name": "A",
                        "name": "A",
                        "members": [
                          {
                            "role_id": 0,
                            "person_ids": [
                              3122470302131
                            ]
                          }
                        ],
                        "start": 1776009600,
                        "end": 1776096000
                      },
                      "update_at": 0,
                      "weight": 0,
                      "index": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleInfoRequest"
              },
              "example": {
                "schedule_id": 2001,
                "start": 1712000000,
                "end": 1712086400
              }
            }
          }
        }
      }
    },
    "/schedule/list": {
      "post": {
        "operationId": "scheduleList",
        "summary": "List schedules",
        "description": "Return a paginated list of on-call schedules. When both start and end are provided (max 45 days apart), computed layer schedules are included.",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/schedules/schedule-list",
          "metadata": {
            "sidebarTitle": "List schedules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 5789640530410,
                        "name": "test-000001",
                        "account_id": 2451002751131,
                        "group_id": 4291079133131,
                        "disabled": 0,
                        "create_at": 1766110836,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": false,
                            "personal_channels": [
                              "email"
                            ]
                          },
                          "webhooks": [
                            {
                              "type": "feishu_app",
                              "settings": {
                                "token": "",
                                "alias": "",
                                "data_source_id": 5427276014131,
                                "chat_ids": [
                                  "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                                ],
                                "verify_token": "",
                                "sign_secret": ""
                              }
                            }
                          ]
                        },
                        "schedule_id": 5789640530410,
                        "schedule_name": "test-000001",
                        "team_id": 4291079133131,
                        "description": "abc",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      },
                      {
                        "id": 5432326025106,
                        "name": "test-2509300001",
                        "account_id": 2451002751131,
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1759132037,
                        "create_by": 2476123212131,
                        "update_at": 1775207501,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": true,
                            "personal_channels": null
                          },
                          "webhooks": null
                        },
                        "schedule_id": 5432326025106,
                        "schedule_name": "test-2509300001",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ],
                    "total": 41
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "query": "production",
                "is_my_team": true
              }
            }
          }
        }
      }
    },
    "/schedule/self": {
      "post": {
        "operationId": "scheduleSelf",
        "summary": "List my schedules",
        "description": "Return on-call schedules where the current user is assigned.",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-self",
          "metadata": {
            "sidebarTitle": "List my schedules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleSelfResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 2539108069860,
                        "name": "Open Source Q&A",
                        "account_id": 2451002751131,
                        "group_id": 2477033058131,
                        "disabled": 0,
                        "create_at": 1702623874,
                        "create_by": 2451002751131,
                        "update_at": 1710468081,
                        "update_by": 2476444212131,
                        "layers": [
                          {
                            "account_id": 2451002751131,
                            "name": "Rule 1",
                            "schedule_id": 2539108069860,
                            "hidden": 0,
                            "mode": 0,
                            "weight": 0,
                            "groups": [
                              {
                                "group_name": "A",
                                "name": "A",
                                "members": [
                                  {
                                    "role_id": 0,
                                    "person_ids": [
                                      2476444212131
                                    ]
                                  }
                                ],
                                "start": 0,
                                "end": 0
                              },
                              {
                                "group_name": "B",
                                "name": "B",
                                "members": [
                                  {
                                    "role_id": 0,
                                    "person_ids": [
                                      2469167612131
                                    ]
                                  }
                                ],
                                "start": 0,
                                "end": 0
                              }
                            ],
                            "rotation_duration": 86400,
                            "handoff_time": 0,
                            "enable_time": 1702623874,
                            "expire_time": 0,
                            "restrict_mode": 0,
                            "restrict_start": 0,
                            "restrict_end": 0,
                            "restrict_periods": [],
                            "day_mask": {
                              "repeat": [
                                1,
                                2,
                                3,
                                4,
                                5
                              ]
                            },
                            "create_at": 1702623874,
                            "create_by": 2451002751131,
                            "update_at": 1710468081,
                            "update_by": 2476444212131,
                            "layer_name": "Rule 1",
                            "fair_rotation": false,
                            "layer_start": 1702623874,
                            "layer_end": null,
                            "rotation_unit": "day",
                            "rotation_value": 1,
                            "mask_continuous_enabled": false
                          }
                        ],
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "fixed_time": null,
                          "by": null,
                          "webhooks": null
                        },
                        "schedule_id": 2539108069860,
                        "schedule_name": "Open Source Q&A",
                        "team_id": 2477033058131,
                        "description": "",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleSelfRequest"
              },
              "example": {
                "start": 1712000000,
                "end": 1712086400
              }
            }
          }
        }
      }
    },
    "/schedule/infos": {
      "post": {
        "operationId": "scheduleInfos",
        "summary": "Batch get schedules",
        "description": "Return details of multiple on-call schedules by their IDs.",
        "tags": [
          "On-call/Schedules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Schedules Read** (`on-call`) or **Schedules Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/schedules/schedule-infos",
          "metadata": {
            "sidebarTitle": "Batch get schedules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ScheduleSelfResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 5789640530410,
                        "name": "test-000001",
                        "account_id": 2451002751131,
                        "group_id": 4291079133131,
                        "disabled": 0,
                        "create_at": 1766110836,
                        "create_by": 2476123212131,
                        "update_at": 1775205795,
                        "update_by": 2476123212131,
                        "layers": null,
                        "schedule_layers": null,
                        "final_schedule": {
                          "layer_name": "",
                          "name": "",
                          "mode": 0,
                          "schedules": null
                        },
                        "notify": {
                          "advance_in_time": 300,
                          "fixed_time": null,
                          "by": {
                            "follow_preference": false,
                            "personal_channels": [
                              "email"
                            ]
                          },
                          "webhooks": [
                            {
                              "type": "feishu_app",
                              "settings": {
                                "token": "",
                                "alias": "",
                                "data_source_id": 5427276014131,
                                "chat_ids": [
                                  "oc_60a6dc4c6e4e5cbc4934ef08aa7ff76d"
                                ],
                                "verify_token": "",
                                "sign_secret": ""
                              }
                            }
                          ]
                        },
                        "schedule_id": 5789640530410,
                        "schedule_name": "test-000001",
                        "team_id": 4291079133131,
                        "description": "abc",
                        "layer_schedules": null,
                        "status": 0,
                        "cur_oncall": null,
                        "next_oncall": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleIDsRequest"
              },
              "example": {
                "schedule_ids": [
                  2001,
                  2002,
                  2003
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/create": {
      "post": {
        "operationId": "calendarCreate",
        "summary": "Create calendar",
        "description": "Create a personal service calendar. Each account is limited to 5 calendars unless the Flashcat-Break-Cal-Limit header is set.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/calendars/calendar-create",
          "metadata": {
            "sidebarTitle": "Create calendar"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                    "cal_name": "API Test Calendar"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarCreateRequest"
              },
              "example": {
                "cal_name": "Production On-Call Calendar",
                "description": "Calendar for production on-call team",
                "timezone": "Asia/Shanghai",
                "workdays": [
                  1,
                  2,
                  3,
                  4,
                  5
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/update": {
      "post": {
        "operationId": "calendarUpdate",
        "summary": "Update calendar",
        "description": "Update a personal service calendar. Only non-null fields are updated.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/calendars/calendar-update",
          "metadata": {
            "sidebarTitle": "Update calendar"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarUpdateRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "cal_name": "Production On-Call Calendar (Updated)",
                "timezone": "America/New_York",
                "workdays": [
                  1,
                  2,
                  3,
                  4,
                  5
                ]
              }
            }
          }
        }
      }
    },
    "/calendar/delete": {
      "post": {
        "operationId": "calendarDelete",
        "summary": "Delete calendar",
        "description": "Delete a personal service calendar. The call fails when referenced by escalation or silence rules.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/calendars/calendar-delete",
          "metadata": {
            "sidebarTitle": "Delete calendar"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarIDRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM"
              }
            }
          }
        }
      }
    },
    "/calendar/info": {
      "post": {
        "operationId": "calendarInfo",
        "summary": "Get calendar info",
        "description": "Return details of a service calendar.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/calendars/calendar-info",
          "metadata": {
            "sidebarTitle": "Get calendar info"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "team_id": 2477033058131,
                    "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg",
                    "cal_name": "Stock Exchange Calendar",
                    "description": "A stock market trading calendar example",
                    "timezone": "Asia/Shanghai",
                    "kind": "personal",
                    "workdays": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ],
                    "created_at": 1702455630,
                    "updated_at": 1775529526,
                    "creator_id": 2476444212131,
                    "updated_by": 3790925372131,
                    "status": "enabled"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarIDRequest"
              },
              "example": {
                "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg"
              }
            }
          }
        }
      }
    },
    "/calendar/list": {
      "post": {
        "operationId": "calendarList",
        "summary": "List calendars",
        "description": "Return the list of service calendars visible to the current account.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/calendars/calendar-list",
          "metadata": {
            "sidebarTitle": "List calendars"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "team_id": 2477033058131,
                        "cal_id": "cal.eh9gvPtWeH3xXgKeVSRxRg",
                        "cal_name": "Stock Exchange Calendar",
                        "description": "A stock market trading calendar example",
                        "timezone": "Asia/Shanghai",
                        "kind": "personal",
                        "workdays": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5,
                          6
                        ],
                        "created_at": 1702455630,
                        "updated_at": 1775529526,
                        "creator_id": 2476444212131,
                        "updated_by": 3790925372131,
                        "status": "enabled"
                      },
                      {
                        "account_id": 2451002751131,
                        "team_id": 0,
                        "cal_id": "cal.VZYkchxJhGELSF4jzkUAud",
                        "cal_name": "HK Stock Exchange Calendar",
                        "description": "Hong Kong Stock Exchange trading days calendar",
                        "timezone": "Asia/Shanghai",
                        "kind": "personal",
                        "extra_cal_ids": [
                          "zh-cn.china.official"
                        ],
                        "created_at": 1702968470,
                        "updated_at": 1775188967,
                        "creator_id": 2451002751131,
                        "updated_by": 3790925372131,
                        "status": "enabled"
                      }
                    ],
                    "total": 8
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarListRequest"
              },
              "example": {
                "kind": "personal"
              }
            }
          }
        }
      }
    },
    "/calendar/event/upsert": {
      "post": {
        "operationId": "calEventUpsert",
        "summary": "Upsert calendar event",
        "description": "Create or update a calendar event (holiday or workday override). Omit event_id to create a new event.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/calendars/cal-event-upsert",
          "metadata": {
            "sidebarTitle": "Upsert calendar event"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalEventUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                    "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4",
                    "summary": "Test Holiday"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalEventUpsertRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "summary": "Labour Day",
                "start_at": "2024-05-01",
                "end_at": "2024-05-06",
                "is_off": true,
                "description": "International Workers Day holiday"
              }
            }
          }
        }
      }
    },
    "/calendar/event/delete": {
      "post": {
        "operationId": "calEventDelete",
        "summary": "Delete calendar event",
        "description": "Delete a calendar event by calendar ID and event ID.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Calendars Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/calendars/cal-event-delete",
          "metadata": {
            "sidebarTitle": "Delete calendar event"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalendarEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalEventIDRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4"
              }
            }
          }
        }
      }
    },
    "/calendar/event/list": {
      "post": {
        "operationId": "calEventList",
        "summary": "List calendar events",
        "description": "Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned.",
        "tags": [
          "On-call/Calendars"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/calendars/cal-event-list",
          "metadata": {
            "sidebarTitle": "List calendar events"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CalEventListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "creator_id": 2476444212131,
                        "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                        "event_id": "cale.KyG9XWTCU5CucbwukEVBQ4",
                        "summary": "Test Holiday",
                        "description": "A test holiday event",
                        "start_at": "2026-05-01",
                        "end_at": "2026-05-02",
                        "is_off": true,
                        "created_at": 1775972034,
                        "updated_at": 1775972034
                      },
                      {
                        "account_id": 2451002751131,
                        "creator_id": 2451002751131,
                        "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                        "event_id": "non_work.20260502",
                        "summary": "non-working day (Saturday)",
                        "description": "",
                        "start_at": "2026-05-02",
                        "end_at": "2026-05-03",
                        "is_off": true,
                        "created_at": 0,
                        "updated_at": 0
                      }
                    ],
                    "total": 11
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalEventListRequest"
              },
              "example": {
                "cal_id": "cal.QiNvtdKs4Wj52kZhT3LafM",
                "year": 2024,
                "month": 5
              }
            }
          }
        }
      }
    },
    "/template/info": {
      "post": {
        "operationId": "template-read-info",
        "summary": "Get template detail",
        "description": "Return a single notification template by ID.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) |\n\n## Usage\n\n- Pass `000000000000000000000001` as `template_id` to retrieve the built-in preset template for the caller's account locale.",
          "href": "/en/api-reference/on-call/notification-templates/template-read-info",
          "metadata": {
            "sidebarTitle": "Get template detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 10023,
                    "team_id": 0,
                    "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                    "template_name": "Prod incident default",
                    "description": "Default template for production incidents.",
                    "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                    "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}",
                    "voice": "",
                    "dingtalk": "",
                    "wecom": "",
                    "feishu": "",
                    "feishu_app": "",
                    "dingtalk_app": "",
                    "wecom_app": "",
                    "slack_app": "",
                    "teams_app": "",
                    "telegram": "",
                    "slack": "",
                    "zoom": "",
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1712700000,
                    "updated_at": 1712702400
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateIDRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0"
              }
            }
          }
        }
      }
    },
    "/template/list": {
      "post": {
        "operationId": "template-read-list",
        "summary": "List templates",
        "description": "Return a paginated list of notification templates.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Read** (`on-call`) or **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Pagination defaults to page 1 with 20 rows. The response's `has_next_page` tells you whether another page exists without needing a separate count request.\n- When `is_my_team` is `true`, `team_ids` is ignored.",
          "href": "/en/api-reference/on-call/notification-templates/template-read-list",
          "metadata": {
            "sidebarTitle": "List templates"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 47,
                    "has_next_page": true,
                    "items": [
                      {
                        "account_id": 10023,
                        "team_id": 0,
                        "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                        "template_name": "Prod incident default",
                        "description": "Default template for production incidents.",
                        "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                        "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}",
                        "voice": "",
                        "dingtalk": "",
                        "wecom": "",
                        "feishu": "",
                        "feishu_app": "",
                        "dingtalk_app": "",
                        "wecom_app": "",
                        "slack_app": "",
                        "teams_app": "",
                        "telegram": "",
                        "slack": "",
                        "zoom": "",
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1712700000,
                        "updated_at": 1712702400
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "updated_at",
                "asc": false,
                "is_my_team": false
              }
            }
          }
        }
      }
    },
    "/template/create": {
      "post": {
        "operationId": "template-write-create",
        "summary": "Create a template",
        "description": "Create a new notification template.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- `template_name` must be unique within the account; duplicates return `InvalidParameter`.\n- The server validates every non-empty channel template by rendering it against a mock incident — a syntactic error in any channel fails the whole request with `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/notification-templates/template-write-create",
          "metadata": {
            "sidebarTitle": "Create a template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TemplateCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                    "template_name": "Prod incident default"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreateRequest"
              },
              "example": {
                "team_id": 0,
                "template_name": "Prod incident default",
                "description": "Default template for production incidents.",
                "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}"
              }
            }
          }
        }
      }
    },
    "/template/update": {
      "post": {
        "operationId": "template-write-update",
        "summary": "Update a template",
        "description": "Replace the content of every channel on an existing template.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Every channel field in the request overwrites the stored value — send an empty string to clear a channel.\n- The caller needs data-permission on the template's team; otherwise the response is `AccessDenied`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/notification-templates/template-write-update",
          "metadata": {
            "sidebarTitle": "Update a template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdateRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0",
                "template_name": "Prod incident default",
                "description": "Updated description.",
                "email": "Incident {{ .IncidentName }} on {{ .Severity }}",
                "sms": "[Flashduty] {{ .IncidentName }} — {{ .Severity }}"
              }
            }
          }
        }
      }
    },
    "/template/delete": {
      "post": {
        "operationId": "template-write-delete",
        "summary": "Delete a template",
        "description": "Soft-delete a template by ID.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Templates Manage** (`on-call`) |\n\n## Usage\n\n- Fails with `400 ReferenceExist` if the template is still referenced by any channel, escalation rule, or notification subscription.\n- Deletion is soft — `deleted_at` is set. The record remains for audit, but the template stops appearing in listings.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/notification-templates/template-write-delete",
          "metadata": {
            "sidebarTitle": "Delete a template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateIDRequest"
              },
              "example": {
                "template_id": "6605a1b2c3d4e5f6a7b8c9d0"
              }
            }
          }
        }
      }
    },
    "/enrichment/info": {
      "post": {
        "operationId": "enrichment-read-info",
        "summary": "Get enrichment rules",
        "description": "Return the enrichment rule set configured for a specific integration.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if no enrichment rules have been configured for the integration.",
          "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-info",
          "metadata": {
            "sidebarTitle": "Get enrichment rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnrichmentItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "integration_id": 5001,
                    "rules": [
                      {
                        "kind": "extraction",
                        "settings": {
                          "source_field": "labels.env",
                          "result_label": "environment",
                          "pattern": "^(prod|staging|dev).*$",
                          "override": true
                        }
                      }
                    ],
                    "status": "enabled",
                    "updated_by": 80011,
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentInfoRequest"
              },
              "example": {
                "integration_id": 5001
              }
            }
          }
        }
      }
    },
    "/enrichment/list": {
      "post": {
        "operationId": "enrichment-read-list",
        "summary": "List enrichment rules",
        "description": "Return the enrichment rule sets for a list of integration IDs.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/alert-enrichment/enrichment-read-list",
          "metadata": {
            "sidebarTitle": "List enrichment rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EnrichmentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "integration_id": 5001,
                        "rules": [],
                        "status": "enabled",
                        "updated_by": 80011,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentListRequest"
              },
              "example": {
                "integration_ids": [
                  5001,
                  5002
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/upsert": {
      "post": {
        "operationId": "enrichment-write-upsert",
        "summary": "Upsert enrichment rules",
        "description": "Create or fully replace the enrichment rule set for an integration. The entire `rules` array is replaced atomically.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Manage** (`on-call`) or **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- Enrichment rules are evaluated in order.\n- Each rule has a `kind`: `extraction` (regex/gjson extraction), `composition` (template-based label composition), `mapping` (lookup via mapping schema or API), or `drop` (remove labels).\n- The optional `if` field is an `AndFilters` condition: if it does not match, the rule is skipped.\n- For `kind: extraction`: `source_field` must be `title`, `description`, or a `labels.*` key; specify exactly one of `pattern` (regex with named group `result`) or `g_json` (GJson path).\n- For `kind: composition`: `template` uses Go text/template syntax referencing `labels.*` keys.\n- For `kind: mapping`: `mapping_type` is `schema` (default) or `api`; provide `schema_id` or `api_id` accordingly.\n- For `kind: drop`: `drop_labels` lists the label keys to remove.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/enrichment-write-upsert",
          "metadata": {
            "sidebarTitle": "Upsert enrichment rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentUpsertRequest"
              },
              "example": {
                "integration_id": 5001,
                "rules": [
                  {
                    "kind": "extraction",
                    "settings": {
                      "source_field": "labels.env",
                      "result_label": "environment",
                      "pattern": "(?P<result>prod|staging|dev)",
                      "override": true
                    }
                  },
                  {
                    "kind": "composition",
                    "settings": {
                      "result_label": "full_env",
                      "template": "{{.labels.region}}-{{.labels.environment}}",
                      "override": false
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/list": {
      "post": {
        "operationId": "mapping-schema-read-list",
        "summary": "List mapping schemas",
        "description": "Return all mapping schemas for the account, sorted by creation time ascending.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Channels Read** (`on-call`) or **Channels Manage** (`on-call`) or **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-list",
          "metadata": {
            "sidebarTitle": "List mapping schemas"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                        "schema_name": "CMDB Lookup",
                        "description": "Enrich alerts with CMDB data",
                        "source_labels": [
                          "host"
                        ],
                        "result_labels": [
                          "owner",
                          "team",
                          "service"
                        ],
                        "status": "enabled",
                        "team_id": 0,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/info": {
      "post": {
        "operationId": "mapping-schema-read-info",
        "summary": "Get mapping schema detail",
        "description": "Return detail of a single mapping schema by its ID.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Returns `null` if the schema does not exist.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-read-info",
          "metadata": {
            "sidebarTitle": "Get mapping schema detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                    "schema_name": "CMDB Lookup",
                    "description": "Enrich alerts with CMDB data",
                    "source_labels": [
                      "host"
                    ],
                    "result_labels": [
                      "owner",
                      "team",
                      "service"
                    ],
                    "status": "enabled",
                    "team_id": 0,
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/create": {
      "post": {
        "operationId": "mapping-schema-write-create",
        "summary": "Create mapping schema",
        "description": "Create a new mapping schema defining source lookup labels and the result labels to populate. Requires a Pro plan.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Schema names must be unique within an account.\n- `source_labels` (1–3 labels) are used as lookup keys; `result_labels` (1–10 labels) are the labels written on match.\n- Label names must match `^[a-z][a-z0-9_]{0,39}$` (lowercase).\n- `source_labels` and `result_labels` must not overlap.\n- An account can have at most 20 mapping schemas.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-create",
          "metadata": {
            "sidebarTitle": "Create mapping schema"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingSchemaCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                    "schema_name": "CMDB Lookup"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaCreateRequest"
              },
              "example": {
                "schema_name": "CMDB Lookup",
                "description": "Enrich alerts with CMDB data",
                "source_labels": [
                  "host"
                ],
                "result_labels": [
                  "owner",
                  "team",
                  "service"
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/update": {
      "post": {
        "operationId": "mapping-schema-write-update",
        "summary": "Update mapping schema",
        "description": "Update the name, description, or owning team of a mapping schema. Source and result labels cannot be changed after creation.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the schema creator, account admin, or team member can update the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-update",
          "metadata": {
            "sidebarTitle": "Update mapping schema"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaUpdateRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "schema_name": "CMDB Lookup v2",
                "description": "Updated description"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/schema/delete": {
      "post": {
        "operationId": "mapping-schema-write-delete",
        "summary": "Delete mapping schema",
        "description": "Delete a mapping schema and all its associated data. Deletion is blocked if the schema is referenced by any enrichment rule or webhook.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the schema is still referenced, the response returns HTTP 400 with a `refs` list of blocking references.\n- Only the schema creator, account admin, or team member can delete the schema.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-schema-write-delete",
          "metadata": {
            "sidebarTitle": "Delete mapping schema"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/list": {
      "post": {
        "operationId": "mapping-data-read-list",
        "summary": "List mapping data",
        "description": "Return paginated mapping data rows for a schema, with optional exact-match filtering on source label values.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If `query` is provided, all source labels must be specified — partial source label queries are rejected.\n- Pagination uses cursor-based (`search_after_ctx`) or page-based (`p`, `limit`) navigation. `limit` defaults to 20, max 100.\n- The `search_after_ctx` token from a response can be passed back to retrieve the next page.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-list",
          "metadata": {
            "sidebarTitle": "List mapping data"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingDataListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "key": "server01",
                        "fields": {
                          "host": "server01",
                          "owner": "alice",
                          "team": "sre",
                          "service": "api"
                        },
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ],
                    "total": 1,
                    "has_next_page": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingDataListRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "orderby": "updated_at",
                "asc": false,
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/upsert": {
      "post": {
        "operationId": "mapping-data-write-upsert",
        "summary": "Upsert mapping data rows",
        "description": "Insert or update up to 1000 data rows in a mapping schema. Each row must contain all source and result labels.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Each doc must contain values for all labels defined in `source_labels` and `result_labels`.\n- Values for unknown labels are silently dropped.\n- Each value must be at most 2048 characters.\n- Upsert is keyed on the combination of source label values — existing rows with the same source key are updated.\n- A schema can hold at most 10,000 rows by default.\n- The operation is locked per schema; concurrent upserts to the same schema may fail with `ErrRequestTooFrequently`.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upsert",
          "metadata": {
            "sidebarTitle": "Upsert mapping data rows"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingDataUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "keys": [
                      "server01",
                      "server02"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingDataUpsertRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "docs": [
                  {
                    "host": "server01",
                    "owner": "alice",
                    "team": "sre",
                    "service": "api"
                  },
                  {
                    "host": "server02",
                    "owner": "bob",
                    "team": "platform",
                    "service": "gateway"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/delete": {
      "post": {
        "operationId": "mapping-data-write-delete",
        "summary": "Delete mapping data rows",
        "description": "Delete up to 100 mapping data rows by their keys.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-delete",
          "metadata": {
            "sidebarTitle": "Delete mapping data rows"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingDataDeleteRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01",
                "keys": [
                  "server01",
                  "server02"
                ]
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/truncate": {
      "post": {
        "operationId": "mapping-data-write-truncate",
        "summary": "Truncate mapping data",
        "description": "Delete all data rows in a mapping schema.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- This is an irreversible bulk-delete operation.\n- High-risk operation. Console JWT callers must pass a second-factor code; `app_key` callers bypass the MFA prompt but remain audited — treat the key as a secret.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-truncate",
          "metadata": {
            "sidebarTitle": "Truncate mapping data"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/upload": {
      "post": {
        "operationId": "mapping-data-write-upload",
        "summary": "Upload mapping data via CSV",
        "description": "Upload a CSV file to bulk-load mapping data. By default the existing data is truncated before loading the new rows.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The request must use `Content-Type: multipart/form-data`. The file field name is `file` and `schema_id` is a query parameter.\n- CSV header row must include all source and result label names.\n- Maximum file size: 100 MB.\n- By default the schema's existing data is truncated before import. Pass query param `do_not_truncate_first=TRUE` to append instead.\n- Duplicate source label value combinations in the CSV cause a 400 error.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-write-upload",
          "metadata": {
            "sidebarTitle": "Upload mapping data via CSV"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingDataUploadRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/data/download": {
      "post": {
        "operationId": "mapping-data-read-download",
        "summary": "Download mapping data as CSV",
        "description": "Export all data rows of a mapping schema as a CSV file download.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Read** (`on-call`) or **Integrations Manage** (`on-call`) or **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- The response is a CSV file with `Content-Disposition: attachment` header.\n- The CSV header row matches the schema's source and result labels in order.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-data-read-download",
          "metadata": {
            "sidebarTitle": "Download mapping data as CSV"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CsvFileResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "host,owner,team,service\nserver01,alice,sre,api\n"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingSchemaIDRequest"
              },
              "example": {
                "schema_id": "665f1a2b3c4d5e6f7a8b9c01"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/list": {
      "post": {
        "operationId": "mapping-api-read-list",
        "summary": "List mapping APIs",
        "description": "Return all mapping APIs configured for the account.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Read** (`on-call`) or **Mappings Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-list",
          "metadata": {
            "sidebarTitle": "List mapping APIs"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPIListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "items": [
                      {
                        "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                        "api_name": "CMDB API",
                        "description": "Query CMDB for host metadata",
                        "url": "https://cmdb.example.com/api/lookup",
                        "headers": {
                          "X-Token": "***"
                        },
                        "timeout": 2,
                        "retry_count": 1,
                        "insecure_skip_verify": false,
                        "status": "enabled",
                        "team_id": 0,
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/info": {
      "post": {
        "operationId": "mapping-api-read-info",
        "summary": "Get mapping API detail",
        "description": "Return detail of a single mapping API by its ID.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `null` if the API does not exist.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-read-info",
          "metadata": {
            "sidebarTitle": "Get mapping API detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPIItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                    "api_name": "CMDB API",
                    "url": "https://cmdb.example.com/api/lookup",
                    "timeout": 2,
                    "retry_count": 1,
                    "insecure_skip_verify": false,
                    "status": "enabled",
                    "creator_id": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingAPIIDRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02"
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/create": {
      "post": {
        "operationId": "mapping-api-write-create",
        "summary": "Create mapping API",
        "description": "Create a new external HTTP API endpoint used to enrich alerts via HTTP lookup.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- `url` must start with `http://` or `https://` and cannot resolve to an internal IP (in SaaS mode).\n- `timeout` is the HTTP read timeout in seconds (1–3, default 2).\n- `retry_count` is the number of retries on failure (0–1, default 0).\n- Headers with security-sensitive names (e.g. `authorization`, `cookie`) are rejected in SaaS mode.\n- An account can have at most 50 mapping APIs.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-create",
          "metadata": {
            "sidebarTitle": "Create mapping API"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MappingAPICreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                    "api_name": "CMDB API"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingAPICreateRequest"
              },
              "example": {
                "api_name": "CMDB API",
                "description": "Query CMDB for host metadata",
                "url": "https://cmdb.example.com/api/lookup",
                "headers": {
                  "X-Token": "mytoken"
                },
                "timeout": 2,
                "retry_count": 1,
                "insecure_skip_verify": false
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/update": {
      "post": {
        "operationId": "mapping-api-write-update",
        "summary": "Update mapping API",
        "description": "Update configuration of an existing mapping API.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- Only the API creator, account admin, or team member can update the API.\n- All updatable fields are optional — only provided fields are changed.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-update",
          "metadata": {
            "sidebarTitle": "Update mapping API"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingAPIUpdateRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02",
                "timeout": 3,
                "retry_count": 1
              }
            }
          }
        }
      }
    },
    "/enrichment/mapping/api/delete": {
      "post": {
        "operationId": "mapping-api-write-delete",
        "summary": "Delete mapping API",
        "description": "Delete a mapping API. Deletion is blocked if the API is referenced by any enrichment rule.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Mappings Manage** (`on-call`) |\n\n## Usage\n\n- If the API is still referenced, the response returns HTTP 400 with a `refs` list.\n- Only the API creator, account admin, or team member can delete the API.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/alert-enrichment/mapping-api-write-delete",
          "metadata": {
            "sidebarTitle": "Delete mapping API"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MappingAPIIDRequest"
              },
              "example": {
                "api_id": "665f1a2b3c4d5e6f7a8b9c02"
              }
            }
          }
        }
      }
    },
    "/insight/alert/topk-by-label": {
      "post": {
        "operationId": "insightTopkAlertsByLabel",
        "summary": "Get top-K alerts grouped by check or resource",
        "description": "Return the top-K alert groups aggregated either by `check` or by `resource` label over the specified time range.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-topk-alerts-by-label",
          "metadata": {
            "sidebarTitle": "Get top-K alerts grouped by check or resource"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InsightAlertByLabelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "label": "cpu-high",
                        "total_alert_cnt": 312,
                        "total_alert_event_cnt": 987
                      },
                      {
                        "label": "disk-full",
                        "total_alert_cnt": 178,
                        "total_alert_event_cnt": 452
                      },
                      {
                        "label": "memory-oom",
                        "total_alert_cnt": 94,
                        "total_alert_event_cnt": 231
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightTopkAlertByLabelRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "label": "check",
                "k": 10,
                "orderby": "total_alert_cnt"
              }
            }
          }
        }
      }
    },
    "/insight/account": {
      "post": {
        "operationId": "insightByAccount",
        "summary": "Get account-level insight",
        "description": "Return aggregated incident insight metrics for the entire account.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-by-account",
          "metadata": {
            "sidebarTitle": "Get account-level insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "aggregate_unit": "day",
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/incident/list": {
      "post": {
        "operationId": "insightIncidentList",
        "summary": "List insight incidents",
        "description": "Return a paged list of incidents with per-incident handling metrics used by the analytics dashboard.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-incident-list",
          "metadata": {
            "sidebarTitle": "List insight incidents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/InsightIncidentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "incident_id": "67ca560c381a4fedb664f5f8",
                        "title": "CPU spike on prod-web-01",
                        "description": "CPU usage exceeded 90% threshold",
                        "team_id": 4295771902131,
                        "team_name": "SRE Team",
                        "channel_id": 4321322010131,
                        "channel_name": "Production Alerts",
                        "progress": "Closed",
                        "severity": "Info",
                        "created_at": 1741313548,
                        "closed_by": "manually",
                        "seconds_to_ack": 1052085,
                        "seconds_to_close": 1483880,
                        "engaged_seconds": 1052085,
                        "hours": "work",
                        "responders": [
                          {
                            "person_id": 3790925372131,
                            "assigned_at": 1741313548,
                            "acknowledged_at": 1742365633,
                            "person_name": "alice",
                            "email": "alice@example.com"
                          }
                        ],
                        "assigned_to": {
                          "person_ids": [
                            3790925372131
                          ],
                          "escalate_rule_id": "000000000000000000000000",
                          "layer_idx": 0,
                          "type": "reassign"
                        },
                        "labels": {},
                        "fields": {},
                        "notifications": 4,
                        "interruptions": 2,
                        "assignments": 2,
                        "reassignments": 1,
                        "acknowledgements": 1,
                        "escalations": 0,
                        "timeout_escalations": 0,
                        "manual_escalations": 0,
                        "creator_id": 3790925372131,
                        "creator_name": "alice",
                        "owner_id": 3790925372132,
                        "owner_name": "bob",
                        "closer_id": 3790925372133,
                        "closer_name": "carol",
                        "snoozed_before": 1712608400,
                        "ever_muted": false,
                        "frequency": "rare"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightIncidentListRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "p": 1,
                "limit": 20,
                "severities": [
                  "Critical"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/incident/export": {
      "post": {
        "operationId": "insightIncidentExport",
        "summary": "Export insight incidents",
        "description": "Export the filtered incident analytics list as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-incident-export",
          "metadata": {
            "sidebarTitle": "Export insight incidents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightIncidentExportRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "severities": [
                  "Critical",
                  "Warning"
                ],
                "export_fields": [
                  "incident_id",
                  "title",
                  "severity",
                  "created_at",
                  "seconds_to_close"
                ],
                "description_html_to_text": true
              }
            }
          }
        }
      }
    },
    "/insight/channel": {
      "post": {
        "operationId": "insightByChannel",
        "summary": "Get channel insight",
        "description": "Return insight metrics aggregated by channel.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-by-channel",
          "metadata": {
            "sidebarTitle": "Get channel insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "channel_id": 4321322010131,
                        "channel_name": "Production Alerts",
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "channel_ids": [
                  4321322010131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/channel/export": {
      "post": {
        "operationId": "insightChannelExport",
        "summary": "Export channel insight",
        "description": "Export channel insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-channel-export",
          "metadata": {
            "sidebarTitle": "Export channel insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "channel_ids": [
                  4321322010131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/team": {
      "post": {
        "operationId": "insightByTeam",
        "summary": "Get team insight",
        "description": "Return insight metrics aggregated by team.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-by-team",
          "metadata": {
            "sidebarTitle": "Get team insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DimensionInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "team_id": 4295771902131,
                        "team_name": "SRE Team",
                        "total_incident_cnt": 2,
                        "total_incidents_acknowledged": 2,
                        "total_incidents_closed": 2,
                        "total_incidents_auto_closed": 0,
                        "total_incidents_manually_closed": 2,
                        "total_incidents_timeout_closed": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_reassigned": 2,
                        "total_interruptions": 3,
                        "total_notifications": 6,
                        "total_engaged_seconds": 3317709,
                        "total_seconds_to_ack": 3317709,
                        "total_seconds_to_close": 3749514,
                        "mean_seconds_to_ack": 1658854.5,
                        "mean_seconds_to_close": 1874757,
                        "noise_reduction_pct": 0,
                        "acknowledgement_pct": 100,
                        "total_alert_cnt": 0,
                        "total_alert_event_cnt": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "team_ids": [
                  4295771902131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/team/export": {
      "post": {
        "operationId": "insightTeamExport",
        "summary": "Export team insight",
        "description": "Export team insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-team-export",
          "metadata": {
            "sidebarTitle": "Export team insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "team_ids": [
                  4295771902131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/insight/responder": {
      "post": {
        "operationId": "insightByResponder",
        "summary": "Get responder insight",
        "description": "Return insight metrics aggregated by responder.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-by-responder",
          "metadata": {
            "sidebarTitle": "Get responder insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ResponderInsightResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "ts": 1740844800,
                        "responder_id": 3790925372131,
                        "responder_name": "alice",
                        "total_incident_cnt": 1,
                        "total_incidents_acknowledged": 1,
                        "total_incidents_reassigned": 0,
                        "total_incidents_escalated": 0,
                        "total_incidents_timeout_escalated": 0,
                        "total_incidents_manually_escalated": 0,
                        "total_interruptions": 1,
                        "total_notifications": 2,
                        "total_engaged_seconds": 10,
                        "total_seconds_to_ack": 2265624,
                        "mean_seconds_to_ack": 2265624,
                        "acknowledgement_pct": 100
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "responder_ids": [
                  3790925372131
                ],
                "aggregate_unit": "day"
              }
            }
          }
        }
      }
    },
    "/insight/responder/export": {
      "post": {
        "operationId": "insightResponderExport",
        "summary": "Export responder insight",
        "description": "Export responder insight metrics as a CSV file. CSV headers and formatted values use the request locale, falling back to the member locale and then the account locale. The response is a CSV stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope.",
        "tags": [
          "On-call/Analytics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Analytics Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/analytics/insight-responder-export",
          "metadata": {
            "sidebarTitle": "Export responder insight"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InsightQueryRequest"
              },
              "example": {
                "start_time": 1712000000,
                "end_time": 1712604800,
                "responder_ids": [
                  3790925372131
                ],
                "severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/info": {
      "get": {
        "operationId": "statusPageChangeInfo",
        "summary": "Get status page event detail",
        "description": "Retrieve details of a specific status page event (incident or maintenance).",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-info",
          "metadata": {
            "sidebarTitle": "Get status page event detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "change_id": 5821693893131,
                    "page_id": 5750613685214,
                    "type": "incident",
                    "title": "Web Console Degraded Performance",
                    "description": "The issue has been resolved, and all services are operating normally.\n\nThank you for your patience.",
                    "status": "resolved",
                    "affected_components": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Web Console",
                        "available_since_seconds": 1765349358,
                        "order_id": 1,
                        "status": "operational"
                      }
                    ],
                    "start_at_seconds": 1766736878,
                    "close_at_seconds": 1775529742,
                    "updates": [
                      {
                        "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                        "at_seconds": 1766736876,
                        "status": "investigating",
                        "description": "We are currently investigating an issue affecting some services.",
                        "component_changes": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "component_name": "Web Console",
                            "status": "degraded"
                          }
                        ]
                      },
                      {
                        "update_id": "01KNJX3KW873ZZSRZC14SGFYS3",
                        "at_seconds": 1775529742,
                        "status": "resolved",
                        "description": "The issue has been resolved, and all services are operating normally.",
                        "component_changes": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "component_name": "Web Console",
                            "status": "operational"
                          }
                        ]
                      }
                    ],
                    "notify_subscribers": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "change_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Event (change) ID."
          }
        ]
      }
    },
    "/status-page/change/list": {
      "get": {
        "operationId": "statusPageChangeList",
        "summary": "List status page events",
        "description": "List events (incidents and maintenances) for a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-list",
          "metadata": {
            "sidebarTitle": "List status page events"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "change_id": 5821693893131,
                        "page_id": 5750613685214,
                        "type": "incident",
                        "title": "Web Console Degraded Performance",
                        "description": "The issue has been resolved, and all services are operating normally.",
                        "status": "resolved",
                        "affected_components": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                            "name": "Web Console",
                            "available_since_seconds": 1765349358,
                            "order_id": 1,
                            "status": "operational"
                          }
                        ],
                        "start_at_seconds": 1766736878,
                        "close_at_seconds": 1775529742,
                        "updates": [
                          {
                            "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                            "at_seconds": 1766736876,
                            "status": "investigating",
                            "description": "We are currently investigating an issue affecting some services.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "degraded"
                              }
                            ]
                          },
                          {
                            "update_id": "01KNJX3KW873ZZSRZC14SGFYS3",
                            "at_seconds": 1775529742,
                            "status": "resolved",
                            "description": "The issue has been resolved, and all services are operating normally.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "operational"
                              }
                            ]
                          }
                        ],
                        "notify_subscribers": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "start_at_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter events started at or after this unix timestamp (seconds)."
          },
          {
            "name": "end_at_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter events started at or before this unix timestamp (seconds)."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "incident",
                "maintenance"
              ]
            },
            "description": "Event type filter. Required."
          },
          {
            "name": "status",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "investigating",
                "identified",
                "monitoring",
                "resolved",
                "scheduled",
                "ongoing",
                "completed"
              ]
            },
            "description": "Event status filter. Required. Must be a status valid for the given `type` (e.g. `investigating`/`identified`/`monitoring`/`resolved` for incidents; `scheduled`/`ongoing`/`completed` for maintenances)."
          }
        ]
      }
    },
    "/status-page/change/active/list": {
      "get": {
        "operationId": "statusPageChangeActiveList",
        "summary": "List active status page events",
        "description": "List in-progress (non-terminal) events of a given type for a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-active-list",
          "metadata": {
            "sidebarTitle": "List active status page events"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "change_id": 5821693893131,
                        "page_id": 5750613685214,
                        "type": "incident",
                        "title": "Web Console Degraded Performance",
                        "description": "We are currently investigating an issue affecting some services.",
                        "status": "investigating",
                        "affected_components": [
                          {
                            "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                            "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                            "name": "Web Console",
                            "available_since_seconds": 1765349358,
                            "order_id": 1,
                            "status": "degraded"
                          }
                        ],
                        "start_at_seconds": 1766736878,
                        "updates": [
                          {
                            "update_id": "01KDCVJQ88SZPHWPTDV2Z2AZW8",
                            "at_seconds": 1766736876,
                            "status": "investigating",
                            "description": "We are currently investigating an issue affecting some services.",
                            "component_changes": [
                              {
                                "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                                "component_name": "Web Console",
                                "status": "degraded"
                              }
                            ]
                          }
                        ],
                        "notify_subscribers": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "incident",
                "maintenance"
              ]
            },
            "description": "Event type filter. Required. Returns only in-progress (non-terminal) events — `investigating`/`identified`/`monitoring` for `incident`, `scheduled`/`ongoing` for `maintenance`."
          }
        ]
      }
    },
    "/status-page/change/create": {
      "post": {
        "operationId": "statusPageChangeCreate",
        "summary": "Create status page event",
        "description": "Create a new incident or maintenance event on a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-create",
          "metadata": {
            "sidebarTitle": "Create status page event"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "change_id": 6294539747131,
                    "change_name": "API Test Incident"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "type": "incident",
                "title": "Web Console Degraded Performance",
                "description": "We are investigating degraded performance affecting the web console.",
                "status": "investigating",
                "start_at_seconds": 1712000000,
                "notify_subscribers": true,
                "updates": [
                  {
                    "status": "investigating",
                    "description": "We are currently investigating an issue affecting some users.",
                    "component_changes": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "status": "degraded"
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/update": {
      "post": {
        "operationId": "statusPageChangeUpdate",
        "summary": "Update status page event",
        "description": "Update an existing status page event.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-update",
          "metadata": {
            "sidebarTitle": "Update status page event"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "title": "Web Console Degraded Performance (Updated)"
              }
            }
          }
        }
      }
    },
    "/status-page/change/delete": {
      "post": {
        "operationId": "statusPageChangeDelete",
        "summary": "Delete status page event",
        "description": "Delete a status page event.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-delete",
          "metadata": {
            "sidebarTitle": "Delete status page event"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteStatusPageChangeRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/create": {
      "post": {
        "operationId": "statusPageChangeTimelineCreate",
        "summary": "Create event timeline entry",
        "description": "Add a timeline update to a status page event.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-create",
          "metadata": {
            "sidebarTitle": "Create event timeline entry"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageChangeTimelineCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "update_id": "01KP0311872NVYFRRQ82FWXAP4"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "status": "identified",
                "description": "We have identified the root cause and are working on a fix.",
                "at_seconds": 1712003600,
                "component_changes": [
                  {
                    "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                    "status": "partial_outage"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/update": {
      "post": {
        "operationId": "statusPageChangeTimelineUpdate",
        "summary": "Update event timeline entry",
        "description": "Update a timeline entry for a status page event.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-update",
          "metadata": {
            "sidebarTitle": "Update event timeline entry"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "update_id": "01KP0311872NVYFRRQ82FWXAP4",
                "description": "Corrected description: root cause identified in database layer.",
                "at_seconds": 1712003600
              }
            }
          }
        }
      }
    },
    "/status-page/change/timeline/delete": {
      "post": {
        "operationId": "statusPageChangeTimelineDelete",
        "summary": "Delete event timeline entry",
        "description": "Delete a timeline entry from a status page event.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Events Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-change-timeline-delete",
          "metadata": {
            "sidebarTitle": "Delete event timeline entry"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteStatusPageChangeTimelineRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "change_id": 5821693893131,
                "update_id": "01KP0311872NVYFRRQ82FWXAP4"
              }
            }
          }
        }
      }
    },
    "/status-page/subscriber/list": {
      "get": {
        "operationId": "statusPageSubscriberList",
        "summary": "List status page subscribers",
        "description": "List subscribers who have signed up for status page notifications.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-list",
          "metadata": {
            "sidebarTitle": "List status page subscribers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageSubscriberListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "recipient": "alice@example.com",
                        "method": "email",
                        "components": [],
                        "all": true,
                        "locale": "zh-CN"
                      },
                      {
                        "recipient": "bob@example.com",
                        "method": "email",
                        "components": [],
                        "all": true,
                        "locale": "en-US"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "component_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated component IDs to filter subscribers by."
          },
          {
            "name": "p",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (1-based)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "Page size (1-100)."
          }
        ]
      }
    },
    "/status-page/subscriber/import": {
      "post": {
        "operationId": "statusPageSubscriberImport",
        "summary": "Import subscribers",
        "description": "Bulk import subscribers for a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-import",
          "metadata": {
            "sidebarTitle": "Import subscribers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportStatusPageSubscribersRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "method": "email",
                "subscribers": [
                  {
                    "recipient": "alice@example.com",
                    "all": true,
                    "locale": "en-US"
                  },
                  {
                    "recipient": "bob@example.com",
                    "component_ids": [
                      "01KC3GAZ6ZJE40H55GM31RPWZE"
                    ],
                    "all": false,
                    "locale": "zh-CN"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/subscriber/export": {
      "post": {
        "operationId": "statusPageSubscriberExport",
        "summary": "Export subscribers",
        "description": "Export subscribers list for a status page as a CSV attachment. The response is a `text/csv` file with columns: Method, Recipient, Components, Subscribe All, Locale.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-subscriber-export",
          "metadata": {
            "sidebarTitle": "Export subscribers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageSubscriberExportResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "Method,Recipient,Components,Subscribe All,Locale\nemail,alice@example.com,,true,zh-CN\nemail,bob@example.com,,true,en-US"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportStatusPageSubscribersRequest"
              },
              "example": {
                "page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/migrate-structure": {
      "post": {
        "operationId": "statusPageMigrateStructure",
        "summary": "Migrate status page structure",
        "description": "Start a migration job that imports the structure and historical events of an Atlassian Statuspage into a new Flashduty status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-migrate-structure",
          "metadata": {
            "sidebarTitle": "Migrate status page structure"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationStartResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0001"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrateStatusPageStructureRequest"
              },
              "example": {
                "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx",
                "source_page_id": "abcdefghij"
              }
            }
          }
        }
      }
    },
    "/status-page/migrate-email-subscribers": {
      "post": {
        "operationId": "statusPageMigrateEmailSubscribers",
        "summary": "Migrate email subscribers",
        "description": "Start a migration job that imports email subscribers from an Atlassian Statuspage into an existing Flashduty status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-migrate-email-subscribers",
          "metadata": {
            "sidebarTitle": "Migrate email subscribers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationStartResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0002"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrateStatusPageEmailSubscribersRequest"
              },
              "example": {
                "api_key": "sk-stsp-xxxxxxxxxxxxxxxxxxxx",
                "source_page_id": "abcdefghij",
                "target_page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/migration/status": {
      "get": {
        "operationId": "statusPageMigrationStatus",
        "summary": "Get migration status",
        "description": "Get the current status and progress of a status page migration job.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-migration-status",
          "metadata": {
            "sidebarTitle": "Get migration status"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StatusPageMigrationJob"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "job_id": "01KP0311872NVYFRRQ82FW0001",
                    "account_id": 2451002751131,
                    "source_page_id": "abcdefghij",
                    "target_page_id": 5750613685214,
                    "phase": "history",
                    "status": "completed",
                    "progress": {
                      "total_steps": 5,
                      "completed_steps": 5,
                      "components_imported": 8,
                      "sections_imported": 3,
                      "incidents_imported": 12,
                      "maintenances_imported": 2,
                      "subscribers_imported": 0,
                      "templates_imported": 0,
                      "subscribers_skipped": 0
                    },
                    "created_at": 1766736878,
                    "updated_at": 1766740000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Migration job ID returned by `migrate-structure` or `migrate-email-subscribers`."
          }
        ]
      }
    },
    "/status-page/migration/cancel": {
      "post": {
        "operationId": "statusPageMigrationCancel",
        "summary": "Cancel status page migration",
        "description": "Cancel an in-progress status page migration job. Only jobs currently in the `running` state can be cancelled.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-migration-cancel",
          "metadata": {
            "sidebarTitle": "Cancel status page migration"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelStatusPageMigrationRequest"
              },
              "example": {
                "job_id": "01KP0311872NVYFRRQ82FW0001"
              }
            }
          }
        }
      }
    },
    "/monit/rule/list/basic": {
      "post": {
        "operationId": "monit-rule-read-list",
        "summary": "List alert rules",
        "description": "Return the basic information of all alert rules in a folder. For full rule details, call `POST /monit/rule/info`.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to list all rules across all folders visible to the current user.\n- The `triggered` field indicates whether the rule has any currently active alerts.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-list",
          "metadata": {
            "sidebarTitle": "List alert rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleBasicListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 50001,
                      "folder_id": 100,
                      "name": "CPU High",
                      "ds_type": "prometheus",
                      "enabled": true,
                      "triggered": true,
                      "created_at": 1710000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleListRequest"
              },
              "example": {
                "folder_id": 100
              }
            }
          }
        }
      }
    },
    "/monit/rule/info": {
      "post": {
        "operationId": "monit-rule-read-info",
        "summary": "Get alert rule detail",
        "description": "Return the full configuration of an alert rule by its ID, including rule queries, thresholds, and notification settings.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-info",
          "metadata": {
            "sidebarTitle": "Get alert rule detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRuleInfoResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "folder_id": 100,
                    "name": "CPU High",
                    "ds_type": "prometheus",
                    "ds_list": [
                      "prometheus*"
                    ],
                    "enabled": true,
                    "cron_pattern": "* * * * *",
                    "channel_ids": [
                      20001
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/create": {
      "post": {
        "operationId": "monit-rule-write-create",
        "summary": "Create alert rule",
        "description": "Create a new alert rule. Returns the created rule with its assigned ID.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `name`, `ds_type`, `cron_pattern`, and `rule_configs.queries` are required.\n- Either `ds_list` (supports wildcards) or `ds_ids` must be non-empty.\n- `cron_pattern` uses standard 5-field cron syntax.\n- `channel_ids` can be empty; alerts will then route through the global integration.\n- `name` must be unique within `folder_id`; a duplicate returns `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-create",
          "metadata": {
            "sidebarTitle": "Create alert rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRule"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "folder_id": 100,
                    "name": "CPU High",
                    "ds_type": "prometheus",
                    "created_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRule"
              },
              "example": {
                "folder_id": 100,
                "name": "CPU High",
                "ds_type": "prometheus",
                "ds_list": [
                  "prometheus*"
                ],
                "enabled": true,
                "cron_pattern": "* * * * *",
                "channel_ids": [
                  20001
                ],
                "rule_configs": {
                  "queries": [
                    {
                      "name": "A",
                      "expr": "avg(cpu_usage_idle) < 10"
                    }
                  ],
                  "check_threshold": {
                    "enabled": true,
                    "critical": "A",
                    "alerting_check_times": 1,
                    "recovery_check_times": 1,
                    "push_recovery_event": true,
                    "recovery": {
                      "mode": "invert"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/rule/update": {
      "post": {
        "operationId": "monit-rule-write-update",
        "summary": "Update alert rule",
        "description": "Replace the full configuration of an existing alert rule. All fields are overwritten.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- `id` is required. All other fields follow the same rules as `POST /monit/rule/create`.\n- The name must remain unique within its folder; a duplicate returns `InvalidParameter`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-update",
          "metadata": {
            "sidebarTitle": "Update alert rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRule"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 50001,
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertRule"
              },
              "example": {
                "id": 50001,
                "folder_id": 100,
                "name": "CPU High v2",
                "ds_type": "prometheus",
                "ds_list": [
                  "prometheus*"
                ],
                "enabled": true,
                "cron_pattern": "* * * * *",
                "rule_configs": {
                  "queries": [
                    {
                      "name": "A",
                      "expr": "avg(cpu_usage_idle) < 5"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/monit/rule/delete": {
      "post": {
        "operationId": "monit-rule-write-delete",
        "summary": "Delete alert rule",
        "description": "Delete a single alert rule by its ID.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete",
          "metadata": {
            "sidebarTitle": "Delete alert rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleEmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/delete/batch": {
      "post": {
        "operationId": "monit-rule-write-delete-batch",
        "summary": "Batch delete alert rules",
        "description": "Delete multiple alert rules in a single request.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **5 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-delete-batch",
          "metadata": {
            "sidebarTitle": "Batch delete alert rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleEmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleIDsRequest"
              },
              "example": {
                "ids": [
                  50001,
                  50002
                ]
              }
            }
          }
        }
      }
    },
    "/monit/rule/update/fields": {
      "post": {
        "operationId": "monit-rule-write-fields-update",
        "summary": "Batch update rule fields",
        "description": "Update specific fields across multiple alert rules at once. Only the fields listed in `fields` are applied.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Include the field names you want to update in the `fields` array, e.g. `[\"enabled\", \"channel_ids\"]`.\n- Only the specified fields are updated; others are left unchanged.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-fields-update",
          "metadata": {
            "sidebarTitle": "Batch update rule fields"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleNameMessageListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU High",
                      "message": ""
                    },
                    {
                      "name": "Disk High",
                      "message": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleFieldsUpdateRequest"
              },
              "example": {
                "ids": [
                  50001,
                  50002
                ],
                "fields": [
                  "enabled"
                ],
                "enabled": false
              }
            }
          }
        }
      }
    },
    "/monit/rule/import": {
      "post": {
        "operationId": "monit-rule-write-import",
        "summary": "Import alert rules",
        "description": "Import one or more alert rules from a JSON array. Returns the result for each rule, indicating success or failure.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **2 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- The request body is a JSON array of rule export objects (compatible with the output of `POST /monit/rule/export`).\n- Each object must include `folder_id`, `ds_type`, and either `ds_list` or `ds_ids`.\n- Some rules may fail (e.g. duplicate name). Check each result for individual status.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-import",
          "metadata": {
            "sidebarTitle": "Import alert rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleImportResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU High",
                      "message": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleImportRequest"
              },
              "example": [
                {
                  "folder_id": 100,
                  "name": "CPU High",
                  "ds_type": "prometheus",
                  "ds_list": [
                    "prometheus*"
                  ],
                  "enabled": true,
                  "cron_pattern": "* * * * *",
                  "rule_configs": {
                    "queries": [
                      {
                        "name": "A",
                        "expr": "avg(cpu_usage_idle) < 10"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/monit/rule/export": {
      "post": {
        "operationId": "monit-rule-read-export",
        "summary": "Export alert rules",
        "description": "Export the configuration of selected alert rules as a portable JSON array, compatible with `POST /monit/rule/import`.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **10 requests/minute**; **1 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-export",
          "metadata": {
            "sidebarTitle": "Export alert rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRuleExportListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU High",
                      "ds_type": "prometheus",
                      "ds_list": [
                        "prometheus*"
                      ],
                      "enabled": true,
                      "cron_pattern": "* * * * *"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleIDsRequest"
              },
              "example": {
                "ids": [
                  50001
                ]
              }
            }
          }
        }
      }
    },
    "/monit/rule/move": {
      "post": {
        "operationId": "monit-rule-write-move",
        "summary": "Move alert rules to folder",
        "description": "Move one or more alert rules to a different folder.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Rules whose names already exist in the destination folder are skipped. Inspect each result's `message` to identify conflicts.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-move",
          "metadata": {
            "sidebarTitle": "Move alert rules to folder"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleNameMessageListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "name": "CPU High",
                      "message": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleMoveRequest"
              },
              "example": {
                "ids": [
                  50001,
                  50002
                ],
                "dest_folder_id": 200
              }
            }
          }
        }
      }
    },
    "/monit/rule/status": {
      "post": {
        "operationId": "monit-rule-write-status",
        "summary": "Get rule trigger status under folder",
        "description": "Return the rule trigger summary for all rules under a folder node and its descendants.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Manage** (`monit`) |\n\n## Usage\n\n- Set `folder_id` to `0` to get summary across all folders.\n- If the folder contains too many rules, computation is skipped for self-protection.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-write-status",
          "metadata": {
            "sidebarTitle": "Get rule trigger status under folder"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleStatusResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "folder_id": 100,
                      "folder_name": "Production",
                      "rule_total": 10,
                      "triggered_rule_count": 2
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleFolderIDRequest"
              },
              "example": {
                "folder_id": 100
              }
            }
          }
        }
      }
    },
    "/monit/rule/audits": {
      "post": {
        "operationId": "monit-rule-read-audits",
        "summary": "List rule change history",
        "description": "Return the change history (audit records) for an alert rule.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audits",
          "metadata": {
            "sidebarTitle": "List rule change history"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleAuditListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 9001,
                      "account_id": 10023,
                      "alert_rule_id": 50001,
                      "action": "update",
                      "creator_id": 80011,
                      "creator_name": "Alice",
                      "created_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleIDRequest"
              },
              "example": {
                "id": 50001
              }
            }
          }
        }
      }
    },
    "/monit/rule/audit/detail": {
      "post": {
        "operationId": "monit-rule-read-audit-detail",
        "summary": "Get rule audit snapshot",
        "description": "Return the audit record (including the `content` field, a JSON string of the rule snapshot at that point in time).",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Pass the audit record `id` (not the rule `id`) from `POST /monit/rule/audits`.\n- `content` is a JSON string — parse it to get the full rule snapshot.",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail",
          "metadata": {
            "sidebarTitle": "Get rule audit snapshot"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AlertRuleAudit"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 9001,
                    "account_id": 10023,
                    "alert_rule_id": 50001,
                    "action": "update",
                    "content": "{\"id\":50001,\"name\":\"CPU High\"}",
                    "creator_id": 80011,
                    "creator_name": "Alice",
                    "created_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditRecordIDRequest"
              },
              "example": {
                "id": 9001
              }
            }
          }
        }
      }
    },
    "/monit/rule/dstypes": {
      "post": {
        "operationId": "monit-rule-read-dstypes",
        "summary": "List available datasource types",
        "description": "Return the list of datasource types (`DSType` records) that the current account can use when authoring alert rules — combines global types and account-scoped types.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-dstypes",
          "metadata": {
            "sidebarTitle": "List available datasource types"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleDsTypesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "name": "Prometheus",
                      "ident": "prometheus",
                      "account_id": 0,
                      "weight": 100
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/total": {
      "post": {
        "operationId": "monit-rule-read-counter-total",
        "summary": "Get rule counter time series",
        "description": "Return the stored time series of the total rule count across the account — one sample per `clock` timestamp.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |\n\n## Usage\n\n- Each item is a historical snapshot: `num` is the total rule count at the given `clock` (Unix epoch seconds).",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-total",
          "metadata": {
            "sidebarTitle": "Get rule counter time series"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterTotalResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "account_id": 10023,
                      "num": 50,
                      "clock": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/node": {
      "post": {
        "operationId": "monit-rule-read-counter-node",
        "summary": "Get rule counts by folder node",
        "description": "Return an object mapping top-level folder name to the total number of rules under that folder and all its descendants.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-node",
          "metadata": {
            "sidebarTitle": "Get rule counts by folder node"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterNodeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "Production": 10,
                    "Staging": 3
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/channel": {
      "post": {
        "operationId": "monit-rule-read-counter-channel",
        "summary": "Get rule counts by channel",
        "description": "Return an object mapping channel name to the number of rules routing alerts to that channel. If a channel name cannot be resolved, the channel ID (as a string) is used as the key.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-channel",
          "metadata": {
            "sidebarTitle": "Get rule counts by channel"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleCounterChannelResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "Production": 8
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/rule/counter/status": {
      "post": {
        "operationId": "monit-rule-read-counter-status",
        "summary": "Get rule status counters for top-level folders",
        "description": "Return trigger status summary for all top-level folder nodes — used for the overview dashboard.",
        "tags": [
          "Monitors/Alert rules"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Alerting Rules Read** (`monit`) |",
          "href": "/en/api-reference/monitors/alert-rules/monit-rule-read-counter-status",
          "metadata": {
            "sidebarTitle": "Get rule status counters for top-level folders"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RuleStatusResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "folder_id": 100,
                      "folder_name": "Production",
                      "rule_total": 10,
                      "triggered_rule_count": 2
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleEmptyRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/monit/datasource/list": {
      "post": {
        "operationId": "monit-datasource-read-list",
        "summary": "List datasources",
        "description": "Return all data sources for the current account. Optionally filter by `type_ident`.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- Omit `type_ident` to return all types.\n- Sensitive credential fields (passwords, keys) are not returned in the list response.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-list",
          "metadata": {
            "sidebarTitle": "List datasources"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 10,
                      "account_id": 10023,
                      "type_ident": "prometheus",
                      "name": "Prometheus Prod",
                      "enabled": true,
                      "note": "Production Prometheus",
                      "address": "http://prometheus.example.com:9090",
                      "edge_cluster_name": "default",
                      "updated_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSourceListRequest"
              },
              "example": {
                "type": "prometheus"
              }
            }
          }
        }
      }
    },
    "/monit/datasource/info": {
      "post": {
        "operationId": "monit-datasource-read-info",
        "summary": "Get datasource detail",
        "description": "Retrieve full details of a single data source by its ID, including the `payload` configuration.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-info",
          "metadata": {
            "sidebarTitle": "Get datasource detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "account_id": 10023,
                    "type_ident": "prometheus",
                    "name": "Prometheus Prod",
                    "enabled": true,
                    "note": "Production Prometheus",
                    "address": "http://prometheus.example.com:9090",
                    "payload": {
                      "prometheus": {
                        "basic_auth_enabled": false,
                        "basic_auth_username": "",
                        "basic_auth_password": "",
                        "tls_skip_verify": false
                      }
                    },
                    "edge_cluster_name": "default",
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              },
              "example": {
                "id": 10
              }
            }
          }
        }
      }
    },
    "/monit/datasource/create": {
      "post": {
        "operationId": "monit-datasource-write-create",
        "summary": "Create datasource",
        "description": "Create a new monitoring data source. The `payload` must include the type-specific configuration block.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- `type_ident` must be one of: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`.\n- `edge_cluster_name` specifies which Monitors edge cluster evaluates rules using this datasource.\n- For `elasticsearch`, set `payload.elasticsearch.deployment` to `cloud` or `self-managed`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-create",
          "metadata": {
            "sidebarTitle": "Create datasource"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "type_ident": "prometheus",
                    "name": "Prometheus Prod",
                    "enabled": true,
                    "edge_cluster_name": "default",
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSourceUpsertRequest"
              },
              "example": {
                "type_ident": "prometheus",
                "name": "Prometheus Prod",
                "note": "Production Prometheus",
                "address": "http://prometheus.example.com:9090",
                "edge_cluster_name": "default",
                "payload": {
                  "prometheus": {
                    "basic_auth_enabled": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/datasource/update": {
      "post": {
        "operationId": "monit-datasource-write-update",
        "summary": "Update datasource",
        "description": "Update an existing data source. Supply `id` plus the fields to change.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-update",
          "metadata": {
            "sidebarTitle": "Update datasource"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DataSourceItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 10,
                    "type_ident": "prometheus",
                    "name": "Prometheus Prod v2",
                    "enabled": true,
                    "edge_cluster_name": "default",
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSourceUpsertRequest"
              },
              "example": {
                "id": 10,
                "type_ident": "prometheus",
                "name": "Prometheus Prod v2",
                "note": "Updated",
                "address": "http://prometheus-v2.example.com:9090",
                "edge_cluster_name": "default",
                "payload": {
                  "prometheus": {
                    "basic_auth_enabled": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monit/datasource/delete": {
      "post": {
        "operationId": "monit-datasource-write-delete",
        "summary": "Delete datasource",
        "description": "Delete a data source by ID. Alert rules referencing this datasource must be updated or deleted first.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-write-delete",
          "metadata": {
            "sidebarTitle": "Delete datasource"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              },
              "example": {
                "id": 10
              }
            }
          }
        }
      }
    },
    "/monit/datasource/sls/projects": {
      "post": {
        "operationId": "monit-datasource-read-sls-projects",
        "summary": "List SLS projects",
        "description": "List Alibaba Cloud SLS (Simple Log Service) projects available in the specified SLS datasource.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Use `query` to filter projects by name prefix. Use `offset` and `size` for pagination.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-projects",
          "metadata": {
            "sidebarTitle": "List SLS projects"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SLSProjectsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    "project-a",
                    "project-b"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SLSProjectsRequest"
              },
              "example": {
                "id": 10,
                "query": "",
                "offset": 0,
                "size": 50
              }
            }
          }
        }
      }
    },
    "/monit/datasource/sls/logstores": {
      "post": {
        "operationId": "monit-datasource-read-sls-logstores",
        "summary": "List SLS logstores",
        "description": "List logstores within an SLS project for the specified SLS datasource.",
        "tags": [
          "Monitors/Data sources"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Datasources Read** (`monit`) |\n\n## Usage\n\n- The datasource identified by `id` must be of type `sls`.\n- Supply `project` to select the SLS project whose logstores to list.",
          "href": "/en/api-reference/monitors/data-sources/monit-datasource-read-sls-logstores",
          "metadata": {
            "sidebarTitle": "List SLS logstores"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SLSLogstoresResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    "logstore-1",
                    "logstore-2"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SLSLogstoresRequest"
              },
              "example": {
                "id": 10,
                "project": "project-a",
                "offset": 0,
                "size": 50
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/list": {
      "post": {
        "operationId": "monit-store-ruleset-list",
        "summary": "List rulesets",
        "description": "Return all rulesets for a given datasource type that are accessible to the current user.",
        "tags": [
          "Monitors/Rule sets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |\n\n## Usage\n\n- A ruleset is visible if its `open_flag` is `2` (public), if the current user is the creator (`open_flag=0`), or if it belongs to the same account (`open_flag=1`).\n- The list does not include the `payload` field. Call `/monit/store/ruleset/info` to get the full ruleset content.",
          "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-list",
          "metadata": {
            "sidebarTitle": "List rulesets"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "id": 1,
                      "type_ident": "prometheus",
                      "note": "CPU usage alerts",
                      "open_flag": 2,
                      "creator_account_id": 10023,
                      "creator_id": 80011,
                      "creator_name": "Alice",
                      "created_at": 1710000000,
                      "updated_at": 1712000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreRulesetListRequest"
              },
              "example": {
                "type_ident": "prometheus"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/info": {
      "post": {
        "operationId": "monit-store-ruleset-info",
        "summary": "Get ruleset detail",
        "description": "Retrieve the full details of a ruleset including its `payload` (the alert rule definitions as a JSON string).",
        "tags": [
          "Monitors/Rule sets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Read** (`monit`) |",
          "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-info",
          "metadata": {
            "sidebarTitle": "Get ruleset detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "type_ident": "prometheus",
                    "note": "CPU usage alerts",
                    "open_flag": 2,
                    "payload": "[{\"prom_ql\":\"...\"}]",
                    "creator_account_id": 10023,
                    "creator_id": 80011,
                    "creator_name": "Alice",
                    "created_at": 1710000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              },
              "example": {
                "id": 1
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/create": {
      "post": {
        "operationId": "monit-store-ruleset-create",
        "summary": "Create ruleset",
        "description": "Create a new ruleset in the rule repository.",
        "tags": [
          "Monitors/Rule sets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- `open_flag`: `0` = private (creator only), `1` = account-shared, `2` = public.\n- `payload` is a required JSON string containing the alert rule definitions.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-create",
          "metadata": {
            "sidebarTitle": "Create ruleset"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "type_ident": "prometheus",
                    "note": "CPU usage alerts",
                    "open_flag": 1,
                    "created_at": 1712000000,
                    "updated_at": 1712000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreRulesetUpsertRequest"
              },
              "example": {
                "type_ident": "prometheus",
                "note": "CPU usage alerts",
                "open_flag": 1,
                "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.8\"}]"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/update": {
      "post": {
        "operationId": "monit-store-ruleset-update",
        "summary": "Update ruleset",
        "description": "Update the note, sharing flag, and payload of an existing ruleset.",
        "tags": [
          "Monitors/Rule sets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-update",
          "metadata": {
            "sidebarTitle": "Update ruleset"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/StoreRulesetItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "id": 1,
                    "note": "Updated CPU alerts",
                    "open_flag": 2,
                    "updated_at": 1712100000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreRulesetUpdateRequest"
              },
              "example": {
                "id": 1,
                "note": "Updated CPU alerts",
                "open_flag": 2,
                "payload": "[{\"prom_ql\":\"rate(cpu_usage[5m]) > 0.9\"}]"
              }
            }
          }
        }
      }
    },
    "/monit/store/ruleset/delete": {
      "post": {
        "operationId": "monit-store-ruleset-delete",
        "summary": "Delete ruleset",
        "description": "Delete a ruleset from the rule repository by ID.",
        "tags": [
          "Monitors/Rule sets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Rule Repository Manage** (`monit`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/monitors/rule-sets/monit-store-ruleset-delete",
          "metadata": {
            "sidebarTitle": "Delete ruleset"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IDRequest"
              },
              "example": {
                "id": 1
              }
            }
          }
        }
      }
    },
    "/rum/facet/count": {
      "post": {
        "operationId": "rum-read-facet-count",
        "summary": "Count facet value distribution",
        "description": "Return the top N values for a facet field within a time range, sorted by occurrence count descending.",
        "tags": [
          "RUM/Facets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `POST /rum/facet/list` to discover available `facet_key` values for each scope.\n- The `scope` must be one of: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Pass `dql` to further filter events before counting. DQL syntax follows the RUM query language.\n- Pass `sql` with a WHERE-clause only (no SELECT) for SQL-style filtering.\n- Default limit is 100; maximum is 100.\n- Time range is required (`start_time` / `end_time` in Unix epoch **milliseconds**). Maximum span is 31 days.",
          "href": "/en/api-reference/rum/facets/rum-read-facet-count",
          "metadata": {
            "sidebarTitle": "Count facet value distribution"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFacetCountResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "facet_value": "TypeError",
                        "count": 1523
                      },
                      {
                        "facet_value": "ReferenceError",
                        "count": 342
                      },
                      {
                        "facet_value": "SyntaxError",
                        "count": 89
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumFacetCountRequest"
              },
              "example": {
                "scope": "error",
                "facet_key": "error.type",
                "start_time": 1712620800000,
                "end_time": 1712707200000,
                "limit": 10
              }
            }
          }
        }
      }
    },
    "/rum/application/webhook/test": {
      "post": {
        "operationId": "rum-application-webhook-test",
        "summary": "Test application webhook",
        "description": "Send a sample RUM alert event to verify an application's webhook URL.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- The endpoint validates the URL before sending the sample event.\n- A failed delivery still returns HTTP 200 with `ok=false` and the delivery error in `message`.",
          "href": "/en/api-reference/rum/applications/rum-application-webhook-test",
          "metadata": {
            "sidebarTitle": "Test application webhook"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumWebhookTestResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "ok": true,
                    "status_code": 200,
                    "message": "ok"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumWebhookTestRequest"
              },
              "example": {
                "application_id": "rum-app-prod",
                "webhook_url": "https://hooks.example.com/rum-alerts"
              }
            }
          }
        }
      }
    },
    "/rum/issue/info": {
      "post": {
        "operationId": "rum-issue-read-info",
        "summary": "Get issue detail",
        "description": "Retrieve full details of a single issue by `issue_id`.",
        "tags": [
          "RUM/Issues"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/rum/issues/rum-issue-read-info",
          "metadata": {
            "sidebarTitle": "Get issue detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumIssueItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "team_id": 2477033058131,
                    "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                    "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                    "application_name": "Flashduty DEV",
                    "service": "fd-console",
                    "status": "for_review",
                    "error_count": 752,
                    "session_count": 381,
                    "is_crash": false,
                    "age": 5078684,
                    "resolved_at": 0,
                    "resolved_by": 0,
                    "created_at": 1770883154944,
                    "updated_at": 1775961914595,
                    "first_seen": {
                      "timestamp": 1770883154944,
                      "version": "1.0.0"
                    },
                    "last_seen": {
                      "timestamp": 1775961839090,
                      "version": "1.0.0"
                    },
                    "error": {
                      "message": "Script error.",
                      "type": "Error"
                    },
                    "suspected_cause": {
                      "source": "auto",
                      "value": "code.exception",
                      "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.",
                      "person_id": 0
                    },
                    "versions": [
                      "1.0.0"
                    ],
                    "severity": "Info"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumIssueIDRequest"
              },
              "example": {
                "issue_id": "NHEacQHi2DhXqobr9qPQz9"
              }
            }
          }
        }
      }
    },
    "/rum/application/list": {
      "post": {
        "operationId": "rum-application-read-list",
        "summary": "List applications",
        "description": "Return a paginated list of RUM applications accessible to the current user.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use `is_my_team` to filter applications belonging to the current user's teams.\n- Default page size is 20, maximum is 100.\n- `orderby` accepts `created_at` or `updated_at`.",
          "href": "/en/api-reference/rum/applications/rum-application-read-list",
          "metadata": {
            "sidebarTitle": "List applications"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "has_next_page": true,
                    "total": 7,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "application_id": "WoyQQ3BohkdtPivubEvE8o",
                        "application_name": "flashcat-rum",
                        "type": "browser",
                        "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                        "team_id": 2477033058131,
                        "is_private": true,
                        "no_ip": true,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            2490121812131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": false,
                          "open_type": "",
                          "endpoint": ""
                        },
                        "status": "enabled",
                        "created_by": 4441703362131,
                        "updated_by": 3790925372131,
                        "created_at": 1746673831462,
                        "updated_at": 1773398630657,
                        "links": {
                          "enabled": true,
                          "systems": [
                            {
                              "id": "s3-crash-logs",
                              "name": "S3 Crash Logs",
                              "icon_text": "S3",
                              "icon_color": "#0F766E",
                              "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                              "event_types": [
                                "crash",
                                "error"
                              ],
                              "enabled": true
                            }
                          ]
                        }
                      },
                      {
                        "account_id": 2451002751131,
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "type": "browser",
                        "client_token": "ce8d1be90fc6534f89ce36ebf526765e131",
                        "team_id": 2477033058131,
                        "is_private": false,
                        "no_ip": false,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            5962711836131,
                            5967875767131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": true,
                          "open_type": "popup",
                          "endpoint": "https://www.tracing.com/${trace_id}"
                        },
                        "status": "enabled",
                        "created_by": 2476444212131,
                        "updated_by": 3122470302131,
                        "created_at": 1742958482000,
                        "updated_at": 1772096392711,
                        "links": {
                          "enabled": false,
                          "systems": []
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "query": "",
                "is_my_team": false
              }
            }
          }
        }
      }
    },
    "/rum/facet/list": {
      "post": {
        "operationId": "rum-read-facet-list",
        "summary": "List RUM facet fields",
        "description": "Return all available RUM field definitions, optionally filtered by scope and facet status.",
        "tags": [
          "RUM/Facets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Use the returned `field_key` values as `facet_key` in `POST /rum/facet/count`.\n- Valid `scopes` are: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`.\n- Set `is_facet: true` to return only facet-enabled fields (those that support value distribution queries).",
          "href": "/en/api-reference/rum/facets/rum-read-facet-list",
          "metadata": {
            "sidebarTitle": "List RUM facet fields"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFacetListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 0,
                        "field_key": "error.type",
                        "field_name": "Error type",
                        "group": "Error",
                        "description": "The type of the error.",
                        "value_type": "string",
                        "show_type": "list",
                        "unit_family": "",
                        "unit_name": "",
                        "edit_able": false,
                        "is_facet": true,
                        "enum_values": [],
                        "scopes": [
                          "error"
                        ],
                        "status": "active",
                        "queryable": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumFacetListRequest"
              },
              "example": {
                "scopes": [
                  "error"
                ],
                "is_facet": true
              }
            }
          }
        }
      }
    },
    "/sourcemap/stack/enrich": {
      "post": {
        "operationId": "sourcemap-read-stack-enrich",
        "summary": "Enrich a stack trace",
        "description": "Symbolicate or deobfuscate a browser, Android, iOS, Mini Program, or HarmonyOS stack trace.",
        "tags": [
          "RUM/Sourcemaps"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `type` defaults to `browser` when omitted for backward compatibility.\n- Set `near` from 1 to 20 to include source-code snippets around converted frames.\n- For Android NDK native crashes, provide `arch` and `source_type: ndk` so the backend routes to native symbolication.\n- For iOS crash stacks, pass `binary_images` so addresses can be relocated against the uploaded dSYM files.\n- `no_cache` is intended for debugging and bypasses cached enrich results.",
          "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-stack-enrich",
          "metadata": {
            "sidebarTitle": "Enrich a stack trace"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SourcemapStackEnrichResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "frames": [
                      {
                        "function": "renderCheckout",
                        "file": "src/pages/checkout.tsx",
                        "line": 42,
                        "column": 17,
                        "converted": true,
                        "code_snippets": [
                          {
                            "line": 41,
                            "code": "const cart = props.cart;"
                          },
                          {
                            "line": 42,
                            "code": "return cart.items.map(renderItem);"
                          }
                        ],
                        "original_frame": {
                          "function": "render",
                          "file": "https://cdn.example.com/app.min.js",
                          "line": 1,
                          "column": 2345
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourcemapStackEnrichRequest"
              },
              "example": {
                "type": "browser",
                "service": "my-web-app",
                "version": "1.0.0",
                "stack": "TypeError: Cannot read properties of undefined\n    at render (https://cdn.example.com/app.min.js:1:2345)",
                "near": 3
              }
            }
          }
        }
      }
    },
    "/rum/data/query": {
      "post": {
        "operationId": "rum-read-data-query",
        "summary": "Query RUM data",
        "description": "Run one or more SQL-style RUM data queries over a bounded time range.",
        "tags": [
          "RUM/Data query"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Send 1 to 10 queries in one request; each query `id` becomes a key in the response object.\n- `start_time` and `end_time` are required Unix epoch milliseconds. The maximum time range is 31 days.\n- Use `format: table` for tabular results, or `format: time_series` for bucketed time-series results.\n- For `time_series`, `interval` defaults to 3600 seconds and `max_points` defaults to 1226 when omitted.\n- `search_after_ctx` is returned by paginated table queries and can be sent back to continue scanning.",
          "href": "/en/api-reference/rum/data-query/rum-read-data-query",
          "metadata": {
            "sidebarTitle": "Query RUM data"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumDataQueryResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "errors_by_type": {
                      "data": {
                        "fields": [
                          {
                            "name": "error.type",
                            "type": "String",
                            "nullable": false
                          },
                          {
                            "name": "errors",
                            "type": "UInt64",
                            "nullable": false
                          }
                        ],
                        "values": [
                          [
                            "TypeError",
                            1523
                          ],
                          [
                            "ReferenceError",
                            342
                          ]
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumDataQueryRequest"
              },
              "example": {
                "start_time": 1712620800000,
                "end_time": 1712707200000,
                "queries": [
                  {
                    "id": "errors_by_type",
                    "sql": "SELECT error.type, count(*) AS errors FROM error GROUP BY error.type ORDER BY errors DESC LIMIT 10",
                    "format": "table",
                    "time_zone": "Asia/Shanghai"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/rum/issue/list": {
      "post": {
        "operationId": "rum-issue-read-list",
        "summary": "List issues",
        "description": "Return a paginated list of RUM error tracking issues matching the given filters.",
        "tags": [
          "RUM/Issues"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are millisecond timestamps. Maximum range: 183 days.\n- `statuses` filters by issue status. Valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `orderby` accepts: `created_at`, `updated_at`, `session_count`, `error_count`.\n- Use `dql` or `sql` for advanced filtering. Cannot provide both.",
          "href": "/en/api-reference/rum/issues/rum-issue-read-list",
          "metadata": {
            "sidebarTitle": "List issues"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumIssueListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "team_id": 2477033058131,
                        "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "service": "fd-console",
                        "status": "for_review",
                        "error_count": 752,
                        "session_count": 381,
                        "is_crash": false,
                        "age": 5078684,
                        "resolved_at": 0,
                        "resolved_by": 0,
                        "created_at": 1770883154944,
                        "updated_at": 1775961914595,
                        "first_seen": {
                          "timestamp": 1770883154944,
                          "version": "1.0.0"
                        },
                        "last_seen": {
                          "timestamp": 1775961839090,
                          "version": "1.0.0"
                        },
                        "error": {
                          "message": "Script error.",
                          "type": "Error"
                        },
                        "suspected_cause": {
                          "source": "auto",
                          "value": "code.exception",
                          "reason": "The error message 'Script error.' typically indicates an unhandled exception in JavaScript.",
                          "person_id": 0
                        },
                        "versions": [
                          "1.0.0"
                        ],
                        "severity": "Info"
                      },
                      {
                        "team_id": 2477033058131,
                        "issue_id": "H8kZSmxiE7EgdyD4fCyyNa",
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "service": "fd-console",
                        "status": "for_review",
                        "error_count": 3,
                        "session_count": 1,
                        "is_crash": false,
                        "age": 48,
                        "resolved_at": 0,
                        "resolved_by": 0,
                        "created_at": 1775189479566,
                        "updated_at": 1775191284163,
                        "first_seen": {
                          "timestamp": 1775189479566,
                          "version": "1.0.0"
                        },
                        "last_seen": {
                          "timestamp": 1775189527762,
                          "version": "1.0.0"
                        },
                        "error": {
                          "message": "API ERROR: We encountered an internal error | POST /api/access/logout",
                          "type": "Error"
                        },
                        "suspected_cause": {
                          "source": "auto",
                          "value": "api.failed_request",
                          "reason": "The error indicates an internal server error during a POST request to /api/access/logout.",
                          "person_id": 0
                        },
                        "versions": [
                          "1.0.0"
                        ],
                        "severity": "Info"
                      }
                    ],
                    "has_next_page": true,
                    "total": 111
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumIssueListRequest"
              },
              "example": {
                "start_time": 1772611200000,
                "end_time": 1775961914595,
                "application_ids": [
                  "eWbr4xk3ZRnLabRa6unqwD"
                ],
                "statuses": [
                  "for_review"
                ],
                "p": 1,
                "limit": 20,
                "orderby": "updated_at"
              }
            }
          }
        }
      }
    },
    "/rum/issue/update": {
      "post": {
        "operationId": "rum-issue-write-update",
        "summary": "Update issue",
        "description": "Update the status or suspected cause of an issue.",
        "tags": [
          "RUM/Issues"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `status` valid values: `for_review`, `reviewed`, `ignored`, `resolved`.\n- `suspected_cause` valid values: `api.failed_request`, `network.error`, `code.exception`, `code.invalid_object_access`, `code.invalid_argument`, `unknown`.\n- Setting `status` to `resolved` also stamps `resolved_at` and `resolved_by` on the issue; moving a resolved issue back to another status clears them.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/rum/issues/rum-issue-write-update",
          "metadata": {
            "sidebarTitle": "Update issue"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumIssueUpdateRequest"
              },
              "example": {
                "issue_id": "NHEacQHi2DhXqobr9qPQz9",
                "status": "resolved"
              }
            }
          }
        }
      }
    },
    "/rum/application/infos": {
      "post": {
        "operationId": "rum-application-read-infos",
        "summary": "Batch get applications",
        "description": "Retrieve details for multiple RUM applications by their IDs in one request.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Maximum 200 IDs per request.",
          "href": "/en/api-reference/rum/applications/rum-application-read-infos",
          "metadata": {
            "sidebarTitle": "Batch get applications"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "application_id": "eWbr4xk3ZRnLabRa6unqwD",
                        "application_name": "Flashduty DEV",
                        "type": "browser",
                        "client_token": "ce8d1be90fc6534f89ce36ebf526765e131",
                        "team_id": 2477033058131,
                        "is_private": false,
                        "no_ip": false,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            5962711836131,
                            5967875767131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": true,
                          "open_type": "popup",
                          "endpoint": "https://www.tracing.com/${trace_id}"
                        },
                        "status": "enabled",
                        "created_by": 2476444212131,
                        "updated_by": 3122470302131,
                        "created_at": 1742958482000,
                        "updated_at": 1772096392711,
                        "links": {
                          "enabled": false,
                          "systems": []
                        }
                      },
                      {
                        "account_id": 2451002751131,
                        "application_id": "WoyQQ3BohkdtPivubEvE8o",
                        "application_name": "flashcat-rum",
                        "type": "browser",
                        "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                        "team_id": 2477033058131,
                        "is_private": true,
                        "no_ip": true,
                        "no_geo": false,
                        "alerting": {
                          "enabled": true,
                          "channel_ids": [
                            2490121812131
                          ],
                          "integration_id": 4759595678131
                        },
                        "tracing": {
                          "enabled": false,
                          "open_type": "",
                          "endpoint": ""
                        },
                        "status": "enabled",
                        "created_by": 4441703362131,
                        "updated_by": 3790925372131,
                        "created_at": 1746673831462,
                        "updated_at": 1773398630657,
                        "links": {
                          "enabled": true,
                          "systems": [
                            {
                              "id": "s3-crash-logs",
                              "name": "S3 Crash Logs",
                              "icon_text": "S3",
                              "icon_color": "#0F766E",
                              "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                              "event_types": [
                                "crash",
                                "error"
                              ],
                              "enabled": true
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationInfosRequest"
              },
              "example": {
                "application_ids": [
                  "eWbr4xk3ZRnLabRa6unqwD",
                  "WoyQQ3BohkdtPivubEvE8o"
                ]
              }
            }
          }
        }
      }
    },
    "/rum/field/list": {
      "post": {
        "operationId": "rum-read-field-list",
        "summary": "List RUM fields",
        "description": "Return RUM field definitions, optionally filtered by scope and facet status.",
        "tags": [
          "RUM/Facets"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- This is the current field-model route for discovering RUM fields.\n- Use returned `field_key` values in RUM data queries and facet-count requests.\n- Set `is_facet: true` to return only fields that support value distribution queries.",
          "href": "/en/api-reference/rum/facets/rum-read-field-list",
          "metadata": {
            "sidebarTitle": "List RUM fields"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumFieldListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 0,
                        "field_key": "error.type",
                        "field_name": "Error type",
                        "group": "Error",
                        "description": "The type of the error.",
                        "value_type": "string",
                        "show_type": "list",
                        "unit_family": "",
                        "unit_name": "",
                        "edit_able": false,
                        "is_facet": true,
                        "enum_values": [],
                        "scopes": [
                          "error"
                        ],
                        "status": "active",
                        "queryable": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumFieldListRequest"
              },
              "example": {
                "scopes": [
                  "error"
                ],
                "is_facet": false
              }
            }
          }
        }
      }
    },
    "/rum/application/info": {
      "post": {
        "operationId": "rum-application-read-info",
        "summary": "Get application detail",
        "description": "Retrieve full details of a single RUM application by `application_id`.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/rum/applications/rum-application-read-info",
          "metadata": {
            "sidebarTitle": "Get application detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "application_id": "WoyQQ3BohkdtPivubEvE8o",
                    "application_name": "flashcat-rum",
                    "type": "browser",
                    "client_token": "a3cea433a8685a398cdfd68f54a45e06131",
                    "team_id": 2477033058131,
                    "is_private": true,
                    "no_ip": true,
                    "no_geo": false,
                    "alerting": {
                      "enabled": true,
                      "channel_ids": [
                        2490121812131
                      ],
                      "integration_id": 4759595678131
                    },
                    "tracing": {
                      "enabled": false,
                      "open_type": "",
                      "endpoint": ""
                    },
                    "status": "enabled",
                    "created_by": 4441703362131,
                    "updated_by": 3790925372131,
                    "created_at": 1746673831462,
                    "updated_at": 1773398630657,
                    "links": {
                      "enabled": true,
                      "systems": [
                        {
                          "id": "s3-crash-logs",
                          "name": "S3 Crash Logs",
                          "icon_text": "S3",
                          "icon_color": "#0F766E",
                          "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                          "event_types": [
                            "crash",
                            "error"
                          ],
                          "enabled": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationIDRequest"
              },
              "example": {
                "application_id": "WoyQQ3BohkdtPivubEvE8o"
              }
            }
          }
        }
      }
    },
    "/rum/application/delete": {
      "post": {
        "operationId": "rum-application-write-delete",
        "summary": "Delete application",
        "description": "Delete a RUM application by `application_id`.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/rum/applications/rum-application-write-delete",
          "metadata": {
            "sidebarTitle": "Delete application"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationIDRequest"
              },
              "example": {
                "application_id": "qLpu24Dz4CAzWsESPbJYWA"
              }
            }
          }
        }
      }
    },
    "/rum/application/create": {
      "post": {
        "operationId": "rum-application-write-create",
        "summary": "Create application",
        "description": "Create a new RUM application. Returns the generated `application_id` and `client_token`.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `type` must be one of: `browser`, `ios`, `android`, `react-native`, `flutter`, `kotlin-multiplatform`, `roku`, `unity`.\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- `client_token` is auto-generated and used to initialize the RUM SDK.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/rum/applications/rum-application-write-create",
          "metadata": {
            "sidebarTitle": "Create application"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RumApplicationCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "application_id": "qLpu24Dz4CAzWsESPbJYWA",
                    "application_name": "My Web App",
                    "client_token": "e090078724855a4ca168c3884880dfbc131"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationCreateRequest"
              },
              "example": {
                "application_name": "My Web App",
                "type": "browser",
                "team_id": 2477033058131,
                "is_private": false,
                "links": {
                  "enabled": true,
                  "systems": [
                    {
                      "id": "s3-crash-logs",
                      "name": "S3 Crash Logs",
                      "icon_text": "S3",
                      "icon_color": "#0F766E",
                      "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                      "event_types": [
                        "crash",
                        "error"
                      ],
                      "enabled": true
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/rum/application/update": {
      "post": {
        "operationId": "rum-application-write-update",
        "summary": "Update application",
        "description": "Update an existing RUM application. All fields except `application_id` are optional — only provided fields are updated.",
        "tags": [
          "RUM/Applications"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Applications Manage** (`rum`) |\n\n## Usage\n\n- `links.systems[].url` must start with `http` or `https`; `${var}` tokens are resolved from RUM event context.\n- `links.systems[].event_types` accepts: `crash`, `error`, `view`, `action`, `resource`, `session`, `all`.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/rum/applications/rum-application-write-update",
          "metadata": {
            "sidebarTitle": "Update application"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RumApplicationUpdateRequest"
              },
              "example": {
                "application_id": "WoyQQ3BohkdtPivubEvE8o",
                "application_name": "My Web App v2",
                "alerting": {
                  "enabled": true,
                  "channel_ids": [
                    2490121812131
                  ]
                },
                "links": {
                  "enabled": true,
                  "systems": [
                    {
                      "id": "s3-crash-logs",
                      "name": "S3 Crash Logs",
                      "icon_text": "S3",
                      "icon_color": "#0F766E",
                      "url": "https://s3.example.com/logs?app=${application_id}&trace=${trace_id}",
                      "event_types": [
                        "crash",
                        "error"
                      ],
                      "enabled": true
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/sourcemap/list": {
      "post": {
        "operationId": "sourcemap-read-list",
        "summary": "List sourcemaps",
        "description": "Return a paginated list of uploaded sourcemap files filtered by platform type, service, and version.",
        "tags": [
          "RUM/Sourcemaps"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `start_time` and `end_time` are required — both use Unix epoch **milliseconds**. Maximum window is 365 days.\n- The `type` field selects the platform: `browser` (JavaScript), `android`, or `ios`. Defaults to `browser` when omitted.\n- Default page size is 20; maximum is 100. Default sort is `created_at` descending.\n- For Android, `build_id` matches the Gradle plugin build identifier. For iOS, `uuid` matches the dSYM bundle UUID.",
          "href": "/en/api-reference/rum/sourcemaps/sourcemap-read-list",
          "metadata": {
            "sidebarTitle": "List sourcemaps"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SourcemapListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "items": [
                      {
                        "key": "browser/my-web-app/1.0.0/main.js.map",
                        "type": "browser",
                        "service": "my-web-app",
                        "version": "1.0.0",
                        "size": 204800,
                        "git_repository_url": "https://github.com/example/my-web-app",
                        "git_commit_sha": "abc1234def5678",
                        "created_at": 1712700000,
                        "updated_at": 1712700000,
                        "metadata": {}
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourcemapListRequest"
              },
              "example": {
                "start_time": 1712000000000,
                "end_time": 1712700000000,
                "type": "browser",
                "services": [
                  "my-web-app"
                ],
                "p": 1,
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/member/info": {
      "post": {
        "operationId": "memberInfo",
        "summary": "Get current member info",
        "description": "Return the current session member's full profile.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/platform/members/member-info",
          "metadata": {
            "sidebarTitle": "Get current member info"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberInfoResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_avatar": "",
                    "account_email": "alice@example.com",
                    "account_id": 2451002751131,
                    "account_locale": "en-US",
                    "account_name": "Acme Corp",
                    "account_role_ids": [
                      6
                    ],
                    "account_time_zone": "Asia/Shanghai",
                    "avatar": "/image/avatar1.png",
                    "country_code": "CN",
                    "created_at": 1701399971,
                    "domain": "acme",
                    "email": "alice@example.com",
                    "email_verified": true,
                    "is_external": false,
                    "locale": "zh-CN",
                    "member_id": 2476444212131,
                    "member_name": "Alice",
                    "phone": "+86185****0300",
                    "phone_verified": true,
                    "time_zone": "Asia/Shanghai"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberInfoRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/member/list": {
      "post": {
        "operationId": "memberList",
        "summary": "List members",
        "description": "Return a paginated list of organization members.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/platform/members/member-list",
          "metadata": {
            "sidebarTitle": "List members"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "p": 1,
                    "limit": 5,
                    "total": 148,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "member_id": 5068740052131,
                        "member_name": "Bob",
                        "country_code": "",
                        "phone": "+86151****6519",
                        "email": "bob@example.com",
                        "phone_verified": true,
                        "email_verified": true,
                        "avatar": "",
                        "status": "enabled",
                        "account_role_ids": [
                          2,
                          6
                        ],
                        "created_at": 1752030749,
                        "updated_at": 1775962064,
                        "ref_id": "",
                        "is_external": false
                      },
                      {
                        "account_id": 2451002751131,
                        "member_id": 2476444212131,
                        "member_name": "Alice",
                        "country_code": "CN",
                        "phone": "+86185****0300",
                        "email": "alice@example.com",
                        "phone_verified": true,
                        "email_verified": true,
                        "avatar": "/image/avatar1.png",
                        "status": "enabled",
                        "account_role_ids": [
                          6
                        ],
                        "created_at": 1701399971,
                        "updated_at": 1775809507,
                        "ref_id": "",
                        "is_external": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberListRequest"
              },
              "example": {
                "p": 1,
                "limit": 5
              }
            }
          }
        }
      }
    },
    "/member/delete": {
      "post": {
        "operationId": "memberDelete",
        "summary": "Delete member",
        "description": "Remove a member from the organization by ID, email, phone, or name.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |\n\n## Usage\n\n- By default (`is_force=false`), the system checks whether the member is referenced by other resources (e.g., escalation rules, schedules). If references exist, the API returns error code `ReferenceExist` with the reference list in `data.refs`. Set `is_force=true` to skip the reference check and force delete.\n- Members provisioned via SSO with `sso_user_non_editable=true` cannot be deleted through this API. Disable that SSO restriction first.\n- This operation is recorded in the audit log.",
          "href": "/en/api-reference/platform/members/member-delete",
          "metadata": {
            "sidebarTitle": "Delete member"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberDeleteRequest"
              },
              "example": {
                "member_id": 5068740052131
              }
            }
          }
        }
      }
    },
    "/member/invite": {
      "post": {
        "operationId": "memberInvite",
        "summary": "Invite members",
        "description": "Batch invite new members to the organization by email or phone.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |",
          "href": "/en/api-reference/platform/members/member-invite",
          "metadata": {
            "sidebarTitle": "Invite members"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberInviteResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "member_id": 5068740052131,
                        "member_name": "Charlie"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberInviteRequest"
              },
              "example": {
                "members": [
                  {
                    "member_name": "Charlie",
                    "email": "charlie@example.com",
                    "locale": "en-US",
                    "time_zone": "Asia/Shanghai",
                    "role_ids": [
                      6
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/grant": {
      "post": {
        "operationId": "memberGrantRole",
        "summary": "Grant role to member",
        "description": "Add a role assignment to a member.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |",
          "href": "/en/api-reference/platform/members/member-grant-role",
          "metadata": {
            "sidebarTitle": "Grant role to member"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRoleGrantRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/revoke": {
      "post": {
        "operationId": "memberRevokeRole",
        "summary": "Revoke role from member",
        "description": "Remove a role assignment from a member.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |",
          "href": "/en/api-reference/platform/members/member-revoke-role",
          "metadata": {
            "sidebarTitle": "Revoke role from member"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRoleRevokeRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/role/update": {
      "post": {
        "operationId": "memberUpdateRole",
        "summary": "Update member roles",
        "description": "Replace all role assignments for a member at once.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Members Manage** (`organization`) |",
          "href": "/en/api-reference/platform/members/member-update-role",
          "metadata": {
            "sidebarTitle": "Update member roles"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRoleUpdateRequest"
              },
              "example": {
                "member_id": 5068740052131,
                "role_ids": [
                  2,
                  6
                ]
              }
            }
          }
        }
      }
    },
    "/member/info/reset": {
      "post": {
        "operationId": "memberResetInfo",
        "summary": "Reset member info",
        "description": "Batch-update multiple profile fields of the current member.",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/platform/members/member-reset-info",
          "metadata": {
            "sidebarTitle": "Reset member info"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MemberEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberResetInfoRequest"
              },
              "example": {
                "member_id": 2476444212131,
                "member_name": "Alice",
                "locale": "zh-CN",
                "time_zone": "Asia/Shanghai"
              }
            }
          }
        }
      }
    },
    "/person/infos": {
      "post": {
        "operationId": "personInfos",
        "summary": "Batch get persons",
        "description": "Return profile information for a batch of person IDs (members or accounts).",
        "tags": [
          "Platform/Members"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/platform/members/person-infos",
          "metadata": {
            "sidebarTitle": "Batch get persons"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PersonInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "person_id": 2476444212131,
                        "person_name": "Alice",
                        "avatar": "/image/avatar1.png",
                        "locale": "zh-CN",
                        "time_zone": "Asia/Shanghai",
                        "email": "alice@example.com",
                        "phone_verified": false,
                        "email_verified": true,
                        "as": "member",
                        "status": "enabled"
                      },
                      {
                        "account_id": 2451002751131,
                        "person_id": 3790925372131,
                        "person_name": "Bob",
                        "email": "bob@example.com",
                        "phone_verified": false,
                        "email_verified": true,
                        "as": "member",
                        "status": "enabled"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonInfosRequest"
              },
              "example": {
                "person_ids": [
                  2476444212131,
                  3790925372131
                ]
              }
            }
          }
        }
      }
    },
    "/team/info": {
      "post": {
        "operationId": "team-read-info",
        "summary": "Get team detail",
        "description": "Return a single team by ID, name, or external reference ID.",
        "tags": [
          "Platform/Teams"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.",
          "href": "/en/api-reference/platform/teams/team-read-info",
          "metadata": {
            "sidebarTitle": "Get team detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 10023,
                    "team_id": 1001,
                    "team_name": "Backend SRE",
                    "description": "Backend reliability engineering team",
                    "status": "enabled",
                    "updated_by_name": "alice",
                    "updated_by": 80011,
                    "creator_id": 80011,
                    "creator_name": "alice",
                    "created_at": 1710000000,
                    "updated_at": 1712000000,
                    "person_ids": [
                      80011,
                      80012
                    ],
                    "ref_id": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamInfoRequest"
              },
              "example": {
                "team_id": 1001
              }
            }
          }
        }
      }
    },
    "/team/infos": {
      "post": {
        "operationId": "team-read-infos",
        "summary": "Batch get teams",
        "description": "Return basic info for multiple teams by their IDs in a single request.",
        "tags": [
          "Platform/Teams"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Up to 100 team IDs per request.",
          "href": "/en/api-reference/platform/teams/team-read-infos",
          "metadata": {
            "sidebarTitle": "Batch get teams"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamInfosResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "team_id": 1001,
                        "team_name": "Backend SRE",
                        "person_ids": [
                          80011,
                          80012
                        ]
                      },
                      {
                        "team_id": 1002,
                        "team_name": "Frontend",
                        "person_ids": [
                          80013
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamInfosRequest"
              },
              "example": {
                "team_ids": [
                  1001,
                  1002
                ]
              }
            }
          }
        }
      }
    },
    "/team/list": {
      "post": {
        "operationId": "team-read-list",
        "summary": "List teams",
        "description": "Return a paginated list of teams in the current account.",
        "tags": [
          "Platform/Teams"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Filter by `person_id` to return teams that a specific person belongs to.\n- Defaults: p=1, limit=20.",
          "href": "/en/api-reference/platform/teams/team-read-list",
          "metadata": {
            "sidebarTitle": "List teams"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "p": 1,
                    "limit": 20,
                    "total": 5,
                    "items": [
                      {
                        "account_id": 10023,
                        "team_id": 1001,
                        "team_name": "Backend SRE",
                        "status": "enabled",
                        "creator_id": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1712000000,
                        "person_ids": [
                          80011
                        ],
                        "description": "",
                        "updated_by_name": "",
                        "updated_by": 0,
                        "creator_name": "alice",
                        "ref_id": ""
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/team/upsert": {
      "post": {
        "operationId": "team-write-upsert",
        "summary": "Create or update a team",
        "description": "Create a new team or update an existing one. Pass `team_id` to update.",
        "tags": [
          "Platform/Teams"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- Omit `team_id` (or set to 0) to create a new team; pass an existing ID to update.\n- `team_name` must be 1–39 characters and unique within the account.\n- Pass `person_ids` to set team membership; this replaces the entire member list.\n- Pass `emails` or `phones` to invite members who don't yet have accounts.\n- `ref_id` is an external identifier for integration with third-party HR systems.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/teams/team-write-upsert",
          "metadata": {
            "sidebarTitle": "Create or update a team"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TeamUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "team_id": 1001,
                    "team_name": "Backend SRE"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpsertRequest"
              },
              "example": {
                "team_name": "Backend SRE",
                "description": "Backend reliability engineering team",
                "person_ids": [
                  80011,
                  80012
                ]
              }
            }
          }
        }
      }
    },
    "/team/delete": {
      "post": {
        "operationId": "team-write-delete",
        "summary": "Delete a team",
        "description": "Permanently delete a team by ID, name, or external reference ID.",
        "tags": [
          "Platform/Teams"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Teams Manage** (`organization`) |\n\n## Usage\n\n- At least one of `team_id`, `team_name`, or `ref_id` must be provided.\n- Fails with `400 ReferenceExist` if the team is still referenced by schedules, escalation rules, or other resources.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/teams/team-write-delete",
          "metadata": {
            "sidebarTitle": "Delete a team"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamDeleteRequest"
              },
              "example": {
                "team_id": 1001
              }
            }
          }
        }
      }
    },
    "/role/info": {
      "post": {
        "operationId": "role-read-info",
        "summary": "Get role detail",
        "description": "Return the detail of a single role by its ID.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/platform/roles-permissions/role-read-info",
          "metadata": {
            "sidebarTitle": "Get role detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "role_id": 2,
                    "role_name": "Account Admin",
                    "description": "Account admin with all permissions.",
                    "status": "enabled",
                    "permission_ids": [
                      101,
                      102,
                      201
                    ],
                    "editable": false,
                    "created_at": 1700000000,
                    "updated_at": 1700000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleInfoRequest"
              },
              "example": {
                "role_id": 2
              }
            }
          }
        }
      }
    },
    "/role/list": {
      "post": {
        "operationId": "role-read-list",
        "summary": "List roles",
        "description": "Return all custom and built-in roles for the current account.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Built-in roles (`editable: false`) cannot be modified or deleted.",
          "href": "/en/api-reference/platform/roles-permissions/role-read-list",
          "metadata": {
            "sidebarTitle": "List roles"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 3,
                    "items": [
                      {
                        "role_id": 2,
                        "role_name": "Account Admin",
                        "description": "",
                        "status": "enabled",
                        "permission_ids": [],
                        "editable": false,
                        "created_at": 1700000000,
                        "updated_at": 1700000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleListRequest"
              },
              "example": {
                "orderby": "created_at",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/role/upsert": {
      "post": {
        "operationId": "role-write-upsert",
        "summary": "Create or update a role",
        "description": "Create a new custom role or update an existing one. Pass `role_id` to update.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Omit `role_id` (or set to 0) to create; pass an existing ID to update.\n- `role_name` must be 1–39 characters and unique within the account.\n- `permission_ids` sets the full permission set for the role, replacing any previous assignment.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-upsert",
          "metadata": {
            "sidebarTitle": "Create or update a role"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RoleUpsertResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "role_id": 150,
                    "role_name": "On-call Manager"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleUpsertRequest"
              },
              "example": {
                "role_name": "On-call Manager",
                "description": "Manage on-call rotations and incidents.",
                "permission_ids": [
                  501,
                  502
                ]
              }
            }
          }
        }
      }
    },
    "/role/enable": {
      "post": {
        "operationId": "role-write-enable",
        "summary": "Enable a role",
        "description": "Re-enable a previously disabled custom role.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Only custom roles can be enabled/disabled. Built-in roles always remain enabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-enable",
          "metadata": {
            "sidebarTitle": "Enable a role"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/disable": {
      "post": {
        "operationId": "role-write-disable",
        "summary": "Disable a role",
        "description": "Disable a custom role to prevent it from granting permissions.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who held this role lose its permissions immediately.\n- Only custom roles can be disabled.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-disable",
          "metadata": {
            "sidebarTitle": "Disable a role"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/delete": {
      "post": {
        "operationId": "role-write-delete",
        "summary": "Delete a role",
        "description": "Permanently delete a custom role and revoke it from all members.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Built-in roles cannot be deleted.\n- All members who held this role lose its permissions immediately.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-delete",
          "metadata": {
            "sidebarTitle": "Delete a role"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleIDRequest"
              },
              "example": {
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/permission/list": {
      "post": {
        "operationId": "role-read-list-permission",
        "summary": "List permissions",
        "description": "Return all available permissions, optionally filtered to those granted to specific roles.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pass `role_ids` to filter permissions to those granted to those roles.\n- Pass `with_all: true` to include all permissions regardless of role filter, with `is_granted` set to indicate which are granted to the specified roles.",
          "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission",
          "metadata": {
            "sidebarTitle": "List permissions"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/RolePermissionListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "id": 501,
                        "permission_name": "Templates Read",
                        "permission_type": "read",
                        "description": "View notification templates",
                        "class": "On-call",
                        "scope": "on-call",
                        "status": "enabled",
                        "is_granted": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RolePermissionListRequest"
              },
              "example": {
                "role_ids": [
                  150
                ],
                "with_all": true
              }
            }
          }
        }
      }
    },
    "/role/permission/factor/list": {
      "post": {
        "operationId": "role-read-list-permission-factor",
        "summary": "List permission factors",
        "description": "Return all permission factors (API, button, menu, URL, visit) optionally filtered by type.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Permission factors are the fine-grained controls that make up each permission.\n- `factor_types` accepts: `api`, `button`, `visit`, `menu`, `url`.",
          "href": "/en/api-reference/platform/roles-permissions/role-read-list-permission-factor",
          "metadata": {
            "sidebarTitle": "List permission factors"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PermissionFactorListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "factor_name": "template:read:info",
                      "factor_type": "api"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionFactorListRequest"
              },
              "example": {
                "factor_types": [
                  "api"
                ]
              }
            }
          }
        }
      }
    },
    "/role/member/grant": {
      "post": {
        "operationId": "role-write-grant-role",
        "summary": "Grant role to members",
        "description": "Assign a role to one or more members, giving them its permissions.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Up to 100 member IDs per request.\n- Members who already have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-grant-role",
          "metadata": {
            "sidebarTitle": "Grant role to members"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleGrantRequest"
              },
              "example": {
                "member_ids": [
                  80011,
                  80012
                ],
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/role/member/revoke": {
      "post": {
        "operationId": "role-write-revoke-role",
        "summary": "Revoke role from members",
        "description": "Remove a role from one or more members, revoking the permissions it granted.",
        "tags": [
          "Platform/Roles & permissions"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Roles Manage** (`organization`) |\n\n## Usage\n\n- Members who don't have the role are silently skipped.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/platform/roles-permissions/role-write-revoke-role",
          "metadata": {
            "sidebarTitle": "Revoke role from members"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PlatformEmptyObject"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleGrantRequest"
              },
              "example": {
                "member_ids": [
                  80011
                ],
                "role_id": 150
              }
            }
          }
        }
      }
    },
    "/audit/search": {
      "post": {
        "operationId": "audit-read-search",
        "summary": "Search audit logs",
        "description": "Return a cursor-paginated list of audit log entries within a time range.",
        "tags": [
          "Platform/Audit logs"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Time range is required. Maximum span is 90 days. Both `start_time` and `end_time` are Unix epoch **seconds**.\n- Use `search_after_ctx` from the previous response to fetch the next page. The token is opaque — do not construct it manually.\n- The retention window depends on the account's license. Queries beyond the retention boundary silently return an empty result rather than an error.\n- Default page size is 20 rows; maximum is 99.",
          "href": "/en/api-reference/platform/audit-logs/audit-read-search",
          "metadata": {
            "sidebarTitle": "Search audit logs"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AuditSearchResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "search_after_ctx": "",
                    "docs": [
                      {
                        "created_at": 1712700123456,
                        "account_id": 10023,
                        "member_id": 80011,
                        "member_name": "Alice",
                        "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                        "ip": "203.0.113.42",
                        "operation": "template:write:create",
                        "operation_name": "创建模板",
                        "body": "{\"template_name\":\"Prod default\"}",
                        "params": [],
                        "is_dangerous": false,
                        "is_write": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditSearchRequest"
              },
              "example": {
                "start_time": 1712620800,
                "end_time": 1712707200,
                "limit": 20,
                "operations": [
                  "template:write:create",
                  "template:write:delete"
                ]
              }
            }
          }
        }
      }
    },
    "/audit/operation/list": {
      "post": {
        "operationId": "audit-read-operation-list",
        "summary": "List auditable operation types",
        "description": "Return all operation names that are recorded in the audit log, for use as `operations` filter values.",
        "tags": [
          "Platform/Audit logs"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Audit Read** (`organization`) |\n\n## Usage\n\n- Use the `name` values from this response as `operations` filter values in `POST /audit/search`.\n- `name_cn` is the human-readable Chinese label shown in the console; `name` is the stable wire value to filter on.",
          "href": "/en/api-reference/platform/audit-logs/audit-read-operation-list",
          "metadata": {
            "sidebarTitle": "List auditable operation types"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AuditOperationListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "name": "template:write:create",
                        "name_cn": "创建模板"
                      },
                      {
                        "name": "template:write:delete",
                        "name_cn": "删除模板"
                      },
                      {
                        "name": "incident:write:acknowledge",
                        "name_cn": "认领故障"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditOperationListRequest"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/field/info": {
      "post": {
        "operationId": "field-read-info",
        "summary": "Get field detail",
        "description": "Return the configuration of a single incident custom field by ID.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Only fields whose status is not `deleted` are returned; a deleted or unknown `field_id` yields a 400 error.\n- The shape of `options` and `default_value` varies by `field_type` — see the `FieldItem` schema.",
          "href": "/en/api-reference/on-call/alert-enrichment/field-read-info",
          "metadata": {
            "sidebarTitle": "Get field detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 80001,
                    "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                    "field_name": "severity_class",
                    "display_name": "Severity Class",
                    "description": "Business severity tier.",
                    "field_type": "single_select",
                    "value_type": "string",
                    "options": [
                      "Critical",
                      "High",
                      "Medium",
                      "Low"
                    ],
                    "default_value": "Medium",
                    "status": "enabled",
                    "creator_id": 80011,
                    "updated_by": 80011,
                    "created_at": 1710000000,
                    "updated_at": 1710000000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldInfoRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3"
              }
            }
          }
        }
      }
    },
    "/field/list": {
      "post": {
        "operationId": "field-read-list",
        "summary": "List fields",
        "description": "Return all incident custom fields configured for the account.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) or **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- All non-deleted fields are returned in a single response — there is no pagination and no `total` counter.\n- `query` matches against `field_name` and `display_name`; invalid regular expressions are auto-escaped to a literal substring match.",
          "href": "/en/api-reference/on-call/alert-enrichment/field-read-list",
          "metadata": {
            "sidebarTitle": "List fields"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/FieldListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "account_id": 80001,
                        "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                        "field_name": "severity_class",
                        "display_name": "Severity Class",
                        "description": "Business severity tier.",
                        "field_type": "single_select",
                        "value_type": "string",
                        "options": [
                          "Critical",
                          "High",
                          "Medium",
                          "Low"
                        ],
                        "default_value": "Medium",
                        "status": "enabled",
                        "creator_id": 80011,
                        "updated_by": 80011,
                        "created_at": 1710000000,
                        "updated_at": 1710000000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FieldListRequest"
              },
              "example": {
                "orderby": "updated_at",
                "asc": false,
                "query": "severity"
              }
            }
          }
        }
      }
    },
    "/field/create": {
      "post": {
        "operationId": "field-write-create",
        "summary": "Create field",
        "description": "Create a new incident custom field on the account.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Maximum **15** custom fields per account.\n- `field_name` must match `^[a-zA-Z_][a-zA-Z0-9_]{0,39}$` and is immutable after creation; `display_name` must also be unique within the account.\n- Type-specific rules: `checkbox` requires `value_type=bool` and no `options`; `single_select`/`multi_select` require `value_type=string` and a non-empty unique `options` list; `text` requires `value_type=string` and no `options`.\n- Response contains only `field_id` and `field_name`; use `/field/info` to fetch the full object.\n- Audited — changes are recorded in the audit log.",
          "href": "/en/api-reference/on-call/alert-enrichment/field-write-create",
          "metadata": {
            "sidebarTitle": "Create field"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateFieldResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                    "field_name": "severity_class"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFieldRequest"
              },
              "example": {
                "field_name": "severity_class",
                "display_name": "Severity Class",
                "description": "Business severity tier.",
                "field_type": "single_select",
                "value_type": "string",
                "options": [
                  "Critical",
                  "High",
                  "Medium",
                  "Low"
                ],
                "default_value": "Medium"
              }
            }
          }
        }
      }
    },
    "/field/update": {
      "post": {
        "operationId": "field-write-update",
        "summary": "Update field",
        "description": "Update mutable attributes of an existing incident custom field.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Only `display_name`, `description`, `options`, and `default_value` can be changed; `field_name`, `field_type`, and `value_type` are immutable.\n- `options` and `default_value` must remain consistent with the field's existing type — same rules as create.\n- Audited — changes are recorded in the audit log.",
          "href": "/en/api-reference/on-call/alert-enrichment/field-write-update",
          "metadata": {
            "sidebarTitle": "Update field"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFieldRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3",
                "display_name": "Severity Class",
                "description": "Business severity tier.",
                "options": [
                  "Critical",
                  "High",
                  "Medium",
                  "Low"
                ],
                "default_value": "Medium"
              }
            }
          }
        }
      }
    },
    "/field/delete": {
      "post": {
        "operationId": "field-write-delete",
        "summary": "Delete field",
        "description": "Delete an incident custom field and asynchronously strip it from existing incidents.",
        "tags": [
          "On-call/Alert enrichment"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- The field is marked deleted synchronously; clearing its values from historical incidents runs in the background and may take time on large datasets.\n- Re-creating a field with the same `field_name` is only allowed if `field_type` and `value_type` match the deleted entry.\n- Audited — changes are recorded in the audit log.",
          "href": "/en/api-reference/on-call/alert-enrichment/field-write-delete",
          "metadata": {
            "sidebarTitle": "Delete field"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteFieldRequest"
              },
              "example": {
                "field_id": "66e9d3a4f7c2b04a1c8a91b3"
              }
            }
          }
        }
      }
    },
    "/monit/query/rows": {
      "post": {
        "operationId": "monit-read-query-rows",
        "summary": "Query data source rows",
        "description": "Run a synchronous ad-hoc query against a configured data source and get back its raw rows. Used by Flashduty AI SRE and by UI preview. The request is forwarded over WebSocket to monit-edge, which executes the query against the underlying source (Prometheus / Loki / VictoriaLogs / SLS / MySQL / Postgres / Oracle / ClickHouse / Elasticsearch).",
        "tags": [
          "Monitors/Diagnostics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- The request is forwarded to `monit-edge` over WebSocket; the data source named by `ds_type` + `ds_name` must already exist under the calling account.\n- `account_id` in the body is optional. When supplied it must equal the authenticated account; mismatched values are rejected.\n- Two error layers: webapi-level failures use the standard error envelope, but errors raised by `monit-edge` while executing the query are returned as HTTP 200 with an `error` object in the body. Always check the response body for `error` in addition to the HTTP status.\n- monit-edge enforces a row cap; large result sets come back as `error.message = \"too many rows\"`. Narrow the time range or aggregate at the source.\n- `args` is a polymorphic `string→string` map that is forwarded verbatim. Semantics depend on `ds_type` (SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `*.start`/`*.end` or `*.timespan.value`/`*.timespan.unit`; Prometheus and SQL sources ignore it). See the monit-webapi query-api docs for the per-source key list.",
          "href": "/en/api-reference/monitors/diagnostics/monit-read-query-rows",
          "metadata": {
            "sidebarTitle": "Query data source rows"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRowsRequest"
              },
              "example": {
                "account_id": 10001,
                "ds_type": "prometheus",
                "ds_name": "prod-prom",
                "expr": "up",
                "delay_seconds": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/QueryRowsResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": [
                    {
                      "fields": {
                        "__name__": "up",
                        "instance": "10.0.0.1:9100",
                        "job": "node"
                      },
                      "values": {
                        "__value__": 1
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/query/diagnose": {
      "post": {
        "operationId": "monit-read-query-diagnose",
        "summary": "Diagnose data source",
        "description": "Run a synchronous diagnostic query (`log_patterns` for Loki/VictoriaLogs, `metric_trends` for Prometheus). Used by Flashduty AI SRE for log-pattern clustering and time-series trend analysis. Long-running — up to 35 s.",
        "tags": [
          "Monitors/Diagnostics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- This is a diagnostic / RCA endpoint, not a raw data query — pair it with `/monit/query/rows` when you need detailed rows.\n- `operation` defaults from `ds_type`: `loki` / `victorialogs` → `log_patterns`, `prometheus` → `metric_trends`. Other sources must pass `operation` explicitly.\n- `methods` selects the analyses to run; when omitted, `log_patterns` defaults to `pattern_snapshot + pattern_compare(previous_window)` and `metric_trends` defaults to `single_window_shape + window_compare(previous_window)`.\n- `time_range` is in Unix seconds; missing or invalid values default to the last 15 minutes; a window wider than 6 hours is rejected.\n- The request is forwarded over WebSocket to `monit-edge`. Long-running: the request may take up to ~30 s on the edge side plus webapi overhead. Set client timeouts to **at least 35 s**.\n- `options.*` are upper-bounded by edge (`max_logs_scanned` ≤ 50 000, `max_patterns` ≤ 50, `examples_per_pattern` ≤ 3, `step_seconds` ∈ [15, 300], `max_series` ≤ 200, `topk` ≤ 50, `timeout_seconds` ≤ 30).\n- Two error layers as with `/monit/query/rows`: edge-level execution errors come back as HTTP 200 with an `error` object in the body — check both layers.\n- Log examples are basic-redacted before being returned; expect `warnings: [\"examples redacted\"]`. Do not treat them as raw logs.",
          "href": "/en/api-reference/monitors/diagnostics/monit-read-query-diagnose",
          "metadata": {
            "sidebarTitle": "Diagnose data source"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiagnoseRequest"
              },
              "example": {
                "account_id": 10001,
                "ds_type": "victorialogs",
                "ds_name": "vmlogs-read",
                "operation": "log_patterns",
                "time_range": {
                  "start": 1776847544,
                  "end": 1776849344
                },
                "methods": [
                  {
                    "name": "pattern_snapshot"
                  },
                  {
                    "name": "pattern_compare",
                    "baseline": "same_window_yesterday"
                  }
                ],
                "input": {
                  "query": "_stream:{status='500'}"
                },
                "options": {
                  "max_logs_scanned": 10000,
                  "max_patterns": 20,
                  "examples_per_pattern": 2,
                  "timeout_seconds": 25
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/DiagnoseResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "operation": "log_patterns",
                    "ds_type": "victorialogs",
                    "ds_name": "vmlogs-read",
                    "query": "_stream:{status='500'}",
                    "window": {
                      "start": 1776847544,
                      "end": 1776849344
                    },
                    "results": [
                      {
                        "method": "pattern_snapshot",
                        "window": {
                          "start": 1776847544,
                          "end": 1776849344
                        },
                        "summary": {
                          "logs_scanned": 405,
                          "baseline_logs_scanned": 0,
                          "current_truncated": false,
                          "baseline_truncated": false,
                          "patterns_total": 2,
                          "returned_patterns": 2,
                          "new_patterns": 0,
                          "surging_patterns": 0,
                          "surging_threshold": {
                            "change_ratio_min": 3,
                            "count_min": 5
                          }
                        },
                        "patterns": [
                          {
                            "pattern_hash": "239fa5da",
                            "template": "POST /api/v<number>/orders/<number> HTTP/<number>",
                            "count": 213,
                            "first_seen": 1776847562,
                            "last_seen": 1776849336,
                            "severity": "unknown",
                            "approximate": false,
                            "sources": [
                              {
                                "field": "pod",
                                "value": "order-api-7f69d8d9b6-m4x9n",
                                "count": 130
                              }
                            ],
                            "examples": [
                              "POST /api/v<number>/orders/<number> HTTP/<number>"
                            ]
                          }
                        ],
                        "warnings": [
                          "examples redacted"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/tools/catalog": {
      "post": {
        "operationId": "monit-read-tools-catalog",
        "summary": "List target tool catalog",
        "description": "Look up the tools that the per-target monit-agent currently exposes for a given `target_locator` (host, mysql, …). Returns each tool's name, description, and JSON-Schema `input_schema`. Pair with `/monit/tools/invoke` to drive AI-SRE tool calls.",
        "tags": [
          "Monitors/Diagnostics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Use `target_locator` to identify the target; `target_kind` is optional and is auto-inferred when omitted. Built-in target kinds are `host` and `mysql`.\n- If multiple kinds match the same locator, the response is HTTP 200 with `data.error.code = \"ambiguous_target_kind\"` and a `target_kinds` list — retry with an explicit `target_kind`.\n- The catalog is a *candidate capability* view, not an execution guarantee. The target Agent may go offline between catalog and invoke, or local Agent policy may block individual tools at invoke time.\n- Set `include_output_shape: true` to additionally receive each tool's `output_shape`. Default is `false` to keep the response small for LLM consumption.\n- Business errors (`target_unavailable`, `unknown_toolset_hash`, `ambiguous_target_kind`) come back as HTTP 200 with a non-null `data.error`. Only protocol / auth / internal errors use the standard error envelope.",
          "href": "/en/api-reference/monitors/diagnostics/monit-read-tools-catalog",
          "metadata": {
            "sidebarTitle": "List target tool catalog"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolCatalogRequest"
              },
              "example": {
                "account_id": 10001,
                "target_locator": "web-01",
                "include_output_shape": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ToolCatalogResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "target": {
                      "kind": "host",
                      "locator": "web-01"
                    },
                    "tools": [
                      {
                        "name": "os.overview",
                        "target_kind": "host",
                        "description": "Returns a bounded overview of host health (CPU, memory, disk, network, top processes).",
                        "input_schema": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {}
                        },
                        "output_shape": {
                          "type": "object",
                          "required": [
                            "data",
                            "summary",
                            "truncated"
                          ],
                          "properties": {
                            "data": {
                              "type": "object"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "truncated": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/tools/invoke": {
      "post": {
        "operationId": "monit-read-tools-invoke",
        "summary": "Invoke target tools",
        "description": "Invoke up to 8 monit-agent tools concurrently on a single target. Results come back in the order of the input `tools` array. Long-running — individual tools have per-tool timeouts on the agent and the whole request may take tens of seconds.",
        "tags": [
          "Monitors/Diagnostics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- Up to **8** tools per call (`MaxToolsPerInvoke`); larger batches must be split client-side. The 8-tool cap aligns with the per-target agent concurrency.\n- Tools execute in parallel on the agent; webapi returns `results[]` aligned with the request `tools[]` order.\n- Long-running: set client timeouts to **at least 35 s**. The endpoint is intended for AI-SRE / human-RCA flows, not interactive UI.\n- Request-level errors (`target_unavailable`, `ambiguous_target_kind`, `unknown_toolset_hash`, `forward_failed`) appear as HTTP 200 with `data.error` set and `data.results = []`.\n- Per-tool failures appear as HTTP 200 with `data.error = null` and `results[i].error` populated — always check **all three** layers (outer envelope `error`, `data.error`, then each `results[i].error`).\n- Each result carries two latency fields: `agent_elapsed_ms` (agent-self-reported, excludes network) and `e2e_elapsed_ms` (webapi-observed end-to-end). A large gap between them indicates network / edge slowness rather than slow tool execution.\n- Construct `tools[].params` against the `input_schema` returned by `/monit/tools/catalog`. For no-arg tools always pass `params: {}` explicitly.",
          "href": "/en/api-reference/monitors/diagnostics/monit-read-tools-invoke",
          "metadata": {
            "sidebarTitle": "Invoke target tools"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolInvokeRequest"
              },
              "example": {
                "account_id": 10001,
                "target_locator": "web-01",
                "tools": [
                  {
                    "tool": "os.overview",
                    "params": {}
                  },
                  {
                    "tool": "net.tcp_ping",
                    "params": {
                      "host": "10.0.0.10",
                      "port": 3306
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ToolInvokeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "target": {
                      "kind": "host",
                      "locator": "web-01"
                    },
                    "results": [
                      {
                        "tool": "os.overview",
                        "tool_version": "0.5.0",
                        "data": {
                          "data": {
                            "sample_interval_sec": 3,
                            "degraded": false,
                            "degradation_reasons": []
                          },
                          "summary": "os.overview ...",
                          "truncated": {
                            "truncated": false
                          }
                        },
                        "error": null,
                        "agent_elapsed_ms": 3120,
                        "e2e_elapsed_ms": 3188
                      },
                      {
                        "tool": "net.tcp_ping",
                        "tool_version": "0.5.0",
                        "data": null,
                        "error": {
                          "code": "target_unreachable",
                          "message": "dial tcp 10.0.0.10:3306: i/o timeout"
                        },
                        "agent_elapsed_ms": 0,
                        "e2e_elapsed_ms": 2008
                      }
                    ],
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/monit/targets": {
      "post": {
        "operationId": "monit-read-targets-list",
        "summary": "List monitored targets",
        "description": "List the targets observed under the current tenant by the monit-agent route projection. Supports `target_locator` prefix search and cursor pagination. Use this to drive `target_locator` selection for `/monit/tools/catalog` and `/monit/tools/invoke`.",
        "tags": [
          "Monitors/Diagnostics"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **600 requests/minute**; **10 requests/second** per account |\n| Permissions | Any valid `app_key` (read-only; not gated by a specific permission class) |\n\n## Usage\n\n- This is a **UI projection view**, not the live source-of-truth used by `/monit/tools/invoke`. A row in the list is no guarantee the target is currently invokable.\n- `keyword` is a **prefix** match against `target_locator` (ASCII-only, no whitespace, no `|`, max 256 bytes). Substring search is not supported in v1.\n- `limit` defaults to 50, max 200. Pagination is cursor-based: pass the previous response's `next_cursor` to fetch the next page; an empty / missing `next_cursor` means the last page.\n- Resetting `keyword`, `limit`, or the tenant context requires resetting `cursor`; never mix a cursor across different filter sets.\n- `total` is the unfiltered-by-cursor match count for the current `(account_id, keyword)` pair and stays stable across pages.\n- Fields surface `cluster_name` / `edge_ipport` for diagnostics; treat `updated_at` as \"most recently observed\" rather than a live online indicator.",
          "href": "/en/api-reference/monitors/diagnostics/monit-read-targets-list",
          "metadata": {
            "sidebarTitle": "List monitored targets"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TargetsListRequest"
              },
              "example": {
                "keyword": "db-prod",
                "limit": 50
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TargetsListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "target_kind": "host",
                        "target_locator": "db-prod-01",
                        "agent_version": "2.0.0",
                        "cluster_name": "edge-a",
                        "edge_ipport": "10.0.0.1:19090",
                        "updated_at": 1710000000
                      }
                    ],
                    "total": 120,
                    "next_cursor": "eyJ0YXJnZXRfbG9jYXRvciI6ImRiLXByb2QtMDEiLCJpZCI6MTIzNDV9"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/change/list": {
      "post": {
        "operationId": "change-read-list",
        "summary": "List changes",
        "description": "Query change records within a time window, with filtering, search, and pagination.",
        "tags": [
          "On-call/Changes"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/changes/change-read-list",
          "metadata": {
            "sidebarTitle": "List changes"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListChangeResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "has_next_page": false,
                    "items": [
                      {
                        "change_id": "664a1b2c3d4e5f6a7b8c9d0e",
                        "account_id": 10001,
                        "channel_id": 5001,
                        "channel_name": "Production",
                        "channel_status": "active",
                        "integration_id": 362,
                        "integration_name": "GitHub Deploy",
                        "title": "Deploy api-server v2.3.1",
                        "description": "Rolling deploy to production cluster",
                        "change_key": "deploy-api-server-2311",
                        "change_status": "Done",
                        "start_time": 1716962400,
                        "last_time": 1716962700,
                        "end_time": 1716963000,
                        "labels": {
                          "service": "api-server",
                          "env": "prod"
                        },
                        "link": "https://github.com/acme/api-server/actions/runs/123"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListChangeRequest"
              },
              "example": {
                "start_time": 1716960000,
                "end_time": 1717046400,
                "p": 1,
                "limit": 10,
                "integration_ids": [
                  362
                ],
                "orderby": "start_time",
                "asc": false,
                "include_events": false
              }
            }
          }
        }
      }
    },
    "/incident/war-room/default-observers": {
      "post": {
        "operationId": "incident-read-get-war-room-default-observers",
        "summary": "Get war-room default observers",
        "description": "Return historical responders suggested as default observers when opening a war room.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/incidents/incident-read-get-war-room-default-observers",
          "metadata": {
            "sidebarTitle": "Get war-room default observers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/GetWarRoomDefaultObserversResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "observers": [
                      {
                        "account_id": 10001,
                        "person_id": 20001,
                        "person_name": "Alice Chen",
                        "avatar": "https://cdn.flashcat.cloud/avatar/20001.png",
                        "email": "alice@acme.com",
                        "phone": "+8613800000000",
                        "locale": "zh-CN",
                        "time_zone": "Asia/Shanghai",
                        "as": "responder",
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetWarRoomDefaultObserversRequest"
              },
              "example": {
                "incident_id": "664a1b2c3d4e5f6a7b8c9d0e"
              }
            }
          }
        }
      }
    },
    "/incident/war-room/add-member": {
      "post": {
        "operationId": "incident-write-add-war-room-member",
        "summary": "Add war-room member",
        "description": "Add one or more members to the IM war room bound to an incident integration.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/incidents/incident-write-add-war-room-member",
          "metadata": {
            "sidebarTitle": "Add war-room member"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "string",
                          "description": "Returns the literal \"ok\" on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": "ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddWarRoomMemberRequest"
              },
              "example": {
                "integration_id": 362,
                "chat_id": "oc_5ce6d572455d361153b7cb51da133945",
                "member_ids": [
                  20001,
                  20002
                ]
              }
            }
          }
        }
      }
    },
    "/template/preview": {
      "post": {
        "operationId": "template-read-preview",
        "summary": "Preview template",
        "description": "Render a notification template against incident data or mock data and return the output.",
        "tags": [
          "On-call/Notification templates"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/notification-templates/template-read-preview",
          "metadata": {
            "sidebarTitle": "Preview template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PreviewTemplateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "success": true,
                    "content": "Incident Database latency spike is Critical",
                    "message": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewTemplateRequest"
              },
              "example": {
                "content": "Incident {{.Title}} is {{.Status}}",
                "type": "feishu_app",
                "incident_id": "664a1b2c3d4e5f6a7b8c9d0e"
              }
            }
          }
        }
      }
    },
    "/datasource/im/war-room-enabled/list": {
      "post": {
        "operationId": "im-war-room-enabled-list",
        "summary": "List war-room-enabled IM integrations",
        "description": "List IM integrations that have the war-room feature enabled for the account.",
        "tags": [
          "On-call/IM integrations"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/integrations/im-war-room-enabled-list",
          "metadata": {
            "sidebarTitle": "List war-room-enabled IM integrations"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListWarRoomEnabledResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "data_source_id": 362,
                        "account_id": 10001,
                        "team_id": 0,
                        "plugin_id": 101,
                        "name": "Feishu Ops",
                        "status": "enabled",
                        "category": "im",
                        "plugin_type": "feishu",
                        "plugin_type_name": "Feishu",
                        "description": "Feishu war-room integration",
                        "integration_key": "ik_8f3a2b1c9d0e",
                        "ref_id": "",
                        "settings": {
                          "war_room_enabled": true
                        },
                        "no_editable": false,
                        "creator_id": 20001,
                        "updated_by": 20001,
                        "created_at": 1716962400,
                        "updated_at": 1716962700,
                        "last_time": 1716963000,
                        "exclusive_data_source_id": 0,
                        "integration_id": 362
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {}
            }
          }
        }
      }
    },
    "/status-page/list": {
      "get": {
        "operationId": "status-page-read-page-list",
        "summary": "List status pages",
        "description": "List all status pages owned by the account, including their components and sections.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n",
          "href": "/en/api-reference/on-call/status-pages/status-page-read-page-list",
          "metadata": {
            "sidebarTitle": "List status pages"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListStatusPageResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "page_id": 7001,
                        "name": "Acme Status",
                        "url_name": "acme",
                        "type": "public",
                        "custom_domain": "status.acme.com",
                        "logo_url": "https://acme.com",
                        "page_header": "Acme System Status",
                        "date_view": "calendar",
                        "display_uptime_mode": "chart_and_percentage",
                        "custom_links": [
                          {
                            "name": "Home",
                            "url": "https://acme.com"
                          }
                        ],
                        "contact_info": "mailto:support@acme.com",
                        "components": [
                          {
                            "component_id": "cmp_001",
                            "section_id": "sec_001",
                            "name": "API",
                            "description": "Core API service",
                            "available_since_seconds": 1716962400,
                            "order_id": 1,
                            "hide_uptime": false,
                            "hide_all": false
                          }
                        ],
                        "sections": [
                          {
                            "section_id": "sec_001",
                            "name": "Core Services",
                            "order_id": 1,
                            "hide_uptime": false,
                            "hide_all": false
                          }
                        ],
                        "subscription": {
                          "email": true,
                          "im": false
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/account/info": {
      "post": {
        "summary": "Get account detail",
        "description": "Return the current account's profile and settings.",
        "operationId": "account-read-info",
        "tags": [
          "Platform/Account"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AccountInfo"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "error_code": 0,
                  "data": {
                    "account_id": 1001,
                    "account_name": "acme",
                    "domain": "acme",
                    "extra_domains": [
                      "acme-corp"
                    ],
                    "phone": "138****8000",
                    "country_code": "86",
                    "email": "ops@acme.example",
                    "avatar": "https://cdn.flashcat.cloud/avatar/acme.png",
                    "locale": "zh-CN",
                    "time_zone": "Asia/Shanghai",
                    "created_at": 1716960000,
                    "restrictions": {
                      "ips": [
                        "203.0.113.0/24"
                      ],
                      "email_domains": [
                        "acme.example"
                      ],
                      "allow_subdomain": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "x-mint": {
          "metadata": {
            "sidebarTitle": "Get account detail"
          },
          "content": "| Permission | Description |\n| --- | --- |\n| None | None — any valid app_key can call this operation. |\n\nFind this operation in the [Platform API reference](/en/api-reference/platform/account/account-read-info).",
          "href": "/en/api-reference/platform/account/account-read-info"
        }
      }
    },
    "/datasource/im/person/try-link": {
      "post": {
        "operationId": "datasourceImPersonTryLink",
        "summary": "Attempt IM person linking",
        "description": "Try to automatically link unbound members to their IM accounts for one integration.",
        "tags": [
          "On-call/Integrations"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Integrations Manage** (`on-call`) |\n\n## Usage\n\n- The server uses member email and phone values to find matching users in DingTalk, Feishu, or WeCom.\n- If no member can be linked, the response contains an empty `new_linked_person_ids` array.",
          "href": "/en/api-reference/on-call/integrations/datasource-im-person-try-link",
          "metadata": {
            "sidebarTitle": "Attempt IM person linking"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/TryLinkPersonResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "new_linked_person_ids": [
                      5348648172131
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TryLinkPersonRequest"
              },
              "example": {
                "integration_id": 6113996590131
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/init": {
      "post": {
        "operationId": "postmortem-write-init",
        "summary": "Initialize post-mortem",
        "description": "Create a post-mortem draft from one or more incidents and a template.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Links at most 10 incidents to one post-mortem report.\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-init",
          "metadata": {
            "sidebarTitle": "Initialize post-mortem"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "meta": {
                      "account_id": 2451002751131,
                      "title": "Postmortem1",
                      "status": "published",
                      "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                      "template_id": "post_mortem_default_tmpl_en-us",
                      "incident_ids": [
                        "69bb9233331067560c718ecd"
                      ],
                      "media_count": 0,
                      "author_ids": [
                        2477273692131
                      ],
                      "team_id": 2477033058131,
                      "channel_id": 3047621227131,
                      "is_private": false,
                      "channel_name": "Ops Channel",
                      "created_at_seconds": 1773900354,
                      "updated_at_seconds": 1773909012
                    },
                    "basics": {
                      "incidents_highest_severity": "Warning",
                      "incidents_earliest_start_seconds": 1761133512,
                      "incidents_latest_close_seconds": 1761133632,
                      "incidents_total_duration_seconds": 120,
                      "responders": [
                        {
                          "person_id": 3790925372131,
                          "assigned_at": 1761133515,
                          "acknowledged_at": 0
                        }
                      ]
                    },
                    "content": {
                      "content": "{\"type\":\"doc\",\"content\":[]}"
                    },
                    "follow_ups": ""
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitPostMortemRequest"
              },
              "example": {
                "incident_ids": [
                  "69bb9233331067560c718ecd"
                ],
                "template_id": "post_mortem_default_tmpl_en-us"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/basics/reset": {
      "post": {
        "operationId": "postmortem-write-reset-basics",
        "summary": "Update post-mortem basics",
        "description": "Replace the incident facts stored in a post-mortem report.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-basics",
          "metadata": {
            "sidebarTitle": "Update post-mortem basics"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPostMortemBasicsRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "incidents_highest_severity": "Warning",
                "incidents_earliest_start_seconds": 1761133512,
                "incidents_latest_close_seconds": 1761133632,
                "incidents_total_duration_seconds": 120,
                "responder_ids": [
                  3790925372131
                ]
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/status/reset": {
      "post": {
        "operationId": "postmortem-write-reset-status",
        "summary": "Update post-mortem status",
        "description": "Set a post-mortem report to drafting or published.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-status",
          "metadata": {
            "sidebarTitle": "Update post-mortem status"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPostMortemStatusRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "status": "published"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/title/reset": {
      "post": {
        "operationId": "postmortem-write-reset-title",
        "summary": "Update post-mortem title",
        "description": "Replace the title of a post-mortem report.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-title",
          "metadata": {
            "sidebarTitle": "Update post-mortem title"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPostMortemTitleRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "title": "Production API latency incident"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/follow-ups/reset": {
      "post": {
        "operationId": "postmortem-write-reset-follow-ups",
        "summary": "Update post-mortem follow-ups",
        "description": "Replace the follow-up action items on a post-mortem report.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-reset-follow-ups",
          "metadata": {
            "sidebarTitle": "Update post-mortem follow-ups"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPostMortemFollowUpsRequest"
              },
              "example": {
                "post_mortem_id": "8104935102bf89dc01ac638a5261fe7e",
                "follow_ups": "- Add database saturation alert\n- Review cache TTL rollout"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/upsert": {
      "post": {
        "operationId": "postmortem-write-upsert-template",
        "summary": "Create or update post-mortem template",
        "description": "Create a custom post-mortem template or update an existing one.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-upsert-template",
          "metadata": {
            "sidebarTitle": "Create or update post-mortem template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemTemplate"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "template_id": "post_mortem_default_tmpl_en-us",
                    "name": "Default post-mortem report",
                    "description": "Default sections for post-mortem reports.",
                    "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                    "content_markdown": "## Summary\nDescribe what happened.",
                    "team_id": 2477033058131,
                    "created_at_seconds": 1773900000,
                    "updated_at_seconds": 1773903600
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertPostMortemTemplateRequest"
              },
              "example": {
                "team_id": 2477033058131,
                "name": "Production incident template",
                "description": "Template for production incident reviews.",
                "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                "content_markdown": "## Summary\nDescribe what happened."
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/delete": {
      "post": {
        "operationId": "postmortem-write-delete-template",
        "summary": "Delete post-mortem template",
        "description": "Delete a custom post-mortem template.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Every call is recorded in the account audit log. Don't put secrets in request fields.",
          "href": "/en/api-reference/on-call/incidents/postmortem-write-delete-template",
          "metadata": {
            "sidebarTitle": "Delete post-mortem template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletePostMortemTemplateRequest"
              },
              "example": {
                "template_id": "post_mortem_custom_tmpl_01"
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/list": {
      "post": {
        "operationId": "postmortem-read-list-templates",
        "summary": "List post-mortem templates",
        "description": "Return built-in and custom post-mortem templates for the account.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/postmortem-read-list-templates",
          "metadata": {
            "sidebarTitle": "List post-mortem templates"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ListPostMortemTemplatesResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 2,
                    "has_next_page": false,
                    "items": [
                      {
                        "account_id": 2451002751131,
                        "template_id": "post_mortem_default_tmpl_en-us",
                        "name": "Default post-mortem report",
                        "description": "Default sections for post-mortem reports.",
                        "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                        "content_markdown": "## Summary\nDescribe what happened.",
                        "team_id": 2477033058131,
                        "created_at_seconds": 1773900000,
                        "updated_at_seconds": 1773903600
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPostMortemTemplatesRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "order_by": "created_at_seconds",
                "asc": false
              }
            }
          }
        }
      }
    },
    "/incident/post-mortem/template/info": {
      "get": {
        "operationId": "postmortem-read-template-info",
        "summary": "Get post-mortem template detail",
        "description": "Return one post-mortem template by ID.",
        "tags": [
          "On-call/Incidents"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |",
          "href": "/en/api-reference/on-call/incidents/postmortem-read-template-info",
          "metadata": {
            "sidebarTitle": "Get post-mortem template detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PostMortemTemplate"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "account_id": 2451002751131,
                    "template_id": "post_mortem_default_tmpl_en-us",
                    "name": "Default post-mortem report",
                    "description": "Default sections for post-mortem reports.",
                    "content": "[{\"type\":\"heading\",\"content\":\"Summary\"}]",
                    "content_markdown": "## Summary\nDescribe what happened.",
                    "team_id": 2477033058131,
                    "created_at_seconds": 1773900000,
                    "updated_at_seconds": 1773903600
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "template_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template ID."
          }
        ]
      }
    },
    "/monit/preview/sync": {
      "post": {
        "operationId": "monit-preview-sync",
        "summary": "Preview datasource query",
        "description": "Execute a synchronous datasource query and return the raw result. Used to preview alert rule expressions before saving.",
        "tags": [
          "Monitors/Monitor utilities"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **60 requests/minute**; **10 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `ds_type` must match the datasource type (e.g. `prometheus`, `loki`).\n- `ds_name` is the display name of the datasource as configured in the account.\n- `delay_seconds` shifts the query window backward by the specified number of seconds, useful for accommodating data ingestion latency.\n- The response body is the raw JSON returned by the datasource — its schema varies by datasource type.",
          "href": "/en/api-reference/monitors/monitor-utilities/monit-preview-sync",
          "metadata": {
            "sidebarTitle": "Preview datasource query"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/PreviewSyncResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "status": "success",
                    "data": {
                      "resultType": "vector",
                      "result": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewSyncRequest"
              },
              "example": {
                "ds_type": "prometheus",
                "ds_name": "Prometheus Prod",
                "expr": "rate(http_requests_total[5m])",
                "delay_seconds": 0
              }
            }
          }
        }
      }
    },
    "/status-page/info": {
      "get": {
        "operationId": "statusPageInfo",
        "summary": "Get status page detail",
        "description": "Retrieve detailed configuration for a specific status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-info",
          "metadata": {
            "sidebarTitle": "Get status page detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "page_id": 5750613685214,
                    "name": "Flashduty Status Page",
                    "url_name": "flashduty-statuspage",
                    "type": "public",
                    "custom_domain": "status.example.com",
                    "logo": "https://cdn.example.com/logo.png",
                    "favicon": "https://cdn.example.com/favicon.png",
                    "page_header": "Welcome to our status page",
                    "page_footer": "2025 Example Corp",
                    "date_view": "list",
                    "display_uptime_mode": "chart_and_percentage",
                    "custom_links": [
                      {
                        "key": "Documentation",
                        "value": "https://docs.example.com"
                      }
                    ],
                    "contact_info": "mailto:support@example.com",
                    "components": [
                      {
                        "component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Web Console",
                        "available_since_seconds": 1765349358,
                        "order_id": 1
                      }
                    ],
                    "sections": [
                      {
                        "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                        "name": "Core Services",
                        "description": "Our core services",
                        "order_id": 1,
                        "hide_uptime": false,
                        "hide_all": false
                      }
                    ],
                    "subscription": {
                      "email": true,
                      "im": false
                    },
                    "template_preference": "message"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Status page ID"
          }
        ]
      }
    },
    "/status-page/create": {
      "post": {
        "operationId": "statusPageCreate",
        "summary": "Create status page",
        "description": "Create a new status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-create",
          "metadata": {
            "sidebarTitle": "Create status page"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/CreateStatusPageResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "page_id": 6294565612043,
                    "page_name": "My Status Page",
                    "page_url_name": "my-status-page"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStatusPageRequest"
              },
              "example": {
                "name": "My Status Page",
                "url_name": "my-status-page",
                "type": "public",
                "page_header": "Welcome to our status page",
                "contact_info": "mailto:support@example.com"
              }
            }
          }
        }
      }
    },
    "/status-page/update": {
      "post": {
        "operationId": "statusPageUpdate",
        "summary": "Update status page",
        "description": "Update an existing status page configuration.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-update",
          "metadata": {
            "sidebarTitle": "Update status page"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "name": "Flashduty Status Page (Updated)",
                "page_header": "Updated status page header",
                "contact_info": "mailto:support@example.com"
              }
            }
          }
        }
      }
    },
    "/status-page/delete": {
      "post": {
        "operationId": "statusPageDelete",
        "summary": "Delete status page",
        "description": "Delete a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-delete",
          "metadata": {
            "sidebarTitle": "Delete status page"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              },
              "example": {
                "page_id": 5750613685214
              }
            }
          }
        }
      }
    },
    "/status-page/component/upsert": {
      "post": {
        "operationId": "statusPageComponentUpsert",
        "summary": "Upsert status page component",
        "description": "Create or update a service component on a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-component-upsert",
          "metadata": {
            "sidebarTitle": "Upsert status page component"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageComponentResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "component_ids": [
                      "01KP032KMN9YFBMPWANJMFZFG1"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertStatusPageComponentRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "components": [
                  {
                    "name": "Web Console",
                    "description": "Main web interface",
                    "section_id": "01KC3FKKX5TSVG6Z3X1QNGF6V2",
                    "order_id": 1
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/component/delete": {
      "post": {
        "operationId": "statusPageComponentDelete",
        "summary": "Delete status page component",
        "description": "Delete a service component from a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-component-delete",
          "metadata": {
            "sidebarTitle": "Delete status page component"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteStatusPageComponentRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "component_ids": [
                  "01KP032KMN9YFBMPWANJMFZFG1"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/section/upsert": {
      "post": {
        "operationId": "statusPageSectionUpsert",
        "summary": "Upsert status page section",
        "description": "Create or update a section on a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-section-upsert",
          "metadata": {
            "sidebarTitle": "Upsert status page section"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageSectionResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "section_ids": [
                      "01KP032J1FV2H8DDGN0QSJ1CAR"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertStatusPageSectionRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "sections": [
                  {
                    "name": "Core Services",
                    "description": "Our core services",
                    "order_id": 1
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/section/delete": {
      "post": {
        "operationId": "statusPageSectionDelete",
        "summary": "Delete status page section",
        "description": "Delete a section from a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-section-delete",
          "metadata": {
            "sidebarTitle": "Delete status page section"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteStatusPageSectionRequest"
              },
              "example": {
                "page_id": 5750613685214,
                "section_ids": [
                  "01KP032J1FV2H8DDGN0QSJ1CAR"
                ]
              }
            }
          }
        }
      }
    },
    "/status-page/template/upsert": {
      "post": {
        "operationId": "statusPageTemplateUpsert",
        "summary": "Upsert status page template",
        "description": "Create or update an event template for a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-template-upsert",
          "metadata": {
            "sidebarTitle": "Upsert status page template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/UpsertStatusPageTemplateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "template_id": "01KP0339G5XDEPM4R86T2B23EP"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertStatusPageTemplateRequest"
              },
              "example": {
                "page_id": 5720156736380,
                "type": "pre_defined",
                "template": {
                  "title": "Service Disruption",
                  "event_type": "incident",
                  "status": "investigating",
                  "description": "We are investigating a service disruption affecting some users."
                }
              }
            }
          }
        }
      }
    },
    "/status-page/template/delete": {
      "post": {
        "operationId": "statusPageTemplateDelete",
        "summary": "Delete status page template",
        "description": "Delete an event template from a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Status Pages Manage** (`on-call`) |",
          "href": "/en/api-reference/on-call/status-pages/status-page-template-delete",
          "metadata": {
            "sidebarTitle": "Delete status page template"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteStatusPageTemplateRequest"
              },
              "example": {
                "page_id": 5720156736380,
                "type": "pre_defined",
                "template_id": "01KP0339G5XDEPM4R86T2B23EP"
              }
            }
          }
        }
      }
    },
    "/status-page/template/list": {
      "get": {
        "operationId": "statusPageTemplateList",
        "summary": "List status page templates",
        "description": "List all event templates for a status page.",
        "tags": [
          "On-call/Status pages"
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |",
          "href": "/en/api-reference/on-call/status-pages/status-page-template-list",
          "metadata": {
            "sidebarTitle": "List status page templates"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SuccessEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/EmptyResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "template_id": "01KC8KP6PHVPSCAB0BTKZBN2HR",
                        "title": "Service Disruption",
                        "type": "incident",
                        "status": "identified",
                        "description": "We have identified the root cause."
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "page_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Status page ID."
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pre_defined",
                "message"
              ]
            },
            "description": "Template category. `pre_defined` returns predefined event templates; `message` returns message notification templates."
          }
        ]
      }
    },
    "/safari/a2a-agent/create": {
      "post": {
        "operationId": "remote-agent-write-create",
        "summary": "Create A2A agent",
        "description": "Register a new A2A remote agent from its agent-card URL.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- `instructions` is required; a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.\n- `card_url` must be an absolute `http`/`https` URL with a non-empty host (reachability is enforced by the execution environment, not here); `auth_type` accepts only `none`, `api_key`, or `bearer`.\n- `environment_kind` accepts only empty (automatic) or `byoc`; `cloud` is rejected. `byoc` requires `environment_id`, and the runner must be visible to the caller.\n- Creating into a team (`team_id > 0`) requires the caller to actually belong to that team; only the account owner/admin may create at account scope (`team_id=0`).\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-create",
          "metadata": {
            "sidebarTitle": "Create A2A agent"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentCreateResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentCreateRequest"
              },
              "example": {
                "agent_name": "deploy-bot",
                "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                "card_url": "https://agents.example.com/deploy-bot/card",
                "auth_type": "bearer",
                "streaming": true,
                "team_id": 0,
                "environment_kind": "byoc",
                "environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/delete": {
      "post": {
        "operationId": "remote-agent-write-delete",
        "summary": "Delete A2A agent",
        "description": "Soft-delete an A2A agent by ID.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Delete is a soft delete; the agent stops appearing in list/get and can no longer be dispatched once removed.\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-delete",
          "metadata": {
            "sidebarTitle": "Delete A2A agent"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/disable": {
      "post": {
        "operationId": "remote-agent-write-disable",
        "summary": "Disable A2A agent",
        "description": "Disable an enabled A2A agent.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team.\n- Returns `InvalidParameter` if the agent is already disabled.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-disable",
          "metadata": {
            "sidebarTitle": "Disable A2A agent"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/enable": {
      "post": {
        "operationId": "remote-agent-write-enable",
        "summary": "Enable A2A agent",
        "description": "Enable a disabled A2A agent.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's team, not just visibility into it.\n- Returns `InvalidParameter` if the agent is already enabled.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-enable",
          "metadata": {
            "sidebarTitle": "Enable A2A agent"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/get": {
      "post": {
        "operationId": "remote-agent-read-get",
        "summary": "Get A2A agent detail",
        "description": "Get one A2A agent by ID.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-get",
          "metadata": {
            "sidebarTitle": "Get A2A agent detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "agent_name": "deploy-bot",
                    "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                    "card_url": "https://agents.example.com/deploy-bot/card",
                    "auth_type": "bearer",
                    "streaming": true,
                    "status": "enabled",
                    "agent_card_name": "Deploy Bot",
                    "agent_card_skills": [
                      "rollback",
                      "diff"
                    ],
                    "card_resolve_timeout": 0,
                    "task_timeout": 0,
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentIDRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/list": {
      "post": {
        "operationId": "remote-agent-read-list",
        "summary": "List A2A agents",
        "description": "List A2A agents visible to the caller across account and team scopes, with pagination.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `offset`/`limit` (not `p`/`limit`).\n- `scope=account` restricts to account-scoped agents; `scope=team` restricts to the caller's visible teams; the default `all` combines both, subject to `include_account`.\n- `query` performs a case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.\n- `card_resolve_timeout` and `task_timeout` are always `0` today — the API does not yet expose a way to set them.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-read-list",
          "metadata": {
            "sidebarTitle": "List A2A agents"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/A2AAgentListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "items": [
                      {
                        "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                        "account_id": 10023,
                        "team_id": 0,
                        "can_edit": true,
                        "environment_kind": "",
                        "environment_id": "",
                        "agent_name": "deploy-bot",
                        "instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
                        "card_url": "https://agents.example.com/deploy-bot/card",
                        "auth_type": "bearer",
                        "streaming": true,
                        "status": "enabled",
                        "agent_card_name": "Deploy Bot",
                        "agent_card_skills": [
                          "rollback",
                          "diff"
                        ],
                        "card_resolve_timeout": 0,
                        "task_timeout": 0,
                        "auth_mode": "shared",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000
                      }
                    ],
                    "total": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentListRequest"
              },
              "example": {
                "offset": 0,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/a2a-agent/update": {
      "post": {
        "operationId": "remote-agent-write-update",
        "summary": "Update A2A agent",
        "description": "Apply a partial update to an A2A agent. Omit a field to leave it unchanged.",
        "tags": [
          "en"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Agent Manage** (`ai-sre`) |\n\n## Usage\n\n- Requires edit permission (`access.CanEdit`) on the agent's *current* team before any field may change.\n- Reassigning `team_id` requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.\n- Changing `auth_mode` always rewrites `secret_schema` together with it; omitting `oauth_metadata` alongside a new `auth_mode` clears it to empty.\n- Sending back a masked or empty value for a sensitive `auth_config` key (`api_key`, `token`, `client_secret`) keeps the stored secret instead of overwriting it.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/a2a-agents/remote-agent-write-update",
          "metadata": {
            "sidebarTitle": "Update A2A agent"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2AAgentUpdateRequest"
              },
              "example": {
                "agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
                "instructions": "Inspect deployment pipelines and propose rollbacks."
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/create": {
      "post": {
        "operationId": "automation-rule-write-create",
        "summary": "Create Automation rule",
        "description": "Create an Automation rule with schedule, HTTP POST, and On-call incident triggers.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- A caller may create personal rules and rules for any team in the current account; `team_id` is immutable after creation.\n- `cron_expr` is evaluated in `timezone` if provided, else the caller's member timezone, else the account timezone, else UTC.\n- `http_post_trigger_enabled=true` creates and enables an HTTP POST trigger; the response's `http_post_token` is a one-time value returned only on creation — save it immediately.\n- `oncall_incident_trigger_enabled=true` requires at least one `oncall_incident_channel_ids` entry and one `oncall_incident_severities` value; matching incidents run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-write-create",
          "metadata": {
            "sidebarTitle": "Create Automation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleCreateRequest"
              },
              "example": {
                "name": "Weekly on-call review",
                "team_id": 123,
                "enabled": true,
                "cron_expr": "0 9 * * 1",
                "timezone": "Asia/Shanghai",
                "schedule_trigger_enabled": true,
                "prompt": "Summarize last week's alert noise and escalation load.",
                "http_post_trigger_enabled": true,
                "oncall_incident_trigger_enabled": true,
                "oncall_incident_channel_ids": [
                  456
                ],
                "oncall_incident_severities": [
                  "Critical",
                  "Warning"
                ]
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/delete": {
      "post": {
        "operationId": "automation-rule-write-delete",
        "summary": "Delete Automation rule",
        "description": "Delete an Automation rule.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Deleting a rule also removes its schedule, HTTP POST, and On-call incident triggers; a deleted HTTP POST trigger's token stops working immediately.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-write-delete",
          "metadata": {
            "sidebarTitle": "Delete Automation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/get": {
      "post": {
        "operationId": "automation-rule-read-get",
        "summary": "Get Automation rule",
        "description": "Get one Automation rule by ID.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Manage rights mean the personal rule owner; for team rules, an account admin or a member of the rule's team.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-read-get",
          "metadata": {
            "sidebarTitle": "Get Automation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/list": {
      "post": {
        "operationId": "automation-rule-read-list",
        "summary": "List Automation rules",
        "description": "List Automation rules visible to the caller.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n\n## Usage\n\n- `all` returns your personal rules plus team rules you can access.\n- Account admins see all team rules in list results, but not other users' personal rules.\n- `team_ids` narrows the visible set and never expands access.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-read-list",
          "metadata": {
            "sidebarTitle": "List Automation rules"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "rules": [
                      {
                        "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                        "account_id": 10023,
                        "team_id": 123,
                        "owner_id": 80011,
                        "name": "Weekly on-call review",
                        "enabled": true,
                        "run_scope": "team",
                        "cron_expr": "0 9 * * 1",
                        "timezone": "Asia/Shanghai",
                        "prompt": "Summarize last week's alert noise and escalation load.",
                        "environment_kind": "",
                        "environment_id": "",
                        "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                        "schedule_trigger_enabled": true,
                        "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                        "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                        "http_post_trigger_enabled": true,
                        "can_edit": true,
                        "created_at": 1780367971228,
                        "updated_at": 1780367971228,
                        "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                        "schedule_next_fire_at_ms": 1780630800000,
                        "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                        "oncall_incident_trigger_enabled": true,
                        "oncall_incident_channel_ids": [
                          456
                        ],
                        "oncall_incident_severities": [
                          "Critical",
                          "Warning"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleListRequest"
              },
              "example": {
                "scope": "all",
                "limit": 20
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/run": {
      "post": {
        "operationId": "automation-rule-write-run",
        "summary": "Run Automation rule",
        "description": "Manually run an Automation rule immediately, outside its schedule.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **100 requests/minute**; **5 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Rate-limited to at most once per minute per rule; a second call within that window returns `429` with `code: \"RequestTooFrequently\"`.\n- Only enabled rules can run manually; a disabled or misconfigured rule fails preflight with a `400` error before any run is created.\n- The call returns once the underlying agent session starts, not once the run finishes; the run continues asynchronously — use List Automation runs to check completion status.\n- `trigger_kind` is always `manual` for runs started this way, distinguishing them from `schedule`, `http_post`, and `oncall_incident` runs in run history.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-write-run",
          "metadata": {
            "sidebarTitle": "Run Automation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/ManualRunRuleResult"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "trigger_kind": "manual",
                    "preflight": {
                      "ok": true,
                      "checks": [
                        "rule_loaded",
                        "actor_authorized",
                        "app_allowed",
                        "runtime_scope_resolved",
                        "rule_config_valid"
                      ],
                      "scope": "team",
                      "owner_id": 80011,
                      "team_id": 123,
                      "app_name": "ai-sre"
                    },
                    "run": {
                      "run_id": "trun_5oDvqiG64uur6sBNsTc4u",
                      "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleIDRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b"
              }
            }
          }
        }
      }
    },
    "/safari/automation/rule/update": {
      "post": {
        "operationId": "automation-rule-write-update",
        "summary": "Update Automation rule",
        "description": "Update mutable Automation rule fields, including HTTP POST and On-call incident trigger settings.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | Valid `app_key`; management operations require the caller to manage the target rule |\n\n## Usage\n\n- Omitted or `null` fields are left unchanged; `team_id` cannot be changed from its current value.\n- `cron_expr` and `timezone` can be updated independently — sending only one keeps the other at its current stored value.\n- `rotate_http_post_trigger_token=true` issues a fresh webhook token, returned only in this response.\n- To trigger from On-call incidents, send `oncall_incident_trigger_enabled`, `oncall_incident_channel_ids`, and `oncall_incident_severities`; matching events run with `trigger_kind=oncall_incident`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-rule-write-update",
          "metadata": {
            "sidebarTitle": "Update Automation rule"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRuleItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                    "account_id": 10023,
                    "team_id": 123,
                    "owner_id": 80011,
                    "name": "Weekly on-call review",
                    "enabled": true,
                    "run_scope": "team",
                    "cron_expr": "0 9 * * 1",
                    "timezone": "Asia/Shanghai",
                    "prompt": "Summarize last week's alert noise and escalation load.",
                    "environment_kind": "",
                    "environment_id": "",
                    "schedule_trigger_id": "atrig_6aKp3wT9mQ2xVc8bR1nY7z",
                    "schedule_trigger_enabled": true,
                    "http_post_trigger_id": "atrig_2bLq4xT8mP1sWd9cN3rF6y",
                    "http_post_trigger_url": "/safari/automation/triggers/atrig_2bLq4xT8mP1sWd9cN3rF6y/fire",
                    "http_post_trigger_enabled": true,
                    "can_edit": true,
                    "created_at": 1780367971228,
                    "updated_at": 1780367971228,
                    "http_post_token": "sat_yQ9p8V7n6M5k4J3h2G1f0E9d8C7b6A5z4Y3x2W1v0U",
                    "schedule_next_fire_at_ms": 1780630800000,
                    "oncall_incident_trigger_id": "atrig_9cVb2mN7qKs4dEa8T1rY5p",
                    "oncall_incident_trigger_enabled": true,
                    "oncall_incident_channel_ids": [
                      456
                    ],
                    "oncall_incident_severities": [
                      "Critical",
                      "Warning"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRuleUpdateRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                "enabled": true,
                "cron_expr": "15 9 * * 1",
                "rotate_http_post_trigger_token": true,
                "oncall_incident_trigger_enabled": true,
                "oncall_incident_severities": [
                  "Critical",
                  "Warning"
                ],
                "oncall_incident_channel_ids": [
                  456
                ]
              }
            }
          }
        }
      }
    },
    "/safari/automation/run/list": {
      "post": {
        "operationId": "automation-run-read-list",
        "summary": "List Automation runs",
        "description": "List run history for a rule the caller can manage.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; caller must manage the target rule |\n\n## Usage\n\n- Run history is visible only when the caller can manage the rule: the personal rule owner; for team rules, an account admin or a member of the rule's team.\n",
          "href": "/en/api-reference/ai-sre/automations/automation-run-read-list",
          "metadata": {
            "sidebarTitle": "List Automation runs"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationRunListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "runs": [
                      {
                        "run_id": "trun_5oDvqiG64uur6sBNsTc4u",
                        "kind": "automation_rule",
                        "account_id": 10023,
                        "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                        "trigger_kind": "schedule",
                        "occurrence_key": "atrig_6aKp3wT9mQ2xVc8bR1nY7z:1780630800000",
                        "status": "succeeded",
                        "attempts": 1,
                        "started_at": 1780630800000,
                        "completed_at": 1780630923456,
                        "duration_ms": 123456,
                        "error_code": "",
                        "error_message": "",
                        "stats_json": {},
                        "result_json": {
                          "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
                        },
                        "created_at": 1780630800000,
                        "updated_at": 1780630923456
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationRunListRequest"
              },
              "example": {
                "rule_id": "arule_7NnLzY2Qp8xS4kUaV3mR6b",
                "limit": 20,
                "trigger_kind": "schedule"
              }
            }
          }
        }
      }
    },
    "/safari/automation/template/list": {
      "post": {
        "operationId": "automation-template-read-list",
        "summary": "List Automation templates",
        "description": "List preset Automation templates for the requested locale.",
        "tags": [
          "AI SRE/Automations"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | Valid `app_key`; results are filtered to the caller's visible scope |\n",
          "href": "/en/api-reference/ai-sre/automations/automation-template-read-list",
          "metadata": {
            "sidebarTitle": "List Automation templates"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/AutomationTemplateListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "templates": [
                      {
                        "name": "Weekly Insights",
                        "description": "Analyze incidents, alerts, response activity, notification load, and related changes from the past week.",
                        "icon": "chart-no-axes-combined",
                        "enabled": false,
                        "prompt": "Generate a weekly insights report. Analyze incidents, alerts, response activity, notification load, and related changes from the past week. Focus on what happened this week, which signals deserve attention, and which improvement actions are most valuable. Do not modify any Flashduty business state.\n"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationTemplateListRequest"
              },
              "example": {
                "locale": "en-US"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/create": {
      "post": {
        "operationId": "mcp-write-server-create",
        "summary": "Create MCP server",
        "description": "Register a new MCP server (connector) on the account.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- `command`/`args`/`env` apply to `stdio`; `url`/`headers` apply to `sse`/`streamable-http`.\n- Server name must start with a letter and contain only letters, digits, `-`, or `_`, and is unique within the account (case-insensitive); violations return InvalidParameter.\n- `environment_kind` accepts only `byoc` (with `environment_id`) or empty for automatic selection — `cloud` cannot be bound directly to an MCP server.\n- `per_user_secret` auth mode requires `secret_schema` to be valid JSON with a non-empty `header_name`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-create",
          "metadata": {
            "sidebarTitle": "Create MCP server"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics and alerts.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerCreateRequest"
              },
              "example": {
                "server_name": "prometheus",
                "description": "Query Prometheus metrics and alerts.",
                "transport": "streamable-http",
                "url": "https://mcp.example.com/prometheus",
                "status": "enabled"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/delete": {
      "post": {
        "operationId": "mcp-write-server-delete",
        "summary": "Delete MCP server",
        "description": "Delete an MCP server by ID.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-delete",
          "metadata": {
            "sidebarTitle": "Delete MCP server"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerDeleteRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/disable": {
      "post": {
        "operationId": "mcp-write-server-disable",
        "summary": "Disable MCP server",
        "description": "Disable an enabled MCP server.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Disabling an already-disabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-disable",
          "metadata": {
            "sidebarTitle": "Disable MCP server"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerStatusRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/enable": {
      "post": {
        "operationId": "mcp-write-server-enable",
        "summary": "Enable MCP server",
        "description": "Enable a disabled MCP server.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Enabling an already-enabled server returns InvalidParameter instead of a silent no-op.\n- Requires edit permission on the server's current team: account-scope servers are owner/admin only; team-scope servers require the caller to belong to that team (or be owner/admin).\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-enable",
          "metadata": {
            "sidebarTitle": "Enable MCP server"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerStatusRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/get": {
      "post": {
        "operationId": "mcp-read-server-get",
        "summary": "Get MCP server detail",
        "description": "Get one MCP server and run a live probe of its tool list.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The detail call live-probes tools; on failure `list_error` is set and the request still succeeds.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-get",
          "metadata": {
            "sidebarTitle": "Get MCP server detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics and alerts.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerGetRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1"
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/list": {
      "post": {
        "operationId": "mcp-read-server-list",
        "summary": "List MCP servers",
        "description": "List MCP servers visible to the caller across account and team scopes, with pagination.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The live tool list is not included; fetch a single server to probe its tools.\n- `query` performs a case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-read-server-list",
          "metadata": {
            "sidebarTitle": "List MCP servers"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "servers": [
                      {
                        "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                        "account_id": 10023,
                        "team_id": 0,
                        "can_edit": true,
                        "environment_kind": "",
                        "environment_id": "",
                        "server_name": "prometheus",
                        "description": "Query Prometheus metrics and alerts.",
                        "transport": "streamable-http",
                        "url": "https://mcp.example.com/prometheus",
                        "status": "enabled",
                        "connect_timeout": 10,
                        "call_timeout": 60,
                        "tool_count": 2,
                        "tools": [
                          {
                            "name": "query",
                            "description": "Run a PromQL instant query."
                          },
                          {
                            "name": "query_range",
                            "description": "Run a PromQL range query."
                          }
                        ],
                        "auth_mode": "shared",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/mcp/server/update": {
      "post": {
        "operationId": "mcp-write-server-update",
        "summary": "Update MCP server",
        "description": "Update an MCP server's configuration. Omit a field to leave it unchanged.",
        "tags": [
          "AI SRE/MCP servers"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **MCP Manage** (`ai-sre`) |\n\n## Usage\n\n- Masked secret values in `env`/`headers` are preserved — sending the masked value back does not overwrite the stored secret.\n- `environment_kind`/`environment_id` are independent partial-update fields: omit both to leave the runner binding unchanged; set either to change it, subject to the same `byoc`-or-empty constraint as create.\n- Changing `team_id` requires reassignment permission on the destination team; if the runner binding is left unchanged, it must still be selectable by the caller under the new team or the update is rejected.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/mcp-servers/mcp-write-server-update",
          "metadata": {
            "sidebarTitle": "Update MCP server"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/MCPServerItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                    "account_id": 10023,
                    "team_id": 0,
                    "can_edit": true,
                    "environment_kind": "",
                    "environment_id": "",
                    "server_name": "prometheus",
                    "description": "Query Prometheus metrics, alerts, and rules.",
                    "transport": "streamable-http",
                    "url": "https://mcp.example.com/prometheus",
                    "status": "enabled",
                    "connect_timeout": 10,
                    "call_timeout": 60,
                    "tool_count": 2,
                    "tools": [
                      {
                        "name": "query",
                        "description": "Run a PromQL instant query."
                      },
                      {
                        "name": "query_range",
                        "description": "Run a PromQL range query."
                      }
                    ],
                    "auth_mode": "shared",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerUpdateRequest"
              },
              "example": {
                "server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
                "description": "Query Prometheus metrics, alerts, and rules."
              }
            }
          }
        }
      }
    },
    "/safari/session/delete": {
      "post": {
        "operationId": "session-write-delete",
        "summary": "Delete session",
        "description": "Delete a session by ID.",
        "tags": [
          "AI SRE/Sessions"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions can be deleted only by their creator; team sessions can be deleted by the creator, an account admin, or a member of the owning team.\n- This is a soft delete: it also cascades to delete child subagent sessions and any presented files; the underlying S3/MinIO blobs are removed best-effort after the transaction commits, so an orphaned blob is possible on partial failure.\n",
          "href": "/en/api-reference/ai-sre/sessions/session-write-delete",
          "metadata": {
            "sidebarTitle": "Delete session"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionDeleteRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u"
              }
            }
          }
        }
      }
    },
    "/safari/session/export": {
      "post": {
        "operationId": "session-read-export",
        "summary": "Export session transcript",
        "description": "Stream a session's full event transcript as newline-delimited JSON.",
        "tags": [
          "AI SRE/Sessions"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **20 requests/minute**; **1 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are exportable only by their creator; team sessions can be exported by same-account callers with the `session_id`.\n- The response is `application/x-ndjson` — parse line-by-line and write to a file; do not buffer the whole body in memory.\n- The first line is always a `session_meta` envelope; `include_subagents=true` inlines each child session's stream after its dispatch line.\n- Requests are capped at a 60-second execution timeout; very large sessions may not finish exporting within that window.\n- If the stream fails partway through, the response ends with a JSON error line instead of a proper error envelope (headers are already sent) — check for this trailing line to detect truncation.\n",
          "href": "/en/api-reference/ai-sre/sessions/session-read-export",
          "metadata": {
            "sidebarTitle": "Export session transcript"
          }
        },
        "responses": {
          "200": {
            "description": "Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a `session_meta` envelope; subsequent lines are session events.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "description": "Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionExportRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                "include_subagents": false
              }
            }
          }
        }
      }
    },
    "/safari/session/get": {
      "post": {
        "operationId": "session-read-info",
        "summary": "Get session detail",
        "description": "Fetch one session plus a backward-paged window of its most recent events.",
        "tags": [
          "AI SRE/Sessions"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Personal sessions are readable only by their creator; team sessions can be read by same-account callers with the `session_id`.\n- Page older history with `search_after_ctx` from the previous response.\n- `limit` (or legacy `num_recent_events`) caps the event page; default 100, max 1000.\n- A malformed `search_after_ctx` returns 400 immediately, before any DB work.\n- `current_turn_*` fields are populated only while the session `is_running`; `suggest_init` is the same account-wide onboarding flag as `session/list`.\n",
          "href": "/en/api-reference/ai-sre/sessions/session-read-info",
          "metadata": {
            "sidebarTitle": "Get session detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionGetResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "session": {
                      "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                      "session_name": "Investigate cloud-assistant first heartbeat",
                      "app_name": "ai-sre",
                      "entry_kind": "web",
                      "person_id": "3790925372131",
                      "team_id": 0,
                      "is_mine": false,
                      "can_manage": true,
                      "status": "enabled",
                      "incognito": false,
                      "created_at": 1780367971228,
                      "updated_at": 1780367993457,
                      "token_usage": {
                        "input_tokens": 14948,
                        "cached_tokens": 11520,
                        "output_tokens": 888,
                        "reasoning_tokens": 351
                      },
                      "current_context_tokens": 14948,
                      "context_window": 0,
                      "archived_at": 0,
                      "pinned_at": 0,
                      "last_event_at": 1780367992649,
                      "is_running": false,
                      "has_unread": true,
                      "current_turn_started_at": 0,
                      "current_turn_active_ms": 0,
                      "current_turn_wait_ms": 0,
                      "current_turn_tokens": 0
                    },
                    "events": [
                      {
                        "event_id": "evt_3aZQ9p",
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "author": "user",
                        "partial": false,
                        "turn_complete": false,
                        "status": "normal",
                        "created_at": 1780367971241
                      },
                      {
                        "event_id": "evt_7bWk2r",
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "author": "ai-sre",
                        "content": {
                          "role": "model",
                          "parts": [
                            {
                              "text": "..."
                            }
                          ]
                        },
                        "partial": false,
                        "turn_complete": true,
                        "status": "normal",
                        "created_at": 1780367992649
                      }
                    ],
                    "has_more_older": false,
                    "suggest_init": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionGetRequest"
              },
              "example": {
                "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                "num_recent_events": 50
              }
            }
          }
        }
      }
    },
    "/safari/session/list": {
      "post": {
        "operationId": "session-read-list",
        "summary": "List sessions",
        "description": "List agent sessions visible to the caller, filtered by app, surface, archive status, and team.",
        "tags": [
          "AI SRE/Sessions"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Pagination uses `p`/`limit` (max 100); `scope` defaults to `all`.\n- `all` returns your personal sessions plus team sessions you can access; account admins see all team sessions, but not other users' personal sessions.\n- `team_ids` narrows the visible set and never expands access.\n- `is_running` reflects the live run-set; `has_unread` is computed per calling user; the `current_turn_*` fields are always zero here — only `session/get` computes them while a session is running.\n- `suggest_init` is an account-wide onboarding flag (true only when the account has zero knowledge packs anywhere) — it doesn't depend on the list filters.\n",
          "href": "/en/api-reference/ai-sre/sessions/session-read-list",
          "metadata": {
            "sidebarTitle": "List sessions"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SessionListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 988,
                    "sessions": [
                      {
                        "session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
                        "session_name": "Investigate cloud-assistant first heartbeat",
                        "app_name": "ai-sre",
                        "entry_kind": "web",
                        "person_id": "3790925372131",
                        "team_id": 0,
                        "is_mine": false,
                        "can_manage": true,
                        "status": "enabled",
                        "incognito": false,
                        "created_at": 1780367971228,
                        "updated_at": 1780367993457,
                        "token_usage": {
                          "input_tokens": 14948,
                          "cached_tokens": 11520,
                          "output_tokens": 888,
                          "reasoning_tokens": 351
                        },
                        "current_context_tokens": 14948,
                        "context_window": 0,
                        "archived_at": 0,
                        "pinned_at": 0,
                        "last_event_at": 1780367992649,
                        "is_running": false,
                        "has_unread": true,
                        "current_turn_started_at": 0,
                        "current_turn_active_ms": 0,
                        "current_turn_wait_ms": 0,
                        "current_turn_tokens": 0
                      }
                    ],
                    "suggest_init": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionListRequest"
              },
              "example": {
                "app_name": "ai-sre",
                "limit": 2,
                "orderby": "updated_at",
                "scope": "all"
              }
            }
          }
        }
      }
    },
    "/safari/skill/delete": {
      "post": {
        "operationId": "skill-write-delete",
        "summary": "Delete skill",
        "description": "Delete a skill by ID.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Soft delete only: sets `status` to `deleted` and renames the row to free its name for reuse; the skill's zip archive is not removed from object storage.\n- Deleting an already-deleted or nonexistent `skill_id` returns `ResourceNotFound`, since the lookup excludes deleted rows before the delete itself runs.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-write-delete",
          "metadata": {
            "sidebarTitle": "Delete skill"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillDeleteRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/disable": {
      "post": {
        "operationId": "skill-write-disable",
        "summary": "Disable skill",
        "description": "Disable an enabled skill so the agent stops loading it.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only an `enabled` skill can be disabled; an already-disabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-write-disable",
          "metadata": {
            "sidebarTitle": "Disable skill"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillStatusRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/enable": {
      "post": {
        "operationId": "skill-read-enable",
        "summary": "Enable skill",
        "description": "Enable a disabled skill so the agent can load it.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only a `disabled` skill can be enabled; an already-enabled skill returns `InvalidParameter`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-read-enable",
          "metadata": {
            "sidebarTitle": "Enable skill"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "null",
                          "description": "Always null on success."
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillStatusRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/get": {
      "post": {
        "operationId": "skill-read-get",
        "summary": "Get skill detail",
        "description": "Get one skill including its full SKILL.md content.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- Returns `ResourceNotFound` if the skill does not exist or has already been deleted.\n- `can_edit` reflects team membership, but read access itself is open to any caller regardless of team.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-read-get",
          "metadata": {
            "sidebarTitle": "Get skill detail"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false,
                    "description_en": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "content": "---\nname: k8s-triage\ndescription: ...\n---\n# Triage steps"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillGetRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m"
              }
            }
          }
        }
      }
    },
    "/safari/skill/list": {
      "post": {
        "operationId": "skill-read-list",
        "summary": "List skills",
        "description": "List AI SRE skills visible to the caller across account and team scopes, with pagination.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | None — any valid `app_key` can call this operation |\n\n## Usage\n\n- The `content` field is omitted in list rows; fetch a single skill to read its body.\n- `scope` selects `all` (default), `account`-only, or `team`-only, overriding `include_account`; non-admins requesting specific `team_ids` are silently filtered down to the teams they belong to.\n- `update_available` compares against the marketplace catalog once per call; if the catalog fails to load, the badge is simply suppressed rather than the request failing.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-read-list",
          "metadata": {
            "sidebarTitle": "List skills"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillListResponse"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "total": 1,
                    "skills": [
                      {
                        "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                        "account_id": 10023,
                        "team_id": 0,
                        "skill_name": "k8s-triage",
                        "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                        "version": "1.2.0",
                        "tags": [
                          "kubernetes",
                          "triage"
                        ],
                        "author": "sre-team",
                        "tools": [
                          "bash",
                          "mcp:prometheus/query"
                        ],
                        "status": "enabled",
                        "created_by": 80011,
                        "created_at": 1716960000000,
                        "updated_at": 1717046400000,
                        "can_edit": true,
                        "update_available": false,
                        "is_modified": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillListRequest"
              },
              "example": {
                "p": 1,
                "limit": 20,
                "include_account": true
              }
            }
          }
        }
      }
    },
    "/safari/skill/update": {
      "post": {
        "operationId": "skill-write-update",
        "summary": "Update skill",
        "description": "Update a skill's descriptions or reassign its team scope.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **300 requests/minute**; **20 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Only `description`, `description_en`, and `team_id` are editable; the skill body is changed by re-uploading.\n- `description` only updates when non-empty — there is no way to clear it via this field; `description_en` is nilable, so send an empty string to explicitly clear it.\n- Reassigning `team_id` to a different team runs a second authorization check beyond edit access, verifying the caller may target the destination team.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-write-update",
          "metadata": {
            "sidebarTitle": "Update skill"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Updated triage runbook.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillUpdateRequest"
              },
              "example": {
                "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                "description": "Updated triage runbook."
              }
            }
          }
        }
      }
    },
    "/safari/skill/upload": {
      "post": {
        "operationId": "skill-write-upload",
        "summary": "Upload skill",
        "description": "Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill.",
        "tags": [
          "AI SRE/Skills"
        ],
        "security": [
          {
            "AppKeyAuth": []
          }
        ],
        "x-mint": {
          "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **30 requests/minute**; **3 requests/second** per account |\n| Permissions | **Skill Manage** (`ai-sre`) |\n\n## Usage\n\n- Send as `multipart/form-data` with a `file` part; accepted archive types are `.skill`, `.zip`, `.tar.gz`, `.tgz`, capped at 100MB (oversized files are rejected before the body is read).\n- `skill_id` + `replace=true` targets and overwrites that specific skill, skipping the team-authorship check since the caller already owns the row.\n- `replace=true` without `skill_id` upserts by matching skill name; omitting `replace` always creates a new skill — both paths require the caller to be allowed to author into the target `team_id`.\n- The response always stamps `can_edit: true`.\n- Every call is recorded in the account audit log.\n",
          "href": "/en/api-reference/ai-sre/skills/skill-write-upload",
          "metadata": {
            "sidebarTitle": "Upload skill"
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/SkillItem"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "data": {
                    "skill_id": "skill_8s7Hn2kLpQ3xYbVc4Wd2m",
                    "account_id": 10023,
                    "team_id": 0,
                    "skill_name": "k8s-triage",
                    "description": "Diagnose unhealthy Kubernetes workloads from cluster events and pod logs.",
                    "version": "1.2.0",
                    "tags": [
                      "kubernetes",
                      "triage"
                    ],
                    "author": "sre-team",
                    "tools": [
                      "bash",
                      "mcp:prometheus/query"
                    ],
                    "status": "enabled",
                    "created_by": 80011,
                    "created_at": 1716960000000,
                    "updated_at": 1717046400000,
                    "can_edit": true,
                    "update_available": false,
                    "is_modified": false,
                    "created": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SkillUploadRequest"
              },
              "example": {
                "team_id": 0,
                "replace": false
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "app_key",
        "description": "App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account."
      },
      "AutomationTriggerBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token generated for one Automation HTTP POST trigger. This is not an app_key."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request — usually a missing or malformed parameter.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missingParameter": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "InvalidParameter",
                    "message": "The specified parameter is not valid."
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid app_key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missingAppKey": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "Unauthorized",
                    "message": "You are unauthorized."
                  }
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "The app_key is valid but lacks permission for this operation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "noEditPermission": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "AccessDenied",
                    "message": "Access Denied."
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "The referenced resource does not exist or has been deleted. Note: Flashduty historically returns HTTP 400 with code `ResourceNotFound` for missing domain entities; a true 404 is reserved for unknown routes.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "resourceMissing": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "ResourceNotFound",
                    "message": "The resource you request is not found"
                  }
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit hit. Either the global API limit, a per-account limit, or a per-integration limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "rateLimited": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "RequestTooFrequently",
                    "message": "Request too frequently."
                  }
                }
              }
            }
          }
        }
      },
      "ServerError": {
        "description": "Unexpected server-side error. Include the request_id when reporting.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "internal": {
                "value": {
                  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
                  "error": {
                    "code": "InternalError",
                    "message": "We encountered an internal error, and it has been reported. Please try again later."
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorCode": {
        "type": "string",
        "description": "Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.",
        "enum": [
          "OK",
          "InvalidParameter",
          "BadRequest",
          "InvalidContentType",
          "ResourceNotFound",
          "NoLicense",
          "ReferenceExist",
          "Unauthorized",
          "BalanceNotEnough",
          "AccessDenied",
          "RouteNotFound",
          "MethodNotAllowed",
          "UndonedOrderExist",
          "RequestLocked",
          "EntityTooLarge",
          "RequestTooFrequently",
          "RequestVerifyRequired",
          "DangerousOperation",
          "InternalError",
          "ServiceUnavailable"
        ]
      },
      "DutyError": {
        "type": "object",
        "description": "Error payload inside the response envelope. Present only on non-2xx responses.",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message, localized by the caller's Accept-Language. May contain field names, IDs, or other context from the failing request."
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "SuccessEnvelope": {
        "type": "object",
        "description": "Success response envelope. On every 2xx response, `request_id` identifies the call (also mirrored in the `Flashcat-Request-Id` header) and `data` holds the endpoint-specific payload. Failure responses use a different shape — see `ErrorResponse`.",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "data": {
            "description": "Endpoint-specific payload. See each operation's 200 response schema."
          }
        },
        "required": [
          "request_id",
          "data"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Response envelope for errors. `error` is required; `data` is absent.",
        "properties": {
          "request_id": {
            "type": "string",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "error": {
            "$ref": "#/components/schemas/DutyError"
          }
        },
        "required": [
          "request_id",
          "error"
        ]
      },
      "EmptyObject": {
        "type": "object",
        "description": "An empty object. Returned as the `data` payload by operations whose success signal is simply the absence of an error.",
        "additionalProperties": false
      },
      "EmptyResponse": {
        "type": "object",
        "description": "Empty response body. The server returns `data: null` on success.",
        "properties": {}
      },
      "EmptyRequest": {
        "type": "object",
        "description": "No parameters required.",
        "additionalProperties": false
      },
      "CreateIncidentRequest": {
        "type": "object",
        "description": "Parameters for manually creating an incident.",
        "required": [
          "incident_severity"
        ],
        "properties": {
          "incident_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "Incident severity."
          },
          "title": {
            "type": "string",
            "maxLength": 512,
            "description": "Incident title, up to 512 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Incident description, up to 1024 characters."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel to file the incident into. Optional; leave unset for a standalone incident."
          },
          "assigned_to": {
            "type": "object",
            "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.",
            "properties": {
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "minItems": 1,
                "maxItems": 100,
                "description": "Member IDs to assign directly."
              },
              "escalate_rule_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment."
              },
              "layer_idx": {
                "type": "integer",
                "description": "Starting layer index when using an escalation rule."
              },
              "type": {
                "type": "string",
                "description": "Assignment type."
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "minItems": 1,
                "maxItems": 100,
                "description": "Email recipients, used for ServiceNow-style integrations."
              },
              "notify": {
                "type": "object",
                "description": "Override the notification channels used for this assignment.",
                "properties": {
                  "follow_preference": {
                    "type": "boolean",
                    "description": "When true, fall back to each responder's personal preference."
                  },
                  "personal_channels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Channels to use (e.g. `voice`, `sms`, `email`)."
                  },
                  "template_id": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{24}$",
                    "description": "Notification template ID (MongoDB ObjectID)."
                  }
                }
              }
            }
          }
        }
      },
      "CreateWarRoomRequest": {
        "type": "object",
        "description": "Parameters for opening an incident war room in an IM integration.",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM integration ID. Must have war room enabled; Feishu, DingTalk, WeCom (self-built), Slack and Teams are supported."
          },
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Additional member IDs to add to the war room."
          },
          "add_observers": {
            "type": "boolean",
            "description": "When true, also add historical responders of the incident as observers."
          }
        }
      },
      "AssignedTo": {
        "type": "object",
        "description": "Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.",
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Member IDs to assign directly."
          },
          "escalate_rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Escalation rule ID (MongoDB ObjectID) to drive assignment."
          },
          "layer_idx": {
            "type": "integer",
            "description": "Current level index within the escalation rule."
          },
          "type": {
            "type": "string",
            "description": "Assignment type: `assign` direct assignment, `reassign` reassignment, `escalate` escalation-rule driven, `reopen` automatic reassignment on reopen.",
            "enum": [
              "assign",
              "reassign",
              "escalate",
              "reopen"
            ]
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Email recipients, used by integrations such as ServiceNow."
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "Escalation rule display name, filled by the server."
          },
          "assigned_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the assignment was made."
          },
          "id": {
            "type": "string",
            "description": "Opaque assignment ID generated by the server."
          }
        }
      },
      "PersonShort": {
        "type": "object",
        "description": "A Flashduty member reference.",
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID."
          },
          "person_name": {
            "type": "string",
            "description": "Member display name."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Member email address."
          },
          "as": {
            "type": "string",
            "description": "Role label for this member in the context of the current object."
          }
        }
      },
      "Responder": {
        "type": "object",
        "description": "Incident responder with assignment/acknowledgement timestamps.",
        "required": [
          "person_id",
          "assigned_at",
          "acknowledged_at"
        ],
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "Responder member ID."
          },
          "assigned_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the member was assigned."
          },
          "acknowledged_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged."
          },
          "person_name": {
            "type": "string",
            "description": "Member display name, filled by the server."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Member email, filled by the server."
          },
          "as": {
            "type": "string",
            "description": "Role label of this responder."
          }
        }
      },
      "LinkItem": {
        "type": "object",
        "description": "Channel-level link integration reference rendered from a template.",
        "required": [
          "name",
          "endpoint",
          "open_type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name of the link."
          },
          "endpoint": {
            "type": "string",
            "description": "Rendered URL for the link."
          },
          "open_type": {
            "type": "string",
            "enum": [
              "popup",
              "tab"
            ],
            "description": "How the link should be opened."
          }
        }
      },
      "Image": {
        "type": "object",
        "description": "Image or attachment reference.",
        "required": [
          "src"
        ],
        "properties": {
          "src": {
            "type": "string",
            "description": "Image source. Either an `img_` upload token or an `http(s)` URL."
          },
          "href": {
            "type": "string",
            "description": "Optional link the image points to."
          },
          "alt": {
            "type": "string",
            "description": "Alt text."
          }
        }
      },
      "IncidentShort": {
        "type": "object",
        "description": "Brief incident reference embedded in an alert.",
        "properties": {
          "incident_id": {
            "type": "string",
            "description": "Incident ID (ObjectID hex string)."
          },
          "title": {
            "type": "string",
            "description": "Incident title."
          },
          "progress": {
            "type": "string",
            "description": "Incident progress — one of `Triggered`, `Processing`, `Closed`."
          }
        }
      },
      "AlertEventItem": {
        "type": "object",
        "description": "A raw alert event.",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Event ID (MongoDB ObjectID)."
          },
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Parent alert ID (MongoDB ObjectID)."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID the event is routed to."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration that produced this event."
          },
          "integration_type": {
            "type": "string",
            "description": "Type/plugin key of the integration that produced this event."
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Deprecated. Use `integration_id` instead."
          },
          "title": {
            "type": "string",
            "description": "Event title."
          },
          "title_rule": {
            "type": "string",
            "description": "Title template used to derive `title` from labels."
          },
          "description": {
            "type": "string",
            "description": "Event description."
          },
          "alert_key": {
            "type": "string",
            "description": "Deduplication key used to merge events into an alert."
          },
          "event_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Severity of this event."
          },
          "event_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Status of this event."
          },
          "event_time": {
            "type": "integer",
            "format": "int64",
            "description": "Event timestamp, Unix epoch seconds."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Label key-value pairs."
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertImage"
            },
            "description": "Images attached to the event."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Record creation time, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Record update time, Unix epoch seconds."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Soft-delete timestamp (seconds). Zero if not deleted."
          }
        }
      },
      "AlertInfo": {
        "type": "object",
        "description": "Detailed alert item.",
        "required": [
          "alert_id",
          "integration_id",
          "data_source_id",
          "channel_id",
          "account_id",
          "description",
          "title",
          "title_rule",
          "alert_key",
          "alert_severity",
          "alert_status",
          "start_time",
          "last_time",
          "end_time",
          "labels",
          "ever_muted",
          "created_at",
          "updated_at",
          "integration_name",
          "integration_type",
          "integration_ref_id",
          "channel_name",
          "channel_status",
          "responder_name",
          "responder_email",
          "event_cnt",
          "images",
          "data_source_name",
          "data_source_ref_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Alert ID (MongoDB ObjectID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID that produced the alert."
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Deprecated. Use `integration_id` instead."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "description": {
            "type": "string",
            "description": "Alert description."
          },
          "title": {
            "type": "string",
            "description": "Alert title."
          },
          "title_rule": {
            "type": "string",
            "description": "Title rendering rule."
          },
          "alert_key": {
            "type": "string",
            "description": "Deduplication key used to merge events into the alert."
          },
          "alert_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Current severity."
          },
          "alert_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Current status."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the alert first fired."
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) of the most recent event."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the alert recovered. 0 if still active."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Alert labels."
          },
          "ever_muted": {
            "type": "boolean",
            "description": "Whether this alert has ever been silenced."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Soft-delete timestamp (seconds). Zero if not deleted."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (seconds)."
          },
          "integration_name": {
            "type": "string",
            "description": "Integration display name."
          },
          "integration_type": {
            "type": "string",
            "description": "Integration type string."
          },
          "integration_ref_id": {
            "type": "string",
            "description": "Integration reference ID."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel display name."
          },
          "channel_status": {
            "type": "string",
            "description": "Channel status."
          },
          "responder_name": {
            "type": "string",
            "description": "Primary responder name, if any."
          },
          "responder_email": {
            "type": "string",
            "description": "Primary responder email, if any."
          },
          "incident": {
            "$ref": "#/components/schemas/IncidentShort",
            "description": "Parent incident reference, if the alert has been merged into one."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "Raw alert event preview, populated only when requested. Capped at the 20 newest events per alert."
          },
          "event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of raw events merged into this alert."
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "description": "Attached images."
          },
          "data_source_name": {
            "type": "string",
            "description": "Deprecated. Use `integration_name`."
          },
          "data_source_type": {
            "type": "string",
            "description": "Deprecated. Use `integration_type`."
          },
          "data_source_ref_id": {
            "type": "string",
            "description": "Deprecated. Use `integration_ref_id`."
          }
        }
      },
      "IncidentInfo": {
        "type": "object",
        "description": "Detailed incident record.",
        "required": [
          "incident_id",
          "account_id",
          "channel_id",
          "integration_id",
          "integration_ids",
          "integration_types",
          "dedup_key",
          "equals_md5",
          "start_time",
          "end_time",
          "last_time",
          "ack_time",
          "close_time",
          "creator_id",
          "closer_id",
          "owner_id",
          "incident_status",
          "incident_severity",
          "progress",
          "title",
          "description",
          "ai_summary",
          "impact",
          "root_cause",
          "resolution",
          "num",
          "created_at",
          "updated_at",
          "snoozed_before",
          "group_method",
          "ever_muted",
          "labels",
          "fields",
          "assigned_to",
          "alert_cnt",
          "active_alert_cnt",
          "alert_event_cnt",
          "responders",
          "account_name",
          "account_locale",
          "account_time_zone",
          "channel_name",
          "channel_status",
          "detail_url",
          "silence_url",
          "post_mortem_id",
          "images",
          "manual_overrides"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID that owns the incident."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID. 0 for standalone incidents."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "First integration associated with the incident."
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "All integration IDs contributing alerts to this incident."
          },
          "integration_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Integration type strings for all contributing integrations."
          },
          "dedup_key": {
            "type": "string",
            "description": "Deduplication key used to coalesce alerts."
          },
          "equals_md5": {
            "type": "string",
            "description": "MD5 hash used for content-equality checks."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the incident started."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the incident ended. 0 if still active."
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) of the most recent update."
          },
          "ack_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the incident was first acknowledged. 0 if unacknowledged."
          },
          "close_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) when the incident was closed. 0 if still open."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID that created the incident. 0 if auto-created by the system."
          },
          "closer_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID that closed the incident. 0 if auto-closed."
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Primary owner member ID. 0 if none."
          },
          "incident_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Current incident status, derived from alert statuses."
          },
          "incident_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Configured incident severity."
          },
          "progress": {
            "type": "string",
            "enum": [
              "Triggered",
              "Processing",
              "Closed"
            ],
            "description": "Incident progress state."
          },
          "title": {
            "type": "string",
            "description": "Incident title."
          },
          "description": {
            "type": "string",
            "description": "Incident description."
          },
          "ai_summary": {
            "type": "string",
            "description": "AI-generated summary of the incident."
          },
          "impact": {
            "type": "string",
            "description": "Impact description."
          },
          "root_cause": {
            "type": "string",
            "description": "Root cause analysis."
          },
          "resolution": {
            "type": "string",
            "description": "Resolution notes."
          },
          "num": {
            "type": "string",
            "description": "Short display identifier; not guaranteed unique."
          },
          "frequency": {
            "type": "string",
            "description": "Frequency bucket for recurrence analysis: `frequent` or `rare`.",
            "enum": [
              "frequent",
              "rare"
            ]
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Soft-delete timestamp (seconds). Zero if not deleted."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (seconds)."
          },
          "snoozed_before": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp (seconds) until which notifications are snoozed. 0 if not snoozed."
          },
          "group_method": {
            "type": "string",
            "description": "Alert grouping method: `i` intelligent, `p` pattern, `n` none.",
            "enum": [
              "i",
              "p",
              "n"
            ]
          },
          "ever_muted": {
            "type": "boolean",
            "description": "Whether the incident has ever been silenced."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Labels propagated from alerts."
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "Custom field values keyed by field name."
          },
          "assigned_to": {
            "$ref": "#/components/schemas/AssignedTo",
            "description": "Current assignment target for the incident."
          },
          "reporter_email": {
            "type": "string",
            "description": "Reporter email for manually created incidents."
          },
          "alert_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "Total count of alerts merged into this incident."
          },
          "active_alert_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "Count of alerts currently in Critical/Warning/Info state."
          },
          "alert_event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "Total raw alert event count across all merged alerts."
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertInfo"
            },
            "description": "Embedded alerts, only populated for notification templates and custom actions."
          },
          "closer": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "Closer member info."
          },
          "creator": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "Creator member info."
          },
          "owner": {
            "$ref": "#/components/schemas/PersonShort",
            "description": "Owner member info. May be deprecated.",
            "deprecated": true
          },
          "responders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Responder"
            },
            "description": "Current responders with assignment/acknowledgement state."
          },
          "account_name": {
            "type": "string",
            "description": "Account name."
          },
          "account_locale": {
            "type": "string",
            "description": "Account locale."
          },
          "account_time_zone": {
            "type": "string",
            "description": "Account time zone."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel display name."
          },
          "channel_status": {
            "type": "string",
            "description": "Channel status."
          },
          "detail_url": {
            "type": "string",
            "description": "Web console URL for the incident."
          },
          "silence_url": {
            "type": "string",
            "description": "Quick-silence URL for this incident."
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkItem"
            },
            "description": "Channel-level link integrations rendered for this incident."
          },
          "integration_type": {
            "type": "string",
            "description": "First alert's integration type string, used by the detail page for label mappings."
          },
          "post_mortem_id": {
            "type": "string",
            "description": "Associated post-mortem ID, if any. One incident can only link to a single post-mortem."
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "description": "Attached images."
          },
          "manual_overrides": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Fields that were manually overridden after auto-population."
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Deprecated. Use `integration_id` instead.",
            "deprecated": true
          },
          "data_source_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Deprecated. Use `integration_ids` instead.",
            "deprecated": true
          },
          "data_source_type": {
            "type": "string",
            "description": "Deprecated. Use `integration_type` instead.",
            "deprecated": true
          },
          "data_source_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Deprecated. Use `integration_types` instead.",
            "deprecated": true
          }
        }
      },
      "IncidentListResponse": {
        "type": "object",
        "description": "Paginated list of incidents.",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentInfo"
            },
            "description": "Incident list for the current page."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of matching incidents."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "True when more results are available beyond this page."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor to pass as `search_after_ctx` on the next request."
          }
        }
      },
      "ListIncidentsRequest": {
        "type": "object",
        "description": "Filters for the incident list query. `start_time` and `end_time` are required; the window must not exceed 31 days.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Window start, Unix seconds."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Window end, Unix seconds. Must be greater than `start_time` and within 31 days."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order when true."
          },
          "is_snoozed": {
            "type": "boolean",
            "description": "When true, include only snoozed incidents."
          },
          "is_my_team": {
            "type": "boolean",
            "description": "When true, restrict to incidents in channels owned by the user's teams."
          },
          "is_my_channel": {
            "type": "boolean",
            "description": "When true, restrict to incidents in channels the user personally owns."
          },
          "ever_muted": {
            "type": "boolean",
            "description": "When true, include only incidents that were ever silenced."
          },
          "is_rare": {
            "type": "boolean",
            "description": "When true, include only outlier (rare) incidents."
          },
          "progress": {
            "type": "string",
            "description": "Comma-separated list of progress states to match (e.g. `Triggered,Processing`)."
          },
          "query": {
            "type": "string",
            "description": "Full-text search query."
          },
          "incident_severity": {
            "type": "string",
            "description": "Comma-separated list of severities (`Critical,Warning,Info`)."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Channel IDs to filter by. Use 0 for standalone (global) incidents."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Team IDs; resolved to channels via channel ownership."
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Responder member IDs."
          },
          "acker_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Acknowledger member IDs."
          },
          "creator_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Creator member IDs. Use 0 for automatically created incidents."
          },
          "closer_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Closer member IDs. Use 0 for automatically closed incidents."
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Restrict to the given incident IDs."
          },
          "nums": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Restrict to the given short display identifiers."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Page number starting at 1."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "Page size, at most 100."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor from a previous response for forward pagination."
          }
        }
      },
      "IncidentInfoRequest": {
        "type": "object",
        "description": "Lookup parameters for a single incident. Supply either incident_id or num.",
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "num": {
            "type": "string",
            "description": "Short incident ID (the 6-character uppercased id shown in the UI). Not unique — resolves to the most recent match. Supply either incident_id or num."
          }
        }
      },
      "ListIncidentsByIdsRequest": {
        "type": "object",
        "description": "Batch lookup parameters for incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "Incident IDs to fetch."
          }
        }
      },
      "ListIncidentAlertsRequest": {
        "type": "object",
        "description": "Filters for alerts belonging to an incident.",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "include_events": {
            "type": "boolean",
            "description": "When true, include at most the 20 newest raw events in each alert item as a preview."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When true return only active alerts (Critical/Warning/Info); when false return only recovered alerts (Ok). Omit to include all."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 1000,
            "default": 1000,
            "description": "Page size, at most 1000."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "default": 1,
            "description": "Page number starting at 1."
          }
        }
      },
      "ListIncidentAlertsResponse": {
        "type": "object",
        "description": "Paginated list of alerts merged into an incident.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertInfo"
            },
            "description": "Alert list."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching alerts."
          }
        }
      },
      "IncidentFeedType": {
        "type": "string",
        "description": "Incident timeline entry type. Each value identifies one lifecycle event; the matching `detail` payload shape is determined by this field. Incident types are prefixed with `i_`.\n\n| Type | Meaning |\n|---|---|\n| `i_new` | Incident Created: A new incident was created automatically or manually. |\n| `i_assign` | Assigned: Incident was assigned to responders. |\n| `i_a_rspd` | Responder Added: Additional responders joined the incident. |\n| `i_notify` | Notification dispatched through a channel at a specific escalation level. |\n| `i_storm` | Alert storm threshold reached on the incident. |\n| `i_snooze` | Notifications snoozed for a given duration. |\n| `i_wake` | Snooze cancelled and notifications resumed. |\n| `i_ack` | Acknowledged: Responder confirmed they are working on the incident. |\n| `i_unack` | Acknowledgement removed. |\n| `i_comm` | Comment: Responder logged progress or key information. |\n| `i_rslv` | Resolved: Incident was marked as resolved. |\n| `i_reopen` | Reopened: Resolved incident was reopened, possibly due to recurrence. |\n| `i_merge` | Merged: Multiple related incidents were merged into one. |\n| `i_r_title` | Title updated. |\n| `i_r_desc` | Description updated. |\n| `i_r_impact` | Impact updated. |\n| `i_r_rc` | Root cause updated. |\n| `i_r_rsltn` | Resolution updated. |\n| `i_r_severity` | Severity Changed: Incident severity level was adjusted. |\n| `i_r_field` | Custom field value updated. |\n| `i_m_flapping` | Incident muted by flapping detection. |\n| `i_m_reply` | Mute reply marker on a comment. |\n| `i_custom` | Action: Automated action or script was triggered. |\n| `i_wr_create` | War Room Created: Chat group was created for collaborative response. |\n| `i_wr_delete` | War room chat group deleted. |\n| `i_auto_refresh` | Card auto-refresh event posted back to the timeline. |\n| `a_merge` | Alert Merged: An alert was merged into an existing incident. |",
        "enum": [
          "i_new",
          "i_assign",
          "i_a_rspd",
          "i_notify",
          "i_storm",
          "i_snooze",
          "i_wake",
          "i_ack",
          "i_unack",
          "i_comm",
          "i_rslv",
          "i_reopen",
          "i_merge",
          "i_r_title",
          "i_r_desc",
          "i_r_impact",
          "i_r_rc",
          "i_r_rsltn",
          "i_r_severity",
          "i_r_field",
          "i_m_flapping",
          "i_m_reply",
          "i_custom",
          "i_wr_create",
          "i_wr_delete",
          "i_auto_refresh",
          "a_merge"
        ]
      },
      "FeedSeverity": {
        "type": "string",
        "enum": [
          "Ok",
          "Critical",
          "Warning",
          "Info"
        ],
        "description": "Severity level."
      },
      "NotifyPerson": {
        "type": "object",
        "description": "Notification delivery record for a single person recipient.",
        "properties": {
          "person_id": {
            "type": "integer",
            "format": "int64",
            "description": "Recipient member ID."
          },
          "failed_reason": {
            "type": "string",
            "description": "Failure reason if delivery did not succeed."
          }
        }
      },
      "NotifyChat": {
        "type": "object",
        "description": "Notification delivery record for a chat group recipient.",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration data source ID used to send the notification."
          },
          "chat_id": {
            "type": "string",
            "description": "Chat group identifier."
          },
          "chat_name": {
            "type": "string",
            "description": "Chat group display name."
          },
          "failed_reason": {
            "type": "string",
            "description": "Failure reason if delivery did not succeed."
          }
        }
      },
      "NotifyRobot": {
        "type": "object",
        "description": "Notification delivery record for a robot webhook recipient.",
        "properties": {
          "token": {
            "type": "string",
            "description": "Robot token or identifier."
          },
          "alias": {
            "type": "string",
            "description": "Robot alias."
          },
          "failed_reason": {
            "type": "string",
            "description": "Failure reason if delivery did not succeed."
          }
        }
      },
      "FeedDetailIncidentNew": {
        "type": "object",
        "description": "Detail payload for `i_new`.",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "title": {
            "type": "string",
            "description": "Initial incident title."
          },
          "reporter_email": {
            "type": "string",
            "description": "Email of the reporter when the incident was created externally."
          }
        },
        "title": "i_new"
      },
      "FeedDetailIncidentComment": {
        "type": "object",
        "description": "Detail payload for `i_comm`.",
        "properties": {
          "comment": {
            "type": "string",
            "description": "Comment body."
          },
          "mute_reply": {
            "type": "boolean",
            "description": "Whether replies to this comment are muted."
          }
        },
        "title": "i_comm"
      },
      "FeedDetailIncidentAck": {
        "type": "object",
        "description": "Detail payload for `i_ack`.",
        "properties": {
          "progress": {
            "type": "string",
            "description": "Progress note entered at acknowledgement."
          }
        },
        "title": "i_ack"
      },
      "FeedDetailIncidentUnack": {
        "type": "object",
        "description": "Detail payload for `i_unack`.",
        "properties": {
          "progress": {
            "type": "string",
            "description": "Progress note entered when acknowledgement was removed."
          }
        },
        "title": "i_unack"
      },
      "FeedDetailIncidentSnooze": {
        "type": "object",
        "description": "Detail payload for `i_snooze`.",
        "properties": {
          "minutes": {
            "type": "integer",
            "format": "int64",
            "description": "Snooze duration in minutes."
          }
        },
        "title": "i_snooze"
      },
      "FeedDetailIncidentWake": {
        "type": "object",
        "description": "Detail payload for `i_wake`.",
        "properties": {
          "snoozedBefore": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp at which the prior snooze was scheduled to end."
          }
        },
        "title": "i_wake"
      },
      "FeedDetailIncidentResolve": {
        "type": "object",
        "description": "Detail payload for `i_rslv`.",
        "required": [
          "from"
        ],
        "properties": {
          "from": {
            "type": "string",
            "enum": [
              "voice",
              "console",
              "card",
              "wcard",
              "event",
              "autorslv",
              "autorefresh",
              "escalation"
            ],
            "description": "Source that triggered the resolve action."
          }
        },
        "title": "i_rslv"
      },
      "FeedDetailIncidentReopen": {
        "type": "object",
        "description": "Detail payload for `i_reopen`.",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason why the incident was reopened."
          }
        },
        "title": "i_reopen"
      },
      "FeedDetailIncidentMerge": {
        "type": "object",
        "description": "Detail payload for `i_merge`.",
        "properties": {
          "comment": {
            "type": "string",
            "description": "Merge comment."
          },
          "source_incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentShort"
            },
            "description": "Source incidents that were merged."
          },
          "target_incident": {
            "$ref": "#/components/schemas/IncidentShort"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID that performed the merge."
          },
          "title": {
            "type": "string",
            "description": "Resulting incident title."
          },
          "remove_source_incidents": {
            "type": "boolean",
            "description": "True if the source incidents were removed after merging."
          },
          "source_responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Responder member IDs carried over from the source incidents."
          }
        },
        "title": "i_merge"
      },
      "FeedDetailIncidentAssign": {
        "type": "object",
        "description": "Detail payload for `i_assign`. Extends `AssignedTo` with the set of target member IDs.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AssignedTo"
          },
          {
            "type": "object",
            "properties": {
              "to": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "Member IDs that received the assignment."
              }
            }
          }
        ],
        "title": "i_assign"
      },
      "FeedDetailIncidentAddRspd": {
        "type": "object",
        "description": "Detail payload for `i_a_rspd`.",
        "properties": {
          "to": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs added as responders."
          }
        },
        "title": "i_a_rspd"
      },
      "FeedDetailIncidentResetTitle": {
        "type": "object",
        "description": "Detail payload for `i_r_title`.",
        "properties": {
          "from": {
            "type": "string",
            "description": "Previous title."
          },
          "to": {
            "type": "string",
            "description": "New title."
          }
        },
        "title": "i_r_title"
      },
      "FeedDetailIncidentResetDescription": {
        "type": "object",
        "description": "Detail payload for `i_r_desc`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_desc"
      },
      "FeedDetailIncidentResetImpact": {
        "type": "object",
        "description": "Detail payload for `i_r_impact`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_impact"
      },
      "FeedDetailIncidentResetRootCause": {
        "type": "object",
        "description": "Detail payload for `i_r_rc`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_rc"
      },
      "FeedDetailIncidentResetResolution": {
        "type": "object",
        "description": "Detail payload for `i_r_rsltn`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_r_rsltn"
      },
      "FeedDetailIncidentResetSeverity": {
        "type": "object",
        "description": "Detail payload for `i_r_severity`.",
        "properties": {
          "from": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "to": {
            "$ref": "#/components/schemas/FeedSeverity"
          }
        },
        "title": "i_r_severity"
      },
      "FeedDetailIncidentResetField": {
        "type": "object",
        "description": "Detail payload for `i_r_field`.",
        "required": [
          "field_name"
        ],
        "properties": {
          "field_name": {
            "type": "string",
            "description": "Name of the custom field that was updated."
          },
          "to": {
            "description": "New value of the custom field. Type depends on the field definition."
          }
        },
        "title": "i_r_field"
      },
      "FeedDetailIncidentNotify": {
        "type": "object",
        "description": "Detail payload for `i_notify`.",
        "required": [
          "layer_idx"
        ],
        "properties": {
          "rid": {
            "type": "string",
            "description": "Notification record ID."
          },
          "msg_id": {
            "type": "string",
            "description": "Upstream message ID returned by the delivery channel."
          },
          "fire_type": {
            "type": "string",
            "enum": [
              "fire",
              "refire"
            ],
            "description": "Whether this is the first fire or a refire."
          },
          "escalate_rule_name": {
            "type": "string",
            "description": "Escalation rule display name."
          },
          "escalate_rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Escalation rule ID (MongoDB ObjectID)."
          },
          "layer_idx": {
            "type": "integer",
            "description": "Escalation level index used for this notification."
          },
          "by": {
            "type": "string",
            "description": "Delivery channel or method label."
          },
          "persons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyPerson"
            },
            "description": "Per-person delivery records."
          },
          "chats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyChat"
            },
            "description": "Per-chat delivery records."
          },
          "robots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotifyRobot"
            },
            "description": "Per-robot delivery records."
          }
        },
        "title": "i_notify"
      },
      "FeedDetailIncidentStorm": {
        "type": "object",
        "description": "Detail payload for `i_storm`.",
        "properties": {
          "threshold": {
            "type": "integer",
            "description": "Storm threshold that was reached."
          }
        },
        "title": "i_storm"
      },
      "FeedDetailIncidentMuteByFlapping": {
        "type": "object",
        "description": "Detail payload for `i_m_flapping`.",
        "properties": {
          "max_changes": {
            "type": "integer",
            "description": "Maximum state changes allowed within the window."
          },
          "in_mins": {
            "type": "integer",
            "description": "Window length in minutes."
          },
          "mute_mins": {
            "type": "integer",
            "description": "Mute duration in minutes once flapping is detected."
          }
        },
        "title": "i_m_flapping"
      },
      "FeedDetailIncidentMuteReply": {
        "type": "object",
        "description": "Detail payload for `i_m_reply`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_m_reply"
      },
      "FeedDetailIncidentCustomAction": {
        "type": "object",
        "description": "Detail payload for `i_custom`.",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID that executed the action."
          },
          "integration_name": {
            "type": "string",
            "description": "Integration display name."
          }
        },
        "title": "i_custom"
      },
      "FeedDetailIncidentWarRoomCreate": {
        "type": "object",
        "description": "Detail payload for `i_wr_create`.",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID that hosts the war room chat group."
          },
          "chat_id": {
            "type": "string",
            "description": "Chat group identifier."
          },
          "chat_name": {
            "type": "string",
            "description": "Chat group display name."
          },
          "plugin_type": {
            "type": "string",
            "description": "Chat integration plugin type."
          },
          "integration_name": {
            "type": "string",
            "description": "Integration display name."
          },
          "share_link": {
            "type": "string",
            "description": "Shareable join link for the war room."
          }
        },
        "title": "i_wr_create"
      },
      "FeedDetailIncidentWarRoomDelete": {
        "type": "object",
        "description": "Detail payload for `i_wr_delete`.",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID that hosted the war room chat group."
          },
          "chat_id": {
            "type": "string",
            "description": "Chat group identifier."
          },
          "chat_name": {
            "type": "string",
            "description": "Chat group display name."
          },
          "plugin_type": {
            "type": "string",
            "description": "Chat integration plugin type."
          },
          "integration_name": {
            "type": "string",
            "description": "Integration display name."
          }
        },
        "title": "i_wr_delete"
      },
      "FeedDetailIncidentAutoRefreshCard": {
        "type": "object",
        "description": "Detail payload for `i_auto_refresh`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "i_auto_refresh"
      },
      "IncidentFeedItem": {
        "type": "object",
        "description": "Single incident timeline entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetail*` schemas.",
        "required": [
          "ref_id",
          "type",
          "detail",
          "account_id",
          "creator_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "ref_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "ObjectID of the source alert or incident this entry references."
          },
          "type": {
            "$ref": "#/components/schemas/IncidentFeedType"
          },
          "detail": {
            "description": "Type-specific payload. The concrete shape is determined by `type`.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeedDetailIncidentNew"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAssign"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAddRspd"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentNotify"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentStorm"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentSnooze"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWake"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAck"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentUnack"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentComment"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResolve"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentReopen"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMerge"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetTitle"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetDescription"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetImpact"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetRootCause"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetResolution"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetSeverity"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentResetField"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMuteByFlapping"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentMuteReply"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentCustomAction"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWarRoomCreate"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentWarRoomDelete"
              },
              {
                "$ref": "#/components/schemas/FeedDetailIncidentAutoRefreshCard"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "i_new": "#/components/schemas/FeedDetailIncidentNew",
                "i_assign": "#/components/schemas/FeedDetailIncidentAssign",
                "i_a_rspd": "#/components/schemas/FeedDetailIncidentAddRspd",
                "i_notify": "#/components/schemas/FeedDetailIncidentNotify",
                "i_storm": "#/components/schemas/FeedDetailIncidentStorm",
                "i_snooze": "#/components/schemas/FeedDetailIncidentSnooze",
                "i_wake": "#/components/schemas/FeedDetailIncidentWake",
                "i_ack": "#/components/schemas/FeedDetailIncidentAck",
                "i_unack": "#/components/schemas/FeedDetailIncidentUnack",
                "i_comm": "#/components/schemas/FeedDetailIncidentComment",
                "i_rslv": "#/components/schemas/FeedDetailIncidentResolve",
                "i_reopen": "#/components/schemas/FeedDetailIncidentReopen",
                "i_merge": "#/components/schemas/FeedDetailIncidentMerge",
                "i_r_title": "#/components/schemas/FeedDetailIncidentResetTitle",
                "i_r_desc": "#/components/schemas/FeedDetailIncidentResetDescription",
                "i_r_impact": "#/components/schemas/FeedDetailIncidentResetImpact",
                "i_r_rc": "#/components/schemas/FeedDetailIncidentResetRootCause",
                "i_r_rsltn": "#/components/schemas/FeedDetailIncidentResetResolution",
                "i_r_severity": "#/components/schemas/FeedDetailIncidentResetSeverity",
                "i_r_field": "#/components/schemas/FeedDetailIncidentResetField",
                "i_m_flapping": "#/components/schemas/FeedDetailIncidentMuteByFlapping",
                "i_m_reply": "#/components/schemas/FeedDetailIncidentMuteReply",
                "i_custom": "#/components/schemas/FeedDetailIncidentCustomAction",
                "i_wr_create": "#/components/schemas/FeedDetailIncidentWarRoomCreate",
                "i_wr_delete": "#/components/schemas/FeedDetailIncidentWarRoomDelete",
                "i_auto_refresh": "#/components/schemas/FeedDetailIncidentAutoRefreshCard"
              }
            }
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "User ID of the actor. `0` means system-generated."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Soft-delete timestamp (ms). Zero if not deleted."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp in milliseconds."
          }
        }
      },
      "ListIncidentFeedRequest": {
        "type": "object",
        "description": "Filters for the incident timeline query.",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Page number starting at 1."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "Page size, at most 100."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending chronological order when true."
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentFeedType"
            },
            "description": "Optional filter restricting the returned entries to specific types."
          }
        }
      },
      "ListIncidentFeedResponse": {
        "type": "object",
        "description": "Page of incident timeline entries.",
        "required": [
          "has_next_page",
          "items"
        ],
        "properties": {
          "has_next_page": {
            "type": "boolean",
            "description": "True when more entries are available."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentFeedItem"
            },
            "description": "Timeline entries for the current page."
          }
        }
      },
      "ListPastIncidentsRequest": {
        "type": "object",
        "description": "Parameters for the similar-past-incidents query.",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Reference incident ID (MongoDB ObjectID)."
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 5,
            "description": "Maximum number of similar incidents to return."
          }
        }
      },
      "PastIncidentItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IncidentInfo"
          },
          {
            "type": "object",
            "required": [
              "score"
            ],
            "properties": {
              "score": {
                "type": "number",
                "format": "float",
                "description": "Similarity score from the vector search."
              }
            }
          }
        ]
      },
      "ListPastIncidentsResponse": {
        "type": "object",
        "description": "List of similar historical incidents, ranked by relevance.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PastIncidentItem"
            },
            "description": "Similar past incidents with similarity scores."
          }
        }
      },
      "AckIncidentRequest": {
        "type": "object",
        "description": "Parameters for acknowledging one or more incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to acknowledge. At most 100 per call.",
            "minItems": 1
          }
        }
      },
      "UnackIncidentRequest": {
        "type": "object",
        "description": "Parameters for removing acknowledgement from one or more incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to unacknowledge. At most 100 per call.",
            "minItems": 1
          }
        }
      },
      "ResolveIncidentRequest": {
        "type": "object",
        "description": "Parameters for resolving one or more incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to resolve. At most 100 per call.",
            "minItems": 1
          },
          "root_cause": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "Optional root cause note applied to every resolved incident."
          },
          "resolution": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "Optional resolution note applied to every resolved incident."
          }
        }
      },
      "ReopenIncidentRequest": {
        "type": "object",
        "description": "Parameters for reopening one or more closed incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to reopen. At most 100 per call.",
            "minItems": 1
          },
          "reason": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional reason recorded on the timeline."
          }
        }
      },
      "SnoozeIncidentRequest": {
        "type": "object",
        "description": "Parameters for snoozing notifications on one or more incidents.",
        "required": [
          "incident_ids",
          "minutes"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to snooze. At most 100 per call."
          },
          "minutes": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "maximum": 1440,
            "description": "Duration in minutes. Must be greater than 0 and at most 1440 (24h)."
          }
        }
      },
      "WakeIncidentRequest": {
        "type": "object",
        "description": "Parameters for waking snoozed incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to wake. At most 100 per call.",
            "minItems": 1
          }
        }
      },
      "MergeIncidentsRequest": {
        "type": "object",
        "description": "Parameters for merging source incidents into a target.",
        "required": [
          "source_incident_ids",
          "target_incident_id"
        ],
        "properties": {
          "source_incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Source incident IDs. The target incident is removed from this set automatically."
          },
          "target_incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Target incident ID that source incidents will be merged into."
          },
          "title": {
            "type": "string",
            "maxLength": 512,
            "description": "Optional new title for the target incident."
          },
          "comment": {
            "type": "string",
            "maxLength": 1024,
            "description": "Optional comment recorded on the merge timeline entry."
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional new owner member ID for the target incident."
          },
          "remove_source_incidents": {
            "type": "boolean",
            "description": "When true, soft-delete the source incidents after merging instead of closing them."
          }
        }
      },
      "DisableIncidentMergeRequest": {
        "type": "object",
        "description": "Parameters for disabling automatic merging on incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "Incident IDs whose automatic merge should be disabled."
          }
        }
      },
      "UpdateIncidentFieldsRequest": {
        "type": "object",
        "description": "Parameters for updating user-editable fields of an incident. At least one field must be provided; the handler will update only the fields you supply.",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "title": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200,
            "description": "New incident title."
          },
          "description": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "New description."
          },
          "impact": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "New impact description."
          },
          "root_cause": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "New root cause analysis."
          },
          "resolution": {
            "type": "string",
            "minLength": 3,
            "maxLength": 6144,
            "description": "New resolution notes."
          },
          "incident_severity": {
            "type": "string",
            "enum": [
              "Info",
              "Warning",
              "Critical"
            ],
            "description": "New severity."
          }
        }
      },
      "RemoveIncidentRequest": {
        "type": "object",
        "description": "Parameters for permanently removing incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to remove. At most 100 per call. The caller must have access to every channel the incidents belong to."
          }
        }
      },
      "CommentIncidentRequest": {
        "type": "object",
        "description": "Parameters for adding a comment to one or more incidents.",
        "required": [
          "incident_ids"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "maxItems": 100,
            "description": "Incident IDs to comment on. At most 100 per call.",
            "minItems": 1
          },
          "comment": {
            "type": "string",
            "maxLength": 1024,
            "description": "Comment body."
          },
          "mute_reply": {
            "type": "boolean",
            "description": "When true, do not trigger webhook reply actions for this comment."
          }
        }
      },
      "AssignIncidentRequest": {
        "type": "object",
        "description": "Parameters for dispatching one or more incidents to a target. Provide `incident_id` or `incident_ids` but not both.",
        "required": [
          "assigned_to"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Single incident ID. Ignored when `incident_ids` is also provided."
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Batch incident IDs."
          },
          "assigned_to": {
            "$ref": "#/components/schemas/AssignedTo"
          }
        }
      },
      "AddIncidentResponderRequest": {
        "type": "object",
        "description": "Parameters for adding responders to an existing incident.",
        "required": [
          "incident_id",
          "person_ids"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs to add as responders."
          },
          "notify": {
            "type": "object",
            "description": "Optional notification override. Defaults to following each person's personal preference.",
            "properties": {
              "follow_preference": {
                "type": "boolean",
                "description": "When true, fall back to each responder's personal preference."
              },
              "personal_channels": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Channels to use (e.g. `voice`, `sms`, `email`)."
              },
              "template_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "Notification template ID (MongoDB ObjectID)."
              }
            }
          }
        }
      },
      "ResetIncidentFieldRequest": {
        "type": "object",
        "description": "Parameters for updating a custom field value on an incident.",
        "required": [
          "incident_id",
          "field_name"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "field_name": {
            "type": "string",
            "description": "Custom field name; must match a field defined on the account."
          },
          "field_value": {
            "description": "New field value. Type must match the field definition."
          }
        }
      },
      "DoIncidentCustomActionRequest": {
        "type": "object",
        "description": "Parameters for invoking a custom action integration on an incident.",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Custom action integration ID. Must be enabled and associated with the incident's channel."
          }
        }
      },
      "DoIncidentCustomActionResponse": {
        "type": "object",
        "description": "Result of a custom action dispatch.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message if the action's HTTP call failed; omitted on success."
          }
        }
      },
      "GetWarRoomDetailRequest": {
        "type": "object",
        "description": "Parameters for retrieving a war room's live detail.",
        "required": [
          "integration_id",
          "chat_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM integration ID that hosts the war room."
          },
          "chat_id": {
            "type": "string",
            "description": "Chat/group ID on the IM side."
          }
        }
      },
      "WarRoom": {
        "type": "object",
        "description": "Live war room details fetched from the IM side. Returns an empty object if the group was deleted externally.",
        "required": [
          "chat_id",
          "chat_name",
          "share_link"
        ],
        "properties": {
          "chat_id": {
            "type": "string",
            "description": "Chat/group ID on the IM side."
          },
          "chat_name": {
            "type": "string",
            "description": "Chat/group display name."
          },
          "share_link": {
            "type": "string",
            "description": "Join link for the war room, if provided by the IM."
          }
        }
      },
      "ListWarRoomsRequest": {
        "type": "object",
        "description": "Parameters for listing war rooms linked to an incident.",
        "required": [
          "incident_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional filter: only return war rooms for this IM integration."
          }
        }
      },
      "WarRoomItem": {
        "type": "object",
        "description": "Stored war room record.",
        "required": [
          "account_id",
          "integration_id",
          "created_by",
          "chat_id",
          "incident_id",
          "status",
          "created_at",
          "plugin_type"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM integration ID."
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID that created the war room."
          },
          "chat_id": {
            "type": "string",
            "description": "Chat/group ID on the IM side."
          },
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Associated incident ID (MongoDB ObjectID)."
          },
          "status": {
            "type": "string",
            "description": "War room status."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (seconds)."
          },
          "plugin_type": {
            "type": "string",
            "description": "IM plugin type (e.g. `feishu`, `dingtalk`, `wecom`, `slack`)."
          }
        }
      },
      "ListWarRoomsResponse": {
        "type": "object",
        "description": "List of war rooms associated with the incident.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomItem"
            },
            "description": "War room records."
          }
        }
      },
      "DeleteWarRoomRequest": {
        "type": "object",
        "description": "Parameters for deleting an incident war room.",
        "required": [
          "incident_id",
          "integration_id"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Incident ID (MongoDB ObjectID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM integration ID."
          }
        }
      },
      "ListPostMortemsRequest": {
        "type": "object",
        "description": "Filters for the post-mortem report list.",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "Report status. Defaults to `published` on the server when omitted."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Team IDs to restrict the query to."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Channel IDs to restrict the query to."
          },
          "created_at_start_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Filter by creation time: lower bound in seconds."
          },
          "created_at_end_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Filter by creation time: upper bound in seconds."
          },
          "order_by": {
            "type": "string",
            "enum": [
              "created_at_seconds",
              "updated_at_seconds"
            ],
            "description": "Field used to order results."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order when true."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Page number starting at 1."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "Page size, at most 100."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor from a previous response for forward pagination."
          }
        }
      },
      "PostMortemMeta": {
        "type": "object",
        "description": "Post-mortem metadata (lightweight shape used in lists).",
        "required": [
          "account_id",
          "title",
          "status",
          "post_mortem_id",
          "template_id",
          "incident_ids",
          "media_count",
          "author_ids",
          "team_id",
          "channel_id",
          "is_private",
          "channel_name",
          "created_at_seconds",
          "updated_at_seconds"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "title": {
            "type": "string",
            "description": "Report title."
          },
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "Report status."
          },
          "post_mortem_id": {
            "type": "string",
            "description": "Deterministic post-mortem ID derived from account and incident IDs."
          },
          "template_id": {
            "type": "string",
            "description": "Template used to initialize the report."
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked incident IDs."
          },
          "media_count": {
            "type": "integer",
            "description": "Number of uploaded media files."
          },
          "author_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs that contributed to the report."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID. 0 if none."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning channel ID. 0 if none."
          },
          "is_private": {
            "type": "boolean",
            "description": "When true, only team members and admins can view."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel name, filled by the server."
          },
          "created_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (seconds)."
          },
          "updated_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (seconds)."
          }
        }
      },
      "ListPostMortemsResponse": {
        "type": "object",
        "description": "Paginated list of post-mortem reports.",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMortemMeta"
            },
            "description": "Post-mortem metadata for the current page."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching reports."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "True when more results are available beyond this page."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor for forward pagination."
          }
        }
      },
      "PostMortemItem": {
        "type": "object",
        "description": "Full post-mortem report including basics, content and follow-ups.",
        "required": [
          "meta",
          "basics",
          "content",
          "follow_ups"
        ],
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PostMortemMeta"
          },
          "basics": {
            "type": "object",
            "required": [
              "incidents_highest_severity",
              "incidents_earliest_start_seconds",
              "incidents_latest_close_seconds",
              "incidents_total_duration_seconds",
              "responders"
            ],
            "properties": {
              "incidents_highest_severity": {
                "type": "string",
                "description": "Highest severity among linked incidents."
              },
              "incidents_earliest_start_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "Earliest start time among linked incidents (seconds)."
              },
              "incidents_latest_close_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "Latest close time among linked incidents (seconds)."
              },
              "incidents_total_duration_seconds": {
                "type": "integer",
                "format": "int64",
                "description": "Cumulative duration in seconds."
              },
              "responders": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Responder"
                },
                "description": "Responders involved in the incident(s)."
              }
            }
          },
          "content": {
            "type": "object",
            "required": [
              "content"
            ],
            "properties": {
              "content": {
                "type": "string",
                "description": "Report body content (BlockNote JSON)."
              }
            }
          },
          "follow_ups": {
            "type": "string",
            "description": "Follow-up action items rendered as a single string."
          }
        }
      },
      "DeletePostMortemRequest": {
        "type": "object",
        "description": "Parameters for deleting a post-mortem report.",
        "required": [
          "post_mortem_id"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "Post-mortem ID."
          }
        }
      },
      "CreateIncidentResponse": {
        "type": "object",
        "description": "Result of manually creating an incident.",
        "required": [
          "incident_id",
          "title"
        ],
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Newly created incident ID (MongoDB ObjectID)."
          },
          "title": {
            "type": "string",
            "description": "Echoes the incident title from the request."
          }
        }
      },
      "FilterCondition": {
        "type": "object",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Field name to filter on. Use plain names for built-in alert fields (e.g. `alert_severity`, `alert_key`, `check`, `resource`, `service`, `cluster`) or the `labels.<name>` prefix for custom alert labels (e.g. `labels.env`, `labels.region`)."
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "Filter operator. `IN` — value must match one of `vals`; `NOTIN` — value must not match any of `vals`. Supports regex patterns wrapped in `/pattern/`."
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of values to match against. Each entry is a plain string or a `/regex/` pattern."
          }
        }
      },
      "OrFilterGroup": {
        "type": "array",
        "description": "OR-of-AND filter tree. Outer array is a list of AND groups; the condition passes if **any** AND group matches. Within each AND group, **all** conditions must match.",
        "items": {
          "type": "array",
          "description": "AND group — all conditions in this array must match.",
          "items": {
            "$ref": "#/components/schemas/FilterCondition"
          }
        }
      },
      "CreateChannelRequest": {
        "type": "object",
        "description": "Parameters for creating a channel.",
        "required": [
          "team_id",
          "channel_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 3,
            "description": "Additional teams that can manage the channel. Up to 3 entries."
          },
          "channel_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 59,
            "description": "Channel name. 1 to 59 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Free-form description. Up to 500 characters."
          },
          "escalate_rule": {
            "type": "object",
            "description": "Default escalation rule applied to the channel. Omit to skip default escalation.",
            "required": [
              "template_id",
              "target"
            ],
            "properties": {
              "aggr_window": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3600,
                "description": "Delay window in seconds. 0 disables delay."
              },
              "template_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "Notification template ID (MongoDB ObjectID)."
              },
              "target": {
                "type": "object",
                "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.",
                "properties": {
                  "person_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "description": "Member IDs to notify directly."
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "description": "Team IDs to notify."
                  },
                  "schedule_to_role_ids": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      }
                    },
                    "description": "Map of schedule ID to the role IDs on that schedule to notify."
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "description": "Email addresses to notify (push-only scenarios)."
                  },
                  "by": {
                    "type": "object",
                    "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.",
                    "properties": {
                      "follow_preference": {
                        "type": "boolean",
                        "description": "When true, use each responder's personal preference instead of the lists below."
                      },
                      "critical": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)."
                      },
                      "warning": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Channels for Warning events."
                      },
                      "info": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Channels for Info events."
                      }
                    }
                  },
                  "webhooks": {
                    "type": "array",
                    "description": "Group chat / webhook targets. Required unless `by` is provided.",
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "settings"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)."
                        },
                        "settings": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Type-specific settings (chat IDs, URLs, etc.)."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "group": {
            "type": "object",
            "description": "Alert grouping configuration.",
            "required": [
              "method"
            ],
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "i",
                  "p",
                  "n"
                ],
                "description": "Grouping method: `i` intelligent, `p` pattern, `n` none."
              },
              "equals": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "maxItems": 5,
                "description": "Groups of label keys whose equality defines a bucket."
              },
              "cases": {
                "type": "array",
                "maxItems": 100,
                "description": "Per-filter grouping overrides.",
                "items": {
                  "type": "object"
                }
              },
              "all_equals_required": {
                "type": "boolean",
                "description": "When true, all listed keys must be present for grouping."
              },
              "time_window": {
                "type": "integer",
                "minimum": 0,
                "description": "Grouping time window in seconds."
              },
              "window_type": {
                "type": "string",
                "enum": [
                  "tumbling",
                  "sliding"
                ],
                "description": "Window type. Defaults to `tumbling`."
              },
              "storm_threshold": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000,
                "description": "Alert storm threshold."
              },
              "storm_thresholds": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "maxItems": 5,
                "description": "Multi-level storm thresholds."
              },
              "i_keys": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "description": "Label keys used for intelligent grouping embeddings."
              },
              "i_score_threshold": {
                "type": "number",
                "format": "float",
                "minimum": 0.5,
                "maximum": 1,
                "description": "Intelligent grouping similarity threshold."
              }
            }
          },
          "flapping": {
            "type": "object",
            "description": "Flapping detection configuration.",
            "properties": {
              "is_disabled": {
                "type": "boolean",
                "description": "Disable flapping detection."
              },
              "max_changes": {
                "type": "integer",
                "minimum": 2,
                "maximum": 100,
                "description": "Max state changes allowed within `in_mins`."
              },
              "in_mins": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1440,
                "description": "Observation window in minutes."
              },
              "mute_mins": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1440,
                "description": "Mute duration in minutes after flapping is detected."
              }
            }
          },
          "auto_resolve_timeout": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 2592000,
            "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days."
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "Auto-resolve timer reset mode."
          },
          "plugin_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of plugins (integrations) subscribed to this channel."
          },
          "is_private": {
            "type": "boolean",
            "description": "When true, the channel is visible only to its managing teams."
          },
          "disable_outlier_detection": {
            "type": "boolean",
            "description": "Disable outlier incident detection."
          },
          "disable_auto_close": {
            "type": "boolean",
            "description": "Disable automatic incident closing."
          },
          "is_external_report_enabled": {
            "type": "boolean",
            "description": "Allow external reporters to file incidents into this channel."
          }
        }
      },
      "CreateEscalationRuleRequest": {
        "type": "object",
        "description": "Parameters for creating an escalation rule.",
        "required": [
          "channel_id",
          "template_id",
          "rule_name",
          "layers"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 200,
            "description": "Evaluation priority. Lower runs first."
          },
          "aggr_window": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3600,
            "description": "Delay window in seconds. 0 disables delay."
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Notification template ID (MongoDB ObjectID)."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "layers": {
            "type": "array",
            "description": "Escalation levels in order. At least one level is required.",
            "items": {
              "type": "object",
              "required": [
                "target"
              ],
              "properties": {
                "max_times": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 6,
                  "description": "Max repeat notifications within the level."
                },
                "notify_step": {
                  "type": "number",
                  "format": "float",
                  "minimum": 0.5,
                  "maximum": 120,
                  "description": "Repeat interval in minutes."
                },
                "target": {
                  "type": "object",
                  "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.",
                  "properties": {
                    "person_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "description": "Member IDs to notify directly."
                    },
                    "team_ids": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "format": "int64"
                      },
                      "description": "Team IDs to notify."
                    },
                    "schedule_to_role_ids": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "description": "Map of schedule ID to the role IDs on that schedule to notify."
                    },
                    "emails": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "email"
                      },
                      "description": "Email addresses to notify (push-only scenarios)."
                    },
                    "by": {
                      "type": "object",
                      "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.",
                      "properties": {
                        "follow_preference": {
                          "type": "boolean",
                          "description": "When true, use each responder's personal preference instead of the lists below."
                        },
                        "critical": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)."
                        },
                        "warning": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Channels for Warning events."
                        },
                        "info": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Channels for Info events."
                        }
                      }
                    },
                    "webhooks": {
                      "type": "array",
                      "description": "Group chat / webhook targets. Required unless `by` is provided.",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "settings"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)."
                          },
                          "settings": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Type-specific settings (chat IDs, URLs, etc.)."
                          }
                        }
                      }
                    }
                  }
                },
                "escalate_window": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 720,
                  "description": "Wait before moving to the next level, in minutes."
                },
                "force_escalate": {
                  "type": "boolean",
                  "description": "When true, always escalate regardless of acknowledgement."
                }
              }
            }
          },
          "time_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).",
              "properties": {
                "start": {
                  "type": "string",
                  "description": "Start of the window in `HH:MM`."
                },
                "end": {
                  "type": "string",
                  "description": "End of the window in `HH:MM`."
                },
                "repeat": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "Days of the week this window repeats on. Empty means every day."
                },
                "cal_id": {
                  "type": "string",
                  "description": "Optional calendar ID; restricts the window to days matching the calendar."
                },
                "is_off": {
                  "type": "boolean",
                  "description": "When true, match days marked as days-off in the calendar."
                }
              }
            },
            "description": "Optional recurring time windows during which the rule applies."
          },
          "filters": {
            "type": "array",
            "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key (e.g. `alert_severity`, `labels.service`)."
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "Filter operator."
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Values to match."
                  }
                }
              }
            }
          }
        }
      },
      "CreateInhibitRuleRequest": {
        "type": "object",
        "description": "Parameters for creating an inhibit rule.",
        "required": [
          "channel_id",
          "rule_name",
          "equals"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label keys used to pair source and target alerts."
          },
          "source_filters": {
            "type": "array",
            "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key (e.g. `alert_severity`, `labels.service`)."
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "Filter operator."
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Values to match."
                  }
                }
              }
            }
          },
          "target_filters": {
            "type": "array",
            "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key (e.g. `alert_severity`, `labels.service`)."
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "Filter operator."
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Values to match."
                  }
                }
              }
            }
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "When true, suppressed target alerts are dropped instead of merged."
          }
        }
      },
      "CreateSilenceRuleRequest": {
        "type": "object",
        "description": "Parameters for creating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.",
        "required": [
          "channel_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "from_incident_id": {
            "type": "string",
            "description": "Source incident ID when the silence was created from an incident."
          },
          "time_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` uses ISO-style weekday indices (0=Sunday … 6=Saturday).",
              "properties": {
                "start": {
                  "type": "string",
                  "description": "Start of the window in `HH:MM`."
                },
                "end": {
                  "type": "string",
                  "description": "End of the window in `HH:MM`."
                },
                "repeat": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "Days of the week this window repeats on. Empty means every day."
                },
                "cal_id": {
                  "type": "string",
                  "description": "Optional calendar ID; restricts the window to days matching the calendar."
                },
                "is_off": {
                  "type": "boolean",
                  "description": "When true, match days marked as days-off in the calendar."
                }
              }
            },
            "description": "Recurring time windows during which silencing applies. Mutually exclusive with `time_filter`."
          },
          "time_filter": {
            "type": "object",
            "description": "One-off time window defined by unix seconds.",
            "required": [
              "start_time",
              "end_time"
            ],
            "properties": {
              "start_time": {
                "type": "integer",
                "format": "int64",
                "description": "Window start (unix seconds). Must be less than `end_time`."
              },
              "end_time": {
                "type": "integer",
                "format": "int64",
                "description": "Window end (unix seconds)."
              }
            }
          },
          "filters": {
            "type": "array",
            "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key (e.g. `alert_severity`, `labels.service`)."
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "Filter operator."
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Values to match."
                  }
                }
              }
            }
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "When true, silenced alerts are dropped instead of suppressed into incidents."
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "When true, the silence rule is automatically deleted after its time window expires. Defaults to false."
          }
        }
      },
      "CreateDropRuleRequest": {
        "type": "object",
        "description": "Parameters for creating a channel drop rule.",
        "required": [
          "channel_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "filters": {
            "type": "array",
            "description": "Or-of-and filter tree. Each outer element is an AND group; within each group, all conditions must match.",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "oper",
                  "vals"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key (e.g. `alert_severity`, `labels.service`)."
                  },
                  "oper": {
                    "type": "string",
                    "enum": [
                      "IN",
                      "NOTIN"
                    ],
                    "description": "Filter operator."
                  },
                  "vals": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Values to match."
                  }
                }
              }
            }
          }
        }
      },
      "TimeFilter": {
        "type": "object",
        "description": "Recurring time window. `start`/`end` use 24-hour `HH:MM` format; `repeat` lists ISO-style weekday indices (0=Sunday … 6=Saturday).",
        "properties": {
          "start": {
            "type": "string",
            "description": "Start of the window in `HH:MM`."
          },
          "end": {
            "type": "string",
            "description": "End of the window in `HH:MM`."
          },
          "repeat": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Days of the week this window repeats on. Empty means every day."
          },
          "cal_id": {
            "type": "string",
            "description": "Optional calendar ID; restricts the window to days matching the calendar."
          },
          "is_off": {
            "type": "boolean",
            "description": "When true, match days marked as days-off in the calendar."
          }
        }
      },
      "OnceTimeFilter": {
        "type": "object",
        "description": "One-off time window defined by unix seconds.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Window start (unix seconds). Must be > 0 and less than `end_time`.",
            "exclusiveMinimum": 0
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Window end (unix seconds). Must be > 0.",
            "exclusiveMinimum": 0
          }
        }
      },
      "FilterGroup": {
        "$ref": "#/components/schemas/OrFilterGroup"
      },
      "EscalateTarget": {
        "type": "object",
        "description": "Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.",
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs to notify directly."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Team IDs to notify."
          },
          "schedule_to_role_ids": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            },
            "description": "Map of schedule ID to the role IDs on that schedule to notify."
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "Email addresses to notify (push-only scenarios)."
          },
          "by": {
            "type": "object",
            "description": "Per-severity personal notification channels. Required unless `webhooks` is provided.",
            "properties": {
              "follow_preference": {
                "type": "boolean",
                "description": "When true, use each responder's personal preference instead of the lists below."
              },
              "critical": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`)."
              },
              "warning": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Channels for Warning events."
              },
              "info": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Channels for Info events."
              }
            }
          },
          "webhooks": {
            "type": "array",
            "description": "Group chat / webhook targets. Required unless `by` is provided.",
            "items": {
              "type": "object",
              "required": [
                "type",
                "settings"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`)."
                },
                "settings": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Type-specific settings (chat IDs, URLs, etc.)."
                }
              }
            }
          }
        }
      },
      "EscalateLayer": {
        "type": "object",
        "required": [
          "target"
        ],
        "properties": {
          "max_times": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6,
            "description": "Max repeat notifications within the level."
          },
          "notify_step": {
            "type": "number",
            "format": "float",
            "minimum": 0.5,
            "maximum": 120,
            "description": "Repeat interval in minutes."
          },
          "target": {
            "$ref": "#/components/schemas/EscalateTarget"
          },
          "escalate_window": {
            "type": "integer",
            "minimum": 0,
            "maximum": 720,
            "description": "Wait before moving to the next level, in minutes."
          },
          "force_escalate": {
            "type": "boolean",
            "description": "When true, always escalate regardless of acknowledgement."
          }
        }
      },
      "Group": {
        "type": "object",
        "description": "Alert grouping configuration.",
        "required": [
          "method"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "i",
              "p",
              "n"
            ],
            "description": "Grouping method: `i` intelligent, `p` pattern, `n` none."
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "maxItems": 5,
            "description": "Groups of label keys whose equality defines a bucket."
          },
          "cases": {
            "type": "array",
            "maxItems": 100,
            "description": "Per-filter grouping overrides.",
            "items": {
              "type": "object"
            }
          },
          "all_equals_required": {
            "type": "boolean",
            "description": "When true, all listed keys must be present for grouping."
          },
          "time_window": {
            "type": "integer",
            "minimum": 0,
            "description": "Grouping time window in minutes. Default max is 1440 minutes (24 h); extended accounts may allow up to 43200 minutes (30 days)."
          },
          "window_type": {
            "type": "string",
            "enum": [
              "tumbling",
              "sliding"
            ],
            "description": "Window type. Defaults to `tumbling`."
          },
          "storm_threshold": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "description": "Alert storm threshold."
          },
          "storm_thresholds": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "maxItems": 5,
            "description": "Multi-level storm thresholds."
          },
          "i_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "description": "Label keys used for intelligent grouping embeddings."
          },
          "i_score_threshold": {
            "type": "number",
            "format": "float",
            "minimum": 0.5,
            "maximum": 1,
            "description": "Intelligent grouping similarity threshold."
          }
        }
      },
      "Flapping": {
        "type": "object",
        "description": "Flapping detection configuration.",
        "properties": {
          "is_disabled": {
            "type": "boolean",
            "description": "Disable flapping detection."
          },
          "max_changes": {
            "type": "integer",
            "minimum": 2,
            "maximum": 100,
            "description": "Max state changes allowed within `in_mins`."
          },
          "in_mins": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1440,
            "description": "Observation window in minutes."
          },
          "mute_mins": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1440,
            "description": "Mute duration in minutes after flapping is detected."
          }
        }
      },
      "IncProgressCnts": {
        "type": "object",
        "required": [
          "Triggered",
          "Processing"
        ],
        "properties": {
          "Triggered": {
            "type": "integer",
            "format": "int64",
            "description": "Count of triggered incidents in the last 30 days."
          },
          "Processing": {
            "type": "integer",
            "format": "int64",
            "description": "Count of processing incidents in the last 30 days."
          }
        }
      },
      "ChannelItem": {
        "type": "object",
        "description": "Channel detail record. All fields are optional; they are emitted only when populated.",
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "team_name": {
            "type": "string",
            "description": "Owning team name (resolved from the team directory; empty when unavailable)."
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Additional teams that can manage the channel."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID who created the channel."
          },
          "creator_name": {
            "type": "string",
            "description": "Name of the member who created the channel (resolved from the member directory; empty when unavailable)."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning account ID."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel name."
          },
          "description": {
            "type": "string",
            "description": "Free-form description."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ],
            "description": "Channel status."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Deletion timestamp (unix seconds). Non-zero only for soft-deleted channels."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (unix seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (unix seconds)."
          },
          "auto_resolve_timeout": {
            "type": "integer",
            "format": "int64",
            "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve."
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "Auto-resolve timer reset mode."
          },
          "is_private": {
            "type": "boolean",
            "description": "When true, the channel is visible only to its managing teams."
          },
          "disable_outlier_detection": {
            "type": "boolean",
            "description": "When true, outlier incident detection is disabled."
          },
          "disable_auto_close": {
            "type": "boolean",
            "description": "When true, automatic incident closing is disabled."
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "flapping": {
            "$ref": "#/components/schemas/Flapping"
          },
          "progress_to_incident_cnts": {
            "$ref": "#/components/schemas/IncProgressCnts"
          },
          "is_starred": {
            "type": "boolean",
            "description": "Whether the current user has starred this channel."
          },
          "active_incident_highest_severity": {
            "type": "string",
            "description": "Highest severity among active incidents in the channel."
          },
          "last_incident_at": {
            "type": "integer",
            "format": "int64",
            "description": "Timestamp of the most recent incident (unix seconds)."
          },
          "is_external_report_enabled": {
            "type": "boolean",
            "description": "Whether external reporters can file incidents into this channel."
          },
          "external_report_token": {
            "type": "string",
            "description": "Token granted to external reporters when external reporting is enabled."
          }
        }
      },
      "ChannelShort": {
        "type": "object",
        "required": [
          "channel_id",
          "channel_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel name."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Channel status."
          }
        }
      },
      "EscalateRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "aggr_window",
          "rule_name",
          "description",
          "layers",
          "time_filters",
          "filters",
          "status",
          "template_id",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning account ID."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "aggr_window": {
            "type": "integer",
            "description": "Delay window in seconds."
          },
          "rule_name": {
            "type": "string",
            "description": "Rule name."
          },
          "description": {
            "type": "string",
            "description": "Rule description."
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateLayer"
            },
            "description": "Escalation levels in order."
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "Recurring time windows during which the rule applies."
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Rule status."
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Notification template ID (MongoDB ObjectID)."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Escalation rule ID (MongoDB ObjectID)."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID that last updated the rule."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Deletion timestamp (unix seconds). Emitted only for soft-deleted rules."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (unix seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (unix seconds)."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel name, populated for cross-channel listing responses."
          }
        }
      },
      "SilenceRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "time_filters",
          "time_filter",
          "filters",
          "is_directly_discard",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at",
          "is_effective"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "from_incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Source incident ID when the silence was created from an incident."
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "Recurring time windows."
          },
          "time_filter": {
            "$ref": "#/components/schemas/OnceTimeFilter"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "When true, silenced alerts are dropped instead of suppressed into incidents."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "is_effective": {
            "type": "boolean",
            "description": "Whether the rule is currently in effect."
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "When true, the silence rule is automatically deleted after its time window expires. Defaults to false."
          }
        }
      },
      "InhibitRuleItem": {
        "type": "object",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "source_filters",
          "target_filters",
          "equals",
          "is_directly_discard",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer"
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "source_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "target_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label keys used to pair source and target alerts."
          },
          "is_directly_discard": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "UnsubscribeRuleItem": {
        "type": "object",
        "description": "Drop (unsubscribe) rule record.",
        "required": [
          "account_id",
          "channel_id",
          "priority",
          "rule_name",
          "description",
          "filters",
          "status",
          "rule_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "type": "integer"
          },
          "rule_name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "updated_by": {
            "type": "integer",
            "format": "int64"
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ChannelInfoRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID to fetch."
          }
        }
      },
      "ListChannelsRequest": {
        "type": "object",
        "properties": {
          "p": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number (1-based)."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 100,
            "description": "Page size. Defaults to 100 when omitted."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "ranking",
              "created_at",
              "updated_at",
              "channel_name",
              "last_incident_at"
            ],
            "description": "Field used to order results."
          },
          "asc": {
            "type": "boolean",
            "description": "When true, sort ascending."
          },
          "is_my_managed": {
            "type": "boolean",
            "description": "When true, return only channels the caller manages."
          },
          "is_my_starred": {
            "type": "boolean",
            "description": "When true, return only channels the caller has starred. Mutually exclusive with `is_my_team`."
          },
          "is_brief": {
            "type": "boolean",
            "description": "When true, return only brief fields (`channel_id`, `channel_name`, `description`, `status`)."
          },
          "is_my_team": {
            "type": "boolean",
            "description": "When true, return channels owned by the caller's teams. Mutually exclusive with `is_my_starred`."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by team IDs."
          },
          "query": {
            "type": "string",
            "description": "Free-text query against channel name/description."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by explicit channel IDs."
          },
          "channel_name": {
            "type": "string",
            "description": "Exact-match filter on channel name. Takes priority over `query` for name filtering."
          }
        }
      },
      "ChannelInfosRequest": {
        "type": "object",
        "required": [
          "channel_ids"
        ],
        "properties": {
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 1000,
            "description": "Channel IDs to look up. Up to 1000."
          }
        }
      },
      "UpdateChannelRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "description": "Parameters for updating a channel. Only the fields you pass are updated.",
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID to update."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "New owning team ID."
          },
          "managing_team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "maxItems": 3,
            "description": "Additional teams that can manage the channel. Up to 3 entries."
          },
          "channel_name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 59,
            "description": "New channel name. 1 to 59 characters."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "New description. Up to 500 characters."
          },
          "auto_resolve_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "maximum": 2592000,
            "description": "Auto-resolve timeout in seconds. 0 disables auto-resolve. Max 30 days."
          },
          "auto_resolve_mode": {
            "type": "string",
            "enum": [
              "trigger",
              "update"
            ],
            "description": "Auto-resolve timer reset mode."
          },
          "is_private": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When true, the channel is visible only to its managing teams."
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "flapping": {
            "$ref": "#/components/schemas/Flapping"
          },
          "disable_outlier_detection": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Disable outlier incident detection."
          },
          "disable_auto_close": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Disable automatic incident closing."
          },
          "is_external_report_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Allow external reporters to file incidents into this channel."
          }
        }
      },
      "UpdateChannelResponse": {
        "type": "object",
        "description": "Response from updating a channel. Only populated when `is_external_report_enabled` is set to `true`; otherwise all fields are empty.",
        "properties": {
          "external_report_token": {
            "type": "string",
            "description": "Newly generated token for external reporters. Only returned when `is_external_report_enabled` is set to `true` in the request. Callers should store this value; it cannot be retrieved afterwards."
          }
        }
      },
      "ChannelIDRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID."
          }
        }
      },
      "ChannelScopedListRequest": {
        "type": "object",
        "required": [
          "channel_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel to list rules for."
          }
        }
      },
      "UpdateSilenceRuleRequest": {
        "type": "object",
        "description": "Parameters for updating a silence rule. Exactly one of `time_filter` or `time_filters` must be provided, and `filters` must be non-empty.",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Silence rule ID (MongoDB ObjectID)."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "Recurring time windows. Mutually exclusive with `time_filter`."
          },
          "time_filter": {
            "$ref": "#/components/schemas/OnceTimeFilter"
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "When true, silenced alerts are dropped instead of suppressed into incidents."
          },
          "is_auto_delete": {
            "type": "boolean",
            "description": "When true, the silence rule is automatically deleted after its time window expires. Defaults to false."
          }
        }
      },
      "ChannelRuleIDRequest": {
        "type": "object",
        "required": [
          "channel_id",
          "rule_id"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Rule ID (MongoDB ObjectID)."
          }
        }
      },
      "UpdateInhibitRuleRequest": {
        "type": "object",
        "description": "Parameters for updating an inhibit rule.",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name",
          "equals"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Inhibit rule ID (MongoDB ObjectID)."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label keys used to pair source and target alerts."
          },
          "source_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "target_filters": {
            "$ref": "#/components/schemas/FilterGroup"
          },
          "is_directly_discard": {
            "type": "boolean",
            "description": "When true, suppressed target alerts are dropped instead of merged."
          }
        }
      },
      "UpdateDropRuleRequest": {
        "type": "object",
        "description": "Parameters for updating a channel drop rule.",
        "required": [
          "channel_id",
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Drop rule ID (MongoDB ObjectID)."
          },
          "priority": {
            "type": "integer",
            "description": "Evaluation priority. Lower runs first."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          }
        }
      },
      "UpdateEscalationRuleRequest": {
        "type": "object",
        "description": "Parameters for updating an escalation rule.",
        "required": [
          "channel_id",
          "rule_id",
          "template_id",
          "rule_name",
          "layers"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel the rule belongs to."
          },
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Escalation rule ID (MongoDB ObjectID)."
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Evaluation priority. Lower runs first."
          },
          "aggr_window": {
            "type": "integer",
            "description": "Delay window in seconds. 0 disables delay."
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Notification template ID (MongoDB ObjectID)."
          },
          "rule_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Rule name, 1 to 39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Rule description, up to 500 characters."
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateLayer"
            },
            "description": "Escalation levels in order. At least one level is required."
          },
          "time_filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeFilter"
            },
            "description": "Optional recurring time windows during which the rule applies."
          },
          "filters": {
            "$ref": "#/components/schemas/FilterGroup"
          }
        }
      },
      "ListChannelsResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelItem"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching channels."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "Whether more pages are available."
          }
        }
      },
      "ChannelInfosResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelShort"
            }
          }
        }
      },
      "ListSilenceRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SilenceRuleItem"
            }
          }
        }
      },
      "ListInhibitRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InhibitRuleItem"
            }
          }
        }
      },
      "ListDropRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnsubscribeRuleItem"
            }
          }
        }
      },
      "ListEscalationRulesResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EscalateRuleItem"
            }
          }
        }
      },
      "ChannelCreateResponse": {
        "type": "object",
        "required": [
          "channel_id",
          "channel_name"
        ],
        "properties": {
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Newly created channel ID."
          },
          "channel_name": {
            "type": "string",
            "description": "Channel name echoed back from the request."
          },
          "external_report_token": {
            "type": "string",
            "description": "External report token. Emitted only when external reporting is enabled."
          }
        }
      },
      "RuleCreateResponse": {
        "type": "object",
        "required": [
          "rule_id",
          "rule_name"
        ],
        "properties": {
          "rule_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Newly created rule ID (MongoDB ObjectID)."
          },
          "rule_name": {
            "type": "string",
            "description": "Rule name echoed back from the request."
          }
        }
      },
      "RouteMatchCondition": {
        "type": "object",
        "description": "A single match condition. All conditions inside one case form an AND group.",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "Field key to match against the alert event (e.g. `alert_severity`, `labels.service`)."
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "Match operator. `IN` matches when the field value is one of `vals`; `NOTIN` matches when it is not."
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Values to compare against. Each value may be a literal string, a wildcard (`*`, `?`), a regular expression wrapped in slashes (`/pattern/`), a CIDR (`cidr:10.0.0.0/8`), or a numeric comparison (`num:lt:100`)."
          }
        }
      },
      "RouteCase": {
        "type": "object",
        "description": "A single case branch in the routing rule. When all of its conditions match, the alert is dispatched to the configured channels.",
        "required": [
          "if",
          "channel_ids",
          "fallthrough"
        ],
        "properties": {
          "if": {
            "type": "array",
            "description": "List of match conditions that are AND-ed together.",
            "items": {
              "$ref": "#/components/schemas/RouteMatchCondition"
            }
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Target channel IDs. Required when `routing_mode` is `standard` (or empty)."
          },
          "fallthrough": {
            "type": "boolean",
            "description": "If `true`, evaluation continues to the next case after this one matches; otherwise matching stops at the first hit."
          },
          "routing_mode": {
            "type": "string",
            "enum": [
              "standard",
              "name_mapping"
            ],
            "description": "Routing mode. `standard` (default, also used when left empty) routes to the fixed channel IDs; `name_mapping` resolves channels by reading a label value from the alert event."
          },
          "name_mapping_label": {
            "type": "string",
            "description": "Label key whose value is used as the target channel name. Required when `routing_mode` is `name_mapping`."
          }
        }
      },
      "RouteSection": {
        "type": "object",
        "description": "A logical section that groups consecutive cases for display purposes.",
        "required": [
          "name",
          "position"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Section name. Must be unique within the rule."
          },
          "position": {
            "type": "integer",
            "description": "Index in `cases` where this section starts. Must be between 0 and the length of `cases`."
          }
        }
      },
      "RouteDefault": {
        "type": "object",
        "description": "Default branch used when no case matches (or all matched cases yield no valid channels).",
        "properties": {
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Channel IDs to fall back to."
          }
        }
      },
      "RouteItem": {
        "type": "object",
        "description": "Routing rule of an integration. Alerts are evaluated against `cases` in order; unmatched alerts fall through to `default`. Returns `null` when the integration has no configured rule.",
        "required": [
          "version",
          "updated_by",
          "creator_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration the rule belongs to."
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "description": "Ordered list of case branches."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            },
            "description": "Optional sections that visually group cases."
          },
          "default": {
            "$ref": "#/components/schemas/RouteDefault"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "deleted"
            ],
            "description": "Rule status."
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "description": "Monotonic version number, incremented on each update. Use it for optimistic concurrency control."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the person who performed the last update."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the person who created the rule."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Soft-delete timestamp, Unix seconds. Omitted when the rule is active."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time, Unix timestamp in seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time, Unix timestamp in seconds."
          }
        }
      },
      "RouteInfoRequest": {
        "type": "object",
        "description": "Parameters for retrieving the routing rule of one integration.",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID. Must be greater than 0."
          }
        }
      },
      "ListRoutesRequest": {
        "type": "object",
        "description": "Parameters for listing routing rules across multiple integrations.",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Integration IDs to fetch routing rules for."
          }
        }
      },
      "ListRoutesResponse": {
        "type": "object",
        "description": "Response wrapper for the routing rule list.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteItem"
            },
            "description": "Routing rules of the requested integrations. Integrations without a configured rule are omitted."
          }
        }
      },
      "UpsertRouteRequest": {
        "type": "object",
        "description": "Parameters for creating or updating the routing rule of an integration. The handler creates a rule when none exists for the integration, otherwise it overwrites the existing one. At least one of `cases` or `default` must be provided.",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration the rule belongs to."
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteCase"
            },
            "description": "Ordered list of case branches. Cases are evaluated top to bottom."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteSection"
            },
            "description": "Optional sections that group consecutive cases for display."
          },
          "default": {
            "$ref": "#/components/schemas/RouteDefault"
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "description": "Expected current version for optimistic concurrency control. Pass the value returned by the latest read."
          }
        }
      },
      "AlertListRequest": {
        "type": "object",
        "description": "Filter and pagination criteria for alert list queries. Time range is required.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of the search window, Unix epoch seconds."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of the search window, Unix epoch seconds. Max span 31 days."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Page size. Max 100, default 20."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor from the previous response for the next page."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Filter by active (`true`) or resolved (`false`) status."
          },
          "ever_muted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Filter by whether the alert has ever been silenced."
          },
          "alert_severity": {
            "type": "string",
            "description": "Comma-separated severity filter, e.g. `Critical,Warning`. Allowed values: `Critical`, `Warning`, `Info`, `Ok`."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by channel IDs."
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by integration IDs."
          },
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter to specific alert IDs (ObjectID hex strings)."
          },
          "alert_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by alert deduplication keys."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort field."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending when `true`. Default descending."
          },
          "by_updated_at": {
            "type": "boolean",
            "description": "When `true`, the time range filter is applied on `updated_at` rather than `start_time`."
          }
        }
      },
      "AlertItem": {
        "type": "object",
        "description": "A single alert with full detail.",
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "Unique alert ID (ObjectID hex string)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the integration that produced this alert."
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Deprecated. Use `integration_id` instead. Deprecated: use `integration_id` instead.",
            "deprecated": true
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the channel the alert belongs to."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "title": {
            "type": "string",
            "description": "Alert title."
          },
          "title_rule": {
            "type": "string",
            "description": "Title template used to derive `title` from the event labels (e.g. `$service::$cluster`)."
          },
          "description": {
            "type": "string",
            "description": "Alert description."
          },
          "alert_severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Current severity."
          },
          "alert_status": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ],
            "description": "Current status."
          },
          "alert_key": {
            "type": "string",
            "description": "Deduplication key."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "First-seen time, Unix epoch seconds."
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "Last-event time, Unix epoch seconds."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Resolution time, Unix epoch seconds. 0 if still active."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Label key-value pairs."
          },
          "ever_muted": {
            "type": "boolean",
            "description": "True if this alert has ever been silenced."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          },
          "integration_name": {
            "type": "string",
            "description": "Display name of the integration."
          },
          "integration_type": {
            "type": "string",
            "description": "Type/plugin key of the integration."
          },
          "integration_ref_id": {
            "type": "string",
            "description": "External reference ID of the integration."
          },
          "channel_name": {
            "type": "string",
            "description": "Display name of the channel."
          },
          "channel_status": {
            "type": "string",
            "description": "Status of the channel (e.g. `enabled`, `disabled`)."
          },
          "responder_name": {
            "type": "string",
            "description": "Display name of the current responder (from the associated incident)."
          },
          "responder_email": {
            "type": "string",
            "description": "Email of the current responder (from the associated incident)."
          },
          "event_cnt": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of raw events received by this alert."
          },
          "incident": {
            "$ref": "#/components/schemas/IncidentShort",
            "description": "Associated incident, if any."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "Recent raw events attached to this alert. Populated only by some endpoints."
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertImage"
            },
            "description": "Images attached to the alert."
          },
          "data_source_name": {
            "type": "string",
            "description": "Deprecated. Use `integration_name` instead."
          },
          "data_source_type": {
            "type": "string",
            "description": "Deprecated. Use `integration_type` instead."
          },
          "data_source_ref_id": {
            "type": "string",
            "description": "Deprecated. Use `integration_ref_id` instead."
          }
        }
      },
      "AlertImage": {
        "type": "object",
        "description": "An image attachment on an alert or event.",
        "required": [
          "src"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "Optional link URL when the image is clicked."
          },
          "src": {
            "type": "string",
            "description": "Image source URL or internal image reference (starts with `img_` or `http`)."
          },
          "alt": {
            "type": "string",
            "description": "Alt text."
          }
        }
      },
      "AlertListResponse": {
        "type": "object",
        "description": "Paginated list of alerts.",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching alerts."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "True if more pages are available."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor for the next page."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertItem"
            }
          }
        }
      },
      "AlertInfoRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "Alert ID (ObjectID hex string)."
          }
        }
      },
      "AlertListByIDsRequest": {
        "type": "object",
        "required": [
          "alert_ids"
        ],
        "properties": {
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of alert IDs (ObjectID hex strings)."
          }
        }
      },
      "AlertEventListRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Alert ID (MongoDB ObjectID)."
          },
          "asc": {
            "type": "boolean",
            "default": false,
            "description": "When true, return events oldest-first. Defaults to newest-first."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "Page size. Defaults to 20 and cannot exceed 100."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "default": 1,
            "description": "Page number starting at 1. Used when `search_after_ctx` is omitted."
          },
          "search_after_ctx": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Cursor returned by the previous page. When supplied, cursor pagination is used instead of page-number pagination."
          }
        }
      },
      "AlertEventListResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            },
            "description": "Raw alert events in the requested order."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching event count."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "Whether another page is available."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor to pass as `search_after_ctx` for the next page."
          }
        }
      },
      "AlertFeedRequest": {
        "type": "object",
        "required": [
          "alert_id"
        ],
        "properties": {
          "alert_id": {
            "type": "string",
            "description": "Alert ID."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "Page number, starting at 1.",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Page size, max 100, default 20."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending."
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by feed types."
          }
        }
      },
      "AlertFeedType": {
        "type": "string",
        "description": "Alert activity feed entry type. Each value identifies one alert lifecycle event; the matching `detail` payload shape is determined by this field.\n\n| Type | Meaning |\n|---|---|\n| `a_new` | Alert triggered. |\n| `a_comm` | Comment added on the alert. |\n| `a_close` | Alert closed. |",
        "enum": [
          "a_new",
          "a_comm",
          "a_close"
        ]
      },
      "FeedDetailAlertTrigger": {
        "type": "object",
        "description": "Detail payload for `a_new`.",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/FeedSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/FeedSeverity"
          }
        },
        "title": "a_new"
      },
      "FeedDetailAlertComment": {
        "type": "object",
        "description": "Detail payload for `a_comm`.",
        "properties": {
          "comment": {
            "type": "string",
            "description": "Comment body."
          }
        },
        "title": "a_comm"
      },
      "FeedDetailAlertClose": {
        "type": "object",
        "description": "Detail payload for `a_close`. No fields.",
        "properties": {},
        "additionalProperties": false,
        "title": "a_close"
      },
      "FeedItem": {
        "type": "object",
        "description": "A single alert activity feed entry. The `detail` field is discriminated by `type`; see the per-type `FeedDetailAlert*` schemas.",
        "required": [
          "ref_id",
          "type",
          "detail",
          "account_id",
          "creator_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "ref_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "ObjectID of the alert this entry references."
          },
          "type": {
            "$ref": "#/components/schemas/AlertFeedType"
          },
          "detail": {
            "description": "Type-specific payload. The concrete shape is determined by `type`.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeedDetailAlertTrigger"
              },
              {
                "$ref": "#/components/schemas/FeedDetailAlertComment"
              },
              {
                "$ref": "#/components/schemas/FeedDetailAlertClose"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "a_new": "#/components/schemas/FeedDetailAlertTrigger",
                "a_comm": "#/components/schemas/FeedDetailAlertComment",
                "a_close": "#/components/schemas/FeedDetailAlertClose"
              }
            }
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID of the creator. 0 for system-generated entries."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp in Unix epoch milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp in Unix epoch milliseconds."
          }
        }
      },
      "AlertFeedResponse": {
        "type": "object",
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedItem"
            }
          }
        }
      },
      "AlertMergeRequest": {
        "type": "object",
        "required": [
          "alert_ids",
          "incident_id"
        ],
        "properties": {
          "alert_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Alert IDs to merge."
          },
          "incident_id": {
            "type": "string",
            "description": "Target incident ID."
          },
          "comment": {
            "type": "string",
            "description": "Optional comment on the merge action."
          },
          "title": {
            "type": "string",
            "description": "Optional new title for the target incident."
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional new owner for the target incident."
          }
        }
      },
      "AlertPipelineInfoRequest": {
        "type": "object",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID."
          }
        }
      },
      "AlertPipeline": {
        "type": "object",
        "description": "A single alert processing rule.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "title_reset",
              "description_reset",
              "severity_reset",
              "alert_drop",
              "alert_inhibit"
            ],
            "description": "Rule type."
          },
          "if": {
            "$ref": "#/components/schemas/OrFilterGroup",
            "description": "Optional OR-of-AND filter. When omitted, the rule applies to all alerts."
          },
          "settings": {
            "type": "object",
            "description": "Kind-specific settings. Shape depends on `kind`:\n- `title_reset`: `{ \"title\": \"<string>\" }`\n- `description_reset`: `{ \"description\": \"<string>\" }`\n- `severity_reset`: `{ \"severity\": \"Critical\"|\"Warning\"|\"Info\" }`\n- `alert_drop`: `{}` (empty object)\n- `alert_inhibit`: `{ \"equals\": [\"<label_key>\", ...], \"source_filters\": <OrFilterGroup> }`",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApTitleReset"
              },
              {
                "$ref": "#/components/schemas/ApDescriptionReset"
              },
              {
                "$ref": "#/components/schemas/ApSeverityReset"
              },
              {
                "$ref": "#/components/schemas/ApAlertDrop"
              },
              {
                "$ref": "#/components/schemas/ApAlertInhibit"
              }
            ]
          }
        }
      },
      "AlertPipelineItem": {
        "type": "object",
        "description": "Alert processing pipeline for an integration.",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID this pipeline applies to."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipeline"
            },
            "description": "Ordered list of processing rules."
          },
          "status": {
            "type": "string",
            "description": "Pipeline status. Possible values: `enabled`, `disabled`."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID who created the pipeline."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID who last updated the pipeline."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          }
        }
      },
      "AlertPipelineListRequest": {
        "type": "object",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Integration IDs."
          }
        }
      },
      "AlertPipelineListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipelineItem"
            }
          }
        }
      },
      "AlertPipelineUpsertRequest": {
        "type": "object",
        "required": [
          "integration_id",
          "rules"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID to configure."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertPipeline"
            },
            "description": "Rules to apply. Max 50.",
            "maxItems": 50
          }
        }
      },
      "AlertEventGlobalListRequest": {
        "type": "object",
        "description": "Filter and pagination criteria for the global raw event list.",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of search window, Unix epoch seconds."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of search window, Unix epoch seconds."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "Page number, starting at 1. Used when `search_after_ctx` is not provided."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Page size, max 100, default 20."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor for the next page."
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by integration IDs."
          },
          "integration_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by integration types (plugin keys)."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by channel IDs. Max 100."
          },
          "severities": {
            "type": "string",
            "description": "Comma-separated severity filter, e.g. `Critical,Warning`."
          },
          "orderby": {
            "type": "string",
            "description": "Sort field (ES field name).",
            "enum": [
              "event_time"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending when `true`."
          }
        }
      },
      "AlertEventGlobalListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "has_next_page": {
            "type": "boolean"
          },
          "search_after_ctx": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertEventItem"
            }
          }
        }
      },
      "ApTitleReset": {
        "type": "object",
        "description": "Settings for `title_reset` rule: overrides the alert title with a template string.",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "New title template. Supports Golang template syntax referencing alert fields."
          }
        }
      },
      "ApDescriptionReset": {
        "type": "object",
        "description": "Settings for `description_reset` rule: overrides the alert description.",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "New description template."
          }
        }
      },
      "ApSeverityReset": {
        "type": "object",
        "description": "Settings for `severity_reset` rule: forces the alert severity to a fixed value.",
        "required": [
          "severity"
        ],
        "properties": {
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info"
            ],
            "description": "Target severity level."
          }
        }
      },
      "ApAlertDrop": {
        "type": "object",
        "description": "Settings for `alert_drop` rule: no additional settings required. Matched alerts are silently discarded.",
        "properties": {}
      },
      "ApAlertInhibit": {
        "type": "object",
        "description": "Settings for `alert_inhibit` rule: suppresses source alerts that match the filter when they share the same label values as the current alert.",
        "required": [
          "equals",
          "source_filters"
        ],
        "properties": {
          "equals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label keys whose values must be equal between the source and current alert for inhibition to apply."
          },
          "source_filters": {
            "$ref": "#/components/schemas/OrFilterGroup",
            "description": "Filter that identifies the source alerts to inhibit."
          }
        }
      },
      "ListWebhookHistoryRequest": {
        "type": "object",
        "description": "Filter parameters for listing outbound webhook delivery history. The query is bounded by a required millisecond time window; use `search_after_ctx` for cursor-based pagination.",
        "required": [
          "limit",
          "start_time",
          "end_time"
        ],
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor returned by a previous call for fetching the next page."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Page size."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order by `event_time` when true; otherwise descending."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "event_time"
            ],
            "description": "Sort field. Currently only `event_time` is supported."
          },
          "ref_id": {
            "type": "string",
            "maxLength": 128,
            "description": "Reference ID filter (incident or alert ID)."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Filter by integration ID."
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by event type values."
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "Filter by delivery status."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "minimum": 1000000000000,
            "maximum": 9999999999999,
            "description": "Window start time in Unix milliseconds."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "minimum": 1000000000000,
            "maximum": 9999999999999,
            "description": "Window end time in Unix milliseconds. Must be greater than `start_time`."
          }
        }
      },
      "ListWebhookHistoryResponse": {
        "type": "object",
        "description": "Paginated webhook delivery history.",
        "required": [
          "items",
          "total",
          "search_after_ctx"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookHistoryItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of matching records."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor to pass as `search_after_ctx` to fetch the next page. Empty when no further pages are available."
          }
        }
      },
      "WebhookHistoryItem": {
        "type": "object",
        "description": "A single webhook delivery attempt. Fields with `omitempty` are absent when zero-valued.",
        "required": [
          "integration_id",
          "event_id",
          "webhook_type",
          "event_type",
          "endpoint",
          "attempt",
          "duration",
          "status",
          "status_code",
          "event_time"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID that triggered the webhook."
          },
          "event_id": {
            "type": "string",
            "description": "Unique event identifier for the delivery attempt."
          },
          "webhook_type": {
            "type": "string",
            "description": "Source object kind. `incident` or `alert`."
          },
          "event_type": {
            "type": "string",
            "description": "Event type (e.g. `created`, `acknowledged`, `closed`)."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID associated with the event, when applicable."
          },
          "ref_id": {
            "type": "string",
            "description": "Source object ID (incident ID or alert ID)."
          },
          "request_headers": {
            "type": "string",
            "description": "Serialized outbound request headers."
          },
          "request_body": {
            "type": "string",
            "description": "Outbound request body payload."
          },
          "endpoint": {
            "type": "string",
            "description": "Destination URL."
          },
          "attempt": {
            "type": "integer",
            "description": "Attempt sequence number."
          },
          "duration": {
            "type": "integer",
            "description": "Total elapsed time of the attempt in milliseconds."
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "Delivery outcome."
          },
          "status_code": {
            "type": "integer",
            "description": "HTTP status code returned by the destination."
          },
          "error_message": {
            "type": "string",
            "description": "Error message when delivery failed."
          },
          "response_headers": {
            "type": "string",
            "description": "Serialized response headers from the destination."
          },
          "response_body": {
            "type": "string",
            "description": "Response body returned by the destination."
          },
          "event_time": {
            "type": "string",
            "description": "Event time as a formatted timestamp string."
          }
        }
      },
      "GetWebhookHistoryDetailRequest": {
        "type": "object",
        "description": "Lookup parameters for a single webhook delivery record.",
        "required": [
          "event_id",
          "integration_id"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Event ID returned by `ListWebhookHistory`."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Integration ID the event belongs to."
          }
        }
      },
      "WebhookHistoryDetail": {
        "type": "object",
        "description": "Full detail for a webhook delivery attempt. Extends `WebhookHistoryItem` with human-friendly reference metadata resolved at query time.",
        "required": [
          "integration_id",
          "event_id",
          "webhook_type",
          "event_type",
          "endpoint",
          "attempt",
          "duration",
          "status",
          "status_code",
          "event_time"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID."
          },
          "event_id": {
            "type": "string",
            "description": "Event ID."
          },
          "webhook_type": {
            "type": "string",
            "description": "Source object kind. `incident` or `alert`."
          },
          "event_type": {
            "type": "string",
            "description": "Event type."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64",
            "description": "Channel ID when applicable."
          },
          "ref_id": {
            "type": "string",
            "description": "Source object ID."
          },
          "request_headers": {
            "type": "string",
            "description": "Serialized outbound request headers."
          },
          "request_body": {
            "type": "string",
            "description": "Outbound request body payload."
          },
          "endpoint": {
            "type": "string",
            "description": "Destination URL."
          },
          "attempt": {
            "type": "integer",
            "description": "Attempt sequence number."
          },
          "duration": {
            "type": "integer",
            "description": "Total elapsed time of the attempt in milliseconds."
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ],
            "description": "Delivery outcome."
          },
          "status_code": {
            "type": "integer",
            "description": "HTTP status code."
          },
          "error_message": {
            "type": "string",
            "description": "Error message when delivery failed."
          },
          "response_headers": {
            "type": "string",
            "description": "Serialized response headers."
          },
          "response_body": {
            "type": "string",
            "description": "Response body."
          },
          "event_time": {
            "type": "string",
            "description": "Event time as a formatted timestamp string."
          },
          "ref_title": {
            "type": "string",
            "description": "Title of the source incident or alert, resolved at query time."
          },
          "channel_name": {
            "type": "string",
            "description": "Name of the associated channel, resolved at query time."
          }
        }
      },
      "ScheduleEmptyObject": {
        "type": "object",
        "description": "Empty response.",
        "properties": {}
      },
      "ScheduleSelfRequest": {
        "type": "object",
        "description": "Query parameters for listing the current user's schedules. Both start and end are Unix timestamps (seconds). If omitted they default to 0. The window must not exceed 30 days.",
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Window start (Unix seconds, 10 digits)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Window end (Unix seconds, 10 digits). Must be within 30 days of start."
          }
        }
      },
      "ScheduleIDResponse": {
        "type": "object",
        "description": "Schedule ID response returned after create.",
        "required": [
          "schedule_id"
        ],
        "properties": {
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the newly created schedule."
          }
        }
      },
      "ScheduleIDsBodyRequest": {
        "type": "object",
        "description": "Request carrying a list of schedule IDs (used by delete/enable/disable).",
        "required": [
          "schedule_ids"
        ],
        "properties": {
          "schedule_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Schedule IDs to operate on."
          }
        }
      },
      "ScheduleIDsRequest": {
        "type": "object",
        "description": "Request carrying a list of schedule IDs (used by batch info).",
        "required": [
          "schedule_ids"
        ],
        "properties": {
          "schedule_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Schedule ID list."
          }
        }
      },
      "ScheduleInfoRequest": {
        "type": "object",
        "description": "Schedule detail request. start/end define the window for computed layers; the span must be less than 45 days.",
        "required": [
          "schedule_id",
          "start",
          "end"
        ],
        "properties": {
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "Schedule ID."
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Preview start timestamp (Unix seconds, 10 digits)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Preview end timestamp (Unix seconds, 10 digits)."
          }
        }
      },
      "ScheduleMember": {
        "type": "object",
        "description": "Schedule group member reference.",
        "required": [
          "role_id",
          "person_ids"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "int64",
            "description": "Oncall role ID."
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Person IDs in this slot."
          }
        }
      },
      "ScheduleGroup": {
        "type": "object",
        "description": "Oncall group definition within a rotation layer.",
        "required": [
          "group_name",
          "name",
          "members",
          "start",
          "end"
        ],
        "properties": {
          "group_name": {
            "type": "string",
            "description": "Group display name."
          },
          "name": {
            "type": "string",
            "description": "Legacy group name."
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleMember"
            },
            "description": "Members of this group."
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Group start timestamp (Unix seconds)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Group end timestamp (Unix seconds)."
          }
        }
      },
      "ScheduleRestrictPeriod": {
        "type": "object",
        "description": "Restrict window inside a rotation cycle.",
        "required": [
          "restrict_start",
          "restrict_end"
        ],
        "properties": {
          "restrict_start": {
            "type": "integer",
            "format": "int64",
            "description": "Start offset inside the rotation cycle."
          },
          "restrict_end": {
            "type": "integer",
            "format": "int64",
            "description": "End offset inside the rotation cycle."
          }
        }
      },
      "ScheduleDayMask": {
        "type": "object",
        "description": "Day-of-week mask for a rotation layer.",
        "properties": {
          "repeat": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Weekday numbers (0 = Sunday) included in the rotation."
          }
        }
      },
      "ScheduleLayer": {
        "type": "object",
        "description": "One rotation layer inside a schedule.",
        "required": [
          "account_id",
          "name",
          "schedule_id",
          "hidden",
          "mode",
          "weight",
          "groups",
          "rotation_duration",
          "handoff_time",
          "enable_time",
          "expire_time",
          "restrict_mode",
          "restrict_start",
          "restrict_end",
          "restrict_periods",
          "day_mask",
          "create_at",
          "create_by",
          "update_at",
          "update_by",
          "fair_rotation",
          "rotation_unit",
          "rotation_value",
          "mask_continuous_enabled"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "name": {
            "type": "string",
            "description": "Layer internal name."
          },
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "Parent schedule ID."
          },
          "hidden": {
            "type": "integer",
            "description": "Whether the layer is hidden in the UI (0 = no, 1 = yes)."
          },
          "mode": {
            "type": "integer",
            "description": "Layer mode: 0 = common rotation, 1 = override.",
            "enum": [
              0,
              1
            ]
          },
          "weight": {
            "type": "integer",
            "description": "Layer weight for ordering."
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleGroup"
            },
            "description": "Oncall groups participating in the rotation."
          },
          "rotation_duration": {
            "type": "integer",
            "format": "int64",
            "description": "Rotation duration in seconds."
          },
          "handoff_time": {
            "type": "integer",
            "format": "int64",
            "description": "Handoff time inside the rotation cycle (seconds)."
          },
          "enable_time": {
            "type": "integer",
            "format": "int64",
            "description": "When the layer becomes effective (Unix seconds)."
          },
          "expire_time": {
            "type": "integer",
            "format": "int64",
            "description": "When the layer expires (Unix seconds, 0 means never)."
          },
          "restrict_mode": {
            "type": "integer",
            "description": "Restriction mode: 0 = none, 1 = day, 2 = week.",
            "enum": [
              0,
              1,
              2
            ]
          },
          "restrict_start": {
            "type": "integer",
            "format": "int64",
            "description": "Legacy start offset inside the restriction window (seconds)."
          },
          "restrict_end": {
            "type": "integer",
            "format": "int64",
            "description": "Legacy end offset inside the restriction window (seconds)."
          },
          "restrict_periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleRestrictPeriod"
            },
            "description": "Restriction windows inside each rotation cycle."
          },
          "day_mask": {
            "$ref": "#/components/schemas/ScheduleDayMask",
            "description": "Day-of-week mask."
          },
          "create_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (Unix seconds)."
          },
          "create_by": {
            "type": "integer",
            "format": "int64",
            "description": "Creator person ID."
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (Unix seconds)."
          },
          "update_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater person ID."
          },
          "layer_name": {
            "type": "string",
            "description": "User-facing layer name."
          },
          "fair_rotation": {
            "type": "boolean",
            "description": "Whether fair rotation is enabled."
          },
          "layer_start": {
            "type": "integer",
            "format": "int64",
            "description": "Layer start timestamp (Unix seconds)."
          },
          "layer_end": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Layer end timestamp (Unix seconds). null means open-ended."
          },
          "rotation_unit": {
            "type": "string",
            "description": "Rotation unit.",
            "enum": [
              "hour",
              "day",
              "week",
              "month"
            ]
          },
          "rotation_value": {
            "type": "integer",
            "format": "int64",
            "description": "Rotation quantity (number of rotation_unit per cycle)."
          },
          "mask_continuous_enabled": {
            "type": "boolean",
            "description": "Whether continuous masking is enabled."
          }
        }
      },
      "ScheduleImNotifySettings": {
        "type": "object",
        "description": "Settings for an IM webhook notification channel.",
        "required": [
          "token",
          "alias",
          "data_source_id",
          "chat_ids",
          "verify_token",
          "sign_secret"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Webhook token."
          },
          "alias": {
            "type": "string",
            "description": "Channel alias."
          },
          "data_source_id": {
            "type": "integer",
            "format": "int64",
            "description": "Data source ID."
          },
          "chat_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Chat IDs."
          },
          "verify_token": {
            "type": "string",
            "description": "Verification token."
          },
          "sign_secret": {
            "type": "string",
            "description": "Signature secret."
          }
        }
      },
      "ScheduleImNotify": {
        "type": "object",
        "description": "IM webhook notification entry.",
        "required": [
          "type",
          "settings"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app)."
          },
          "settings": {
            "$ref": "#/components/schemas/ScheduleImNotifySettings"
          }
        }
      },
      "ScheduleFixedTimeNotifyInfo": {
        "type": "object",
        "description": "Fixed-time notification config.",
        "required": [
          "cycle",
          "start"
        ],
        "properties": {
          "cycle": {
            "type": "string",
            "description": "Notification cycle."
          },
          "start": {
            "type": "string",
            "description": "Notification start time within the cycle."
          }
        }
      },
      "ScheduleNotifyBy": {
        "type": "object",
        "description": "Per-recipient notification preference.",
        "required": [
          "follow_preference",
          "personal_channels"
        ],
        "properties": {
          "follow_preference": {
            "type": "boolean",
            "description": "Whether to follow each responder's personal notification preference."
          },
          "personal_channels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Personal notification channel keys."
          }
        }
      },
      "ScheduleNotify": {
        "type": "object",
        "description": "Notification configuration attached to a schedule.",
        "required": [
          "fixed_time",
          "by",
          "webhooks"
        ],
        "properties": {
          "advance_in_time": {
            "type": "integer",
            "format": "int64",
            "description": "Advance notification lead time (seconds)."
          },
          "fixed_time": {
            "$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
          },
          "by": {
            "$ref": "#/components/schemas/ScheduleNotifyBy"
          },
          "im": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Legacy IM-type to token map."
          },
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleImNotify"
            },
            "description": "IM webhook notification channels."
          }
        }
      },
      "ScheduleCalculatedSchedule": {
        "type": "object",
        "description": "Computed shift inside a schedule layer.",
        "required": [
          "start",
          "end",
          "group",
          "index"
        ],
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Shift start timestamp (Unix seconds)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Shift end timestamp (Unix seconds)."
          },
          "group": {
            "$ref": "#/components/schemas/ScheduleGroup"
          },
          "index": {
            "type": "integer",
            "description": "Index inside the rotation."
          }
        }
      },
      "ScheduleCalculatedLayer": {
        "type": "object",
        "description": "Computed schedule for a single layer.",
        "required": [
          "layer_name",
          "name",
          "mode",
          "schedules"
        ],
        "properties": {
          "layer_name": {
            "type": "string",
            "description": "Layer display name."
          },
          "name": {
            "type": "string",
            "description": "Layer internal name."
          },
          "mode": {
            "type": "integer",
            "description": "Layer mode: 0 = common rotation, 1 = override."
          },
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedSchedule"
            },
            "description": "Computed shifts."
          }
        }
      },
      "ScheduleOncallGroup": {
        "type": "object",
        "description": "Snapshot of the currently or next on-call group.",
        "required": [
          "start",
          "end",
          "group",
          "update_at",
          "weight",
          "index"
        ],
        "properties": {
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Shift start timestamp (Unix seconds)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Shift end timestamp (Unix seconds)."
          },
          "group": {
            "$ref": "#/components/schemas/ScheduleGroup"
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "Update timestamp (Unix seconds)."
          },
          "weight": {
            "type": "integer",
            "description": "Layer weight the shift comes from."
          },
          "index": {
            "type": "integer",
            "description": "Index inside the rotation."
          }
        }
      },
      "ScheduleItem": {
        "type": "object",
        "description": "Full schedule detail returned by info/preview/list.",
        "required": [
          "id",
          "name",
          "account_id",
          "group_id",
          "disabled",
          "create_at",
          "create_by",
          "update_at",
          "update_by",
          "layers",
          "schedule_layers",
          "final_schedule",
          "notify",
          "schedule_id",
          "schedule_name",
          "team_id",
          "description",
          "layer_schedules",
          "status",
          "cur_oncall",
          "next_oncall"
        ],
        "properties": {
          "id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Schedule ID. null when returned from /schedule/preview."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "group_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Legacy team/group ID. null when returned from /schedule/preview."
          },
          "disabled": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview."
          },
          "create_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (Unix seconds)."
          },
          "create_by": {
            "type": "integer",
            "format": "int64",
            "description": "Creator person ID."
          },
          "update_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (Unix seconds)."
          },
          "update_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater person ID."
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleLayer"
            },
            "description": "Rotation layers defined on the schedule."
          },
          "field": {
            "type": "string",
            "description": "Field name used by the legacy update-field endpoint."
          },
          "schedule_layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedLayer"
            },
            "description": "Computed layers for the requested window."
          },
          "final_schedule": {
            "$ref": "#/components/schemas/ScheduleCalculatedLayer",
            "description": "Collapsed final schedule across all layers."
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Window start (Unix seconds)."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Window end (Unix seconds)."
          },
          "notify": {
            "$ref": "#/components/schemas/ScheduleNotify"
          },
          "schedule_id": {
            "type": "integer",
            "format": "int64",
            "description": "Schedule ID."
          },
          "schedule_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule display name. null when returned from /schedule/preview."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Owning team ID. null when returned from /schedule/preview."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule description. null when returned from /schedule/preview."
          },
          "layer_schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleCalculatedLayer"
            },
            "description": "Alias of schedule_layers returned for compatibility."
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Legacy status flag. Deprecated. null when returned from /schedule/preview."
          },
          "cur_oncall": {
            "$ref": "#/components/schemas/ScheduleOncallGroup",
            "description": "Current on-call group, or null when nobody is on-call."
          },
          "next_oncall": {
            "$ref": "#/components/schemas/ScheduleOncallGroup",
            "description": "Next on-call group, or null when unknown."
          }
        }
      },
      "ScheduleUpsertRequest": {
        "type": "object",
        "description": "Schedule create/update/preview request body. The server accepts the same shape as the schedule detail model; only the key fields are listed here. For update, set schedule_id. For preview, start and end are required.",
        "properties": {
          "schedule_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Schedule ID. Required on update."
          },
          "schedule_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule display name. Max 40 characters.",
            "maxLength": 40
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Legacy schedule name field. Used when schedule_name is empty.",
            "maxLength": 40
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Schedule description. Max 500 characters.",
            "maxLength": 500
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Owning team ID."
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleLayer"
            },
            "description": "Rotation layers."
          },
          "notify": {
            "$ref": "#/components/schemas/ScheduleNotify"
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "Preview window start (Unix seconds, 10 digits). Required for /schedule/preview."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start."
          }
        }
      },
      "ScheduleListRequest": {
        "type": "object",
        "description": "Schedule list request. limit defaults to 10 and is capped at 100; p defaults to 1. is_my_team and is_my_manage are mutually exclusive.",
        "properties": {
          "query": {
            "type": "string",
            "description": "Search keyword matched against schedule names."
          },
          "p": {
            "type": "integer",
            "description": "Page number (1-indexed).",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Default 10, max 100.",
            "default": 10,
            "maximum": 100
          },
          "is_my_team": {
            "type": "boolean",
            "description": "Only return schedules whose owning team the current user belongs to."
          },
          "is_my_manage": {
            "type": "boolean",
            "description": "Only return schedules created by the current user within their teams."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by team IDs."
          },
          "start": {
            "type": "integer",
            "format": "int64",
            "description": "When set together with end, computed layer schedules are returned. Span must be less than 45 days."
          },
          "end": {
            "type": "integer",
            "format": "int64",
            "description": "Window end timestamp (Unix seconds)."
          }
        }
      },
      "ScheduleListResponse": {
        "type": "object",
        "description": "Schedule list response.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            },
            "description": "Schedules on this page."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of schedules matching the filters."
          }
        }
      },
      "ScheduleSelfResponse": {
        "type": "object",
        "description": "Response of /schedule/self and /schedule/infos. Only the items field is populated.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            },
            "description": "Schedules assigned to the current user (or matching the requested IDs)."
          }
        }
      },
      "CalendarEmptyObject": {
        "type": "object",
        "description": "Empty response body.",
        "properties": {}
      },
      "CalendarCreateRequest": {
        "type": "object",
        "description": "Create calendar request. cal_name is required.",
        "required": [
          "cal_name"
        ],
        "properties": {
          "cal_name": {
            "type": "string",
            "description": "Calendar display name.",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": "string",
            "description": "Calendar description.",
            "maxLength": 499
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone. Defaults to Asia/Shanghai when empty.",
            "default": "Asia/Shanghai"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID. 0 means no team."
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "Workday numbers (0 = Sunday, 6 = Saturday)."
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional public-holiday calendar IDs to inherit events from (for example zh-cn.china.official)."
          }
        }
      },
      "CalendarCreateResponse": {
        "type": "object",
        "description": "Create calendar response.",
        "required": [
          "cal_id",
          "cal_name"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "ID of the newly created calendar (format cal.<uuid>)."
          },
          "cal_name": {
            "type": "string",
            "description": "Calendar display name."
          }
        }
      },
      "CalendarUpdateRequest": {
        "type": "object",
        "description": "Update calendar request. cal_id is required; all other fields are optional and only applied when provided.",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "cal_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "New calendar name.",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "New description.",
            "maxLength": 499
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "New IANA timezone."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "New owning team ID."
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "Workday numbers (0 = Sunday, 6 = Saturday)."
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional public-holiday calendar IDs to inherit events from."
          }
        }
      },
      "CalendarIDRequest": {
        "type": "object",
        "description": "Request body carrying a calendar ID.",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          }
        }
      },
      "CalendarItem": {
        "type": "object",
        "description": "Service calendar detail.",
        "required": [
          "account_id",
          "team_id",
          "cal_id",
          "cal_name",
          "description",
          "timezone",
          "kind",
          "created_at",
          "updated_at",
          "creator_id",
          "updated_by",
          "status"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID."
          },
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Owning team ID (0 when not assigned)."
          },
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "cal_name": {
            "type": "string",
            "description": "Calendar display name."
          },
          "description": {
            "type": "string",
            "description": "Calendar description."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone."
          },
          "kind": {
            "type": "string",
            "description": "Calendar kind.",
            "enum": [
              "region.official.holiday",
              "religion.holiday",
              "personal"
            ]
          },
          "workdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "description": "Workday numbers (0 = Sunday, 6 = Saturday)."
          },
          "extra_cal_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Inherited public-holiday calendar IDs."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (Unix seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (Unix seconds)."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Creator person ID."
          },
          "updated_by": {
            "type": "integer",
            "format": "uint64",
            "description": "Last updater person ID."
          },
          "status": {
            "type": "string",
            "description": "Calendar status.",
            "enum": [
              "enabled",
              "deleted"
            ]
          }
        }
      },
      "CalendarListRequest": {
        "type": "object",
        "description": "Calendar list request. kind filters by calendar kind; no_locale disables locale filtering for public holiday calendars.",
        "properties": {
          "kind": {
            "type": "string",
            "description": "Calendar kind filter. Defaults to personal when empty.",
            "enum": [
              "region.official.holiday",
              "personal"
            ]
          },
          "no_locale": {
            "type": "boolean",
            "description": "Disable locale filtering when listing public-holiday calendars."
          }
        }
      },
      "CalendarListResponse": {
        "type": "object",
        "description": "Calendar list response.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarItem"
            },
            "description": "Calendar items."
          },
          "total": {
            "type": "integer",
            "description": "Total number of calendars returned."
          }
        }
      },
      "CalEventUpsertRequest": {
        "type": "object",
        "description": "Calendar event upsert request. Provide event_id to update an existing event; omit it to create a new one.",
        "required": [
          "cal_id",
          "summary",
          "start_at",
          "end_at",
          "is_off"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "event_id": {
            "type": "string",
            "description": "Event ID. Omit when creating.",
            "maxLength": 63
          },
          "summary": {
            "type": "string",
            "description": "Event summary.",
            "minLength": 1,
            "maxLength": 39
          },
          "description": {
            "type": "string",
            "description": "Event description.",
            "maxLength": 499
          },
          "start_at": {
            "type": "string",
            "description": "Event start date in YYYY-MM-DD."
          },
          "end_at": {
            "type": "string",
            "description": "Event end date in YYYY-MM-DD (exclusive)."
          },
          "is_off": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the event marks a non-working day. true = day off, false = working day override."
          }
        }
      },
      "CalEventUpsertResponse": {
        "type": "object",
        "description": "Response returned by /calendar/event/upsert.",
        "required": [
          "cal_id",
          "event_id",
          "summary"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "event_id": {
            "type": "string",
            "description": "Event ID (existing or newly generated)."
          },
          "summary": {
            "type": "string",
            "description": "Event summary."
          }
        }
      },
      "CalEventIDRequest": {
        "type": "object",
        "description": "Calendar event delete request.",
        "required": [
          "cal_id",
          "event_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "event_id": {
            "type": "string",
            "description": "Event ID."
          }
        }
      },
      "CalEventListRequest": {
        "type": "object",
        "description": "Calendar event list request. When day > 0 month must also be specified. month and day accept 0 to mean \"not filtered\".",
        "required": [
          "cal_id"
        ],
        "properties": {
          "cal_id": {
            "type": "string",
            "description": "Calendar ID."
          },
          "year": {
            "type": "integer",
            "description": "Year. Defaults to the current year when omitted.",
            "minimum": 2023
          },
          "month": {
            "type": "integer",
            "description": "Month (1-12). 0 means no month filter.",
            "minimum": 0,
            "maximum": 12
          },
          "day": {
            "type": "integer",
            "description": "Day (1-31). 0 means no day filter.",
            "minimum": 0,
            "maximum": 31
          }
        }
      },
      "CalEventItem": {
        "type": "object",
        "description": "Calendar event entry.",
        "required": [
          "cal_id",
          "event_id",
          "summary",
          "description",
          "start_at",
          "end_at",
          "is_off",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID. Only present for private events."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Creator person ID. Only present for private events."
          },
          "cal_id": {
            "type": "string",
            "description": "Calendar ID. For public events this is a locale key such as zh-cn.china.official."
          },
          "event_id": {
            "type": "string",
            "description": "Event ID."
          },
          "summary": {
            "type": "string",
            "description": "Event summary."
          },
          "description": {
            "type": "string",
            "description": "Event description."
          },
          "start_at": {
            "type": "string",
            "description": "Event start date (YYYY-MM-DD)."
          },
          "end_at": {
            "type": "string",
            "description": "Event end date (YYYY-MM-DD, exclusive)."
          },
          "is_off": {
            "type": "boolean",
            "description": "Whether the event marks a non-working day."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (Unix seconds)."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp (Unix seconds)."
          }
        }
      },
      "CalEventListResponse": {
        "type": "object",
        "description": "Calendar event list response.",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalEventItem"
            },
            "description": "Calendar events sorted by start_at."
          },
          "total": {
            "type": "integer",
            "description": "Total number of events returned."
          }
        }
      },
      "TemplateItem": {
        "type": "object",
        "description": "A notification template. Each channel field holds the template source string for that delivery channel; an empty string means 'no custom template for that channel'.",
        "required": [
          "account_id",
          "team_id",
          "template_id",
          "template_name",
          "description",
          "email",
          "sms",
          "voice",
          "dingtalk",
          "wecom",
          "feishu",
          "feishu_app",
          "dingtalk_app",
          "wecom_app",
          "slack_app",
          "teams_app",
          "telegram",
          "slack",
          "zoom",
          "status",
          "creator_id",
          "updated_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the owning account."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the team this template is scoped to, or 0 for account-wide."
          },
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Template ID.",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "template_name": {
            "type": "string",
            "description": "Unique template name within the account."
          },
          "description": {
            "type": "string",
            "description": "Free-form description."
          },
          "email": {
            "type": "string",
            "description": "Email body template source (Go `html/template` syntax)."
          },
          "sms": {
            "type": "string",
            "description": "SMS template source (Go `text/template` syntax)."
          },
          "voice": {
            "type": "string",
            "description": "Voice call script template source."
          },
          "dingtalk": {
            "type": "string",
            "description": "DingTalk robot message template source."
          },
          "wecom": {
            "type": "string",
            "description": "WeCom robot message template source."
          },
          "feishu": {
            "type": "string",
            "description": "Feishu robot message template source."
          },
          "feishu_app": {
            "type": "string",
            "description": "Feishu app message template source."
          },
          "dingtalk_app": {
            "type": "string",
            "description": "DingTalk app message template source."
          },
          "wecom_app": {
            "type": "string",
            "description": "WeCom app message template source."
          },
          "slack_app": {
            "type": "string",
            "description": "Slack app message template source."
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams app message template source."
          },
          "telegram": {
            "type": "string",
            "description": "Telegram bot message template source."
          },
          "slack": {
            "type": "string",
            "description": "Slack robot message template source."
          },
          "zoom": {
            "type": "string",
            "description": "Zoom bot message template source."
          },
          "status": {
            "type": "string",
            "description": "Template lifecycle status.",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ]
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID of the creator."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID of the last editor."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the template was soft-deleted. Absent (omitempty) when the template is live."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the template was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the template was last updated."
          }
        }
      },
      "TemplateIDRequest": {
        "type": "object",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Target template ID. Pass `000000000000000000000001` to address the built-in preset.",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          }
        }
      },
      "TemplateListRequest": {
        "type": "object",
        "description": "Paginated list filters. Defaults: p=1, limit=20. Max limit=100.",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Page number, starting at 1.",
            "minimum": 1,
            "default": 1,
            "example": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Capped at 100.",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "example": 20
          },
          "orderby": {
            "type": "string",
            "description": "Sort field.",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending sort order.",
            "default": false
          },
          "is_my_team": {
            "type": "boolean",
            "description": "When true, only return templates scoped to teams the caller belongs to.",
            "default": false
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by specific team IDs."
          },
          "creator_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Filter by creator member ID."
          },
          "query": {
            "type": "string",
            "description": "Regex or substring match on template_name."
          }
        }
      },
      "TemplateListResponse": {
        "type": "object",
        "description": "Paginated template list.",
        "required": [
          "total",
          "has_next_page",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of templates matching the filter, across all pages.",
            "example": 47
          },
          "has_next_page": {
            "type": "boolean",
            "description": "True if another page exists after the returned one.",
            "example": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateItem"
            }
          }
        }
      },
      "TemplateCreateRequest": {
        "type": "object",
        "description": "Create a new notification template.",
        "required": [
          "template_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Team scope. 0 for account-wide.",
            "default": 0
          },
          "template_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Template name, unique per account. 1–39 characters.",
            "example": "Prod incident default"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Free-form description. Up to 500 characters."
          },
          "email": {
            "type": "string",
            "description": "Email body template source (Go `html/template` syntax)."
          },
          "sms": {
            "type": "string",
            "description": "SMS template source (Go `text/template` syntax)."
          },
          "voice": {
            "type": "string",
            "description": "Voice call script template source."
          },
          "dingtalk": {
            "type": "string",
            "description": "DingTalk robot message template source."
          },
          "wecom": {
            "type": "string",
            "description": "WeCom robot message template source."
          },
          "feishu": {
            "type": "string",
            "description": "Feishu robot message template source."
          },
          "feishu_app": {
            "type": "string",
            "description": "Feishu app message template source."
          },
          "dingtalk_app": {
            "type": "string",
            "description": "DingTalk app message template source."
          },
          "wecom_app": {
            "type": "string",
            "description": "WeCom app message template source."
          },
          "slack_app": {
            "type": "string",
            "description": "Slack app message template source."
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams app message template source."
          },
          "telegram": {
            "type": "string",
            "description": "Telegram bot message template source."
          },
          "slack": {
            "type": "string",
            "description": "Slack robot message template source."
          },
          "zoom": {
            "type": "string",
            "description": "Zoom bot message template source."
          }
        }
      },
      "TemplateCreateResponse": {
        "type": "object",
        "required": [
          "template_id",
          "template_name"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Newly created template ID.",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "template_name": {
            "type": "string",
            "description": "Template name echoed from the request.",
            "example": "Prod incident default"
          }
        }
      },
      "TemplateUpdateRequest": {
        "type": "object",
        "description": "Update an existing template.",
        "required": [
          "template_id",
          "template_name"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "description": "Target template ID.",
            "example": "6605a1b2c3d4e5f6a7b8c9d0"
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Team scope. 0 for account-wide.",
            "default": 0
          },
          "template_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Template name. 1–39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Free-form description. Up to 500 characters."
          },
          "email": {
            "type": "string",
            "description": "Email body template source (Go `html/template` syntax)."
          },
          "sms": {
            "type": "string",
            "description": "SMS template source (Go `text/template` syntax)."
          },
          "voice": {
            "type": "string",
            "description": "Voice call script template source."
          },
          "dingtalk": {
            "type": "string",
            "description": "DingTalk robot message template source."
          },
          "wecom": {
            "type": "string",
            "description": "WeCom robot message template source."
          },
          "feishu": {
            "type": "string",
            "description": "Feishu robot message template source."
          },
          "feishu_app": {
            "type": "string",
            "description": "Feishu app message template source."
          },
          "dingtalk_app": {
            "type": "string",
            "description": "DingTalk app message template source."
          },
          "wecom_app": {
            "type": "string",
            "description": "WeCom app message template source."
          },
          "slack_app": {
            "type": "string",
            "description": "Slack app message template source."
          },
          "teams_app": {
            "type": "string",
            "description": "Microsoft Teams app message template source."
          },
          "telegram": {
            "type": "string",
            "description": "Telegram bot message template source."
          },
          "slack": {
            "type": "string",
            "description": "Slack robot message template source."
          },
          "zoom": {
            "type": "string",
            "description": "Zoom bot message template source."
          }
        }
      },
      "CsvFileResponse": {
        "type": "string",
        "description": "CSV file content returned as an attachment download."
      },
      "EnrichmentInfoRequest": {
        "type": "object",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Integration ID to query enrichment rules for. Must be greater than 0."
          }
        }
      },
      "EnrichmentListRequest": {
        "type": "object",
        "required": [
          "integration_ids"
        ],
        "properties": {
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "List of integration IDs to query."
          }
        }
      },
      "EnrichmentUpsertRequest": {
        "type": "object",
        "required": [
          "integration_id",
          "rules"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID to configure enrichment rules for."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichRule"
            },
            "description": "Ordered list of enrichment rules. Replaces all existing rules."
          }
        }
      },
      "EnrichRule": {
        "type": "object",
        "required": [
          "kind",
          "settings"
        ],
        "description": "An enrichment rule with an optional condition and type-specific settings.",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "extraction",
              "composition",
              "mapping",
              "drop"
            ],
            "description": "Rule type. `extraction` extracts a label via regex or GJson. `composition` builds a label from a template. `mapping` looks up values from a schema or API. `drop` removes labels."
          },
          "if": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichFilter"
            },
            "description": "Optional AND-filter list. The rule is skipped if the condition does not match."
          },
          "settings": {
            "description": "Rule-kind–specific settings. The shape depends on `kind`.",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "extraction": "#/components/schemas/ErsExtraction",
                "composition": "#/components/schemas/ErsComposition",
                "mapping": "#/components/schemas/ErsMapping",
                "drop": "#/components/schemas/ErsDrop"
              }
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/ErsExtraction"
              },
              {
                "$ref": "#/components/schemas/ErsComposition"
              },
              {
                "$ref": "#/components/schemas/ErsMapping"
              },
              {
                "$ref": "#/components/schemas/ErsDrop"
              }
            ]
          }
        }
      },
      "ErsExtraction": {
        "type": "object",
        "title": "extraction",
        "required": [
          "source_field",
          "result_label"
        ],
        "properties": {
          "source_field": {
            "type": "string",
            "description": "Source field to extract from. Must be `title`, `description`, or a label key prefixed with `labels.` (e.g. `labels.env`)."
          },
          "result_label": {
            "type": "string",
            "description": "Destination label key to write the extracted value into. Must match `^[a-z][a-z0-9_]{0,62}$`."
          },
          "pattern": {
            "type": "string",
            "description": "RE2 regular expression. Use a named capture group `(?P<result>...)` to extract a sub-match; without a named group the full match is used. Mutually exclusive with `g_json`."
          },
          "g_json": {
            "type": "string",
            "description": "GJson path expression used to extract a value from a JSON-encoded field. Mutually exclusive with `pattern`."
          },
          "override": {
            "type": "boolean",
            "description": "When `true`, overwrite the label if it already exists. Defaults to `false`."
          }
        }
      },
      "ErsComposition": {
        "type": "object",
        "title": "composition",
        "required": [
          "result_label",
          "template"
        ],
        "properties": {
          "result_label": {
            "type": "string",
            "description": "Destination label key to write the composed value into. Must match `^[a-z][a-z0-9_]{0,62}$`."
          },
          "template": {
            "type": "string",
            "maxLength": 500,
            "description": "Go `text/template` string. Alert fields are available as `{{.title}}`, `{{.description}}`, and `{{.labels.key}}`. Example: `{{.labels.region}}-{{.labels.env}}`."
          },
          "override": {
            "type": "boolean",
            "description": "When `true`, overwrite the label if it already exists. Defaults to `false`."
          }
        }
      },
      "ErsMapping": {
        "type": "object",
        "title": "mapping",
        "required": [
          "result_labels"
        ],
        "properties": {
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label keys to populate from the mapping lookup result."
          },
          "mapping_type": {
            "type": "string",
            "enum": [
              "schema",
              "api"
            ],
            "default": "schema",
            "description": "Mapping source type. `schema` uses a mapping schema table; `api` calls an external HTTP API."
          },
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (MongoDB ObjectID hex). Required when `mapping_type` is `schema`."
          },
          "api_id": {
            "type": "string",
            "description": "Mapping API ID (MongoDB ObjectID hex). Required when `mapping_type` is `api`."
          },
          "override": {
            "type": "boolean",
            "description": "When `true`, overwrite labels that already exist. Defaults to `false`."
          }
        }
      },
      "ErsDrop": {
        "type": "object",
        "title": "drop",
        "required": [
          "drop_labels"
        ],
        "properties": {
          "drop_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of label keys to remove from the alert."
          }
        }
      },
      "EnrichFilter": {
        "type": "object",
        "required": [
          "key",
          "oper",
          "vals"
        ],
        "description": "A single label filter condition.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Alert label key."
          },
          "oper": {
            "type": "string",
            "enum": [
              "IN",
              "NOTIN"
            ],
            "description": "Match operator. `IN` matches when any value matches; `NOTIN` matches when none of the values match."
          },
          "vals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Values to match against."
          }
        }
      },
      "EnrichmentItem": {
        "type": "object",
        "description": "Enrichment rule set for an integration.",
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Integration ID."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichRule"
            },
            "description": "Ordered enrichment rules."
          },
          "status": {
            "type": "string",
            "description": "Rule set status."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater member ID."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Creator member ID."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix seconds."
          }
        },
        "required": [
          "integration_id",
          "rules",
          "status",
          "updated_by",
          "creator_id",
          "created_at",
          "updated_at"
        ]
      },
      "EnrichmentListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnrichmentItem"
            },
            "description": "Enrichment rule sets."
          }
        },
        "required": [
          "items"
        ]
      },
      "MappingSchemaIDRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (MongoDB ObjectID hex)."
          }
        }
      },
      "MappingSchemaCreateRequest": {
        "type": "object",
        "required": [
          "schema_name",
          "source_labels",
          "result_labels"
        ],
        "properties": {
          "schema_name": {
            "type": "string",
            "maxLength": 39,
            "description": "Unique schema name (max 39 chars)."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Optional description (max 500 chars)."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID. `0` means no team."
          },
          "source_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 3,
            "description": "Lookup key label names (1–3). Must not overlap with `result_labels`."
          },
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "description": "Output label names (1–10). Must not overlap with `source_labels`."
          }
        }
      },
      "MappingSchemaCreateResponse": {
        "type": "object",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Created schema ID (MongoDB ObjectID hex)."
          },
          "schema_name": {
            "type": "string",
            "description": "Schema name."
          }
        },
        "required": [
          "schema_id",
          "schema_name"
        ]
      },
      "MappingSchemaUpdateRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Schema ID (MongoDB ObjectID hex)."
          },
          "schema_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 39,
            "description": "New schema name (max 39 chars)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "New description (max 500 chars)."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "New owning team ID. `0` removes the team association."
          }
        }
      },
      "MappingSchemaItem": {
        "type": "object",
        "description": "Mapping schema definition.",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Schema ID (MongoDB ObjectID hex)."
          },
          "schema_name": {
            "type": "string",
            "description": "Schema name."
          },
          "description": {
            "type": "string",
            "description": "Schema description."
          },
          "source_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Lookup key label names."
          },
          "result_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Output label names."
          },
          "status": {
            "type": "string",
            "description": "Schema status."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Creator member ID."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater member ID."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix seconds."
          }
        },
        "required": [
          "schema_id",
          "schema_name",
          "description",
          "source_labels",
          "result_labels",
          "status",
          "team_id",
          "updated_by",
          "creator_id"
        ]
      },
      "MappingSchemaListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total schema count."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingSchemaItem"
            },
            "description": "Mapping schemas."
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "MappingDataListRequest": {
        "type": "object",
        "required": [
          "schema_id"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (MongoDB ObjectID hex)."
          },
          "query": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Exact-match filter on source label values. All source labels must be provided if any are specified."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort field."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending when `true`."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "description": "Page number (1-based). Used for offset-based pagination."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Page size (1–100, default 20)."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor token for cursor-based pagination."
          }
        }
      },
      "MappingDataItem": {
        "type": "object",
        "description": "A single mapping data row.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Composite key derived from source label values."
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "All label key-value pairs for this row."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix seconds."
          }
        }
      },
      "MappingDataListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingDataItem"
            },
            "description": "Data rows."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching rows."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "Whether more pages exist."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor token for the next page."
          }
        },
        "required": [
          "items",
          "total",
          "has_next_page"
        ]
      },
      "MappingDataUpsertRequest": {
        "type": "object",
        "required": [
          "schema_id",
          "docs"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (MongoDB ObjectID hex)."
          },
          "docs": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "maxItems": 1000,
            "description": "Rows to insert or update. Each row must include all source and result labels."
          }
        }
      },
      "MappingDataUpsertResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Composite keys of upserted rows."
          }
        },
        "required": [
          "keys"
        ]
      },
      "MappingDataDeleteRequest": {
        "type": "object",
        "required": [
          "schema_id",
          "keys"
        ],
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (MongoDB ObjectID hex)."
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "description": "Keys of rows to delete."
          }
        }
      },
      "MappingDataUploadRequest": {
        "type": "object",
        "description": "Multipart form-data upload request. `schema_id` is passed as a query parameter; `file` is the CSV file field.",
        "properties": {
          "schema_id": {
            "type": "string",
            "description": "Mapping schema ID (query parameter)."
          },
          "file": {
            "type": "string",
            "format": "binary",
            "description": "CSV file to upload."
          }
        }
      },
      "MappingAPIIDRequest": {
        "type": "object",
        "required": [
          "api_id"
        ],
        "properties": {
          "api_id": {
            "type": "string",
            "description": "Mapping API ID (MongoDB ObjectID hex)."
          }
        }
      },
      "MappingAPICreateRequest": {
        "type": "object",
        "required": [
          "api_name",
          "url"
        ],
        "properties": {
          "api_name": {
            "type": "string",
            "maxLength": 199,
            "description": "Unique API name (max 199 chars)."
          },
          "description": {
            "type": "string",
            "description": "Optional description."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "HTTP/HTTPS endpoint URL (max 500 chars)."
          },
          "insecure_skip_verify": {
            "type": "boolean",
            "description": "Skip TLS certificate verification. Default `false`."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom HTTP request headers."
          },
          "timeout": {
            "type": "integer",
            "description": "Request timeout in seconds (1–3). Default 2."
          },
          "retry_count": {
            "type": "integer",
            "description": "Number of retries on failure (0–1). Default 0."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          }
        }
      },
      "MappingAPICreateResponse": {
        "type": "object",
        "properties": {
          "api_id": {
            "type": "string",
            "description": "Created API ID (MongoDB ObjectID hex)."
          },
          "api_name": {
            "type": "string",
            "description": "API name."
          }
        },
        "required": [
          "api_id",
          "api_name"
        ]
      },
      "MappingAPIUpdateRequest": {
        "type": "object",
        "required": [
          "api_id"
        ],
        "properties": {
          "api_id": {
            "type": "string",
            "description": "Mapping API ID (MongoDB ObjectID hex)."
          },
          "api_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 199,
            "description": "New API name (max 199 chars)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "New description."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "maxLength": 500,
            "description": "New endpoint URL (max 500 chars)."
          },
          "insecure_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "New TLS skip-verify setting."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "New headers map (replaces existing)."
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "description": "New timeout in seconds."
          },
          "retry_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "New retry count."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "New owning team ID."
          }
        }
      },
      "MappingAPIItem": {
        "type": "object",
        "description": "Mapping API configuration.",
        "properties": {
          "api_id": {
            "type": "string",
            "description": "API ID (MongoDB ObjectID hex)."
          },
          "api_name": {
            "type": "string",
            "description": "API name."
          },
          "description": {
            "type": "string",
            "description": "Description."
          },
          "url": {
            "type": "string",
            "description": "Endpoint URL."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom request headers."
          },
          "timeout": {
            "type": "integer",
            "description": "Request timeout in seconds."
          },
          "retry_count": {
            "type": "integer",
            "description": "Retry count."
          },
          "insecure_skip_verify": {
            "type": "boolean",
            "description": "Whether TLS verification is skipped."
          },
          "status": {
            "type": "string",
            "description": "API status."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Creator member ID."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater member ID."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix seconds."
          }
        },
        "required": [
          "api_id",
          "api_name",
          "description",
          "url",
          "headers",
          "timeout",
          "retry_count",
          "insecure_skip_verify",
          "status",
          "team_id",
          "updated_by",
          "creator_id"
        ]
      },
      "MappingAPIListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total API count."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingAPIItem"
            },
            "description": "Mapping APIs."
          }
        },
        "required": [
          "total",
          "items"
        ]
      },
      "InsightFilter": {
        "type": "object",
        "description": "Shared filter envelope for insight and export endpoints. Severities accept up to 3 values; team/channel/responder/incident filters accept up to 100 IDs each. The time range cannot exceed one year.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start time, Unix seconds. Must be greater than 0."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End time, Unix seconds. Must be greater than `start_time`."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by team IDs. At most 100 entries."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by channel IDs. At most 100 entries."
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by responder person IDs. At most 100 entries."
          },
          "severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info",
                "Ok"
              ]
            },
            "description": "Filter by severity. At most 3 entries."
          },
          "incident_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            },
            "description": "Filter by incident IDs (MongoDB ObjectIDs). At most 100 entries."
          },
          "query": {
            "type": "string",
            "description": "Full-text query applied to incident title and description."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Label filters (exact match)."
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "Custom-field filters (exact match)."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at"
            ],
            "description": "Field to sort the underlying incident set by."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending when `true`, descending otherwise."
          },
          "is_my_team": {
            "type": "boolean",
            "description": "Restrict results to teams the caller belongs to. When true and the caller has no teams, the result set is empty."
          },
          "time_zone": {
            "type": "string",
            "description": "IANA time zone name used to interpret the time range (e.g. `Asia/Shanghai`). Defaults to the account time zone."
          },
          "seconds_to_close_from": {
            "type": "integer",
            "format": "int64",
            "description": "Lower bound (inclusive) on time-to-close, in seconds."
          },
          "seconds_to_close_to": {
            "type": "integer",
            "format": "int64",
            "description": "Upper bound (exclusive) on time-to-close, in seconds. Must be greater than `seconds_to_close_from` when both are set."
          },
          "seconds_to_ack_from": {
            "type": "integer",
            "format": "int64",
            "description": "Lower bound (inclusive) on time-to-acknowledge, in seconds."
          },
          "seconds_to_ack_to": {
            "type": "integer",
            "format": "int64",
            "description": "Upper bound (exclusive) on time-to-acknowledge, in seconds. Must be greater than `seconds_to_ack_from` when both are set."
          },
          "export_fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "incident_id",
                "title",
                "severity",
                "progress",
                "channel_id",
                "channel_name",
                "team_id",
                "team_name",
                "created_at",
                "seconds_to_ack",
                "seconds_to_close",
                "closed_by",
                "engaged_seconds",
                "hours",
                "notifications",
                "interruptions",
                "acknowledgements",
                "assignments",
                "reassignments",
                "escalations",
                "manual_escalations",
                "timeout_escalations",
                "assigned_to",
                "responders",
                "description",
                "labels",
                "fields",
                "creator_id",
                "creator_name"
              ]
            },
            "description": "Subset of CSV column keys to include in the export. At most 50 entries. Only used by the export endpoints."
          },
          "description_html_to_text": {
            "type": "boolean",
            "description": "Strip HTML markup from the description column when exporting."
          },
          "include_ever_muted": {
            "type": "boolean",
            "description": "Include incidents that have ever been muted. By default, they are excluded."
          }
        }
      },
      "InsightQueryRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightFilter"
          },
          {
            "type": "object",
            "description": "Insight dimension-aggregation request. Extends InsightFilter with aggregation controls.",
            "properties": {
              "split_hours": {
                "type": "boolean",
                "description": "When true, metrics are split into `work`/`sleep`/`off` hour buckets."
              },
              "aggregate_unit": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month"
                ],
                "description": "Aggregate metrics into time buckets. When set, the time range must cover at least 24 hours; `day` additionally caps the range at 31 days."
              }
            }
          }
        ]
      },
      "InsightIncidentListRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightFilter"
          },
          {
            "type": "object",
            "description": "Paged incident list request. Extends InsightFilter with pagination.",
            "properties": {
              "p": {
                "type": "integer",
                "minimum": 1,
                "default": 1,
                "description": "Page number, starting at 1. Defaults to 1."
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "default": 20,
                "description": "Page size, between 1 and 100. Defaults to 20."
              },
              "search_after_ctx": {
                "type": "string",
                "description": "Cursor token returned by a previous page. Pass it back to fetch the next page."
              }
            }
          }
        ]
      },
      "InsightIncidentExportRequest": {
        "$ref": "#/components/schemas/InsightFilter"
      },
      "InsightTopkAlertByLabelRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InsightQueryRequest"
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "label": {
                "type": "string",
                "enum": [
                  "check",
                  "resource"
                ],
                "description": "Dimension to aggregate by."
              },
              "k": {
                "type": "integer",
                "description": "Number of top entries to return, between 1 and 100."
              },
              "orderby": {
                "type": "string",
                "enum": [
                  "total_alert_cnt",
                  "total_alert_event_cnt"
                ],
                "description": "Field to sort results by."
              },
              "asc": {
                "type": "boolean",
                "description": "Sort ascending when `true`, descending otherwise."
              }
            }
          }
        ]
      },
      "MetricsBase": {
        "type": "object",
        "description": "Shared dimension identifiers attached to every aggregated insight row.",
        "properties": {
          "hours": {
            "type": "string",
            "enum": [
              "work",
              "sleep",
              "off"
            ],
            "description": "Hour bucket when `split_hours` is enabled."
          },
          "ts": {
            "type": "integer",
            "format": "int64",
            "description": "Aggregation bucket start time, Unix seconds. Present when `aggregate_unit` is used."
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "responder_id": {
            "type": "integer",
            "format": "int64"
          },
          "account_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_name": {
            "type": "string"
          },
          "channel_name": {
            "type": "string"
          },
          "responder_name": {
            "type": "string"
          }
        }
      },
      "DimensionInsightItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MetricsBase"
          },
          {
            "type": "object",
            "description": "Aggregated incident + alert metrics for an account/team/channel bucket.",
            "properties": {
              "total_incident_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_acknowledged": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_auto_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_closed": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_reassigned": {
                "type": "integer",
                "format": "int64"
              },
              "total_interruptions": {
                "type": "integer",
                "format": "int64"
              },
              "total_notifications": {
                "type": "integer",
                "format": "int64"
              },
              "total_engaged_seconds": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_ack": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_close": {
                "type": "integer",
                "format": "int64"
              },
              "mean_seconds_to_ack": {
                "type": "number",
                "format": "double"
              },
              "mean_seconds_to_close": {
                "type": "number",
                "format": "double"
              },
              "noise_reduction_pct": {
                "type": "number",
                "format": "double"
              },
              "acknowledgement_pct": {
                "type": "number",
                "format": "double"
              },
              "total_alert_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_alert_event_cnt": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "ResponderInsightItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MetricsBase"
          },
          {
            "type": "object",
            "description": "Aggregated incident metrics for a single responder.",
            "properties": {
              "total_incident_cnt": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_acknowledged": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_reassigned": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_timeout_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_incidents_manually_escalated": {
                "type": "integer",
                "format": "int64"
              },
              "total_interruptions": {
                "type": "integer",
                "format": "int64"
              },
              "total_notifications": {
                "type": "integer",
                "format": "int64"
              },
              "total_engaged_seconds": {
                "type": "integer",
                "format": "int64"
              },
              "total_seconds_to_ack": {
                "type": "integer",
                "format": "int64"
              },
              "mean_seconds_to_ack": {
                "type": "number",
                "format": "double"
              },
              "acknowledgement_pct": {
                "type": "number",
                "format": "double"
              }
            }
          }
        ]
      },
      "DimensionInsightResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DimensionInsightItem"
            }
          }
        }
      },
      "ResponderInsightResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponderInsightItem"
            }
          }
        }
      },
      "IncidentRawItem": {
        "type": "object",
        "description": "Raw incident row returned by the analytics incident list, with per-incident handling metrics attached.",
        "properties": {
          "incident_id": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "team_name": {
            "type": "string"
          },
          "channel_id": {
            "type": "integer",
            "format": "int64"
          },
          "channel_name": {
            "type": "string"
          },
          "progress": {
            "type": "string",
            "description": "Incident progress state — one of `Triggered`, `Processing`, `Closed`."
          },
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Warning",
              "Info",
              "Ok"
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "closed_by": {
            "type": "string",
            "enum": [
              "auto",
              "timeout",
              "manually"
            ]
          },
          "seconds_to_ack": {
            "type": "integer",
            "format": "int64"
          },
          "seconds_to_close": {
            "type": "integer",
            "format": "int64"
          },
          "engaged_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "hours": {
            "type": "string"
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Responder entry (see Incident module for full shape)."
            }
          },
          "assigned_to": {
            "type": "object",
            "description": "Current assignment target for the incident.",
            "properties": {
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "Member IDs assigned directly to this incident."
              },
              "escalate_rule_id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "description": "Escalation rule ID (MongoDB ObjectID) driving the assignment."
              },
              "escalate_rule_name": {
                "type": "string",
                "description": "Display name of the escalation rule."
              },
              "layer_idx": {
                "type": "integer",
                "description": "Current level index within the escalation rule."
              },
              "type": {
                "type": "string",
                "enum": [
                  "assign",
                  "reassign",
                  "escalate",
                  "reopen"
                ],
                "description": "Assignment type."
              },
              "assigned_at": {
                "type": "integer",
                "format": "int64",
                "description": "Unix timestamp (seconds) when this assignment was made."
              },
              "id": {
                "type": "string",
                "description": "Internal assignment record ID."
              }
            }
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "fields": {
            "type": "object",
            "additionalProperties": true
          },
          "notifications": {
            "type": "integer",
            "format": "int64"
          },
          "interruptions": {
            "type": "integer",
            "format": "int64"
          },
          "assignments": {
            "type": "integer",
            "format": "int64"
          },
          "reassignments": {
            "type": "integer",
            "format": "int64"
          },
          "acknowledgements": {
            "type": "integer",
            "format": "int64"
          },
          "escalations": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_escalations": {
            "type": "integer",
            "format": "int64"
          },
          "manual_escalations": {
            "type": "integer",
            "format": "int64"
          },
          "creator_id": {
            "type": "integer",
            "format": "int64"
          },
          "creator_name": {
            "type": "string"
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID of the incident owner."
          },
          "owner_name": {
            "type": "string",
            "description": "Display name of the incident owner."
          },
          "closer_id": {
            "type": "integer",
            "format": "int64",
            "description": "Member ID of the person who closed the incident."
          },
          "closer_name": {
            "type": "string",
            "description": "Display name of the person who closed the incident."
          },
          "snoozed_before": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds until which the incident is snoozed."
          },
          "ever_muted": {
            "type": "boolean",
            "description": "Whether the incident has ever been muted."
          },
          "frequency": {
            "type": "string",
            "enum": [
              "frequent",
              "rare"
            ],
            "description": "Incident frequency classification."
          }
        }
      },
      "InsightIncidentListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching incidents."
          },
          "has_next_page": {
            "type": "boolean"
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor token to fetch the next page. Pass it back in the next request's `search_after_ctx`."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncidentRawItem"
            }
          }
        }
      },
      "InsightAlertByLabelItem": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Aggregation key value (check name or resource identifier)."
          },
          "hours": {
            "type": "string",
            "description": "Hour bucket when `split_hours` is enabled."
          },
          "total_alert_cnt": {
            "type": "integer",
            "format": "int64"
          },
          "total_alert_event_cnt": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "InsightAlertByLabelResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightAlertByLabelItem"
            }
          }
        }
      },
      "StatusPageChangeItem": {
        "type": "object",
        "description": "A status page event (incident or maintenance).",
        "required": [
          "change_id",
          "type",
          "title"
        ],
        "properties": {
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Event ID."
          },
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Parent status page ID."
          },
          "type": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "Event type."
          },
          "title": {
            "type": "string",
            "description": "Event title."
          },
          "description": {
            "type": "string",
            "description": "Event description (Markdown)."
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`."
          },
          "affected_components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AffectedStatusPageComponentItem"
            },
            "description": "Components currently affected by this event, with their resulting status."
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs responsible for this event."
          },
          "linked_change_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked event IDs (related incidents, deployments, etc.)."
          },
          "start_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Event start time in unix seconds."
          },
          "close_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Scheduled close time in unix seconds. Set for retrospective and maintenance events."
          },
          "is_retrospective": {
            "type": "boolean",
            "description": "Whether this event is a retrospective (historical) one."
          },
          "updates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageChangeUpdateItem"
            },
            "description": "Timeline updates attached to this event, ordered by time."
          },
          "notify_subscribers": {
            "type": "boolean",
            "description": "Whether subscribers were notified about this event."
          },
          "auto_update_by_schedule": {
            "type": "boolean",
            "description": "Maintenance only: whether the status advances automatically based on the scheduled window."
          }
        }
      },
      "AffectedStatusPageComponentItem": {
        "type": "object",
        "description": "A status page component currently affected by an event, embedding component metadata plus its resulting status.",
        "required": [
          "name",
          "status"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "Component ID."
          },
          "section_id": {
            "type": "string",
            "description": "Parent section ID."
          },
          "name": {
            "type": "string",
            "description": "Component display name."
          },
          "description": {
            "type": "string",
            "description": "Component description."
          },
          "available_since_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Timestamp when the component was first available, in unix seconds."
          },
          "order_id": {
            "type": "integer",
            "format": "int64",
            "description": "Display order within its section."
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "When true, uptime data is hidden from summary responses."
          },
          "hide_all": {
            "type": "boolean",
            "description": "When true, the component is hidden entirely from summary endpoints."
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage",
              "full_outage",
              "under_maintenance"
            ],
            "description": "Current component status resulting from the event."
          }
        }
      },
      "StatusPageChangeUpdateItem": {
        "type": "object",
        "description": "A single timeline update on a status page event.",
        "required": [
          "update_id",
          "at_seconds"
        ],
        "properties": {
          "update_id": {
            "type": "string",
            "description": "Update ID."
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Update timestamp in unix seconds."
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "Event status after this update. Omitted when the update does not change the overall status."
          },
          "description": {
            "type": "string",
            "description": "Update description (Markdown)."
          },
          "component_changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentChangeItem"
            },
            "description": "Component status transitions applied by this update."
          }
        }
      },
      "StatusPageComponentChangeItem": {
        "type": "object",
        "description": "Component status transition applied in a timeline update.",
        "required": [
          "component_id",
          "status"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "Component ID."
          },
          "component_name": {
            "type": "string",
            "description": "Component display name. Populated by the backend on read; ignored on write."
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage",
              "full_outage",
              "under_maintenance"
            ],
            "description": "New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`."
          }
        }
      },
      "StatusPageChangeListResponse": {
        "type": "object",
        "description": "List of status page events.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageChangeItem"
            }
          }
        }
      },
      "StatusPageChangeCreateResponse": {
        "type": "object",
        "description": "Result of creating a status page event.",
        "required": [
          "change_id",
          "change_name"
        ],
        "properties": {
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Newly created event ID."
          },
          "change_name": {
            "type": "string",
            "description": "Event title (echoed from the request)."
          }
        }
      },
      "UpdateStatusPageChangeRequest": {
        "type": "object",
        "description": "Parameters for updating the editable fields of a status page event.",
        "required": [
          "page_id",
          "change_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Target event ID."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "New event title, up to 255 characters. Omit to keep the existing value."
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs responsible for this event. Pass the full replacement list."
          },
          "linked_changes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked event IDs. Pass the full replacement list."
          }
        }
      },
      "DeleteStatusPageChangeRequest": {
        "type": "object",
        "description": "Parameters for deleting a status page event.",
        "required": [
          "page_id",
          "change_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Target event ID."
          }
        }
      },
      "StatusPageChangeTimelineCreateResponse": {
        "type": "object",
        "description": "Result of appending a timeline update to a status page event.",
        "required": [
          "update_id"
        ],
        "properties": {
          "update_id": {
            "type": "string",
            "description": "Newly created update ID."
          }
        }
      },
      "UpdateStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "Parameters for updating an existing timeline entry on a status page event.",
        "required": [
          "page_id",
          "change_id",
          "update_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Parent event ID."
          },
          "update_id": {
            "type": "string",
            "description": "Target timeline update ID."
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "New update timestamp in unix seconds."
          },
          "description": {
            "type": "string",
            "description": "New update description (Markdown)."
          }
        }
      },
      "DeleteStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "Parameters for deleting a timeline entry on a status page event.",
        "required": [
          "page_id",
          "change_id",
          "update_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Parent event ID."
          },
          "update_id": {
            "type": "string",
            "description": "Timeline update ID to delete."
          }
        }
      },
      "StatusPageSubscriberListResponse": {
        "type": "object",
        "description": "Paginated list of status page subscribers.",
        "required": [
          "total",
          "has_next_page",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching subscribers."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "Whether there is at least one more page after the current one."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedStatusPageSubscriberItem"
            }
          }
        }
      },
      "ExportedStatusPageSubscriberItem": {
        "type": "object",
        "description": "A status page subscriber, as returned by the subscriber list and export endpoints.",
        "required": [
          "recipient",
          "method",
          "components",
          "all"
        ],
        "properties": {
          "recipient": {
            "type": "string",
            "description": "Subscriber recipient: email address for public pages, user ID for internal pages."
          },
          "method": {
            "type": "string",
            "enum": [
              "email",
              "im"
            ],
            "description": "Subscription delivery method."
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentItem"
            },
            "description": "Components this subscriber has subscribed to."
          },
          "all": {
            "type": "boolean",
            "description": "Whether the subscriber is subscribed to all components."
          },
          "locale": {
            "type": "string",
            "description": "Preferred locale for notifications."
          }
        }
      },
      "StatusPageComponentItem": {
        "type": "object",
        "description": "A status page component.",
        "required": [
          "name"
        ],
        "properties": {
          "component_id": {
            "type": "string",
            "description": "Component ID."
          },
          "section_id": {
            "type": "string",
            "description": "Parent section ID."
          },
          "name": {
            "type": "string",
            "description": "Component display name."
          },
          "description": {
            "type": "string",
            "description": "Component description."
          },
          "available_since_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Timestamp when the component was first available, in unix seconds."
          },
          "order_id": {
            "type": "integer",
            "format": "int64",
            "description": "Display order within its section."
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "When true, uptime data is hidden from summary responses."
          },
          "hide_all": {
            "type": "boolean",
            "description": "When true, the component is hidden entirely from summary endpoints."
          }
        }
      },
      "ImportStatusPageSubscribersRequest": {
        "type": "object",
        "description": "Parameters for bulk-importing subscribers. Each subscriber must have a non-empty `recipient` (≤255 chars) and subscribe to at least one component, change, or set `all: true`.",
        "required": [
          "page_id",
          "method"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Target status page ID."
          },
          "method": {
            "type": "string",
            "enum": [
              "email",
              "im"
            ],
            "description": "Subscription method. `email` is only valid for public pages; `im` is only valid for internal pages."
          },
          "subscribers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportStatusPageSubscriberItem"
            },
            "description": "Subscribers to import."
          }
        }
      },
      "ImportStatusPageSubscriberItem": {
        "type": "object",
        "description": "A single subscriber to import.",
        "required": [
          "recipient"
        ],
        "properties": {
          "recipient": {
            "type": "string",
            "maxLength": 255,
            "description": "Email address (for public pages) or user ID (for internal pages)."
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Component IDs the subscriber should receive notifications for."
          },
          "change_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Specific event IDs the subscriber should receive notifications for."
          },
          "all": {
            "type": "boolean",
            "description": "When true, the subscriber receives notifications for all components. Must be true when `component_ids` and `change_ids` are both empty."
          },
          "locale": {
            "type": "string",
            "description": "Preferred locale for notifications. Defaults to the request locale when omitted."
          }
        }
      },
      "ExportStatusPageSubscribersRequest": {
        "type": "object",
        "description": "Parameters for exporting a status page subscriber list.",
        "required": [
          "page_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional component IDs to filter subscribers by."
          }
        }
      },
      "StatusPageSubscriberExportResponse": {
        "type": "string",
        "format": "binary",
        "description": "A CSV file (Content-Type: text/csv; charset=utf-8) containing columns: Method, Recipient, Components, Subscribe All, Locale."
      },
      "MigrateStatusPageStructureRequest": {
        "type": "object",
        "description": "Parameters for starting an Atlassian Statuspage structure and history migration job.",
        "required": [
          "api_key",
          "source_page_id"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Atlassian Statuspage API key with access to the source page."
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage source page ID."
          },
          "url_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Target URL name for the migrated status page. When omitted, the source page's URL name is reused."
          }
        }
      },
      "MigrateStatusPageEmailSubscribersRequest": {
        "type": "object",
        "description": "Parameters for starting an Atlassian Statuspage email subscriber migration job.",
        "required": [
          "api_key",
          "source_page_id",
          "target_page_id"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Atlassian Statuspage API key with access to the source page."
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage source page ID."
          },
          "target_page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Flashduty target status page ID that will receive the imported subscribers."
          }
        }
      },
      "StatusPageMigrationStartResponse": {
        "type": "object",
        "description": "Result of starting a migration job.",
        "required": [
          "job_id"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "Migration job ID. Use this to poll status or request cancellation."
          }
        }
      },
      "StatusPageMigrationJob": {
        "type": "object",
        "description": "A migration job's current state and progress.",
        "required": [
          "job_id",
          "account_id",
          "source_page_id",
          "target_page_id",
          "phase",
          "status",
          "progress",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "Migration job ID."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owner account ID."
          },
          "source_page_id": {
            "type": "string",
            "description": "Atlassian Statuspage source page ID."
          },
          "target_page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Flashduty target status page ID. Set once the job produces one, or supplied up front for subscriber migration."
          },
          "phase": {
            "type": "string",
            "enum": [
              "structure",
              "history",
              "subscribers"
            ],
            "description": "Current migration phase."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current job status."
          },
          "progress": {
            "$ref": "#/components/schemas/StatusPageMigrationProgress",
            "description": "Per-entity progress counters."
          },
          "error": {
            "type": "string",
            "description": "Terminal error message when `status` is `failed`."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Job creation time, unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last status update time, unix seconds."
          }
        }
      },
      "StatusPageMigrationProgress": {
        "type": "object",
        "description": "Progress counters for a migration job.",
        "required": [
          "total_steps",
          "completed_steps",
          "components_imported",
          "sections_imported",
          "incidents_imported",
          "maintenances_imported",
          "subscribers_imported",
          "templates_imported",
          "subscribers_skipped"
        ],
        "properties": {
          "total_steps": {
            "type": "integer",
            "description": "Total steps this job will perform."
          },
          "completed_steps": {
            "type": "integer",
            "description": "Steps completed so far."
          },
          "components_imported": {
            "type": "integer"
          },
          "sections_imported": {
            "type": "integer"
          },
          "incidents_imported": {
            "type": "integer"
          },
          "maintenances_imported": {
            "type": "integer"
          },
          "subscribers_imported": {
            "type": "integer"
          },
          "templates_imported": {
            "type": "integer"
          },
          "subscribers_skipped": {
            "type": "integer",
            "description": "Number of subscribers skipped (e.g. because they would create duplicates)."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-fatal warnings recorded during the job."
          }
        }
      },
      "CancelStatusPageMigrationRequest": {
        "type": "object",
        "description": "Parameters for cancelling an in-progress migration job.",
        "required": [
          "job_id"
        ],
        "properties": {
          "job_id": {
            "type": "string",
            "description": "Migration job ID."
          }
        }
      },
      "CreateStatusPageChangeRequest": {
        "type": "object",
        "description": "Parameters for creating a status page incident or maintenance event. The first update must contain `component_changes` to define affected components; retrospective events require at least 2 updates.",
        "required": [
          "page_id",
          "type",
          "title",
          "status",
          "updates"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "type": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "Event type."
          },
          "title": {
            "type": "string",
            "maxLength": 255,
            "description": "Event title, up to 255 characters."
          },
          "description": {
            "type": "string",
            "description": "Event description (Markdown). Required by the validator."
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "Initial event status. `investigating`/`identified`/`monitoring`/`resolved` apply to incidents; `scheduled`/`ongoing`/`completed` apply to maintenances."
          },
          "start_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Event start time in unix seconds. Defaults to now when omitted."
          },
          "responders": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Member IDs responsible for this event."
          },
          "linked_changes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked change IDs (related incidents, deployments, etc.)."
          },
          "close_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Scheduled close time for retrospective events. Must be greater than `start_at_seconds`."
          },
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One timeline update entry.",
              "properties": {
                "update_id": {
                  "type": "string",
                  "description": "Update ID. Server-assigned on create; supply when replaying historical updates."
                },
                "at_seconds": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Update timestamp in unix seconds."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "investigating",
                    "identified",
                    "monitoring",
                    "resolved",
                    "scheduled",
                    "ongoing",
                    "completed"
                  ],
                  "description": "Change status after this update. Omit if the overall status does not change."
                },
                "description": {
                  "type": "string",
                  "description": "Update description (Markdown)."
                },
                "component_changes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "component_id",
                      "status"
                    ],
                    "properties": {
                      "component_id": {
                        "type": "string",
                        "description": "Component ID."
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "operational",
                          "degraded",
                          "partial_outage",
                          "full_outage",
                          "under_maintenance"
                        ],
                        "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances."
                      }
                    }
                  },
                  "description": "Component status transitions applied by this update."
                }
              }
            },
            "description": "Timeline updates. Immediate events normally pass one update; retrospective events must pass all historical updates."
          },
          "notify_subscribers": {
            "type": "boolean",
            "description": "Notify subscribers about this event and all its updates."
          },
          "auto_update_by_schedule": {
            "type": "boolean",
            "description": "Maintenance only: automatically advance the status based on the scheduled window."
          },
          "is_retrospective": {
            "type": "boolean",
            "description": "Mark this event as a retrospective (historical) one."
          }
        }
      },
      "CreateStatusPageChangeTimelineRequest": {
        "type": "object",
        "description": "Parameters for appending an update to a status page event timeline.",
        "required": [
          "page_id",
          "change_id",
          "status"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "change_id": {
            "type": "integer",
            "format": "int64",
            "description": "Target event ID."
          },
          "at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Update timestamp in unix seconds. Defaults to now when omitted."
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "ongoing",
              "completed"
            ],
            "description": "New event status. Must match the event type. When the status transitions to `resolved` or `completed`, all referenced components must become `operational`."
          },
          "description": {
            "type": "string",
            "description": "Update description (Markdown). Required."
          },
          "component_changes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "component_id",
                "status"
              ],
              "properties": {
                "component_id": {
                  "type": "string",
                  "description": "Component ID."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "operational",
                    "degraded",
                    "partial_outage",
                    "full_outage",
                    "under_maintenance"
                  ],
                  "description": "New component status. `operational`/`degraded`/`partial_outage`/`full_outage` apply to incidents; `operational`/`under_maintenance` apply to maintenances."
                }
              }
            },
            "description": "Component status transitions applied by this update. Component IDs must be unique."
          }
        }
      },
      "RuleListRequest": {
        "type": "object",
        "description": "Filter parameter for listing rules in a folder.",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Folder ID. 0 to list all accessible rules."
          }
        }
      },
      "AlertRuleBasic": {
        "type": "object",
        "description": "Basic alert rule information for list views.",
        "required": [
          "id",
          "account_id",
          "folder_id",
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern",
          "delay_seconds",
          "creator_id",
          "creator_name",
          "updater_id",
          "updater_name",
          "created_at",
          "updated_at",
          "triggered"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Unique rule ID."
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID."
          },
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Folder ID."
          },
          "name": {
            "type": "string",
            "description": "Rule name."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom labels."
          },
          "ds_type": {
            "type": "string",
            "description": "Data source type, e.g. `prometheus`."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the rule is enabled."
          },
          "debug_log_enabled": {
            "type": "boolean",
            "description": "Whether debug logging is enabled."
          },
          "cron_pattern": {
            "type": "string",
            "description": "5-field cron schedule, e.g. `* * * * *`."
          },
          "delay_seconds": {
            "type": "integer",
            "description": "Evaluation delay in seconds."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64"
          },
          "updater_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "triggered": {
            "type": "boolean",
            "description": "True if the rule currently has active alerts."
          }
        }
      },
      "RuleBasicListResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AlertRuleBasic"
        },
        "description": "List of alert rules (basic info)."
      },
      "RuleConfigs": {
        "type": "object",
        "description": "Rule evaluation configuration.",
        "properties": {
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Query identifier (letter, e.g. `A`). The name `R` is reserved and must not be used."
                },
                "expr": {
                  "type": "string",
                  "description": "Query expression."
                },
                "label_fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "value_fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "args": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "relate_queries": {
            "type": "array",
            "description": "Optional auxiliary queries whose results are attached to alert events as context. Each entry must have a unique `name` (not duplicating any query name) and a non-empty `expr`.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Relate-query identifier."
                },
                "expr": {
                  "type": "string",
                  "description": "Query expression."
                },
                "args": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "check_threshold": {
            "type": "object",
            "description": "Threshold check configuration.",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "critical": {
                "type": "string"
              },
              "warning": {
                "type": "string"
              },
              "info": {
                "type": "string"
              },
              "recovery": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "invert",
                      "threshold",
                      "ql"
                    ]
                  },
                  "condition": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "check_anydata": {
            "type": "object",
            "description": "Any-data check configuration. Fires when the query returns any data rows.",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "Critical",
                  "Warning",
                  "Info"
                ]
              },
              "recovery": {
                "type": "object",
                "description": "Recovery condition for any-data check. If omitted or `mode` is empty, treated as `nodata`.",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "nodata",
                      "ql"
                    ],
                    "description": "`nodata` = recover when the query returns no data; `ql` = recover when the `condition` expression evaluates to true. When `mode` is `ql`, only a single query (`name=A`) is permitted."
                  },
                  "condition": {
                    "type": "string",
                    "description": "Recovery expression. Required when `mode` is `ql`."
                  },
                  "args": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "check_nodata": {
            "type": "object",
            "description": "No-data check configuration.",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "alerting_check_times": {
                "type": "integer"
              },
              "recovery_check_times": {
                "type": "integer"
              },
              "push_recovery_event": {
                "type": "boolean"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "Critical",
                  "Warning",
                  "Info"
                ]
              },
              "resolve_timeout": {
                "type": "integer",
                "description": "Auto-resolve after N seconds."
              }
            }
          }
        }
      },
      "AlertRule": {
        "type": "object",
        "description": "Full alert rule configuration.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Folder the rule belongs to."
          },
          "name": {
            "type": "string",
            "description": "Rule name."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom labels."
          },
          "ds_type": {
            "type": "string",
            "description": "Data source type."
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Data source name patterns (supports wildcards)."
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Specific data source IDs."
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string",
            "description": "5-field cron schedule."
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "description": "Time windows when the rule is active.",
            "items": {
              "type": "object",
              "properties": {
                "days": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "Days of week (0=Sunday)."
                },
                "stime": {
                  "type": "string",
                  "description": "Start time, e.g. `09:00`."
                },
                "etime": {
                  "type": "string",
                  "description": "End time, e.g. `18:00`."
                }
              }
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description_type": {
            "type": "string",
            "enum": [
              "text",
              "markdown"
            ]
          },
          "description": {
            "type": "string"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Channel IDs to send alerts to."
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64",
            "description": "Notification repeat interval in seconds."
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64",
            "description": "Max number of repeat notifications."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "updater_id": {
            "type": "integer",
            "format": "uint64"
          },
          "updater_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AlertRuleInfoResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AlertRule"
          }
        ],
        "description": "Full alert rule returned by the info endpoint. All server-assigned fields are guaranteed present.",
        "required": [
          "id",
          "account_id",
          "folder_id",
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern",
          "delay_seconds",
          "creator_id",
          "creator_name",
          "updater_id",
          "updater_name",
          "created_at",
          "updated_at"
        ]
      },
      "RuleIDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Rule ID."
          }
        }
      },
      "AuditRecordIDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Audit record ID — the `id` of an audit row returned by `POST /monit/rule/audits`, NOT the rule ID. Passing a rule ID returns HTTP 400."
          }
        }
      },
      "RuleIDsRequest": {
        "type": "object",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Rule IDs."
          }
        }
      },
      "RuleEmptyRequest": {
        "type": "object",
        "description": "No parameters required.",
        "additionalProperties": false
      },
      "RuleEmptyResponse": {
        "type": "object",
        "description": "Empty response on success.",
        "additionalProperties": false
      },
      "RuleFolderIDRequest": {
        "type": "object",
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Folder ID. 0 for all."
          }
        }
      },
      "RuleFieldsUpdateRequest": {
        "type": "object",
        "required": [
          "ids",
          "fields"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Rule IDs to update."
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Field names to update."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "ds_type": {
            "type": "string"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "cron_pattern": {
            "type": "string"
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RuleMoveRequest": {
        "type": "object",
        "required": [
          "ids",
          "dest_folder_id"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Rule IDs to move."
          },
          "dest_folder_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Destination folder ID."
          }
        }
      },
      "RuleImportRequest": {
        "type": "array",
        "description": "Array of alert rule export objects to import.",
        "items": {
          "$ref": "#/components/schemas/AlertRule"
        }
      },
      "RuleImportResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/NameMessage"
        },
        "description": "Import result for each rule."
      },
      "AlertRuleStatus": {
        "type": "object",
        "description": "Rule trigger status for a folder node.",
        "required": [
          "folder_id",
          "rule_total",
          "triggered_rule_count"
        ],
        "properties": {
          "folder_id": {
            "type": "integer",
            "format": "uint64"
          },
          "folder_name": {
            "type": "string"
          },
          "rule_total": {
            "type": "integer",
            "format": "int64",
            "description": "Total rules in the folder family."
          },
          "triggered_rule_count": {
            "type": "integer",
            "format": "int64",
            "description": "Rules with active alerts."
          }
        }
      },
      "RuleStatusResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AlertRuleStatus"
        }
      },
      "AlertRuleAudit": {
        "type": "object",
        "description": "An audit record capturing a rule snapshot at a point in time.",
        "required": [
          "id",
          "account_id",
          "alert_rule_id",
          "action",
          "creator_id",
          "creator_name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Audit record ID."
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "alert_rule_id": {
            "type": "integer",
            "format": "uint64",
            "description": "ID of the alert rule this record belongs to."
          },
          "action": {
            "type": "string",
            "description": "Action performed, e.g. `create`, `update`."
          },
          "content": {
            "type": "string",
            "description": "JSON string of the full rule snapshot at audit time. Populated on `/monit/rule/audit/detail`, omitted on list responses."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64"
          },
          "creator_name": {
            "type": "string"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RuleAuditListResponse": {
        "type": "array",
        "description": "Audit records for a rule, ordered by creation time descending. The `content` field is omitted.",
        "items": {
          "$ref": "#/components/schemas/AlertRuleAudit"
        }
      },
      "DSType": {
        "type": "object",
        "description": "A datasource type definition usable by alert rules.",
        "required": [
          "id",
          "name",
          "ident",
          "account_id",
          "weight"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "name": {
            "type": "string",
            "description": "Display name, e.g. `Prometheus`."
          },
          "ident": {
            "type": "string",
            "description": "Identifier used as the `ds_type` of rules, e.g. `prometheus`."
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Owning account ID. `0` for global types."
          },
          "weight": {
            "type": "integer",
            "description": "Display order weight; higher appears first."
          }
        }
      },
      "RuleDsTypesResponse": {
        "type": "array",
        "description": "Datasource types available to the account — global types plus account-scoped types.",
        "items": {
          "$ref": "#/components/schemas/DSType"
        }
      },
      "AlertRuleCounter": {
        "type": "object",
        "description": "One historical snapshot of the account's alert rule total.",
        "required": [
          "id",
          "account_id",
          "num",
          "clock"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64"
          },
          "account_id": {
            "type": "integer",
            "format": "uint64"
          },
          "num": {
            "type": "integer",
            "format": "int64",
            "description": "Rule count at the sample time."
          },
          "clock": {
            "type": "integer",
            "format": "int64",
            "description": "Sample timestamp, Unix epoch seconds."
          }
        }
      },
      "RuleCounterTotalResponse": {
        "type": "array",
        "description": "Historical rule-count samples ordered by `clock` ascending.",
        "items": {
          "$ref": "#/components/schemas/AlertRuleCounter"
        }
      },
      "RuleCounterNodeResponse": {
        "type": "object",
        "description": "Map of top-level folder name to rule count.",
        "additionalProperties": {
          "type": "integer",
          "format": "int64"
        }
      },
      "RuleCounterChannelResponse": {
        "type": "object",
        "description": "Map of channel name to rule count. Unresolved channel IDs appear as stringified IDs.",
        "additionalProperties": {
          "type": "integer",
          "format": "int64"
        }
      },
      "NameMessage": {
        "type": "object",
        "description": "Per-item result for batch rule operations.",
        "required": [
          "name",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Rule name."
          },
          "message": {
            "type": "string",
            "description": "Empty on success, error message on failure."
          }
        }
      },
      "RuleNameMessageListResponse": {
        "type": "array",
        "description": "Per-rule batch-operation results.",
        "items": {
          "$ref": "#/components/schemas/NameMessage"
        }
      },
      "AlertRuleExport": {
        "type": "object",
        "description": "Portable alert rule representation for import/export. Omits identifying fields like `id`, `account_id`, and audit metadata.",
        "required": [
          "name",
          "ds_type",
          "enabled",
          "debug_log_enabled",
          "cron_pattern"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "ds_type": {
            "type": "string"
          },
          "ds_list": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ds_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "debug_log_enabled": {
            "type": "boolean"
          },
          "rule_configs": {
            "$ref": "#/components/schemas/RuleConfigs"
          },
          "cron_pattern": {
            "type": "string"
          },
          "delay_seconds": {
            "type": "integer"
          },
          "enabled_times": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnabledTime"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description_type": {
            "type": "string",
            "enum": [
              "text",
              "markdown"
            ]
          },
          "description": {
            "type": "string"
          },
          "repeat_interval": {
            "type": "integer",
            "format": "int64"
          },
          "repeat_total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AlertRuleExportListResponse": {
        "type": "array",
        "description": "List of exported rule configurations, compatible with `POST /monit/rule/import`.",
        "items": {
          "$ref": "#/components/schemas/AlertRuleExport"
        }
      },
      "EnabledTime": {
        "type": "object",
        "description": "Time window in which the rule is active.",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Days of week, 0 = Sunday."
          },
          "stime": {
            "type": "string",
            "description": "Start time, e.g. `09:00`."
          },
          "etime": {
            "type": "string",
            "description": "End time, e.g. `18:00`."
          }
        }
      },
      "DataSourceListRequest": {
        "type": "object",
        "description": "Filter parameters for listing datasources.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Filter by datasource type identifier. Omit to return all types. Allowed values: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`."
          }
        }
      },
      "DSPayload": {
        "type": "object",
        "description": "Type-specific datasource configuration. Include only the block matching `type_ident`.",
        "properties": {
          "prometheus": {
            "$ref": "#/components/schemas/DSPrometheusConfig"
          },
          "loki": {
            "$ref": "#/components/schemas/DSLokiConfig"
          },
          "mysql": {
            "$ref": "#/components/schemas/DSMySQLConfig"
          },
          "oracle": {
            "$ref": "#/components/schemas/DSOracleConfig"
          },
          "postgres": {
            "$ref": "#/components/schemas/DSPostgresConfig"
          },
          "clickhouse": {
            "$ref": "#/components/schemas/DSClickHouseConfig"
          },
          "elasticsearch": {
            "$ref": "#/components/schemas/DSElasticSearchConfig"
          },
          "sls": {
            "$ref": "#/components/schemas/DSSLSConfig"
          },
          "victorialogs": {
            "$ref": "#/components/schemas/DSVictoriaLogsConfig"
          }
        }
      },
      "DSPrometheusConfig": {
        "type": "object",
        "description": "Prometheus datasource configuration. TLS fields are inherited from TLSClientConfig.",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean",
            "description": "Enable HTTP Basic Auth."
          },
          "basic_auth_username": {
            "type": "string",
            "description": "Basic auth username."
          },
          "basic_auth_password": {
            "type": "string",
            "description": "Basic auth password."
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Custom HTTP headers in `Key: Value` format."
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Custom query parameters in `key=value` format."
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSLokiConfig": {
        "type": "object",
        "description": "Loki datasource configuration. TLS fields are inherited from TLSClientConfig.",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean"
          },
          "basic_auth_username": {
            "type": "string"
          },
          "basic_auth_password": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSMySQLConfig": {
        "type": "object",
        "description": "MySQL datasource configuration. TLS fields are inherited from TLSClientConfig.",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer",
            "description": "Maximum open connections."
          },
          "idle_conns": {
            "type": "integer",
            "description": "Maximum idle connections."
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Connection maximum lifetime in seconds."
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64",
            "description": "Query timeout in milliseconds."
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSOracleConfig": {
        "type": "object",
        "description": "Oracle datasource configuration.",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Extra connection options as key-value pairs."
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "DSPostgresConfig": {
        "type": "object",
        "description": "PostgreSQL datasource configuration.",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          }
        }
      },
      "DSClickHouseConfig": {
        "type": "object",
        "description": "ClickHouse datasource configuration. TLS fields are inherited from TLSClientConfig.",
        "properties": {
          "database": {
            "type": "string",
            "description": "Default database for authentication."
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "open_conns": {
            "type": "integer"
          },
          "idle_conns": {
            "type": "integer"
          },
          "lifetime_seconds": {
            "type": "integer",
            "format": "int64"
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "max_execution_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Max query execution time in seconds."
          },
          "dial_timeout_mills": {
            "type": "integer",
            "format": "int64",
            "description": "Dial timeout in milliseconds."
          },
          "tls_enabled": {
            "type": "boolean"
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DSElasticSearchConfig": {
        "type": "object",
        "description": "Elasticsearch datasource configuration.",
        "properties": {
          "deployment": {
            "type": "string",
            "enum": [
              "cloud",
              "self-managed"
            ],
            "description": "Deployment type. `cloud` uses Elastic Cloud; `self-managed` uses a self-hosted cluster."
          },
          "timeout_mills": {
            "type": "integer",
            "format": "int64"
          },
          "cloud_id": {
            "type": "string",
            "description": "Elastic Cloud deployment ID. Only for `cloud` deployment."
          },
          "api_key": {
            "type": "string",
            "description": "Elastic Cloud API key. Only for `cloud` deployment."
          },
          "username": {
            "type": "string",
            "description": "Username for `self-managed` deployment."
          },
          "password": {
            "type": "string"
          },
          "service_token": {
            "type": "string",
            "description": "Service token; overrides username/password if set."
          },
          "tls_ca": {
            "type": "string"
          },
          "certificate_fingerprint": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DSSLSConfig": {
        "type": "object",
        "description": "Alibaba Cloud SLS datasource configuration.",
        "properties": {
          "access_key_id": {
            "type": "string",
            "description": "Alibaba Cloud Access Key ID."
          },
          "access_key_secret": {
            "type": "string",
            "description": "Alibaba Cloud Access Key Secret."
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Custom HTTP headers."
          }
        }
      },
      "DSVictoriaLogsConfig": {
        "type": "object",
        "description": "VictoriaLogs datasource configuration. TLS fields are inherited from TLSClientConfig.",
        "properties": {
          "basic_auth_enabled": {
            "type": "boolean"
          },
          "basic_auth_username": {
            "type": "string"
          },
          "basic_auth_password": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tls_ca": {
            "type": "string"
          },
          "tls_cert": {
            "type": "string"
          },
          "tls_key": {
            "type": "string"
          },
          "tls_key_pwd": {
            "type": "string"
          },
          "tls_skip_verify": {
            "type": "boolean"
          },
          "tls_server_name": {
            "type": "string"
          },
          "tls_min_version": {
            "type": "string"
          },
          "tls_max_version": {
            "type": "string"
          }
        }
      },
      "DataSourceItem": {
        "type": "object",
        "description": "A monitoring datasource.",
        "required": [
          "id",
          "account_id",
          "type_ident",
          "name",
          "enabled",
          "note",
          "address",
          "edge_cluster_name",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Unique datasource ID."
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID."
          },
          "type_ident": {
            "type": "string",
            "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`."
          },
          "name": {
            "type": "string",
            "description": "Datasource display name."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the datasource is active."
          },
          "note": {
            "type": "string",
            "description": "Optional description."
          },
          "address": {
            "type": "string",
            "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix."
          },
          "payload": {
            "$ref": "#/components/schemas/DSPayload"
          },
          "edge_cluster_name": {
            "type": "string",
            "description": "Monitors edge cluster name responsible for evaluating rules using this datasource."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          }
        }
      },
      "DataSourceUpsertRequest": {
        "type": "object",
        "description": "Request body for creating or updating a datasource. `id` is required only for update. `address` is required for all types except Elasticsearch with `deployment=cloud`.",
        "required": [
          "type_ident",
          "name",
          "edge_cluster_name",
          "payload"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Datasource ID. Required for update; omit for create."
          },
          "type_ident": {
            "type": "string",
            "description": "Datasource type identifier. Allowed: `prometheus`, `loki`, `mysql`, `oracle`, `postgres`, `clickhouse`, `elasticsearch`, `sls`, `victorialogs`."
          },
          "name": {
            "type": "string",
            "description": "Datasource display name."
          },
          "note": {
            "type": "string",
            "description": "Optional description."
          },
          "address": {
            "type": "string",
            "description": "Connection address. For Prometheus/Loki/VictoriaLogs: HTTP URL. For MySQL/Oracle/Postgres/ClickHouse: `host:port`. For SLS: endpoint without http/https prefix. Not required for Elasticsearch cloud deployment."
          },
          "payload": {
            "$ref": "#/components/schemas/DSPayload",
            "description": "Type-specific configuration block. Must include the key matching `type_ident`."
          },
          "edge_cluster_name": {
            "type": "string",
            "description": "Monitors edge cluster name responsible for evaluating rules using this datasource."
          }
        }
      },
      "DataSourceListResponse": {
        "type": "array",
        "description": "List of datasources. Sensitive credential fields are omitted.",
        "items": {
          "$ref": "#/components/schemas/DataSourceItem"
        }
      },
      "IDRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "description": "Request with a single numeric ID.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Resource ID."
          }
        }
      },
      "SLSProjectsRequest": {
        "type": "object",
        "description": "Parameters for listing SLS projects.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "SLS datasource ID."
          },
          "query": {
            "type": "string",
            "description": "Name prefix filter."
          },
          "offset": {
            "type": "integer",
            "description": "Pagination offset."
          },
          "size": {
            "type": "integer",
            "description": "Page size."
          }
        }
      },
      "SLSProjectsResponse": {
        "type": "array",
        "description": "List of SLS project names.",
        "items": {
          "type": "string"
        }
      },
      "SLSLogstoresRequest": {
        "type": "object",
        "description": "Parameters for listing SLS logstores.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "SLS datasource ID."
          },
          "project": {
            "type": "string",
            "description": "SLS project name."
          },
          "offset": {
            "type": "integer",
            "description": "Pagination offset."
          },
          "size": {
            "type": "integer",
            "description": "Page size."
          }
        }
      },
      "SLSLogstoresResponse": {
        "type": "array",
        "description": "List of SLS logstore names.",
        "items": {
          "type": "string"
        }
      },
      "StoreRulesetUpsertRequest": {
        "type": "object",
        "description": "Request body for creating a ruleset. All fields are validated by `Validate()` on the server.",
        "required": [
          "type_ident",
          "note",
          "payload"
        ],
        "properties": {
          "type_ident": {
            "type": "string",
            "description": "Datasource type identifier this ruleset applies to, e.g. `prometheus`."
          },
          "note": {
            "type": "string",
            "description": "Description or title of the ruleset."
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public. Defaults to `0` if omitted."
          },
          "payload": {
            "type": "string",
            "description": "JSON string containing the alert rule definitions."
          }
        }
      },
      "StoreRulesetItem": {
        "type": "object",
        "description": "A rule repository ruleset.",
        "required": [
          "id",
          "type_ident",
          "note",
          "open_flag",
          "creator_account_id",
          "creator_id",
          "creator_name",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Ruleset ID."
          },
          "type_ident": {
            "type": "string",
            "description": "Datasource type identifier this ruleset applies to."
          },
          "note": {
            "type": "string",
            "description": "Description or title of the ruleset."
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "Sharing scope. `0` = private (creator only), `1` = account-shared, `2` = public."
          },
          "payload": {
            "type": "string",
            "description": "JSON string containing the alert rule definitions. Omitted in list responses."
          },
          "creator_account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID of the creator."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID of the creator."
          },
          "creator_name": {
            "type": "string",
            "description": "Display name of the creator."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          }
        }
      },
      "StoreRulesetListRequest": {
        "type": "object",
        "required": [
          "type_ident"
        ],
        "description": "Filter rulesets by datasource type.",
        "properties": {
          "type_ident": {
            "type": "string",
            "description": "Datasource type identifier to filter by, e.g. `prometheus`."
          }
        }
      },
      "StoreRulesetListResponse": {
        "type": "array",
        "description": "Rulesets accessible to the current user. The `payload` field is omitted.",
        "items": {
          "$ref": "#/components/schemas/StoreRulesetItem"
        }
      },
      "StoreRulesetUpdateRequest": {
        "type": "object",
        "required": [
          "id",
          "note",
          "payload"
        ],
        "description": "Parameters for updating a ruleset.",
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Ruleset ID to update."
          },
          "note": {
            "type": "string",
            "description": "New description."
          },
          "open_flag": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "New sharing scope. `0` = private, `1` = account-shared, `2` = public."
          },
          "payload": {
            "type": "string",
            "description": "New JSON string of alert rule definitions."
          }
        }
      },
      "RumApplicationListRequest": {
        "type": "object",
        "description": "Filters for listing RUM applications.",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Page number (1-based). Default: 1."
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Range: 1–100. Default: 20."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort field."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending if `true`."
          },
          "query": {
            "type": "string",
            "description": "Search query to filter by application name."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Filter by team ID."
          },
          "is_my_team": {
            "type": "boolean",
            "description": "If `true`, return only applications belonging to the current user's teams."
          }
        }
      },
      "RumApplicationAlerting": {
        "type": "object",
        "description": "Alert settings for the application.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether alerting is enabled."
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Channel IDs to send alerts to."
          },
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "Associated on-call integration ID (read-only, auto-assigned)."
          }
        }
      },
      "RumApplicationLink": {
        "type": "object",
        "description": "External system link rendered on matching RUM event detail pages.",
        "required": [
          "name",
          "url",
          "event_types"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable client-side identifier for this external system."
          },
          "name": {
            "type": "string",
            "description": "Display name of the external system."
          },
          "icon_text": {
            "type": "string",
            "description": "Short text shown in the link icon."
          },
          "icon_color": {
            "type": "string",
            "description": "Display color for the link icon."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTP or HTTPS URL template. `${var}` tokens are resolved from the RUM event context."
          },
          "event_types": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "crash",
                "error",
                "view",
                "action",
                "resource",
                "session",
                "all"
              ]
            },
            "description": "RUM event types where this external system link is shown."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether this external system link is enabled."
          }
        }
      },
      "RumApplicationLinks": {
        "type": "object",
        "description": "External link integration settings for the application.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether external link integration is enabled."
          },
          "systems": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/RumApplicationLink"
            },
            "description": "External systems whose URL templates can be opened from matching RUM events."
          }
        }
      },
      "RumApplicationTracing": {
        "type": "object",
        "description": "APM tracing integration settings.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether tracing integration is enabled."
          },
          "open_type": {
            "type": "string",
            "enum": [
              "popup",
              "tab"
            ],
            "description": "How to open the trace link."
          },
          "endpoint": {
            "type": "string",
            "description": "Trace endpoint URL (http or https)."
          }
        }
      },
      "RumApplicationItem": {
        "type": "object",
        "description": "A RUM application.",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "application_id": {
            "type": "string",
            "description": "Unique application ID."
          },
          "application_name": {
            "type": "string",
            "description": "Application display name."
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ],
            "description": "Application type."
          },
          "client_token": {
            "type": "string",
            "description": "Token used to initialize the RUM SDK."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "is_private": {
            "type": "boolean",
            "description": "If `true`, the application is only accessible to team members."
          },
          "no_ip": {
            "type": "boolean",
            "description": "If `true`, IP addresses are not collected."
          },
          "no_geo": {
            "type": "boolean",
            "description": "If `true`, geographic location is not inferred from IP."
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ],
            "description": "Application status."
          },
          "created_by": {
            "type": "integer",
            "format": "int64",
            "description": "Creator member ID."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater member ID."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          }
        }
      },
      "RumApplicationListResponse": {
        "type": "object",
        "description": "Paginated list of RUM applications.",
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "total": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumApplicationItem"
            }
          }
        }
      },
      "RumApplicationIDRequest": {
        "type": "object",
        "required": [
          "application_id"
        ],
        "description": "Request with a single application ID.",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "RUM application ID."
          }
        }
      },
      "RumApplicationInfosRequest": {
        "type": "object",
        "required": [
          "application_ids"
        ],
        "description": "Batch application info request.",
        "properties": {
          "application_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Up to 200 application IDs."
          }
        }
      },
      "RumApplicationInfosResponse": {
        "type": "object",
        "description": "Batch application info response.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumApplicationItem"
            }
          }
        }
      },
      "RumApplicationCreateRequest": {
        "type": "object",
        "required": [
          "application_name",
          "type",
          "team_id"
        ],
        "description": "Parameters for creating a RUM application.",
        "properties": {
          "application_name": {
            "type": "string",
            "description": "Application name. 1–40 characters."
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ],
            "description": "Application type."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team ID."
          },
          "is_private": {
            "type": "boolean",
            "description": "Restrict access to team members only."
          },
          "no_ip": {
            "type": "boolean",
            "description": "Do not collect IP addresses."
          },
          "no_geo": {
            "type": "boolean",
            "description": "Do not infer geographic location."
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          }
        }
      },
      "RumApplicationCreateResponse": {
        "type": "object",
        "description": "Result of creating a RUM application.",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "Auto-generated unique application ID."
          },
          "application_name": {
            "type": "string",
            "description": "Application display name."
          },
          "client_token": {
            "type": "string",
            "description": "Token for RUM SDK initialization."
          }
        }
      },
      "RumApplicationUpdateRequest": {
        "type": "object",
        "required": [
          "application_id"
        ],
        "description": "Parameters for updating a RUM application. All fields except `application_id` are optional.",
        "properties": {
          "application_id": {
            "type": "string",
            "description": "Application ID to update."
          },
          "application_name": {
            "type": "string",
            "description": "New application name."
          },
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "ios",
              "android",
              "react-native",
              "flutter",
              "kotlin-multiplatform",
              "roku",
              "unity"
            ]
          },
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "is_private": {
            "type": "boolean"
          },
          "no_ip": {
            "type": "boolean"
          },
          "no_geo": {
            "type": "boolean"
          },
          "alerting": {
            "$ref": "#/components/schemas/RumApplicationAlerting"
          },
          "tracing": {
            "$ref": "#/components/schemas/RumApplicationTracing"
          },
          "links": {
            "$ref": "#/components/schemas/RumApplicationLinks"
          }
        }
      },
      "RumIssueItem": {
        "type": "object",
        "description": "A RUM error tracking issue.",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "int64"
          },
          "issue_id": {
            "type": "string",
            "description": "Unique issue ID."
          },
          "application_id": {
            "type": "string"
          },
          "application_name": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "for_review",
              "reviewed",
              "ignored",
              "resolved"
            ]
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "Total error occurrences."
          },
          "session_count": {
            "type": "integer",
            "format": "int64",
            "description": "Affected user sessions."
          },
          "is_crash": {
            "type": "boolean",
            "description": "Whether the error caused an app crash."
          },
          "age": {
            "type": "integer",
            "format": "int64"
          },
          "resolved_at": {
            "type": "integer",
            "format": "int64"
          },
          "resolved_by": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64"
          },
          "first_seen": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "integer",
                "format": "int64"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "last_seen": {
            "type": "object",
            "properties": {
              "timestamp": {
                "type": "integer",
                "format": "int64"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          },
          "suspected_cause": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "auto",
                  "user"
                ]
              },
              "value": {
                "type": "string",
                "enum": [
                  "api.failed_request",
                  "network.error",
                  "code.exception",
                  "code.invalid_object_access",
                  "code.invalid_argument",
                  "unknown"
                ]
              },
              "reason": {
                "type": "string"
              },
              "person_id": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "regression": {
            "type": "object",
            "description": "Regression metadata. Present only when a previously resolved issue re-occurred.",
            "properties": {
              "regressed_at": {
                "type": "integer",
                "format": "int64",
                "description": "Timestamp when the regression was detected."
              },
              "regressed_at_version": {
                "type": "string",
                "description": "Application version in which the regression was observed."
              },
              "resolved_at": {
                "type": "integer",
                "format": "int64",
                "description": "Timestamp of the previous resolution before the regression."
              }
            }
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "severity": {
            "type": "string",
            "description": "Issue severity level."
          }
        }
      },
      "RumIssueListRequest": {
        "type": "object",
        "required": [
          "start_time",
          "end_time"
        ],
        "description": "Filters for listing issues.",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of time range, millisecond timestamp."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of time range, millisecond timestamp. Maximum range: 183 days."
          },
          "application_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by application IDs."
          },
          "dql": {
            "type": "string",
            "description": "DQL query for advanced filtering. Cannot be used with `sql`."
          },
          "sql": {
            "type": "string",
            "description": "SQL-style query for advanced filtering. Cannot be used with `dql`."
          },
          "statuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "for_review",
                "reviewed",
                "ignored",
                "resolved"
              ]
            },
            "description": "Filter by statuses."
          },
          "suspected_causes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by suspected causes."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter by team IDs."
          },
          "p": {
            "type": "integer",
            "description": "Page number. Default: 1."
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Range: 1–100. Default: 20."
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at",
              "session_count",
              "error_count"
            ]
          },
          "asc": {
            "type": "boolean"
          },
          "error_required": {
            "type": "boolean",
            "description": "If `true`, only return issues with at least one associated error event."
          },
          "by_intersection": {
            "type": "boolean"
          }
        }
      },
      "RumIssueListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumIssueItem"
            }
          },
          "has_next_page": {
            "type": "boolean"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "RumIssueIDRequest": {
        "type": "object",
        "required": [
          "issue_id"
        ],
        "properties": {
          "issue_id": {
            "type": "string",
            "description": "Issue ID."
          }
        }
      },
      "RumIssueUpdateRequest": {
        "type": "object",
        "required": [
          "issue_id"
        ],
        "description": "Parameters for updating an issue.",
        "properties": {
          "issue_id": {
            "type": "string",
            "description": "Issue ID to update."
          },
          "status": {
            "type": "string",
            "enum": [
              "for_review",
              "reviewed",
              "ignored",
              "resolved"
            ],
            "description": "New status."
          },
          "suspected_cause": {
            "type": "string",
            "enum": [
              "api.failed_request",
              "network.error",
              "code.exception",
              "code.invalid_object_access",
              "code.invalid_argument",
              "unknown"
            ],
            "description": "Suspected cause."
          }
        }
      },
      "SourcemapListRequest": {
        "type": "object",
        "description": "Paginated filter for sourcemap listings.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of upload time range, Unix epoch milliseconds. Must be > 0 and before `end_time`."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of upload time range, Unix epoch milliseconds. Maximum window: 365 days."
          },
          "type": {
            "type": "string",
            "description": "Platform type. Defaults to `browser` when omitted.",
            "enum": [
              "browser",
              "android",
              "ios"
            ]
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by service names. Up to 100 values."
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by version strings. Up to 100 values."
          },
          "query": {
            "type": "string",
            "description": "Substring match on the minified URL (browser) or build ID (android). Max 200 characters."
          },
          "build_id": {
            "type": "string",
            "description": "Android only. Filter by Gradle plugin build identifier. Max 200 characters."
          },
          "uuid": {
            "type": "string",
            "description": "iOS only. Filter by dSYM bundle UUID. Max 200 characters."
          },
          "p": {
            "type": "integer",
            "description": "Page number, starting at 1.",
            "minimum": 1,
            "default": 1,
            "example": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Maximum 100. Default 20.",
            "maximum": 100,
            "default": 20,
            "example": 20
          },
          "orderby": {
            "type": "string",
            "description": "Sort field.",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending. Default false (descending).",
            "default": false
          }
        }
      },
      "SourcemapItem": {
        "type": "object",
        "description": "A single uploaded sourcemap record.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Storage key uniquely identifying this sourcemap file."
          },
          "type": {
            "type": "string",
            "description": "Platform type: `browser`, `android`, or `ios`.",
            "enum": [
              "browser",
              "android",
              "ios"
            ]
          },
          "service": {
            "type": "string",
            "description": "Application or service name."
          },
          "version": {
            "type": "string",
            "description": "Application version string."
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes."
          },
          "git_repository_url": {
            "type": "string",
            "description": "Git repository URL associated with this build."
          },
          "git_commit_sha": {
            "type": "string",
            "description": "Git commit SHA for this build."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Upload timestamp, Unix epoch seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix epoch seconds."
          },
          "metadata": {
            "type": "object",
            "description": "Free-form key-value metadata attached to the sourcemap. Shape depends on the upload client; common keys include `git_repository_url` and `git_commit_sha` (though those are also promoted to top-level fields).",
            "additionalProperties": true
          }
        }
      },
      "SourcemapListResponse": {
        "type": "object",
        "description": "Paginated list of sourcemap records.",
        "required": [
          "total",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of matching records.",
            "example": 3
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourcemapItem"
            }
          }
        }
      },
      "MemberEmptyObject": {
        "type": "object",
        "description": "Empty response",
        "properties": {}
      },
      "MemberInfoRequest": {
        "type": "object",
        "description": "Get member info request",
        "properties": {}
      },
      "MemberInfoResponse": {
        "type": "object",
        "description": "Current member profile",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID"
          },
          "account_name": {
            "type": "string",
            "description": "Account name"
          },
          "account_avatar": {
            "type": "string",
            "description": "Account avatar URL"
          },
          "account_email": {
            "type": "string",
            "description": "Account email"
          },
          "account_role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Assigned role IDs"
          },
          "account_locale": {
            "type": "string",
            "description": "Account-level locale preference (e.g. zh-CN or en-US)"
          },
          "account_time_zone": {
            "type": "string",
            "description": "Account-level time zone (e.g. Asia/Shanghai)"
          },
          "domain": {
            "type": "string",
            "description": "Account domain"
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "member_name": {
            "type": "string",
            "description": "Member display name"
          },
          "phone": {
            "type": "string",
            "description": "Masked phone number"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "Whether phone is verified"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "email_verified": {
            "type": "boolean",
            "description": "Whether email is verified"
          },
          "country_code": {
            "type": "string",
            "description": "Phone country code"
          },
          "avatar": {
            "type": "string",
            "description": "Member avatar URL"
          },
          "locale": {
            "type": "string",
            "description": "Locale preference"
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone"
          },
          "is_external": {
            "type": "boolean",
            "description": "Whether provisioned via SSO"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization."
          }
        }
      },
      "MemberListRequest": {
        "type": "object",
        "description": "List members request",
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Filter by role ID"
          },
          "p": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Page size"
          },
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort field"
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order"
          },
          "query": {
            "type": "string",
            "description": "Search keyword"
          }
        }
      },
      "MemberItem": {
        "type": "object",
        "description": "Member item",
        "required": [
          "account_id",
          "member_id",
          "member_name",
          "country_code",
          "phone",
          "email",
          "phone_verified",
          "email_verified",
          "avatar",
          "status",
          "account_role_ids",
          "created_at",
          "updated_at",
          "ref_id",
          "is_external"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID"
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "member_name": {
            "type": "string",
            "description": "Display name"
          },
          "country_code": {
            "type": "string",
            "description": "Phone country code"
          },
          "phone": {
            "type": "string",
            "description": "Masked phone number"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "locale": {
            "type": "string",
            "description": "Locale"
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "Phone verified"
          },
          "email_verified": {
            "type": "boolean",
            "description": "Email verified"
          },
          "avatar": {
            "type": "string",
            "description": "Avatar URL"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization."
          },
          "account_role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Role IDs"
          },
          "is_external": {
            "type": "boolean",
            "description": "Provisioned via SSO"
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (Unix seconds)"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Update timestamp (Unix seconds)"
          }
        }
      },
      "MemberListResponse": {
        "type": "object",
        "description": "Member list response",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Current page"
          },
          "limit": {
            "type": "integer",
            "description": "Page size"
          },
          "total": {
            "type": "integer",
            "description": "Total count"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberItem"
            },
            "description": "Member items"
          }
        }
      },
      "MemberDeleteRequest": {
        "type": "object",
        "description": "Delete member request (provide one of the lookup fields)",
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "member_name": {
            "type": "string",
            "description": "Member name"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "phone": {
            "type": "string",
            "description": "Phone number"
          },
          "country_code": {
            "type": "string",
            "description": "Phone country code, used with phone"
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID"
          },
          "is_force": {
            "type": "boolean",
            "description": "Force delete. Defaults to false, which checks for references from escalation rules, schedules, etc. Set to true to skip the reference check and delete immediately",
            "default": false
          }
        }
      },
      "InviteMemberItem": {
        "type": "object",
        "description": "Member to invite",
        "properties": {
          "member_name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 39,
            "description": "Display name"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "phone": {
            "type": "string",
            "description": "Phone number"
          },
          "country_code": {
            "type": "string",
            "description": "Country code"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Role IDs to assign"
          },
          "locale": {
            "type": "string",
            "enum": [
              "zh-CN",
              "en-US"
            ],
            "description": "Locale"
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone"
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID"
          }
        }
      },
      "MemberInviteRequest": {
        "type": "object",
        "description": "Invite members request",
        "required": [
          "members"
        ],
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InviteMemberItem"
            },
            "description": "Members to invite (max 20)"
          },
          "from": {
            "type": "string",
            "description": "Invite source context"
          }
        }
      },
      "NewMemberItem": {
        "type": "object",
        "description": "Newly created member",
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "member_name": {
            "type": "string",
            "description": "Member display name"
          }
        }
      },
      "MemberInviteResponse": {
        "type": "object",
        "description": "Invite members response",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NewMemberItem"
            },
            "description": "Newly created members"
          }
        }
      },
      "MemberRoleGrantRequest": {
        "type": "object",
        "description": "Grant role to member request",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Role IDs to grant; appended to the member's current roles (duplicates are deduplicated)."
          }
        }
      },
      "MemberRoleRevokeRequest": {
        "type": "object",
        "description": "Revoke role from member request",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Role IDs to remove from the member."
          }
        }
      },
      "MemberRoleUpdateRequest": {
        "type": "object",
        "description": "Update member roles request",
        "required": [
          "member_id",
          "role_ids"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID"
          },
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "New set of role IDs"
          }
        }
      },
      "MemberResetInfoRequest": {
        "type": "object",
        "description": "Reset member info request",
        "required": [
          "member_id"
        ],
        "properties": {
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID of the member to update"
          },
          "member_name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 2,
            "maxLength": 39,
            "description": "Display name"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number"
          },
          "country_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country code"
          },
          "avatar": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL"
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "zh-CN",
              "en-US"
            ],
            "description": "Locale"
          },
          "time_zone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time zone"
          }
        }
      },
      "PersonInfosRequest": {
        "type": "object",
        "description": "Get person info by IDs request",
        "required": [
          "person_ids"
        ],
        "properties": {
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "List of person IDs"
          }
        }
      },
      "PersonItem": {
        "type": "object",
        "description": "Person profile",
        "required": [
          "account_id",
          "person_id",
          "phone_verified",
          "email_verified"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Account ID"
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Person ID"
          },
          "person_name": {
            "type": "string",
            "description": "Display name"
          },
          "avatar": {
            "type": "string",
            "description": "Avatar URL"
          },
          "locale": {
            "type": "string",
            "description": "Locale"
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "phone": {
            "type": "string",
            "description": "Phone number"
          },
          "phone_verified": {
            "type": "boolean",
            "description": "Phone verified"
          },
          "email_verified": {
            "type": "boolean",
            "description": "Email verified"
          },
          "as": {
            "type": "string",
            "description": "Login role (account/member)"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "pending",
              "deleted"
            ],
            "description": "Person status. `enabled` — active; `pending` — invited but not yet accepted; `deleted` — removed."
          }
        }
      },
      "PersonInfosResponse": {
        "type": "object",
        "description": "Person info by IDs response",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonItem"
            },
            "description": "Person profiles"
          }
        }
      },
      "TeamItem": {
        "type": "object",
        "description": "A team and its membership.",
        "required": [
          "account_id",
          "team_id",
          "team_name",
          "description",
          "status",
          "updated_by_name",
          "updated_by",
          "creator_id",
          "creator_name",
          "created_at",
          "updated_at",
          "person_ids",
          "ref_id"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Owning account ID."
          },
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Unique team ID."
          },
          "team_name": {
            "type": "string",
            "description": "Team display name. 1–39 characters, unique per account."
          },
          "description": {
            "type": "string",
            "description": "Free-form description."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Team status."
          },
          "updated_by_name": {
            "type": "string",
            "description": "Display name of the last editor."
          },
          "updated_by": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID of the last editor."
          },
          "creator_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Member ID of the creator."
          },
          "creator_name": {
            "type": "string",
            "description": "Display name of the creator."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the team was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the team was last updated."
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Member IDs of team members."
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID for third-party HR system integration."
          }
        }
      },
      "TeamInfoRequest": {
        "type": "object",
        "description": "Request identifying a team by one of ID, name, or external ref.",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Team ID."
          },
          "team_name": {
            "type": "string",
            "description": "Team name."
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID."
          }
        }
      },
      "TeamInfosRequest": {
        "type": "object",
        "required": [
          "team_ids"
        ],
        "description": "Request for batch team lookup by IDs.",
        "properties": {
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "List of team IDs to look up. Max 100."
          }
        }
      },
      "TeamBriefItem": {
        "type": "object",
        "description": "Brief team info for batch responses.",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64"
          },
          "team_name": {
            "type": "string"
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            }
          }
        }
      },
      "TeamInfosResponse": {
        "type": "object",
        "description": "Batch team info result.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamBriefItem"
            }
          }
        }
      },
      "TeamListRequest": {
        "type": "object",
        "description": "Filters for listing teams.",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Page number. Default: 1.",
            "minimum": 1,
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Max: 100. Default: 20.",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "orderby": {
            "type": "string",
            "description": "Sort field.",
            "enum": [
              "created_at",
              "updated_at",
              "team_name"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending sort order."
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Filter by member ID — return only teams this person belongs to."
          },
          "query": {
            "type": "string",
            "description": "Substring match on team name."
          }
        }
      },
      "TeamListResponse": {
        "type": "object",
        "description": "Paginated team list.",
        "required": [
          "p",
          "limit",
          "total",
          "items"
        ],
        "properties": {
          "p": {
            "type": "integer",
            "description": "Current page number."
          },
          "limit": {
            "type": "integer",
            "description": "Page size used."
          },
          "total": {
            "type": "integer",
            "description": "Total number of teams matching the filter."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamItem"
            }
          }
        }
      },
      "TeamUpsertRequest": {
        "type": "object",
        "required": [
          "team_name"
        ],
        "description": "Parameters for creating or updating a team.",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Team ID. Omit or set to 0 to create a new team."
          },
          "team_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Team display name. 1–39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Free-form description."
          },
          "person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Member IDs to set as team members. Replaces the existing member list."
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "Email addresses to invite as members."
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Phone numbers to invite as members."
          },
          "countryCode": {
            "type": "string",
            "description": "Default country code applied to any `phones` entries that are not in E.164 format."
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID for HR system integration."
          },
          "reset_if_name_exist": {
            "type": "boolean",
            "description": "If true and a team with the same name already exists, reset its membership to the provided person_ids."
          }
        }
      },
      "TeamUpsertResponse": {
        "type": "object",
        "description": "Team create/update result.",
        "required": [
          "team_id",
          "team_name"
        ],
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Created or updated team ID."
          },
          "team_name": {
            "type": "string",
            "description": "Team name echoed from the request."
          }
        }
      },
      "TeamDeleteRequest": {
        "type": "object",
        "description": "Request identifying a team to delete.",
        "properties": {
          "team_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Team ID."
          },
          "team_name": {
            "type": "string",
            "description": "Team name."
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID."
          }
        }
      },
      "PlatformEmptyObject": {
        "type": "object",
        "description": "Empty object returned on success for operations with no meaningful payload.",
        "additionalProperties": false
      },
      "RoleItem": {
        "type": "object",
        "description": "A role and its permission set.",
        "required": [
          "role_id",
          "role_name",
          "description",
          "status",
          "permission_ids",
          "editable",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Unique role ID."
          },
          "role_name": {
            "type": "string",
            "description": "Role display name."
          },
          "description": {
            "type": "string",
            "description": "Role description."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Role status."
          },
          "permission_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "IDs of permissions granted by this role."
          },
          "editable": {
            "type": "boolean",
            "description": "False for built-in roles which cannot be modified."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the role was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix epoch seconds the role was last updated."
          }
        }
      },
      "RoleInfoRequest": {
        "type": "object",
        "required": [
          "role_id"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Role ID."
          }
        }
      },
      "RoleIDRequest": {
        "type": "object",
        "required": [
          "role_id"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Role ID."
          }
        }
      },
      "RoleListRequest": {
        "type": "object",
        "description": "Filters for listing roles.",
        "properties": {
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort field."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending sort order."
          }
        }
      },
      "RoleListResponse": {
        "type": "object",
        "description": "Role list result.",
        "required": [
          "total",
          "items"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total role count."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleItem"
            }
          }
        }
      },
      "RoleUpsertRequest": {
        "type": "object",
        "required": [
          "role_name"
        ],
        "description": "Parameters for creating or updating a custom role.",
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Role ID. Omit or set to 0 to create."
          },
          "role_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 39,
            "description": "Role display name. 1–39 characters."
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "Role description."
          },
          "permission_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Permission IDs to grant. Replaces the existing set."
          }
        }
      },
      "RoleUpsertResponse": {
        "type": "object",
        "description": "Role create/update result.",
        "required": [
          "role_id",
          "role_name"
        ],
        "properties": {
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Created or updated role ID."
          },
          "role_name": {
            "type": "string",
            "description": "Role name echoed from the request."
          }
        }
      },
      "RolePermissionListRequest": {
        "type": "object",
        "description": "Filters for listing permissions.",
        "properties": {
          "role_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Filter to permissions granted to these roles."
          },
          "with_all": {
            "type": "boolean",
            "description": "If true, return all permissions with is_granted set to indicate which are granted."
          }
        }
      },
      "PermissionItem": {
        "type": "object",
        "description": "A permission entry.",
        "required": [
          "id",
          "permission_name",
          "permission_type",
          "description",
          "class",
          "scope",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "uint64",
            "description": "Unique permission ID."
          },
          "permission_name": {
            "type": "string",
            "description": "Permission display name."
          },
          "permission_type": {
            "type": "string",
            "enum": [
              "read",
              "manage"
            ],
            "description": "Whether this is a read or manage permission."
          },
          "description": {
            "type": "string",
            "description": "Human-readable permission description."
          },
          "class": {
            "type": "string",
            "description": "Permission class (e.g., 'On-call', 'Organization')."
          },
          "scope": {
            "type": "string",
            "description": "Permission scope (e.g., 'on-call', 'organization')."
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Permission status."
          },
          "is_granted": {
            "type": "boolean",
            "description": "Present when with_all is true. Indicates whether this permission is granted to the requested roles."
          }
        }
      },
      "RolePermissionListResponse": {
        "type": "object",
        "description": "Permission list result.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionItem"
            }
          }
        }
      },
      "PermissionFactorListRequest": {
        "type": "object",
        "description": "Filters for listing permission factors.",
        "properties": {
          "factor_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "api",
                "button",
                "visit",
                "menu",
                "url"
              ]
            },
            "description": "Filter by factor type."
          }
        }
      },
      "PermissionFactorItem": {
        "type": "object",
        "description": "A permission factor.",
        "required": [
          "factor_name",
          "factor_type"
        ],
        "properties": {
          "factor_name": {
            "type": "string",
            "description": "Factor identifier (e.g., 'template:read:info')."
          },
          "factor_type": {
            "type": "string",
            "enum": [
              "api",
              "button",
              "visit",
              "menu",
              "url"
            ],
            "description": "Factor type."
          }
        }
      },
      "PermissionFactorListResponse": {
        "type": "array",
        "description": "List of permission factors.",
        "items": {
          "$ref": "#/components/schemas/PermissionFactorItem"
        }
      },
      "RoleGrantRequest": {
        "type": "object",
        "required": [
          "member_ids",
          "role_id"
        ],
        "description": "Request to grant or revoke a role from members.",
        "properties": {
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint64"
            },
            "description": "Member IDs to grant/revoke the role. Max 100."
          },
          "role_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Role ID to grant or revoke."
          }
        }
      },
      "AuditSearchRequest": {
        "type": "object",
        "description": "Filter criteria for audit log search. Time range is required.",
        "required": [
          "start_time",
          "end_time"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of the search window, Unix epoch seconds.",
            "example": 1712620800
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of the search window, Unix epoch seconds. Must be after `start_time`. Maximum span 90 days.",
            "example": 1712707200
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Minimum 0, maximum 99.",
            "minimum": 0,
            "maximum": 99,
            "example": 20
          },
          "request_id": {
            "type": "string",
            "description": "Filter to a single request by its unique request ID."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque pagination cursor returned by the previous response. Leave empty for the first page."
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter to specific operation names. Use `POST /audit/operation/list` to get the valid set."
          },
          "person_id": {
            "type": "integer",
            "format": "uint64",
            "description": "Filter by the member who performed the action."
          },
          "is_dangerous": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When true, return only high-risk (dangerous) operations."
          },
          "is_write": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "When true, return only write operations; when false, return only read operations."
          }
        }
      },
      "AuditLog": {
        "type": "object",
        "description": "A single audit log entry.",
        "required": [
          "created_at",
          "account_id",
          "member_id",
          "member_name",
          "request_id",
          "ip",
          "operation",
          "operation_name",
          "body",
          "params",
          "is_dangerous",
          "is_write"
        ],
        "properties": {
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Timestamp of the operation in Unix epoch milliseconds."
          },
          "account_id": {
            "type": "integer",
            "format": "uint64",
            "description": "ID of the account."
          },
          "member_id": {
            "type": "integer",
            "format": "uint64",
            "description": "ID of the member who performed the action."
          },
          "member_name": {
            "type": "string",
            "description": "Display name of the member."
          },
          "request_id": {
            "type": "string",
            "description": "Unique request ID for correlation."
          },
          "ip": {
            "type": "string",
            "description": "Client IP address of the caller."
          },
          "operation": {
            "type": "string",
            "description": "Stable machine-readable operation name, e.g. `template:write:create`."
          },
          "operation_name": {
            "type": "string",
            "description": "Human-readable operation label in the account's locale."
          },
          "body": {
            "type": "string",
            "description": "JSON-encoded request body (may be truncated at 10 KB)."
          },
          "params": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Key": {
                  "type": "string"
                },
                "Value": {
                  "type": "string"
                }
              }
            },
            "description": "URL path parameters as an array of key-value pairs, or an empty array when none."
          },
          "is_dangerous": {
            "type": "boolean",
            "description": "True if this is flagged as a high-risk operation."
          },
          "is_write": {
            "type": "boolean",
            "description": "True for mutating operations; false for read-only ones."
          }
        }
      },
      "AuditSearchResponse": {
        "type": "object",
        "description": "Cursor-paginated audit log search result.",
        "required": [
          "total",
          "search_after_ctx"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching entries in the search window.",
            "example": 2
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor for the next page. Empty string when there are no more results."
          },
          "docs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            },
            "description": "Audit log entries for this page."
          }
        }
      },
      "AuditOperationListRequest": {
        "type": "object",
        "description": "No parameters required.",
        "additionalProperties": false
      },
      "AuditOperationTypeItem": {
        "type": "object",
        "description": "An auditable operation type.",
        "required": [
          "name",
          "name_cn"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Stable machine-readable operation name for use as a filter.",
            "example": "template:write:create"
          },
          "name_cn": {
            "type": "string",
            "description": "Human-readable Chinese label shown in the console.",
            "example": "创建模板"
          }
        }
      },
      "AuditOperationListResponse": {
        "type": "object",
        "description": "List of auditable operation types.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditOperationTypeItem"
            }
          }
        }
      },
      "FieldItem": {
        "type": "object",
        "description": "Incident custom field configuration.",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning account ID."
          },
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "Field ID — 24-character hex ObjectID."
          },
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,39}$",
            "maxLength": 39,
            "description": "Machine name used in incident payloads under `fields.<field_name>`. Immutable."
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "Human-readable name shown in the UI."
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "Optional free-text description."
          },
          "field_type": {
            "type": "string",
            "enum": [
              "checkbox",
              "multi_select",
              "single_select",
              "text"
            ],
            "description": "Field input type."
          },
          "value_type": {
            "type": "string",
            "enum": [
              "string",
              "bool",
              "float"
            ],
            "description": "Stored value type. `checkbox` is always `bool`; `single_select`/`multi_select`/`text` are always `string`."
          },
          "options": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Allowed choices for `single_select`/`multi_select` (non-empty unique string array). `null` or empty for `checkbox`/`text`."
          },
          "default_value": {
            "description": "Default value. Type depends on `field_type`: `bool` for checkbox; `string` for single_select/text; `string[]` for multi_select; may be `null` if no default.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "Field status (e.g. `enabled`, `deleted`)."
          },
          "creator_id": {
            "type": "integer",
            "format": "int64",
            "description": "Creator member ID."
          },
          "updated_by": {
            "type": "integer",
            "format": "int64",
            "description": "Last updater member ID."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Deletion timestamp, Unix seconds. Only present for soft-deleted fields."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp, Unix seconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update timestamp, Unix seconds."
          }
        },
        "required": [
          "account_id",
          "field_id",
          "field_name",
          "display_name",
          "field_type",
          "value_type",
          "status",
          "creator_id",
          "updated_by",
          "created_at",
          "updated_at"
        ]
      },
      "FieldInfoRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "Field ID — 24-character hex ObjectID."
          }
        }
      },
      "FieldListRequest": {
        "type": "object",
        "properties": {
          "orderby": {
            "type": "string",
            "enum": [
              "created_at",
              "updated_at"
            ],
            "description": "Sort key. Defaults to backend ordering when omitted."
          },
          "asc": {
            "type": "boolean",
            "description": "Sort ascending when `true`; descending otherwise."
          },
          "creator_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Filter by creator member ID. Omit or send `null` to skip."
          },
          "query": {
            "type": "string",
            "description": "Regex filter against `field_name` and `display_name`. Invalid regex is auto-escaped to literal substring match."
          }
        }
      },
      "FieldListResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldItem"
            },
            "description": "All non-deleted custom fields for the account. No pagination."
          }
        }
      },
      "CreateFieldRequest": {
        "type": "object",
        "required": [
          "field_name",
          "display_name",
          "field_type",
          "value_type"
        ],
        "properties": {
          "field_name": {
            "type": "string",
            "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,39}$",
            "maxLength": 39,
            "description": "Machine name. Must start with a letter or underscore; 1–40 chars of `[a-zA-Z0-9_]`. Immutable after creation."
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "Human-readable name. Must be unique within the account."
          },
          "description": {
            "type": "string",
            "maxLength": 499,
            "description": "Optional free-text description."
          },
          "field_type": {
            "type": "string",
            "enum": [
              "checkbox",
              "multi_select",
              "single_select",
              "text"
            ],
            "description": "Field input type. Immutable after creation."
          },
          "value_type": {
            "type": "string",
            "enum": [
              "string",
              "bool",
              "float"
            ],
            "description": "Stored value type. `checkbox` requires `bool`; `single_select`/`multi_select`/`text` require `string`. Immutable after creation."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Required and non-empty for `single_select`/`multi_select` (unique strings, each 1–200 chars). Must be omitted or empty for `checkbox`/`text`."
          },
          "default_value": {
            "description": "Optional default value. Type must match `field_type`: `bool` for checkbox; one of `options` for single_select; subset of `options` for multi_select; string ≤3000 chars for text.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "UpdateFieldRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "Field ID — 24-character hex ObjectID."
          },
          "display_name": {
            "type": "string",
            "maxLength": 39,
            "description": "New display name. Must remain unique within the account."
          },
          "description": {
            "type": "string",
            "description": "New description."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Replacement options list. Must obey the same per-type rules as create."
          },
          "default_value": {
            "description": "Replacement default value. Type must match the field's existing `field_type`.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DeleteFieldRequest": {
        "type": "object",
        "required": [
          "field_id"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "Field ID — 24-character hex ObjectID."
          }
        }
      },
      "CreateFieldResponse": {
        "type": "object",
        "required": [
          "field_id",
          "field_name"
        ],
        "properties": {
          "field_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$",
            "description": "Newly assigned field ID — 24-character hex ObjectID."
          },
          "field_name": {
            "type": "string",
            "description": "Echo of the submitted `field_name`."
          }
        }
      },
      "QueryRowsRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "expr"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional consistency check. Must equal the authenticated account when supplied; mismatched values are rejected. Business execution always uses the authenticated account."
          },
          "ds_type": {
            "type": "string",
            "description": "Data source type; must match a configured data source under the tenant. Examples: `prometheus`, `loki`, `victorialogs`, `sls`, `elasticsearch`, `mysql`, `postgres`, `oracle`, `clickhouse`."
          },
          "ds_name": {
            "type": "string",
            "description": "Data source name; must match a configured data source under the tenant."
          },
          "expr": {
            "type": "string",
            "description": "Query expression. Syntax depends on `ds_type` and is interpreted by the corresponding monit-edge client (PromQL for Prometheus, LogQL for Loki, SQL for SQL sources, etc.)."
          },
          "delay_seconds": {
            "type": "integer",
            "description": "Look-back offset in seconds applied to point-in-time queries (Prometheus, Loki stats, VictoriaLogs stats). Ignored for raw / detail queries.",
            "default": 0
          },
          "args": {
            "type": "object",
            "description": "Polymorphic key/value extension parameters forwarded verbatim to monit-edge. All values must be strings. Semantics depend on `ds_type`: SLS requires `sls.project` + `sls.logstore`; Loki / VictoriaLogs raw mode requires a time range via `<source>.start`/`<source>.end` or `<source>.timespan.value` + `<source>.timespan.unit`; Prometheus and SQL sources ignore it. Always namespace keys by source (e.g. `sls.project`, `loki.type`).",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "QueryRowsResponse": {
        "type": "array",
        "description": "Result rows. Different data sources populate `fields` vs `values` differently — metric sources (Prometheus, *-stats) put numbers into `values`; detail sources (SQL, SLS, raw logs) put data into `fields` and may return `values: null`.",
        "items": {
          "$ref": "#/components/schemas/QueryRow"
        }
      },
      "QueryRow": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "object",
            "description": "String-valued fields (labels, log fields, SQL columns).",
            "additionalProperties": {
              "type": "string"
            }
          },
          "values": {
            "type": "object",
            "nullable": true,
            "description": "Numeric fields. For metric queries the canonical key is `__value__`. May be `null` for detail-oriented sources.",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "DiagnoseRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "input"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional consistency check. Must equal the authenticated account when supplied."
          },
          "ds_type": {
            "type": "string",
            "description": "Data source type. `log_patterns` supports `loki` and `victorialogs`; `metric_trends` supports `prometheus`."
          },
          "ds_name": {
            "type": "string",
            "description": "Data source name configured under the tenant."
          },
          "operation": {
            "type": "string",
            "enum": [
              "log_patterns",
              "metric_trends"
            ],
            "description": "Diagnostic operation. When omitted, inferred from `ds_type` (loki / victorialogs → `log_patterns`, prometheus → `metric_trends`). Other sources must specify explicitly."
          },
          "time_range": {
            "type": "object",
            "description": "Diagnostic window in Unix seconds. Defaults to the last 15 minutes when missing or invalid; windows wider than 6 hours are rejected.",
            "properties": {
              "start": {
                "type": "integer",
                "format": "int64",
                "description": "Window start, Unix seconds."
              },
              "end": {
                "type": "integer",
                "format": "int64",
                "description": "Window end, Unix seconds."
              }
            }
          },
          "methods": {
            "type": "array",
            "description": "Diagnostic methods to run. When omitted, `log_patterns` defaults to `pattern_snapshot + pattern_compare(previous_window)` and `metric_trends` defaults to `single_window_shape + window_compare(previous_window)`.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "`log_patterns` supports `pattern_snapshot`, `pattern_compare`. `metric_trends` supports `single_window_shape`, `window_compare`."
                },
                "baseline": {
                  "type": "string",
                  "enum": [
                    "previous_window",
                    "same_window_yesterday",
                    "same_window_last_week"
                  ],
                  "description": "Only meaningful for compare-style methods. Defaults to `previous_window`."
                }
              }
            }
          },
          "input": {
            "type": "object",
            "required": [
              "query"
            ],
            "properties": {
              "query": {
                "type": "string",
                "description": "Query expression. LogQL / VictoriaLogs query syntax for `log_patterns`; PromQL for `metric_trends`."
              }
            }
          },
          "options": {
            "type": "object",
            "description": "Execution options, all upper-bounded by monit-edge.",
            "properties": {
              "max_logs_scanned": {
                "type": "integer",
                "description": "Per-window log scan cap. Default 10 000, hard max 50 000."
              },
              "max_patterns": {
                "type": "integer",
                "description": "Max patterns returned. Default 20, hard max 50."
              },
              "examples_per_pattern": {
                "type": "integer",
                "description": "Max redacted examples per pattern. Default 2, hard max 3."
              },
              "step_seconds": {
                "type": "integer",
                "description": "`metric_trends` query_range step. Default 60, range [15, 300]."
              },
              "max_series": {
                "type": "integer",
                "description": "`metric_trends` max series considered. Default 50, hard max 200."
              },
              "topk": {
                "type": "integer",
                "description": "`metric_trends` max notable series returned. Default 10, hard max 50."
              },
              "timeout_seconds": {
                "type": "integer",
                "description": "Edge-side diagnostic timeout in seconds. Default 25, hard max 30."
              }
            }
          }
        }
      },
      "DiagnoseResponse": {
        "type": "object",
        "description": "Operation-specific diagnostic result. Inspect `operation` first, then `results[]`. The shape of `results[].patterns` (for `log_patterns`) vs `results[].series` (for `metric_trends`) differs by operation; the full schema is documented in the monit-webapi diagnose-api guide.",
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "log_patterns",
              "metric_trends"
            ]
          },
          "ds_type": {
            "type": "string"
          },
          "ds_name": {
            "type": "string"
          },
          "query": {
            "type": "string",
            "description": "Query string echoed back from the request."
          },
          "window": {
            "type": "object",
            "properties": {
              "start": {
                "type": "integer",
                "format": "int64"
              },
              "end": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "results": {
            "type": "array",
            "description": "One entry per `methods[]` in the request, in the same order.",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string",
                  "description": "`pattern_snapshot` / `pattern_compare` for `log_patterns`; `single_window_shape` / `window_compare` for `metric_trends`."
                },
                "baseline": {
                  "type": "string",
                  "description": "Only present for compare-style methods."
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "end": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                },
                "baseline_window": {
                  "type": "object",
                  "description": "Only present for compare-style methods.",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "end": {
                      "type": "integer",
                      "format": "int64"
                    }
                  }
                },
                "summary": {
                  "type": "object",
                  "description": "Aggregate summary for this method. Shape differs between `log_patterns` (logs_scanned, patterns_total, surging_threshold, …) and `metric_trends` (series_total, data_quality, observations, …)."
                },
                "patterns": {
                  "type": "array",
                  "description": "`log_patterns` only. Sorted RCA-first; each item carries pattern_hash, template, count, severity, sources, examples, and (for compare) baseline_count / change_ratio / is_new / is_gone.",
                  "items": {
                    "type": "object"
                  }
                },
                "series": {
                  "type": "array",
                  "description": "`metric_trends` only. Notable series with current / baseline / change / notable_period.",
                  "items": {
                    "type": "object"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Per-method advisory messages (e.g. `examples redacted`, sampling notices)."
                }
              }
            }
          }
        }
      },
      "ToolCatalogRequest": {
        "type": "object",
        "required": [
          "target_locator"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional consistency check. Must equal the authenticated account when supplied."
          },
          "target_locator": {
            "type": "string",
            "description": "Target identifier (host name, MySQL address, …). Max 256 bytes; no whitespace, control characters, or `|`."
          },
          "target_kind": {
            "type": "string",
            "description": "Optional target kind. When omitted webapi auto-infers across currently known kinds. Built-in kinds: `host`, `mysql`. Required on retry when the previous call returned `ambiguous_target_kind`."
          },
          "include_output_shape": {
            "type": "boolean",
            "description": "When true, each tool entry includes its `output_shape` JSON Schema. Defaults to false to keep responses small for LLM consumption.",
            "default": false
          }
        }
      },
      "ToolCatalogResponse": {
        "type": "object",
        "properties": {
          "target": {
            "type": "object",
            "nullable": true,
            "description": "Resolved target. `null` when locator could not be uniquely resolved.",
            "properties": {
              "kind": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            }
          },
          "tools": {
            "type": "array",
            "description": "Tool catalog entries. Empty when `error` is non-null.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Tool name; pass into `/monit/tools/invoke` as `tools[].tool`."
                },
                "target_kind": {
                  "type": "string",
                  "description": "Target kind this tool applies to."
                },
                "description": {
                  "type": "string",
                  "description": "Tool capability description for UI / AI-SRE consumption."
                },
                "input_schema": {
                  "type": "object",
                  "description": "JSON Schema for `tools[].params`."
                },
                "output_shape": {
                  "type": "object",
                  "description": "Optional output JSON Schema; only returned when `include_output_shape=true`."
                }
              }
            }
          },
          "error": {
            "type": "object",
            "nullable": true,
            "description": "Business error. `null` on success.",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "target_unavailable",
                  "unknown_toolset_hash",
                  "ambiguous_target_kind"
                ]
              },
              "message": {
                "type": "string"
              },
              "target_kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Returned for `ambiguous_target_kind`; lists the candidate kinds."
              }
            }
          }
        }
      },
      "ToolInvokeRequest": {
        "type": "object",
        "required": [
          "target_locator",
          "tools"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional consistency check. Must equal the authenticated account when supplied."
          },
          "target_locator": {
            "type": "string",
            "description": "Target identifier. Same validation rules as `/monit/tools/catalog`."
          },
          "target_kind": {
            "type": "string",
            "description": "Optional target kind; auto-inferred when omitted."
          },
          "tools": {
            "type": "array",
            "minItems": 1,
            "maxItems": 8,
            "description": "Up to 8 tool calls; webapi executes them concurrently and returns results in input order.",
            "items": {
              "type": "object",
              "required": [
                "tool"
              ],
              "properties": {
                "tool": {
                  "type": "string",
                  "description": "Tool name, typically from `/monit/tools/catalog`."
                },
                "params": {
                  "type": "object",
                  "description": "Tool parameters matching the catalog `input_schema`. For no-arg tools pass `{}` explicitly.",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "ToolInvokeResponse": {
        "type": "object",
        "properties": {
          "target": {
            "type": "object",
            "nullable": true,
            "description": "Resolved target.",
            "properties": {
              "kind": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            }
          },
          "results": {
            "type": "array",
            "description": "Per-tool results aligned with the request `tools[]` order. Empty when `error` is non-null.",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string"
                },
                "tool_version": {
                  "type": "string",
                  "description": "Agent-executed tool version. Empty when execution failed before the agent picked a version."
                },
                "data": {
                  "type": "object",
                  "nullable": true,
                  "description": "Successful tool payload — passthrough of monit-agent `ToolResultPayload.data` (typically `data` / `summary` / `truncated`). `null` when the per-tool `error` is set."
                },
                "error": {
                  "type": "object",
                  "nullable": true,
                  "description": "Per-tool error. Mutually exclusive with `data`.",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Common values: `timeout`, `target_unavailable`, `edge_unsupported`, `invalid_tool_result`, `internal`, `invalid_args`, `unknown_tool`, `unknown_tool_version`, `unknown_toolset_hash`, `target_not_owned`, `wrong_agent`, `overloaded`, `denied`, `permission_denied`, `credential_unavailable`, `target_unreachable`."
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "agent_elapsed_ms": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Agent-self-reported tool execution time in milliseconds, excludes network. May be 0 when the failure occurred before the agent started executing."
                },
                "e2e_elapsed_ms": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Webapi-observed end-to-end time in milliseconds (webapi → ws → edge → agent → ws → webapi). A large gap vs `agent_elapsed_ms` indicates network / edge slowness."
                }
              }
            }
          },
          "error": {
            "type": "object",
            "nullable": true,
            "description": "Request-level business error. `null` on success.",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "target_unavailable",
                  "unknown_toolset_hash",
                  "forward_failed",
                  "invalid_tool_result",
                  "ambiguous_target_kind"
                ]
              },
              "message": {
                "type": "string"
              },
              "target_kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "TargetsListRequest": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Optional consistency check. Must equal the authenticated account when supplied."
          },
          "keyword": {
            "type": "string",
            "description": "Prefix match against `target_locator`. ASCII only, no whitespace, no `|`, max 256 bytes. Substring search is not supported."
          },
          "limit": {
            "type": "integer",
            "description": "Page size. Default 50, max 200.",
            "default": 50,
            "maximum": 200
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor from the previous response's `next_cursor`. Omit / pass empty string for the first page. Reset whenever `keyword`, `limit`, or tenant changes."
          }
        }
      },
      "TargetsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "target_kind": {
                  "type": "string",
                  "description": "Target kind, e.g. `host`, `mysql`. Filtering by kind is not supported in v1."
                },
                "target_locator": {
                  "type": "string",
                  "description": "Target identifier; the list is sorted by this field ascending."
                },
                "agent_version": {
                  "type": "string",
                  "description": "Most recently observed Agent version."
                },
                "cluster_name": {
                  "type": "string",
                  "description": "Edge cluster name."
                },
                "edge_ipport": {
                  "type": "string",
                  "description": "Edge instance address (`ip:port`), surfaced for diagnostics."
                },
                "updated_at": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Last route-projection upsert time, Unix seconds. Treat as 'most recently observed', not a live-online indicator."
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matches for the current `(account_id, keyword)` pair, independent of `cursor`."
          },
          "next_cursor": {
            "type": "string",
            "description": "Opaque cursor for the next page. Absent / empty means this is the last page."
          }
        }
      },
      "ListChangeResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of matching changes.",
            "format": "int64"
          },
          "has_next_page": {
            "type": "boolean",
            "description": "Whether more pages are available after this one."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeItem"
            },
            "description": "Changes on the current page."
          }
        }
      },
      "ChangeItem": {
        "type": "object",
        "properties": {
          "change_id": {
            "type": "string",
            "description": "Change ID, a MongoDB ObjectID hex string."
          },
          "account_id": {
            "type": "integer",
            "description": "Account this change belongs to.",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "description": "Collaboration channel this change is routed to.",
            "format": "int64"
          },
          "channel_name": {
            "type": "string",
            "description": "Name of the collaboration channel."
          },
          "channel_status": {
            "type": "string",
            "description": "Status of the collaboration channel."
          },
          "integration_id": {
            "type": "integer",
            "description": "Integration that reported this change.",
            "format": "int64"
          },
          "integration_name": {
            "type": "string",
            "description": "Name of the reporting integration."
          },
          "title": {
            "type": "string",
            "description": "Change title."
          },
          "description": {
            "type": "string",
            "description": "Change description."
          },
          "change_key": {
            "type": "string",
            "description": "Stable key that groups events belonging to the same change."
          },
          "change_status": {
            "type": "string",
            "description": "Current lifecycle status of the change."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change started."
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds of the most recent change activity."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change ended."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value labels attached to the change."
          },
          "link": {
            "type": "string",
            "description": "External link to the source change record."
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeEventItem"
            },
            "description": "Underlying change events, returned only when include_events is true."
          }
        }
      },
      "ChangeEventItem": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Change event ID, a MongoDB ObjectID hex string."
          },
          "account_id": {
            "type": "integer",
            "description": "Account this change event belongs to.",
            "format": "int64"
          },
          "channel_id": {
            "type": "integer",
            "description": "Collaboration channel this change event is routed to.",
            "format": "int64"
          },
          "integration_id": {
            "type": "integer",
            "description": "Integration that reported this change event.",
            "format": "int64"
          },
          "title": {
            "type": "string",
            "description": "Change event title."
          },
          "description": {
            "type": "string",
            "description": "Change event description."
          },
          "change_key": {
            "type": "string",
            "description": "Stable key that groups events belonging to the same change."
          },
          "change_status": {
            "type": "string",
            "description": "Lifecycle status of the change event.",
            "enum": [
              "Planned",
              "Ready",
              "Processing",
              "Canceled",
              "Done"
            ]
          },
          "link": {
            "type": "string",
            "description": "External link to the source change record."
          },
          "event_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change event occurred."
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value labels attached to the change event."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change event was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change event was last updated."
          },
          "deleted_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the change event was deleted."
          }
        }
      },
      "GetWarRoomDefaultObserversResponse": {
        "type": "object",
        "properties": {
          "observers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomPersonItem"
            },
            "description": "Historical responders suggested as default war-room observers."
          }
        }
      },
      "WarRoomPersonItem": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "description": "Account this person belongs to.",
            "format": "int64"
          },
          "person_id": {
            "type": "integer",
            "description": "Person ID.",
            "format": "int64"
          },
          "person_name": {
            "type": "string",
            "description": "Display name of the person."
          },
          "avatar": {
            "type": "string",
            "description": "URL of the person's avatar image."
          },
          "email": {
            "type": "string",
            "description": "Email address of the person."
          },
          "phone": {
            "type": "string",
            "description": "Phone number of the person."
          },
          "locale": {
            "type": "string",
            "description": "Preferred language locale of the person."
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone of the person."
          },
          "as": {
            "type": "string",
            "description": "Role the person holds in the related context."
          },
          "status": {
            "type": "string",
            "description": "Current status of the person."
          }
        }
      },
      "GetWarRoomDefaultObserversRequest": {
        "type": "object",
        "properties": {
          "incident_id": {
            "type": "string",
            "description": "Incident ID, a MongoDB ObjectID hex string."
          }
        },
        "required": [
          "incident_id"
        ]
      },
      "PreviewTemplateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the template rendered without errors."
          },
          "content": {
            "type": "string",
            "description": "Rendered template output, present when success is true."
          },
          "message": {
            "type": "string",
            "description": "Error message describing why rendering failed, present when success is false."
          }
        }
      },
      "ResponseEnvelope": {
        "type": "object",
        "description": "Standard response envelope used by every Flashduty public API. On success `data` contains the endpoint-specific payload and `error` is absent. On failure `error` is present and `data` is absent. `request_id` is always present and is also mirrored in the `Flashcat-Request-Id` response header.",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.",
            "example": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
          },
          "error": {
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "description": "Endpoint-specific payload. See each operation's 200 response schema."
          }
        },
        "required": [
          "request_id"
        ]
      },
      "ListChangeRequest": {
        "type": "object",
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for the start of the query window."
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds for the end of the query window."
          },
          "p": {
            "type": "integer",
            "description": "Page number, starting at 1.",
            "format": "int64",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "description": "Number of items per page.",
            "format": "int64",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "Filter by collaboration channel IDs."
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "Filter by reporting integration IDs."
          },
          "orderby": {
            "type": "string",
            "description": "Field to sort the result by.",
            "enum": [
              "start_time",
              "last_time"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Sort in ascending order when true."
          },
          "include_events": {
            "type": "boolean",
            "description": "Include the underlying change events for each change when true."
          },
          "query": {
            "type": "string",
            "description": "Free-text or regular-expression search over change fields."
          }
        }
      },
      "ListWarRoomEnabledResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarRoomDataSourceItem"
            },
            "description": "IM integrations with the war-room feature enabled."
          }
        }
      },
      "WarRoomDataSourceItem": {
        "type": "object",
        "properties": {
          "data_source_id": {
            "type": "integer",
            "description": "Integration ID.",
            "format": "int64"
          },
          "account_id": {
            "type": "integer",
            "description": "Account this integration belongs to.",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "Team that owns this integration.",
            "format": "int64"
          },
          "plugin_id": {
            "type": "integer",
            "description": "Plugin ID backing this integration.",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Integration name."
          },
          "status": {
            "type": "string",
            "description": "Current status of the integration."
          },
          "category": {
            "type": "string",
            "description": "Category of the integration plugin."
          },
          "plugin_type": {
            "type": "string",
            "description": "Type identifier of the integration plugin."
          },
          "plugin_type_name": {
            "type": "string",
            "description": "Localized display name of the integration plugin type."
          },
          "description": {
            "type": "string",
            "description": "Integration description."
          },
          "integration_key": {
            "type": "string",
            "description": "Push key used by alert sources to send to this integration."
          },
          "ref_id": {
            "type": "string",
            "description": "External reference ID of the integration."
          },
          "settings": {
            "type": "object",
            "additionalProperties": true,
            "description": "Plugin-specific configuration of the integration."
          },
          "no_editable": {
            "type": "boolean",
            "description": "Whether the integration is read-only."
          },
          "creator_id": {
            "type": "integer",
            "description": "Person who created the integration.",
            "format": "int64"
          },
          "updated_by": {
            "type": "integer",
            "description": "Person who last updated the integration.",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the integration was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the integration was last updated."
          },
          "last_time": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds of the most recent activity on the integration."
          },
          "exclusive_data_source_id": {
            "type": "integer",
            "description": "Exclusive integration ID associated with this integration.",
            "format": "int64"
          },
          "integration_id": {
            "type": "integer",
            "description": "Integration ID, alias of data_source_id.",
            "format": "int64"
          }
        }
      },
      "AddWarRoomMemberRequest": {
        "type": "object",
        "properties": {
          "integration_id": {
            "type": "integer",
            "description": "IM integration that hosts the war room.",
            "format": "int64"
          },
          "chat_id": {
            "type": "string",
            "description": "Chat ID of the war room within the IM platform."
          },
          "member_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "",
              "format": "int64"
            },
            "description": "Person IDs to add to the war room."
          }
        },
        "required": [
          "integration_id",
          "chat_id",
          "member_ids"
        ]
      },
      "AccountInfo": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "description": "Account identifier."
          },
          "account_name": {
            "type": "string",
            "description": "Account name."
          },
          "domain": {
            "type": "string",
            "description": "Primary account domain (login subdomain)."
          },
          "extra_domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional account domains."
          },
          "phone": {
            "type": "string",
            "description": "Account contact phone, masked for privacy."
          },
          "country_code": {
            "type": "string",
            "description": "Calling country code for the contact phone."
          },
          "email": {
            "type": "string",
            "description": "Account contact email."
          },
          "avatar": {
            "type": "string",
            "description": "Account avatar URL."
          },
          "locale": {
            "type": "string",
            "description": "Account language preference (e.g. zh-CN, en-US)."
          },
          "time_zone": {
            "type": "string",
            "description": "Account default timezone (IANA name, e.g. Asia/Shanghai)."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Account creation time, Unix timestamp in seconds."
          },
          "restrictions": {
            "type": "object",
            "description": "Account access restrictions (present only when configured).",
            "properties": {
              "ips": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed source IP/CIDR whitelist."
              },
              "email_domains": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed login email domains."
              },
              "allow_subdomain": {
                "type": "boolean",
                "description": "Whether subdomains of the allowed email domains are also accepted."
              }
            }
          },
          "mp_plat": {
            "type": "string",
            "description": "Cloud marketplace platform the account was provisioned from (present only for marketplace accounts)."
          },
          "mp_account_id": {
            "type": "string",
            "description": "Account identifier on the cloud marketplace platform (present only for marketplace accounts)."
          }
        }
      },
      "PreviewTemplateRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Template content to render."
          },
          "type": {
            "type": "string",
            "description": "Template channel type that selects the rendering engine."
          },
          "incident_id": {
            "type": "string",
            "description": "Incident ID whose data is used to render the template; mock data is used when omitted. A MongoDB ObjectID hex string."
          }
        },
        "required": [
          "content",
          "type"
        ]
      },
      "ListStatusPageResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageItem"
            },
            "description": "Status pages owned by the account."
          }
        }
      },
      "StatusPageItem": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "integer",
            "description": "Status page ID.",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Display name of the status page."
          },
          "url_name": {
            "type": "string",
            "description": "URL-safe slug, unique per account."
          },
          "type": {
            "type": "string",
            "description": "Visibility type of the status page.",
            "enum": [
              "public",
              "internal"
            ]
          },
          "custom_domain": {
            "type": "string",
            "description": "Custom domain pointing to the status page."
          },
          "logo": {
            "type": "string",
            "description": "Logo image of the status page."
          },
          "dark_logo": {
            "type": "string",
            "description": "Dark-mode logo image of the status page."
          },
          "logo_url": {
            "type": "string",
            "description": "URL opened when the logo is clicked."
          },
          "favicon": {
            "type": "string",
            "description": "Favicon of the status page."
          },
          "page_header": {
            "type": "string",
            "description": "Header content of the status page."
          },
          "page_footer": {
            "type": "string",
            "description": "Footer content of the status page."
          },
          "date_view": {
            "type": "string",
            "description": "How the timeline is displayed.",
            "enum": [
              "calendar",
              "list"
            ]
          },
          "display_uptime_mode": {
            "type": "string",
            "description": "How uptime is displayed.",
            "enum": [
              "chart_and_percentage",
              "chart",
              "none"
            ]
          },
          "custom_links": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Custom navigation links shown on the status page."
          },
          "contact_info": {
            "type": "string",
            "description": "Get-in-touch contact, a mailto or website URL."
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageComponentItem"
            },
            "description": "Components tracked on the status page."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusPageSectionItem"
            },
            "description": "Sections grouping the components."
          },
          "subscription": {
            "$ref": "#/components/schemas/StatusPageSubscriptionItem"
          },
          "template_preference": {
            "type": "string",
            "description": "Preferred change-event template type."
          }
        }
      },
      "StatusPageSubscriptionItem": {
        "type": "object",
        "properties": {
          "email": {
            "type": "boolean",
            "description": "Whether email subscription is enabled."
          },
          "im": {
            "type": "boolean",
            "description": "Whether IM subscription is enabled."
          }
        }
      },
      "StatusPageSectionItem": {
        "type": "object",
        "properties": {
          "section_id": {
            "type": "string",
            "description": "Section ID."
          },
          "name": {
            "type": "string",
            "description": "Section name."
          },
          "description": {
            "type": "string",
            "description": "Section description."
          },
          "order_id": {
            "type": "integer",
            "description": "Display order of the section.",
            "format": "int64"
          },
          "hide_uptime": {
            "type": "boolean",
            "description": "Whether uptime data is hidden from summary responses."
          },
          "hide_all": {
            "type": "boolean",
            "description": "Whether the section and its components are hidden from summary endpoints."
          }
        }
      },
      "DeletePostMortemTemplateRequest": {
        "type": "object",
        "description": "Parameters for deleting a post-mortem template.",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "Template ID."
          }
        }
      },
      "InitPostMortemRequest": {
        "type": "object",
        "description": "Parameters for initializing a post-mortem report from incidents.",
        "required": [
          "incident_ids",
          "template_id"
        ],
        "properties": {
          "incident_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "string"
            },
            "description": "Incident IDs to link to the report. 1-10 incidents."
          },
          "template_id": {
            "type": "string",
            "description": "Template ID used to initialize the report."
          }
        }
      },
      "ListPostMortemTemplatesRequest": {
        "type": "object",
        "description": "Pagination and ordering options for post-mortem templates.",
        "properties": {
          "order_by": {
            "type": "string",
            "enum": [
              "created_at_seconds"
            ],
            "description": "Field used to order results."
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order when true."
          },
          "p": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Page number starting at 1."
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100,
            "default": 20,
            "description": "Page size, at most 100."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor from a previous response for forward pagination."
          }
        }
      },
      "ListPostMortemTemplatesResponse": {
        "type": "object",
        "description": "Paginated list of post-mortem templates.",
        "required": [
          "items",
          "total",
          "has_next_page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMortemTemplate"
            },
            "description": "Templates in the current page."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total matching templates."
          },
          "has_next_page": {
            "type": "boolean",
            "description": "True when another page is available."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Cursor for forward pagination."
          }
        }
      },
      "PostMortemTemplate": {
        "type": "object",
        "description": "Post-mortem report template.",
        "required": [
          "account_id",
          "template_id",
          "name",
          "description",
          "content",
          "content_markdown",
          "team_id",
          "created_at_seconds",
          "updated_at_seconds"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID that owns the template. 0 for built-in templates."
          },
          "template_id": {
            "type": "string",
            "description": "Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID."
          },
          "name": {
            "type": "string",
            "description": "Template name shown in the console."
          },
          "description": {
            "type": "string",
            "description": "Template description."
          },
          "content": {
            "type": "string",
            "description": "BlockNote JSON content used to initialize the report body."
          },
          "content_markdown": {
            "type": "string",
            "description": "Markdown version of the template content, used by AI generation."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Managing team ID. Built-in templates use 0."
          },
          "created_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the template was created."
          },
          "updated_at_seconds": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in seconds when the template was last updated."
          }
        }
      },
      "PreviewSyncRequest": {
        "type": "object",
        "required": [
          "ds_type",
          "ds_name",
          "expr"
        ],
        "description": "Parameters for a synchronous datasource query preview.",
        "properties": {
          "ds_type": {
            "type": "string",
            "description": "Datasource type, e.g. `prometheus`, `loki`, `elasticsearch`."
          },
          "ds_name": {
            "type": "string",
            "description": "Datasource display name as configured in the account."
          },
          "expr": {
            "type": "string",
            "description": "Query expression. Format depends on `ds_type` (PromQL for Prometheus, LogQL for Loki, etc.)."
          },
          "delay_seconds": {
            "type": "integer",
            "description": "Shift the query window backward by this many seconds to compensate for data ingestion latency."
          },
          "args": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional type-specific query arguments."
          }
        }
      },
      "PreviewSyncResponse": {
        "type": "object",
        "description": "Raw JSON response from the datasource. Schema varies by datasource type."
      },
      "ResetPostMortemBasicsRequest": {
        "type": "object",
        "description": "Basic incident facts to write back to a post-mortem report.",
        "required": [
          "post_mortem_id",
          "incidents_highest_severity",
          "incidents_earliest_start_seconds"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "Post-mortem ID."
          },
          "incidents_highest_severity": {
            "type": "string",
            "description": "Highest severity among linked incidents."
          },
          "incidents_earliest_start_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "Unix timestamp in seconds for the earliest linked incident start time."
          },
          "incidents_latest_close_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Unix timestamp in seconds for the latest linked incident close time. 0 when still open."
          },
          "incidents_total_duration_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Total incident duration in seconds."
          },
          "responder_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Responder member IDs to store on the report."
          }
        }
      },
      "ResetPostMortemFollowUpsRequest": {
        "type": "object",
        "description": "Parameters for replacing post-mortem follow-up action items.",
        "required": [
          "post_mortem_id"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "Post-mortem ID."
          },
          "follow_ups": {
            "type": "string",
            "description": "Follow-up action items as free text."
          }
        }
      },
      "ResetPostMortemStatusRequest": {
        "type": "object",
        "description": "Parameters for changing a post-mortem report status.",
        "required": [
          "post_mortem_id",
          "status"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "Post-mortem ID."
          },
          "status": {
            "type": "string",
            "enum": [
              "drafting",
              "published"
            ],
            "description": "Target report status."
          }
        }
      },
      "ResetPostMortemTitleRequest": {
        "type": "object",
        "description": "Parameters for changing a post-mortem report title.",
        "required": [
          "post_mortem_id",
          "title"
        ],
        "properties": {
          "post_mortem_id": {
            "type": "string",
            "description": "Post-mortem ID."
          },
          "title": {
            "type": "string",
            "description": "New report title."
          }
        }
      },
      "RumWebhookTestRequest": {
        "type": "object",
        "description": "Parameters for sending a sample RUM alert webhook.",
        "required": [
          "application_id",
          "webhook_url"
        ],
        "properties": {
          "application_id": {
            "type": "string",
            "description": "RUM application ID."
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL to receive the sample alert event."
          }
        }
      },
      "RumWebhookTestResponse": {
        "type": "object",
        "description": "Result of the webhook test delivery.",
        "required": [
          "ok",
          "status_code",
          "message"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "Whether the webhook endpoint accepted the sample event."
          },
          "status_code": {
            "type": "integer",
            "description": "HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response."
          },
          "message": {
            "type": "string",
            "description": "`ok` on success, otherwise the delivery error message."
          }
        }
      },
      "TryLinkPersonRequest": {
        "type": "object",
        "description": "Parameters for attempting automatic IM account linking.",
        "required": [
          "integration_id"
        ],
        "properties": {
          "integration_id": {
            "type": "integer",
            "format": "int64",
            "description": "IM integration ID."
          }
        }
      },
      "TryLinkPersonResponse": {
        "type": "object",
        "description": "People linked by this attempt.",
        "required": [
          "new_linked_person_ids"
        ],
        "properties": {
          "new_linked_person_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Person IDs newly linked during this call."
          }
        }
      },
      "UpsertPostMortemTemplateRequest": {
        "type": "object",
        "description": "Parameters for creating or updating a post-mortem template.",
        "required": [
          "name",
          "content"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "Template ID. Omit to create a new template; provide it to update an existing template."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Managing team ID. Required when creating a custom template."
          },
          "name": {
            "type": "string",
            "description": "Template name."
          },
          "description": {
            "type": "string",
            "description": "Template description."
          },
          "content": {
            "type": "string",
            "description": "BlockNote JSON template content."
          },
          "content_markdown": {
            "type": "string",
            "description": "Markdown version of the template content."
          }
        }
      },
      "DeleteStatusPageComponentRequest": {
        "type": "object",
        "description": "Parameters for deleting one or more service components from a status page.",
        "required": [
          "page_id",
          "component_ids"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of components to delete."
          }
        }
      },
      "DeleteStatusPageSectionRequest": {
        "type": "object",
        "description": "Parameters for deleting one or more sections from a status page.",
        "required": [
          "page_id",
          "section_ids"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "section_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of sections to delete."
          }
        }
      },
      "DeleteStatusPageTemplateRequest": {
        "type": "object",
        "description": "Parameters for deleting a status page template.",
        "required": [
          "page_id",
          "type",
          "template_id"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "type": {
            "type": "string",
            "enum": [
              "pre_defined",
              "message"
            ],
            "description": "Template category."
          },
          "template_id": {
            "type": "string",
            "description": "Template ID to delete."
          }
        }
      },
      "UpsertStatusPageComponentRequest": {
        "type": "object",
        "description": "Parameters for creating or updating one or more service components on a status page.",
        "required": [
          "page_id",
          "components"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "components": {
            "type": "array",
            "description": "Components to create or update.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "component_id": {
                  "type": "string",
                  "description": "Component ID. Omit to create a new component; supply to update an existing one."
                },
                "section_id": {
                  "type": "string",
                  "description": "Parent section ID. Omit to place the component at the top level."
                },
                "name": {
                  "type": "string",
                  "description": "Component display name."
                },
                "description": {
                  "type": "string",
                  "description": "Component description."
                },
                "order_id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Display order within its section."
                },
                "hide_uptime": {
                  "type": "boolean",
                  "description": "When true, uptime data is hidden from summary responses."
                },
                "hide_all": {
                  "type": "boolean",
                  "description": "When true, the component is hidden entirely from summary endpoints."
                }
              }
            }
          }
        }
      },
      "UpsertStatusPageComponentResponse": {
        "type": "object",
        "description": "Result of upserting status page components.",
        "required": [
          "component_ids"
        ],
        "properties": {
          "component_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the created or updated components, in the same order as the request."
          }
        }
      },
      "UpsertStatusPageSectionRequest": {
        "type": "object",
        "description": "Parameters for creating or updating one or more sections on a status page.",
        "required": [
          "page_id",
          "sections"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "sections": {
            "type": "array",
            "description": "Sections to create or update.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "section_id": {
                  "type": "string",
                  "description": "Section ID. Omit to create a new section; supply to update an existing one."
                },
                "name": {
                  "type": "string",
                  "description": "Section display name."
                },
                "description": {
                  "type": "string",
                  "description": "Section description."
                },
                "order_id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Display order."
                },
                "hide_uptime": {
                  "type": "boolean",
                  "description": "When true, uptime data for all components in this section is hidden."
                },
                "hide_all": {
                  "type": "boolean",
                  "description": "When true, the entire section is hidden from summary endpoints."
                }
              }
            }
          }
        }
      },
      "UpsertStatusPageSectionResponse": {
        "type": "object",
        "description": "Result of upserting status page sections.",
        "required": [
          "section_ids"
        ],
        "properties": {
          "section_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the created or updated sections, in the same order as the request."
          }
        }
      },
      "UpsertStatusPageTemplateRequest": {
        "type": "object",
        "description": "Parameters for creating or updating a status page template.",
        "required": [
          "page_id",
          "type",
          "template"
        ],
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Status page ID."
          },
          "type": {
            "type": "string",
            "enum": [
              "pre_defined",
              "message"
            ],
            "description": "Template category. `pre_defined` for predefined event templates; `message` for notification message templates."
          },
          "template": {
            "type": "object",
            "description": "Template content.",
            "required": [
              "title",
              "event_type",
              "status"
            ],
            "properties": {
              "template_id": {
                "type": "string",
                "description": "Template ID. Omit to create; supply to update."
              },
              "title": {
                "type": "string",
                "description": "Template title."
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "incident",
                  "maintenance"
                ],
                "description": "Event type this template applies to."
              },
              "status": {
                "type": "string",
                "enum": [
                  "investigating",
                  "identified",
                  "monitoring",
                  "resolved",
                  "scheduled",
                  "ongoing",
                  "completed"
                ],
                "description": "Event status this template represents."
              },
              "description": {
                "type": "string",
                "description": "Template body text (Markdown)."
              }
            }
          }
        }
      },
      "UpsertStatusPageTemplateResponse": {
        "type": "object",
        "description": "Result of upserting a status page template.",
        "required": [
          "template_id"
        ],
        "properties": {
          "template_id": {
            "type": "string",
            "description": "ID of the created or updated template."
          }
        }
      },
      "FacetCountItem": {
        "type": "object",
        "description": "A facet value and its occurrence count.",
        "required": [
          "facet_value",
          "count"
        ],
        "properties": {
          "facet_value": {
            "description": "The facet value. Type matches the field's `value_type`."
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of events with this facet value in the time range.",
            "example": 1523
          }
        }
      },
      "RumDataAggregateFunction": {
        "type": "object",
        "description": "Aggregate function metadata used by the sampling engine.",
        "required": [
          "type",
          "column_name",
          "column_index"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Aggregate function type."
          },
          "column_name": {
            "type": "string",
            "description": "Column name used by the aggregate."
          },
          "column_index": {
            "type": "integer",
            "description": "Column index used by the aggregate."
          }
        }
      },
      "RumDataFieldMeta": {
        "type": "object",
        "description": "Metadata for one returned column.",
        "required": [
          "name",
          "type",
          "nullable"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Column name."
          },
          "type": {
            "type": "string",
            "description": "Backend database type name for this column."
          },
          "nullable": {
            "type": "boolean",
            "description": "Whether values in this column may be null."
          }
        }
      },
      "RumDataQueryDefinition": {
        "type": "object",
        "description": "One RUM data query definition.",
        "required": [
          "id",
          "sql",
          "format"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "description": "Client-supplied query ID. The same value is used as the key in the response object."
          },
          "sql": {
            "type": "string",
            "description": "RUM SQL query to execute."
          },
          "dql": {
            "type": "string",
            "description": "Optional RUM DQL filter expression used together with SQL validation."
          },
          "format": {
            "type": "string",
            "enum": [
              "time_series",
              "table"
            ],
            "description": "Output format. `table` returns rows; `time_series` returns bucketed time-series rows."
          },
          "interval": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 3600,
            "description": "Time bucket interval in seconds for `time_series` queries."
          },
          "max_points": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 1226,
            "description": "Maximum number of points for `time_series` queries."
          },
          "time_zone": {
            "type": "string",
            "description": "IANA time zone name used when evaluating time functions, such as `Asia/Shanghai`."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor returned by a previous table query for continuing pagination."
          },
          "disable_sampling": {
            "type": "boolean",
            "description": "When true, asks the query engine to avoid sampling when possible."
          }
        }
      },
      "RumDataQueryOutput": {
        "type": "object",
        "description": "Result for one query. Failed subqueries populate `error`; successful ones populate `data`.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DutyError"
          },
          "data": {
            "$ref": "#/components/schemas/RumDataQueryResult"
          }
        }
      },
      "RumDataQueryRequest": {
        "type": "object",
        "description": "Batch of RUM data queries over a bounded time range.",
        "required": [
          "start_time",
          "end_time",
          "queries"
        ],
        "properties": {
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of the query window, Unix epoch milliseconds.",
            "example": 1712620800000
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of the query window, Unix epoch milliseconds. Maximum 31-day span.",
            "example": 1712707200000
          },
          "queries": {
            "type": "array",
            "description": "Queries to execute concurrently. 1 to 10 queries are allowed.",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/RumDataQueryDefinition"
            }
          }
        }
      },
      "RumDataQueryResponse": {
        "type": "object",
        "description": "Map from request query ID to that query's result or error.",
        "additionalProperties": {
          "$ref": "#/components/schemas/RumDataQueryOutput"
        }
      },
      "RumDataQueryResult": {
        "type": "object",
        "description": "Rows and metadata returned by one RUM data query.",
        "required": [
          "fields",
          "values"
        ],
        "properties": {
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque cursor for continuing paginated table queries."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumDataFieldMeta"
            },
            "description": "Column metadata for the values matrix."
          },
          "values": {
            "type": "array",
            "description": "Rows returned by the query. Each row aligns with `fields` by index.",
            "items": {
              "type": "array",
              "items": {}
            }
          },
          "interval": {
            "type": "integer",
            "format": "int64",
            "description": "Effective time bucket interval in seconds for time-series queries."
          },
          "sampling": {
            "$ref": "#/components/schemas/RumDataSamplingDecision"
          }
        }
      },
      "RumDataSamplingDecision": {
        "type": "object",
        "description": "Sampling metadata when the query engine uses sampled data.",
        "required": [
          "enabled",
          "scale_factor"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether sampling was applied."
          },
          "scale_factor": {
            "type": "number",
            "description": "Multiplier used to scale sampled counts back to estimated full counts."
          },
          "selected_tablets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Storage tablets selected for the sampled query."
          },
          "aggregate_funcs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumDataAggregateFunction"
            },
            "description": "Aggregate functions affected by sampling."
          }
        }
      },
      "RumFacetCountRequest": {
        "type": "object",
        "description": "Parameters for counting facet value distribution.",
        "required": [
          "scope",
          "facet_key",
          "start_time",
          "end_time"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "description": "RUM data scope to query.",
            "enum": [
              "session",
              "view",
              "action",
              "error",
              "resource",
              "long_task",
              "vital",
              "issue",
              "sourcemap"
            ]
          },
          "facet_key": {
            "type": "string",
            "description": "The field key to count value distribution for."
          },
          "facet_value": {
            "description": "When set, filter events where `facet_key` equals this value before counting. Accepts string, number, or boolean."
          },
          "start_time": {
            "type": "integer",
            "format": "int64",
            "description": "Start of the time range, Unix epoch milliseconds.",
            "example": 1712620800000
          },
          "end_time": {
            "type": "integer",
            "format": "int64",
            "description": "End of the time range, Unix epoch milliseconds. Maximum 31-day span.",
            "example": 1712707200000
          },
          "dql": {
            "type": "string",
            "description": "RUM DQL filter expression applied before counting."
          },
          "sql": {
            "type": "string",
            "description": "SQL WHERE clause (no SELECT) for additional filtering."
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of top values to return. Default 100, maximum 100.",
            "maximum": 100,
            "default": 100
          }
        }
      },
      "RumFacetCountResponse": {
        "type": "object",
        "description": "Top N facet values sorted by count descending.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacetCountItem"
            }
          }
        }
      },
      "RumFacetListRequest": {
        "type": "object",
        "description": "Filter parameters for listing RUM field definitions.",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`."
          },
          "is_facet": {
            "type": "boolean",
            "description": "When true, return only facet-enabled fields. When false or omitted, return all fields."
          }
        }
      },
      "RumFacetListResponse": {
        "type": "object",
        "description": "List of RUM field definitions.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumFieldItem"
            }
          }
        }
      },
      "RumFieldItem": {
        "type": "object",
        "description": "A RUM field definition.",
        "required": [
          "account_id",
          "field_key",
          "field_name",
          "group",
          "description",
          "value_type",
          "show_type",
          "unit_family",
          "unit_name",
          "edit_able",
          "is_facet",
          "enum_values",
          "scopes",
          "status",
          "queryable"
        ],
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID. 0 for built-in fields."
          },
          "field_key": {
            "type": "string",
            "description": "Unique field key, e.g. `error.type`."
          },
          "field_name": {
            "type": "string",
            "description": "Human-readable field name."
          },
          "group": {
            "type": "string",
            "description": "Display group for this field."
          },
          "description": {
            "type": "string",
            "description": "Description of what this field captures."
          },
          "value_type": {
            "type": "string",
            "description": "Data type of the field value.",
            "enum": [
              "string",
              "number",
              "boolean",
              "array<string>",
              "array<number>",
              "array<boolean>"
            ]
          },
          "show_type": {
            "type": "string",
            "description": "Display type in the analytics UI.",
            "enum": [
              "list",
              "range"
            ]
          },
          "unit_family": {
            "type": "string",
            "description": "Measurement unit family, e.g. `time`, `bytes`. Empty for dimensionless fields."
          },
          "unit_name": {
            "type": "string",
            "description": "Specific measurement unit, e.g. `millisecond`, `byte`."
          },
          "edit_able": {
            "type": "boolean",
            "description": "True if this is a custom field that can be edited by the user."
          },
          "is_facet": {
            "type": "boolean",
            "description": "True if value distribution counting is supported for this field."
          },
          "enum_values": {
            "type": "array",
            "description": "Predefined enumerable values for this field. Element type matches the field's `value_type`: string for `string`, number for `number`, boolean for `boolean`. Empty when the field has no fixed set of values.",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "RUM scopes this field appears in."
          },
          "status": {
            "type": "string",
            "description": "Field status, e.g. `active`."
          },
          "queryable": {
            "type": "boolean",
            "description": "True if this field can be used in DQL/SQL queries."
          }
        }
      },
      "RumFieldListRequest": {
        "type": "object",
        "description": "Filter parameters for listing RUM field definitions.",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`."
          },
          "is_facet": {
            "type": "boolean",
            "description": "When true, return only facet-enabled fields. When false or omitted, return all fields."
          }
        }
      },
      "RumFieldListResponse": {
        "type": "object",
        "description": "List of RUM field definitions.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RumFieldItem"
            }
          }
        }
      },
      "SourcemapBinaryImage": {
        "type": "object",
        "description": "Loaded binary image from a crash report.",
        "required": [
          "uuid",
          "name",
          "is_system"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "description": "Build UUID identifying the binary or dSYM."
          },
          "name": {
            "type": "string",
            "description": "Binary image name."
          },
          "is_system": {
            "type": "boolean",
            "description": "Whether this binary belongs to the operating system."
          },
          "load_address": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "format": "int64"
              }
            ],
            "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer."
          },
          "max_address": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "format": "int64"
              }
            ],
            "description": "Runtime address. Accepts a hex string such as `0x100000000` or a decimal integer."
          },
          "arch": {
            "type": "string",
            "description": "CPU architecture for this binary image."
          }
        }
      },
      "SourcemapCodeSnippet": {
        "type": "object",
        "description": "One source-code line returned around an enriched frame.",
        "required": [
          "line",
          "code"
        ],
        "properties": {
          "line": {
            "type": "integer",
            "description": "Source line number."
          },
          "code": {
            "type": "string",
            "description": "Source code on that line."
          }
        }
      },
      "SourcemapEnrichedFrame": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SourcemapStackFrame"
          },
          {
            "type": "object",
            "required": [
              "converted"
            ],
            "properties": {
              "converted": {
                "type": "boolean",
                "description": "Whether the frame was successfully symbolicated or deobfuscated."
              },
              "code_snippets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SourcemapCodeSnippet"
                },
                "description": "Source-code snippets around this frame."
              },
              "original_frame": {
                "$ref": "#/components/schemas/SourcemapStackFrame"
              },
              "third_party": {
                "type": "boolean",
                "description": "Whether the frame is from third-party or system libraries."
              }
            }
          }
        ]
      },
      "SourcemapStackEnrichRequest": {
        "type": "object",
        "description": "Stack trace enrichment request.",
        "required": [
          "service",
          "version"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "browser",
              "android",
              "ios",
              "miniprogram",
              "harmony"
            ],
            "description": "Source platform. Defaults to `browser` when omitted."
          },
          "service": {
            "type": "string",
            "description": "Application or service name used when the sourcemap was uploaded."
          },
          "version": {
            "type": "string",
            "description": "Application version used when the sourcemap was uploaded."
          },
          "stack": {
            "type": "string",
            "description": "Raw stack trace to parse and enrich."
          },
          "near": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "description": "Number of nearby meaningful source lines to return around converted frames."
          },
          "no_cache": {
            "type": "boolean",
            "description": "Skip cached enrich results. Intended for debugging."
          },
          "build_id": {
            "type": "string",
            "description": "Android build ID for Gradle plugin 1.13.0 and later."
          },
          "variant": {
            "type": "string",
            "description": "Android build variant used by older Gradle plugin versions."
          },
          "arch": {
            "type": "string",
            "description": "Android NDK architecture such as `arm`, `arm64`, `x86`, or `x64`."
          },
          "source_type": {
            "type": "string",
            "description": "Android error source type. Use `ndk` with `arch` for native symbolication."
          },
          "binary_images": {
            "type": "array",
            "description": "Loaded binary images from an iOS crash report.",
            "items": {
              "$ref": "#/components/schemas/SourcemapBinaryImage"
            }
          }
        }
      },
      "SourcemapStackEnrichResponse": {
        "type": "object",
        "description": "Enriched stack frames.",
        "required": [
          "frames"
        ],
        "properties": {
          "frames": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourcemapEnrichedFrame"
            }
          }
        }
      },
      "SourcemapStackFrame": {
        "type": "object",
        "description": "Parsed stack frame fields shared across platforms.",
        "properties": {
          "function": {
            "type": "string",
            "description": "Function or method name."
          },
          "file": {
            "type": "string",
            "description": "Source file, URL, or module path."
          },
          "line": {
            "type": "integer",
            "description": "Line number."
          },
          "column": {
            "type": "integer",
            "description": "Column number for JavaScript or Flutter frames."
          },
          "class_name": {
            "type": "string",
            "description": "Android Java/Kotlin class name."
          },
          "method_name": {
            "type": "string",
            "description": "Android Java/Kotlin method name without class prefix."
          },
          "module": {
            "type": "string",
            "description": "iOS Swift/Objective-C module name."
          },
          "address": {
            "type": "string",
            "description": "iOS or native memory address."
          },
          "offset": {
            "type": "integer",
            "description": "Symbol offset from function start."
          },
          "native_address": {
            "type": "string",
            "description": "Unity IL native address."
          }
        }
      },
      "CreateStatusPageRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name of the status page.",
            "maxLength": 255
          },
          "url_name": {
            "type": "string",
            "description": "URL-safe slug, unique per account and page type.",
            "maxLength": 255
          },
          "type": {
            "type": "string",
            "description": "Visibility type of the status page.",
            "enum": [
              "public",
              "internal"
            ]
          },
          "custom_domain": {
            "type": "string",
            "description": "Custom domain for a public status page.",
            "maxLength": 255
          },
          "page_title": {
            "type": "string",
            "description": "Browser title shown for the status page."
          },
          "page_header": {
            "type": "string",
            "description": "Header content shown on the status page."
          },
          "page_footer": {
            "type": "string",
            "description": "Footer content shown on the status page."
          },
          "date_view": {
            "type": "string",
            "description": "How event dates are displayed.",
            "enum": [
              "calendar",
              "list"
            ]
          },
          "display_uptime_mode": {
            "type": "string",
            "description": "How uptime is displayed.",
            "enum": [
              "chart_and_percentage",
              "chart",
              "none"
            ]
          },
          "custom_links": {
            "type": "array",
            "description": "Custom navigation links shown on the status page.",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "contact_info": {
            "type": "string",
            "description": "Get-in-touch contact, such as a mailto or website URL."
          },
          "subscription": {
            "$ref": "#/components/schemas/StatusPageSubscriptionItem"
          }
        },
        "required": [
          "name",
          "url_name",
          "type",
          "date_view",
          "display_uptime_mode"
        ]
      },
      "CreateStatusPageResponse": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "integer",
            "format": "int64",
            "description": "Created status page ID."
          },
          "page_name": {
            "type": "string",
            "description": "Created status page name."
          },
          "page_url_name": {
            "type": "string",
            "description": "Final URL-safe slug assigned to the status page."
          }
        },
        "required": [
          "page_id",
          "page_name",
          "page_url_name"
        ]
      },
      "A2AAgentCreateRequest": {
        "type": "object",
        "description": "Registration parameters for a new A2A agent.",
        "properties": {
          "agent_name": {
            "type": "string",
            "description": "Agent display name.",
            "maxLength": 128
          },
          "instructions": {
            "type": "string",
            "description": "Natural-language instructions for the remote agent. Required — a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.",
            "maxLength": 2000
          },
          "card_url": {
            "type": "string",
            "description": "URL of the remote agent card. Must be an absolute `http` or `https` URL with a non-empty host; reachability is enforced by the execution environment, not at creation time."
          },
          "auth_type": {
            "type": "string",
            "description": "Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`."
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Authentication config key-values, e.g. the API key or bearer token. Values for sensitive keys (`api_key`, `token`, `client_secret`) are masked back in responses."
          },
          "streaming": {
            "type": "boolean",
            "description": "Whether the remote agent supports streaming."
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope: 0 = account-wide; >0 = team. Creating at account scope requires the owner/admin role; creating into a team requires actual membership in that team.",
            "format": "int64"
          },
          "environment_kind": {
            "type": "string",
            "enum": [
              "",
              "byoc"
            ],
            "description": "Execution environment binding. Omit or send empty for automatic routing; `byoc` pins the agent to a specific runner given by `environment_id`. `cloud` is not accepted — configured A2A agents need a persistent runner, not a disposable cloud sandbox."
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC runner ID. Required when `environment_kind=byoc`; the runner must belong to the account or a team the caller belongs to."
          },
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode: `shared` (default) shares one credential across all users; `per_user_secret` requires `secret_schema.header_name`; `per_user_oauth` runs per-user OAuth."
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON-encoded secret schema, e.g. `{\"header_name\":\"X-Api-Key\"}`; required when `auth_mode=per_user_secret`."
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON-encoded OAuth metadata; populated by the OAuth discovery flow for `per_user_oauth` mode."
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS. Defaults to false."
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "Skip TLS certificate verification when connecting to this agent's endpoint (self-signed/private certs). Defaults to false."
          }
        },
        "required": [
          "agent_name",
          "instructions",
          "card_url"
        ]
      },
      "A2AAgentCreateResponse": {
        "type": "object",
        "description": "Result of registering an A2A agent.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "ID of the newly created agent."
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "A2AAgentIDRequest": {
        "type": "object",
        "description": "A2A agent lookup by ID.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Target agent ID."
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "A2AAgentItem": {
        "type": "object",
        "description": "A registered A2A (agent-to-agent) remote agent.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Unique A2A agent ID (prefix `a2a_`)."
          },
          "account_id": {
            "type": "integer",
            "description": "Owning account ID.",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope: 0 = account-wide; >0 = the owning team.",
            "format": "int64"
          },
          "can_edit": {
            "type": "boolean",
            "description": "Whether the caller may edit this agent."
          },
          "environment_kind": {
            "type": "string",
            "enum": [
              "",
              "byoc"
            ],
            "description": "Execution environment binding. Empty selects automatic routing; `byoc` pins the agent to a specific runner named by `environment_id`."
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC runner ID. Set only when `environment_kind=byoc`; empty otherwise."
          },
          "agent_name": {
            "type": "string",
            "description": "Agent display name."
          },
          "instructions": {
            "type": "string",
            "description": "Natural-language instructions for the remote agent (formerly named `description`).",
            "maxLength": 2000
          },
          "card_url": {
            "type": "string",
            "description": "URL of the remote agent card."
          },
          "auth_type": {
            "type": "string",
            "description": "Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`."
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Authentication config; sensitive values (`api_key`, `token`, `client_secret`) are masked."
          },
          "streaming": {
            "type": "boolean",
            "description": "Whether the remote agent supports streaming responses."
          },
          "status": {
            "type": "string",
            "description": "Agent status.",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "agent_card_name": {
            "type": "string",
            "description": "Agent name resolved from the remote card."
          },
          "agent_card_skills": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Skills advertised by the remote card."
          },
          "card_resolve_timeout": {
            "type": "integer",
            "description": "Card-resolution timeout in seconds. Always 0 today — the API does not yet expose a way to set it."
          },
          "task_timeout": {
            "type": "integer",
            "description": "Single-task execution timeout in seconds. Always 0 today — the API does not yet expose a way to set it."
          },
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode.",
            "enum": [
              "shared",
              "per_user_secret",
              "per_user_oauth"
            ]
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON-encoded secret schema (per_user_secret mode)."
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON-encoded OAuth metadata (per_user_oauth mode)."
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS."
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "Skip TLS certificate verification when connecting to this agent's endpoint."
          },
          "created_by": {
            "type": "integer",
            "description": "Member ID that created the agent.",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix timestamp in milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time. Unix timestamp in milliseconds."
          }
        },
        "required": [
          "agent_id",
          "account_id",
          "team_id",
          "can_edit",
          "environment_kind",
          "environment_id",
          "agent_name",
          "instructions",
          "card_url",
          "auth_type",
          "streaming",
          "status",
          "card_resolve_timeout",
          "task_timeout",
          "created_by",
          "created_at",
          "updated_at"
        ]
      },
      "A2AAgentListRequest": {
        "type": "object",
        "description": "Pagination, scope, and search filter for listing A2A agents.",
        "properties": {
          "offset": {
            "type": "integer",
            "description": "Row offset for pagination.",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "description": "Page size.",
            "default": 20
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "account",
              "team"
            ],
            "default": "all",
            "description": "Visibility scope: `all` (account-scope plus the caller's visible teams), `account` (account-scope only), or `team` (team-scoped rows across the caller's visible teams)."
          },
          "query": {
            "type": "string",
            "description": "Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.",
            "maxLength": 128
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter to these team IDs; empty = the caller's visible set."
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Include account-scoped (team_id=0) rows. Defaults to true."
          }
        }
      },
      "A2AAgentListResponse": {
        "type": "object",
        "description": "Paginated A2A agent list.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/A2AAgentItem"
            },
            "description": "A2A agents on this page."
          },
          "total": {
            "type": "integer",
            "description": "Total number of matching agents.",
            "format": "int64"
          }
        },
        "required": [
          "items",
          "total"
        ]
      },
      "A2AAgentUpdateRequest": {
        "type": "object",
        "description": "Partial update of an A2A agent. A null/omitted field is left unchanged.",
        "properties": {
          "agent_id": {
            "type": "string",
            "description": "Target agent ID."
          },
          "agent_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "New display name. Omit to leave unchanged.",
            "maxLength": 128
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ],
            "description": "New instructions. Omit to leave unchanged. A deprecated `description` field is also accepted; if both are sent they must match.",
            "maxLength": 2000
          },
          "card_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "New card URL. Omit to leave unchanged."
          },
          "auth_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "New auth type. Omit to leave unchanged."
          },
          "auth_config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Replace the auth config. Omit to leave unchanged. Sending back the masked value (or an empty string) for a sensitive key keeps the stored secret instead of overwriting it."
          },
          "streaming": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Toggle streaming support. Omit to leave unchanged."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Reassign team scope. Omit to leave unchanged. Reassigning requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.",
            "format": "int64"
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "New execution environment binding: empty for automatic, `byoc` for a specific runner. `cloud` is rejected. Omit to leave unchanged."
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "New BYOC runner ID. Required alongside `environment_kind=byoc`. Omit to leave unchanged."
          },
          "auth_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "New auth mode: shared, per_user_secret, or per_user_oauth. Changing it always rewrites secret_schema together with it."
          },
          "secret_schema": {
            "type": [
              "string",
              "null"
            ],
            "description": "New JSON secret schema."
          },
          "oauth_metadata": {
            "type": [
              "string",
              "null"
            ],
            "description": "New JSON OAuth metadata. If omitted while auth_mode changes, it is cleared to empty."
          },
          "allow_insecure_oauth_http": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged."
          },
          "allow_insecure_tls_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged."
          }
        },
        "required": [
          "agent_id"
        ]
      },
      "AutomationRuleCreateRequest": {
        "type": "object",
        "description": "Create an Automation rule.",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Rule name."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the rule is enabled after creation. Omitted API value is false; Chat/CLI create sends true by default unless the user asks for disabled."
          },
          "cron_expr": {
            "type": "string",
            "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported. A cron that sets both day-of-month and day-of-week is rejected. The create API currently requires this field even for HTTP-POST-only rules; send a valid cron and set `schedule_trigger_enabled=false`.",
            "example": "15 9 * * *"
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone `cron_expr` is evaluated in, e.g. `Asia/Shanghai`. Must be a timezone name loadable by the server; an invalid value is rejected. Defaults to the caller's member timezone, then the account timezone, then UTC when omitted."
          },
          "schedule_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the schedule trigger is enabled. Defaults to true when omitted; HTTP-POST-only rules should send false."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "Task prompt sent to the AI SRE agent on each run."
          },
          "environment_kind": {
            "type": "string",
            "description": "Runtime environment kind. Omit or send an empty value for automatic selection.",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID. Used only when `environment_kind=byoc`."
          },
          "http_post_trigger_enabled": {
            "type": "boolean",
            "description": "Whether to create and enable an HTTP POST trigger. When enabled, the response includes a one-time token."
          },
          "oncall_incident_trigger_enabled": {
            "type": "boolean",
            "description": "Whether the On-call incident trigger is enabled."
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID."
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value."
          }
        },
        "required": [
          "name",
          "cron_expr",
          "prompt"
        ]
      },
      "AutomationRuleIDRequest": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "Rule ID."
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRuleItem": {
        "type": "object",
        "description": "Automation rule.",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "Rule ID."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Scope team ID; 0 means personal rule."
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Creator person ID."
          },
          "name": {
            "type": "string",
            "description": "Rule name."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the rule is enabled."
          },
          "run_scope": {
            "type": "string",
            "enum": [
              "person",
              "team"
            ],
            "description": "Hidden session run scope."
          },
          "cron_expr": {
            "type": "string",
            "description": "Normalized 5-field cron expression."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone `cron_expr` is evaluated in. Always populated for rules created after this field shipped; empty on legacy rows created before it, which still resolve to UTC when scheduled."
          },
          "prompt": {
            "type": "string",
            "description": "Task prompt."
          },
          "environment_kind": {
            "type": "string",
            "description": "Runtime environment kind. Omit or send an empty value for automatic selection.",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "BYOC Runner ID."
          },
          "schedule_trigger_id": {
            "type": "string",
            "description": "Schedule trigger ID."
          },
          "schedule_trigger_enabled": {
            "type": "boolean",
            "description": "Whether the schedule trigger is enabled."
          },
          "http_post_trigger_id": {
            "type": "string",
            "description": "HTTP POST trigger ID."
          },
          "http_post_trigger_url": {
            "type": "string",
            "description": "HTTP POST trigger path."
          },
          "http_post_trigger_enabled": {
            "type": "boolean",
            "description": "Whether the HTTP POST trigger is enabled."
          },
          "oncall_incident_trigger_id": {
            "type": "string",
            "description": "On-call incident trigger ID."
          },
          "oncall_incident_trigger_enabled": {
            "type": "boolean",
            "description": "Whether the On-call incident trigger is enabled."
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID."
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value."
          },
          "http_post_token": {
            "type": "string",
            "description": "HTTP POST trigger token. Returned only on create or token rotation; save it immediately."
          },
          "can_edit": {
            "type": "boolean",
            "description": "True when the caller can manage this rule: the personal rule owner; for team rules, an account admin or a member of the rule's team."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time, Unix milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time, Unix milliseconds."
          },
          "schedule_next_fire_at_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Next scheduled fire time, Unix milliseconds. 0 means no future scheduled fire is available."
          }
        },
        "required": [
          "rule_id",
          "account_id",
          "team_id",
          "owner_id",
          "name",
          "enabled",
          "run_scope",
          "cron_expr",
          "timezone",
          "prompt",
          "environment_kind",
          "environment_id",
          "schedule_trigger_enabled",
          "http_post_trigger_enabled",
          "can_edit",
          "created_at",
          "updated_at",
          "schedule_next_fire_at_ms",
          "oncall_incident_trigger_enabled"
        ]
      },
      "AutomationRuleListRequest": {
        "type": "object",
        "description": "List Automation rules visible to the caller. `all` includes the caller's personal rules plus accessible team rules; account admins do not see other users' personal rules in list results.",
        "properties": {
          "p": {
            "type": "integer",
            "default": 1,
            "description": "Page number, 1-based."
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "description": "Page size."
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "personal",
              "team"
            ],
            "description": "Scope filter: `all` (own personal + accessible team rules), `personal`, or `team`; default `all`."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter to these team IDs; this narrows results and does not expand access."
          },
          "include_person": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Compatibility field; when scope is empty and this is false, behaves like team scope."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Filter by enabled status."
          },
          "keyword": {
            "type": "string",
            "maxLength": 64,
            "description": "Filter by name keyword."
          }
        }
      },
      "AutomationRuleListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total count."
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRuleItem"
            }
          }
        },
        "required": [
          "total",
          "rules"
        ]
      },
      "AutomationRuleUpdateRequest": {
        "type": "object",
        "description": "Update an Automation rule. Omit or send null on a field to leave it unchanged.",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "Target rule ID."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "New rule name."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0,
            "description": "Only the current value is accepted; personal/team scope is immutable after creation."
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the rule is enabled."
          },
          "cron_expr": {
            "type": [
              "string",
              "null"
            ],
            "description": "Run cadence. Supports 4 fields (`hour day month weekday`, minute defaults to 0) and 5 fields (`minute hour day month weekday`). The minute must be one fixed integer; 6-field seconds are not supported.",
            "example": "15 9 * * *"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "New IANA timezone for evaluating `cron_expr`. Omit or send null to leave the current timezone unchanged."
          },
          "schedule_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the schedule trigger is enabled."
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "New task prompt."
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Runtime environment kind. Omit or send an empty value for automatic selection.",
            "enum": [
              "",
              "cloud",
              "byoc"
            ]
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "BYOC Runner ID."
          },
          "http_post_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the HTTP POST trigger is enabled. Sending true creates one when missing."
          },
          "oncall_incident_trigger_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the On-call incident trigger is enabled."
          },
          "oncall_incident_channel_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "On-call integration IDs to watch. Creating or enabling this trigger requires at least one valid ID."
          },
          "oncall_incident_severities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Critical",
                "Warning",
                "Info"
              ]
            },
            "description": "Incident severities to watch. Supported values are Critical, Warning, and Info; creating or enabling this trigger requires at least one value."
          },
          "rotate_http_post_trigger_token": {
            "type": "boolean",
            "description": "Whether to rotate the HTTP POST trigger token. The new token is returned only in this response."
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRunItem": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "description": "Run ID."
          },
          "kind": {
            "type": "string",
            "description": "Run kind."
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Account ID."
          },
          "rule_id": {
            "type": "string",
            "description": "Rule ID."
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "schedule",
              "debug",
              "manual",
              "http_post",
              "oncall_incident"
            ],
            "description": "Trigger kind."
          },
          "occurrence_key": {
            "type": "string",
            "description": "Idempotency key for this occurrence."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "retrying",
              "succeeded",
              "partial",
              "failed",
              "skipped",
              "abandoned"
            ],
            "description": "Run status."
          },
          "attempts": {
            "type": "integer",
            "description": "Attempt count."
          },
          "started_at": {
            "type": "integer",
            "format": "int64",
            "description": "Start time, Unix milliseconds."
          },
          "completed_at": {
            "type": "integer",
            "format": "int64",
            "description": "Completion time, Unix milliseconds. 0 means not completed."
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Duration in milliseconds."
          },
          "error_code": {
            "type": "string",
            "description": "Error code."
          },
          "error_message": {
            "type": "string",
            "description": "Error message."
          },
          "stats_json": {
            "description": "Run stats JSON."
          },
          "result_json": {
            "description": "Run result JSON."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time, Unix milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time, Unix milliseconds."
          }
        },
        "required": [
          "run_id",
          "kind",
          "account_id",
          "rule_id",
          "trigger_kind",
          "occurrence_key",
          "status",
          "attempts",
          "started_at",
          "completed_at",
          "duration_ms",
          "created_at",
          "updated_at"
        ]
      },
      "AutomationRunListRequest": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "Target rule ID."
          },
          "p": {
            "type": "integer",
            "default": 1,
            "description": "Page number, 1-based."
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "description": "Page size."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "retrying",
              "succeeded",
              "partial",
              "failed",
              "skipped",
              "abandoned"
            ],
            "description": "Run status filter."
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "schedule",
              "debug",
              "manual",
              "http_post",
              "oncall_incident"
            ],
            "description": "Trigger kind filter."
          },
          "started_after_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Start-time lower bound, Unix milliseconds."
          },
          "started_before_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Start-time upper bound, Unix milliseconds."
          }
        },
        "required": [
          "rule_id"
        ]
      },
      "AutomationRunListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total count."
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRunItem"
            }
          }
        },
        "required": [
          "total",
          "runs"
        ]
      },
      "AutomationRunView": {
        "type": "object",
        "description": "Reference to the run started by a manual trigger.",
        "properties": {
          "run_id": {
            "type": "string",
            "description": "Run ID, always populated once a run is created."
          },
          "session_id": {
            "type": "string",
            "description": "AI SRE session ID for this run. Always populated in a 200 response, since the call only returns after the session has started."
          }
        },
        "required": [
          "run_id"
        ]
      },
      "AutomationTemplateItem": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Template name."
          },
          "description": {
            "type": "string",
            "description": "Template description."
          },
          "icon": {
            "type": "string",
            "description": "Icon identifier."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the template is enabled."
          },
          "prompt": {
            "type": "string",
            "description": "Template prompt."
          }
        },
        "required": [
          "name",
          "description",
          "icon",
          "enabled",
          "prompt"
        ]
      },
      "AutomationTemplateListRequest": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string",
            "maxLength": 16,
            "description": "Template locale such as zh-CN or en-US. Omit to detect from the request locale."
          }
        }
      },
      "AutomationTemplateListResponse": {
        "type": "object",
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationTemplateItem"
            }
          }
        },
        "required": [
          "templates"
        ]
      },
      "ContextResolvedItem": {
        "type": "object",
        "description": "Snapshot of the three-tier knowledge-pack resolution for this session.",
        "properties": {
          "account_pack_id": {
            "type": "string",
            "description": "Resolved account-scoped pack id."
          },
          "team_pack_id": {
            "type": "string",
            "description": "Resolved team-scoped pack id."
          },
          "incident_id": {
            "type": "string",
            "description": "Bound incident id, when war-room originated."
          },
          "resolved_at_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds when the packs were resolved."
          },
          "versions": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Per-pack resolved version map."
          }
        },
        "required": [
          "resolved_at_ms"
        ]
      },
      "EnvironmentBinding": {
        "type": "object",
        "description": "The runner or cloud sandbox the session is bound to. Null until the first message.",
        "properties": {
          "kind": {
            "type": "string",
            "description": "Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner).",
            "enum": [
              "cloud",
              "byoc"
            ]
          },
          "id": {
            "type": "string",
            "description": "Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings."
          },
          "name": {
            "type": "string",
            "description": "Human-readable environment name; empty for cloud bindings using the default allowlist."
          },
          "status": {
            "type": "string",
            "description": "Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired.",
            "enum": [
              "online",
              "pending",
              "offline",
              "deleted",
              "available",
              "rebuilding",
              "expired"
            ]
          }
        },
        "required": [
          "kind",
          "id"
        ]
      },
      "EventItem": {
        "type": "object",
        "description": "One persisted session event. content/actions/usage_metadata carry the raw ADK envelope; treat them as opaque structured payloads.",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Event identifier."
          },
          "session_id": {
            "type": "string",
            "description": "Owning session id."
          },
          "invocation_id": {
            "type": "string",
            "description": "ADK invocation id grouping a turn."
          },
          "author": {
            "type": "string",
            "description": "Event author (e.g. user, the agent name)."
          },
          "branch": {
            "type": "string",
            "description": "ADK branch path for nested agents."
          },
          "content": {
            "type": "object",
            "additionalProperties": true,
            "description": "ADK content envelope {role, parts:[...]}."
          },
          "actions": {
            "type": "object",
            "additionalProperties": true,
            "description": "ADK actions envelope (state deltas, transfers, escalation)."
          },
          "usage_metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Per-turn token usage metadata."
          },
          "partial": {
            "type": "boolean",
            "description": "True for a streaming partial chunk."
          },
          "turn_complete": {
            "type": "boolean",
            "description": "True on the terminal event of a turn."
          },
          "error_code": {
            "type": "string",
            "description": "Error code when the event represents a failure."
          },
          "error_message": {
            "type": "string",
            "description": "Human-readable error message, when present."
          },
          "status": {
            "type": "string",
            "description": "Event status.",
            "enum": [
              "normal",
              "compressed"
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds when the event was written."
          }
        },
        "required": [
          "event_id",
          "session_id",
          "partial",
          "turn_complete",
          "created_at"
        ]
      },
      "MCPServerCreateRequest": {
        "type": "object",
        "description": "Configuration for a new MCP server.",
        "properties": {
          "server_name": {
            "type": "string",
            "description": "MCP server name, unique within the account.",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Server description.",
            "minLength": 1,
            "maxLength": 1024
          },
          "transport": {
            "type": "string",
            "description": "Transport protocol.",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "Executable command (stdio transport)."
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Command arguments (stdio transport)."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables (stdio transport)."
          },
          "url": {
            "type": "string",
            "description": "Server URL (sse / streamable-http transport)."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP headers (sse / streamable-http)."
          },
          "connect_timeout": {
            "type": "integer",
            "description": "Connection timeout in seconds. 0 = default (10s)."
          },
          "call_timeout": {
            "type": "integer",
            "description": "Tool-call timeout in seconds. 0 = default (60s)."
          },
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth."
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON secret schema; required when auth_mode=per_user_secret."
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON OAuth metadata; reserved for per_user_oauth."
          },
          "status": {
            "type": "string",
            "description": "Initial status.",
            "enum": [
              "enabled",
              "disabled"
            ],
            "default": "enabled"
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope: 0 = account-wide; >0 = team.",
            "format": "int64"
          },
          "environment_kind": {
            "type": "string",
            "description": "Pin the server to a specific BYOC runner (`environment_id` required). Omit or send empty for automatic selection; `cloud` is not supported for MCP servers.",
            "enum": [
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "Runner ID; required when environment_kind is byoc."
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "Allow this server's OAuth token exchange over plaintext HTTP. Testing use only; defaults to false."
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "Skip TLS certificate verification when connecting to this server. Testing use only; defaults to false."
          },
          "source_template_name": {
            "type": "string",
            "description": "Marketplace template name when created from a connector template."
          }
        },
        "required": [
          "server_name",
          "description",
          "transport"
        ]
      },
      "MCPServerDeleteRequest": {
        "type": "object",
        "description": "MCP server deletion by ID.",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "Target MCP server ID."
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerGetRequest": {
        "type": "object",
        "description": "MCP server lookup by ID.",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "Target MCP server ID."
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerItem": {
        "type": "object",
        "description": "An MCP server (connector) registered on the account.",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "Unique MCP server ID (prefix `mcp_`)."
          },
          "account_id": {
            "type": "integer",
            "description": "Owning account ID.",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope: 0 = account-wide; >0 = the owning team.",
            "format": "int64"
          },
          "can_edit": {
            "type": "boolean",
            "description": "Whether the caller may edit this server."
          },
          "environment_kind": {
            "type": "string",
            "description": "Runtime environment kind: empty for automatic selection, or `byoc` when pinned to a specific runner. `cloud` cannot be bound to an MCP server.",
            "enum": [
              "",
              "byoc"
            ]
          },
          "environment_id": {
            "type": "string",
            "description": "Runner ID when environment_kind is byoc; empty otherwise."
          },
          "server_name": {
            "type": "string",
            "description": "MCP server name, unique within the account."
          },
          "description": {
            "type": "string",
            "description": "Server description."
          },
          "ai_description": {
            "type": "string",
            "description": "LLM-generated description, preferred over `description` when present."
          },
          "transport": {
            "type": "string",
            "description": "Transport protocol.",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "Executable command (stdio transport only)."
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Command arguments (stdio transport)."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables (stdio transport). Secret values are masked."
          },
          "url": {
            "type": "string",
            "description": "Server URL (sse / streamable-http transport)."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP headers (sse / streamable-http). Secret values are masked."
          },
          "proxy_url": {
            "type": "string",
            "description": "Outbound proxy URL used to reach the server."
          },
          "status": {
            "type": "string",
            "description": "Server status.",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "connect_timeout": {
            "type": "integer",
            "description": "Connection timeout in seconds (0 = server default, 10s)."
          },
          "call_timeout": {
            "type": "integer",
            "description": "Tool-call timeout in seconds (0 = server default, 60s)."
          },
          "allow_insecure_oauth_http": {
            "type": "boolean",
            "description": "Allow this server's OAuth token exchange over plaintext HTTP; testing use only."
          },
          "allow_insecure_tls_skip_verify": {
            "type": "boolean",
            "description": "Skip TLS certificate verification when connecting to this server; testing use only."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPToolInfo"
            },
            "description": "Live tool list; populated by the get/test endpoints."
          },
          "tool_count": {
            "type": "integer",
            "description": "Number of tools in the live list."
          },
          "list_error": {
            "type": "string",
            "description": "Error message when the live tool list failed."
          },
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode.",
            "enum": [
              "shared",
              "per_user_secret",
              "per_user_oauth"
            ]
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON-encoded secret schema (per_user_secret mode)."
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON-encoded OAuth metadata (per_user_oauth mode)."
          },
          "source_template_name": {
            "type": "string",
            "description": "Marketplace template this connector was installed from; empty for user-authored."
          },
          "created_by": {
            "type": "integer",
            "description": "Member ID that created the server.",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix timestamp in milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time. Unix timestamp in milliseconds."
          }
        },
        "required": [
          "server_id",
          "account_id",
          "team_id",
          "can_edit",
          "environment_kind",
          "environment_id",
          "server_name",
          "description",
          "transport",
          "status",
          "connect_timeout",
          "call_timeout",
          "created_by",
          "created_at",
          "updated_at"
        ]
      },
      "MCPServerListRequest": {
        "type": "object",
        "description": "Pagination, scope, and search filters for listing MCP servers.",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Page number, 1-based.",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size.",
            "default": 20
          },
          "scope": {
            "type": "string",
            "description": "Restrict results to a scope: `account` for account-wide rows only, `team` for the caller's own visible team rows only, or omit (defaults to `all`) for both, subject to team_ids/include_account.",
            "enum": [
              "all",
              "account",
              "team"
            ]
          },
          "query": {
            "type": "string",
            "maxLength": 128,
            "description": "Case-insensitive substring search across name, description, AI-generated description, server ID, transport, URL, command, and source template name."
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter to these team IDs; empty = the caller's visible set."
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Include account-scoped (team_id=0) rows. Defaults to true."
          }
        }
      },
      "MCPServerListResponse": {
        "type": "object",
        "description": "Paginated MCP server list.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of matching servers.",
            "format": "int64"
          },
          "servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MCPServerItem"
            },
            "description": "MCP servers on this page."
          }
        },
        "required": [
          "total",
          "servers"
        ]
      },
      "MCPServerStatusRequest": {
        "type": "object",
        "description": "MCP server enable/disable by ID.",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "Target MCP server ID."
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPServerUpdateRequest": {
        "type": "object",
        "description": "Partial update of an MCP server. Omit a field to leave it unchanged.",
        "properties": {
          "server_id": {
            "type": "string",
            "description": "Target MCP server ID."
          },
          "server_name": {
            "type": "string",
            "description": "New name.",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "New description.",
            "minLength": 1,
            "maxLength": 1024
          },
          "transport": {
            "type": "string",
            "description": "Transport protocol.",
            "enum": [
              "stdio",
              "sse",
              "streamable-http"
            ]
          },
          "command": {
            "type": "string",
            "description": "Executable command (stdio transport)."
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Command arguments (stdio transport)."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables (stdio transport)."
          },
          "url": {
            "type": "string",
            "description": "Server URL (sse / streamable-http transport)."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "HTTP headers (sse / streamable-http)."
          },
          "connect_timeout": {
            "type": "integer",
            "description": "Connection timeout in seconds. 0 = default (10s)."
          },
          "call_timeout": {
            "type": "integer",
            "description": "Tool-call timeout in seconds. 0 = default (60s)."
          },
          "auth_mode": {
            "type": "string",
            "description": "Authentication mode: shared (default), per_user_secret, or per_user_oauth."
          },
          "secret_schema": {
            "type": "string",
            "description": "JSON secret schema; required when auth_mode=per_user_secret."
          },
          "oauth_metadata": {
            "type": "string",
            "description": "JSON OAuth metadata; reserved for per_user_oauth."
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.",
            "format": "int64"
          },
          "environment_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reassign the runner binding: `byoc` (with environment_id) or empty string to reset to automatic selection. Omit (null) to leave the current binding unchanged."
          },
          "environment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Runner ID paired with environment_kind=byoc. Omit (null) to leave the current binding unchanged."
          },
          "allow_insecure_oauth_http": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Allow OAuth token exchange over plaintext HTTP. Omit to leave unchanged."
          },
          "allow_insecure_tls_skip_verify": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Skip TLS certificate verification. Omit to leave unchanged."
          }
        },
        "required": [
          "server_id"
        ]
      },
      "MCPToolInfo": {
        "type": "object",
        "description": "Metadata for one tool exposed by an MCP server.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Tool name."
          },
          "description": {
            "type": "string",
            "description": "Tool description."
          },
          "input_schema": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON Schema describing the tool's input parameters."
          }
        },
        "required": [
          "name",
          "description"
        ]
      },
      "ManualRunRuleResult": {
        "type": "object",
        "description": "Result of manually running an Automation rule outside its schedule.",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "Rule ID that was run."
          },
          "trigger_kind": {
            "type": "string",
            "enum": [
              "manual"
            ],
            "description": "Always manual for this operation."
          },
          "preflight": {
            "$ref": "#/components/schemas/PreflightResult"
          },
          "run": {
            "$ref": "#/components/schemas/AutomationRunView"
          }
        },
        "required": [
          "rule_id",
          "trigger_kind",
          "preflight"
        ]
      },
      "PreflightResult": {
        "type": "object",
        "description": "Readiness checks computed before a manual run is allowed to start.",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "Whether all readiness checks passed. Always true in a response that reaches the caller — a failed preflight returns a 400/403 error instead of a payload with ok=false."
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the readiness checks performed, in order. Current fixed set: rule_loaded, actor_authorized, app_allowed, runtime_scope_resolved, rule_config_valid."
          },
          "scope": {
            "type": "string",
            "enum": [
              "person",
              "team"
            ],
            "description": "Resolved run scope for this run; mirrors the rule's run_scope."
          },
          "owner_id": {
            "type": "integer",
            "format": "int64",
            "description": "Rule owner person ID."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Rule's scope team ID; 0 means a personal rule."
          },
          "app_name": {
            "type": "string",
            "description": "App the rule is scoped to. Currently always ai-sre; manual runs are only supported for that app."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-fatal warnings surfaced during preflight. Omitted or empty when there are none."
          }
        },
        "required": [
          "ok",
          "checks",
          "scope",
          "owner_id",
          "team_id",
          "app_name"
        ]
      },
      "SessionDeleteRequest": {
        "type": "object",
        "description": "Session deletion by ID.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Target session ID.",
            "minLength": 1
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionExportRequest": {
        "type": "object",
        "description": "Export the full event transcript of one session as a streaming NDJSON body.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Target session ID."
          },
          "include_subagents": {
            "type": "boolean",
            "description": "When true, each subagent_dispatch line is followed by the child session's full event stream, bracketed by its own session_meta. Defaults to false."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionGetRequest": {
        "type": "object",
        "description": "Fetch one session plus a backward-paged window of its most recent events.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Target session ID.",
            "minLength": 1
          },
          "num_recent_events": {
            "type": "integer",
            "description": "Legacy page size: number of most-recent events to return. Superseded by `limit` when both are set; 0 uses the server default (100).",
            "minimum": 0,
            "maximum": 1000
          },
          "limit": {
            "type": "integer",
            "description": "Page size for events; takes precedence over `num_recent_events`. 0 uses the server default (100).",
            "minimum": 0,
            "maximum": 1000
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque keyset cursor from a previous response; pass it back to fetch the next older page.",
            "maxLength": 4096
          }
        },
        "required": [
          "session_id"
        ]
      },
      "SessionGetResponse": {
        "type": "object",
        "description": "A session plus a backward-paged window of its events.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/SessionItem"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventItem"
            },
            "description": "Recent events, ascending by (created_at, event_id)."
          },
          "has_more_older": {
            "type": "boolean",
            "description": "True when older events remain beyond this page."
          },
          "search_after_ctx": {
            "type": "string",
            "description": "Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false."
          },
          "suggest_init": {
            "type": "boolean",
            "description": "Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not specific to this session."
          }
        },
        "required": [
          "session",
          "events",
          "has_more_older",
          "suggest_init"
        ]
      },
      "SessionItem": {
        "type": "object",
        "description": "One agent session row.",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session identifier."
          },
          "parent_session_id": {
            "type": "string",
            "description": "Parent session id for subagent (child) sessions; empty otherwise."
          },
          "session_name": {
            "type": "string",
            "description": "Session title; may be empty for untitled sessions."
          },
          "app_name": {
            "type": "string",
            "description": "Agent app that owns the session."
          },
          "entry_kind": {
            "type": "string",
            "description": "Surface that created the session.",
            "enum": [
              "web",
              "im",
              "api",
              "automation",
              "subagent"
            ]
          },
          "person_id": {
            "type": "string",
            "description": "Creator person id."
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Owning team id; 0 means no team is bound. Immutable after create."
          },
          "team_name": {
            "type": "string",
            "description": "Resolved team name; empty for unbound rows or deleted teams."
          },
          "is_mine": {
            "type": "boolean",
            "description": "True when the caller created this session."
          },
          "can_manage": {
            "type": "boolean",
            "description": "True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member."
          },
          "status": {
            "type": "string",
            "description": "Lifecycle status.",
            "enum": [
              "enabled",
              "deleted"
            ]
          },
          "incognito": {
            "type": "boolean",
            "description": "True for incognito (non-persisted-memory) sessions."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds when the session was created."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds of the last session update."
          },
          "template_staging_round_id": {
            "type": "string",
            "description": "Current save→validate round id (template-assistant only); empty otherwise."
          },
          "state": {
            "type": "object",
            "additionalProperties": true,
            "description": "Raw session-state bag (session-scoped keys). Omitted when empty."
          },
          "bound_environment": {
            "$ref": "#/components/schemas/EnvironmentBinding"
          },
          "context_resolved": {
            "$ref": "#/components/schemas/ContextResolvedItem"
          },
          "token_usage": {
            "$ref": "#/components/schemas/SessionTokenUsage"
          },
          "current_context_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed."
          },
          "context_window": {
            "type": "integer",
            "format": "int64",
            "description": "The bound model's max context size in tokens. 0 means unknown."
          },
          "archived_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds when archived; 0 means not archived."
          },
          "pinned_at": {
            "type": "integer",
            "format": "int64",
            "description": "Caller's per-user pin timestamp in milliseconds; 0 means not pinned."
          },
          "last_event_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds of the most recent assistant-side event."
          },
          "is_running": {
            "type": "boolean",
            "description": "True when an agent turn is currently in flight for this session."
          },
          "has_unread": {
            "type": "boolean",
            "description": "True when there is assistant output the caller has not yet viewed."
          },
          "current_turn_started_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet."
          },
          "current_turn_active_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round."
          },
          "current_turn_wait_ms": {
            "type": "integer",
            "format": "int64",
            "description": "Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round."
          },
          "current_turn_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle."
          }
        },
        "required": [
          "session_id",
          "session_name",
          "app_name",
          "person_id",
          "team_id",
          "is_mine",
          "can_manage",
          "status",
          "incognito",
          "created_at",
          "updated_at",
          "current_context_tokens",
          "context_window",
          "archived_at",
          "pinned_at",
          "is_running",
          "has_unread",
          "current_turn_started_at",
          "current_turn_active_ms",
          "current_turn_wait_ms",
          "current_turn_tokens"
        ]
      },
      "SessionListRequest": {
        "type": "object",
        "description": "Filters for listing agent sessions. `all` visibility means the caller's own personal sessions plus accessible team sessions; account admins do not see other users' personal sessions.",
        "properties": {
          "app_name": {
            "type": "string",
            "description": "Agent app whose sessions to list.",
            "enum": [
              "ask-ai",
              "support",
              "support-website",
              "support-flashcat",
              "ai-sre",
              "template-assistant",
              "swe"
            ]
          },
          "p": {
            "type": "integer",
            "description": "Page number, 1-based.",
            "default": 1,
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size, 1–100.",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "orderby": {
            "type": "string",
            "description": "Sort field.",
            "enum": [
              "created_at",
              "updated_at"
            ]
          },
          "asc": {
            "type": "boolean",
            "description": "Ascending order when true; applies only when `orderby` is set."
          },
          "include_subagent_sessions": {
            "type": "boolean",
            "description": "Include subagent-dispatched sessions in the list."
          },
          "keyword": {
            "type": "string",
            "description": "Filter by session-name keyword.",
            "maxLength": 64
          },
          "scope": {
            "type": "string",
            "description": "Visibility scope: `all` (own personal + accessible team sessions), `personal`, or `team`; default `all`.",
            "enum": [
              "all",
              "personal",
              "team"
            ]
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Optional explicit team filter; intersects with `scope` and never expands access."
          },
          "entry_kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "im",
                "api",
                "automation"
              ]
            },
            "description": "Restrict to sessions produced by these surfaces; empty returns every kind."
          },
          "status": {
            "type": "string",
            "description": "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both.",
            "enum": [
              "active",
              "archived",
              "all"
            ]
          }
        },
        "required": [
          "app_name"
        ]
      },
      "SessionListResponse": {
        "type": "object",
        "description": "A page of agent sessions.",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of sessions matching the filter (ignoring pagination)."
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionItem"
            },
            "description": "The page of sessions."
          },
          "suggest_init": {
            "type": "boolean",
            "description": "Account-wide onboarding flag: true when the account has zero knowledge packs in any scope; not dependent on this call's filters."
          }
        },
        "required": [
          "total",
          "sessions",
          "suggest_init"
        ]
      },
      "SessionTokenUsage": {
        "type": "object",
        "description": "Cumulative session-level token rollup across all turns. The account-billing source of truth.",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total prompt (input) tokens, including the cached portion."
          },
          "cached_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Portion of input_tokens served from the prompt cache."
          },
          "output_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total generated (output) tokens."
          },
          "reasoning_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Total reasoning/thinking tokens."
          }
        },
        "required": [
          "input_tokens",
          "cached_tokens",
          "output_tokens",
          "reasoning_tokens"
        ]
      },
      "SkillDeleteRequest": {
        "type": "object",
        "description": "Skill deletion by ID.",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "Target skill ID."
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillGetRequest": {
        "type": "object",
        "description": "Skill lookup by ID.",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "Target skill ID."
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillItem": {
        "type": "object",
        "description": "An AI SRE skill — a packaged SKILL.md bundle the agent can load.",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "Unique skill ID (prefix `skill_`)."
          },
          "account_id": {
            "type": "integer",
            "description": "Owning account ID.",
            "format": "int64"
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope: 0 = account-wide; >0 = the owning team.",
            "format": "int64"
          },
          "skill_name": {
            "type": "string",
            "description": "Skill name, unique within the account."
          },
          "description": {
            "type": "string",
            "description": "Human-readable description from the SKILL.md frontmatter."
          },
          "description_en": {
            "type": "string",
            "description": "Optional English description. English-locale UI responses prefer this over `description`; the skill catalog also uses it as a stable selection signal when `description` is localized for display."
          },
          "content": {
            "type": "string",
            "description": "Full SKILL.md content. Omitted in list responses."
          },
          "version": {
            "type": "string",
            "description": "Skill version from the frontmatter."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags parsed from the frontmatter."
          },
          "author": {
            "type": "string",
            "description": "Skill author."
          },
          "license": {
            "type": "string",
            "description": "Skill license."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Required tools (builtin or `mcp:server/tool`)."
          },
          "s3_key": {
            "type": "string",
            "description": "Object-storage key of the skill zip."
          },
          "checksum": {
            "type": "string",
            "description": "SHA-256 checksum of the skill zip."
          },
          "status": {
            "type": "string",
            "description": "Skill status. Deleted skills are excluded from every API response, so only these two values are ever returned.",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "created_by": {
            "type": "integer",
            "description": "Member ID that created the skill.",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time. Unix timestamp in milliseconds."
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Last update time. Unix timestamp in milliseconds."
          },
          "can_edit": {
            "type": "boolean",
            "description": "Whether the caller may edit this skill."
          },
          "source_template_name": {
            "type": "string",
            "description": "Marketplace template this skill was installed from; empty for user-authored."
          },
          "source_template_version": {
            "type": "string",
            "description": "Template version at install time."
          },
          "update_available": {
            "type": "boolean",
            "description": "True when the marketplace has a newer template version."
          },
          "is_modified": {
            "type": "boolean",
            "description": "True when a marketplace-sourced skill was edited locally (auto-update skips it)."
          },
          "created": {
            "type": "boolean",
            "description": "Set only on install-from-session responses: true = fresh install, false = in-place update."
          }
        },
        "required": [
          "skill_id",
          "account_id",
          "team_id",
          "skill_name",
          "description",
          "status",
          "created_by",
          "created_at",
          "updated_at",
          "can_edit",
          "update_available",
          "is_modified"
        ]
      },
      "SkillListRequest": {
        "type": "object",
        "description": "Pagination, search, and team filter for listing skills.",
        "properties": {
          "p": {
            "type": "integer",
            "description": "Page number, 1-based.",
            "default": 1
          },
          "limit": {
            "type": "integer",
            "description": "Page size.",
            "default": 20
          },
          "scope": {
            "type": "string",
            "description": "Restrict results to `all` (default), `account`-only (team_id=0), or `team`-only (excludes account-scoped rows). Overrides `include_account` when set.",
            "enum": [
              "all",
              "account",
              "team"
            ]
          },
          "query": {
            "type": "string",
            "description": "Free-text search across skill name, description, English description, skill ID, marketplace source template name, and author.",
            "maxLength": 128
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Filter to these team IDs; empty = the caller's visible set."
          },
          "include_account": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Include account-scoped (team_id=0) rows. Defaults to true. Ignored when `scope` is `account` or `team`."
          }
        }
      },
      "SkillListResponse": {
        "type": "object",
        "description": "Paginated skill list.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of matching skills.",
            "format": "int64"
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillItem"
            },
            "description": "Skills on this page."
          }
        },
        "required": [
          "total",
          "skills"
        ]
      },
      "SkillStatusRequest": {
        "type": "object",
        "description": "Skill enable/disable by ID.",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "Target skill ID."
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillUpdateRequest": {
        "type": "object",
        "description": "Editable skill metadata.",
        "properties": {
          "skill_id": {
            "type": "string",
            "description": "Target skill ID."
          },
          "description": {
            "type": "string",
            "description": "New description. Cannot contain `<` or `>`. Sending an empty string leaves the current value unchanged — there is no way to clear it via this field.",
            "maxLength": 1024
          },
          "description_en": {
            "type": [
              "string",
              "null"
            ],
            "description": "New English description. Cannot contain `<` or `>`. Omit to leave unchanged; send an empty string to explicitly clear it.",
            "maxLength": 1024
          },
          "team_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.",
            "format": "int64"
          }
        },
        "required": [
          "skill_id"
        ]
      },
      "SkillUploadRequest": {
        "type": "object",
        "description": "Multipart form for uploading a skill archive.",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Skill archive (.skill / .zip / .tar.gz / .tgz). Max 100MB; oversized files are rejected before the body is read."
          },
          "team_id": {
            "type": "integer",
            "description": "Team scope for the created/upserted skill: 0 = account-wide. Ignored when replacing a specific skill via `skill_id`.",
            "format": "int64"
          },
          "replace": {
            "type": "boolean",
            "description": "When true, overwrite an existing skill instead of failing on a name collision — matched by `skill_id` if provided, otherwise by skill name."
          },
          "skill_id": {
            "type": "string",
            "description": "Existing skill ID to target when replacing a specific skill (requires `replace=true`)."
          }
        },
        "required": [
          "file"
        ]
      }
    }
  }
}