{
  "openapi": "3.1.0",
  "info": {
    "title": "AI SRE API",
    "version": "1.4.6",
    "description": "Start AI SRE chats with the agent, reply to them, read its answers, and approve or deny the tool calls it asks you to confirm."
  },
  "servers": [
    {
      "url": "https://chat.betterstack.com"
    }
  ],
  "x-cli-token-env": "BETTERSTACK_GLOBAL_API_TOKEN",
  "security": [
    {
      "teamApiToken": []
    },
    {
      "globalApiToken": []
    },
    {
      "userOauth": []
    }
  ],
  "tags": [
    {
      "name": "ai_sre_github_integration",
      "description": "An AI SRE GitHub integration, which gives AI SRE your GitHub repositories to read code and propose fixes.",
      "x-wire-type": "github_integration"
    },
    {
      "name": "ai_sre_integration_authorization",
      "description": "A link that connects GitHub to your team's AI SRE. A person who can manage your team's AI SRE integrations opens it in a browser, signs in with GitHub and picks the repositories. Once the sign-in finishes, `status` is `completed`.",
      "x-wire-type": "integration_authorization"
    },
    {
      "name": "chat",
      "description": "A conversation with the AI SRE agent, with your messages, the agent's answers, and the tool calls it asks you to confirm."
    },
    {
      "name": "chat_confirmation",
      "description": "A tool call the AI SRE agent wants to run and asks you to approve or deny first. The agent waits until the tool call is approved or denied.",
      "x-wire-type": "confirmation"
    },
    {
      "name": "chat_model",
      "description": "A model an AI SRE chat can run on. A model's ID is the slug to pass as `model` when creating a chat or replying.",
      "x-wire-type": "model"
    }
  ],
  "paths": {
    "/api/v1/github-integrations": {
      "get": {
        "operationId": "list_ai_sre_github_integration",
        "summary": "List the GitHub accounts connected to your AI SRE, each with the repositories you use.",
        "tags": [
          "ai_sre_github_integration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/github-integrations",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of ai_sre_github_integration objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSreGitHubIntegrationList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The AI SRE GitHub integration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "A GitHub account connected to several of your teams appears once for each team, with the same ID. `team_id` tells them apart."
        ],
        "x-cli-default-fields": [
          "id",
          "account_login",
          "account_type",
          "status",
          "team_name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "account_login",
          "account_type",
          "status",
          "can_create_pull_requests",
          "settings_url",
          "repositories",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.ai_sre_github_integration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_ai_sre_github_integration",
        "summary": "Create a GitHub integration for AI SRE.",
        "description": "You'll get a link back to open in your browser and finish setting up the integration.",
        "tags": [
          "ai_sre_github_integration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "POST /api/v1/github-integrations",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "202": {
            "description": "A single ai_sre_integration_authorization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSreIntegrationAuthorizationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The AI SRE GitHub integration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "503": {
            "description": "The link couldn't be created right now. Nothing is created. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-request-body": "none",
        "x-cli-default-fields": [
          "id",
          "integration_type",
          "status",
          "integration_id",
          "expires_at"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "integration_type",
          "status",
          "status_reason",
          "authorization_url",
          "expires_at",
          "integration_id",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.ai_sre_github_integration.create"
        },
        "x-cli-wait": {
          "observe": "get_ai_sre_integration_authorization",
          "bindings": {
            "id": {
              "source": "result",
              "path": [
                "id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "completed"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "failed",
                "expired"
              ]
            }
          ],
          "messages": [
            "status_reason"
          ],
          "description": "GitHub is connected."
        },
        "x-cli-open-url": "authorization_url",
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/github-integrations/{id}": {
      "get": {
        "operationId": "get_ai_sre_github_integration",
        "summary": "Get a GitHub account connected to your AI SRE, with the repositories you use.",
        "tags": [
          "ai_sre_github_integration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/github-integrations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_github_integration": {
                "summary": "Get a GitHub integration",
                "value": "49349"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single ai_sre_github_integration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSreGitHubIntegrationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The AI SRE GitHub integration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The GitHub account is connected to several of your teams. Name one with `team_id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "account_login",
          "account_type",
          "status",
          "team_name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "account_login",
          "account_type",
          "status",
          "can_create_pull_requests",
          "settings_url",
          "repositories",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.ai_sre_github_integration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_ai_sre_github_integration",
        "summary": "Remove repositories from a GitHub integration.",
        "description": "Send the repositories to keep. The others are removed from your team. Error tracking applications that used a removed repository stop opening pull requests for it. AI Engineer routines and settings that used it lose it too. Your other teams keep their repositories. The last repository can't be removed.",
        "tags": [
          "ai_sre_github_integration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v1/github-integrations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "keep_two_repositories": {
                "summary": "Keep two repositories",
                "value": "49349"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single ai_sre_github_integration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSreGitHubIntegrationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The AI SRE GitHub integration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A repository in `repositories` isn't one the team uses, or the list is empty. To add a repository, connect GitHub again. The GitHub account is connected to several of your teams. Name one with `team_id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiSreGitHubIntegrationUpdate"
              },
              "examples": {
                "keep_two_repositories": {
                  "summary": "Keep two repositories",
                  "value": {
                    "repositories": [
                      {
                        "id": 89949
                      },
                      {
                        "id": 89951
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "account_login",
          "account_type",
          "status",
          "team_name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "account_login",
          "account_type",
          "status",
          "can_create_pull_requests",
          "settings_url",
          "repositories",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.ai_sre_github_integration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/integration-authorizations/{id}": {
      "get": {
        "operationId": "get_ai_sre_integration_authorization",
        "summary": "Check whether connecting an AI SRE integration finished.",
        "description": "Once `status` is `completed`, GitHub is connected and the repositories are added. The authorization is deleted a day after its link expires.",
        "tags": [
          "ai_sre_integration_authorization"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/integration-authorizations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_an_ai_sre_integration_authorization": {
                "summary": "Get an AI SRE integration authorization",
                "value": "hD0Ms9nZ2Yd4mVq1pX7bL8cT3rF6wK5jA0eS9uG2iNy"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single ai_sre_integration_authorization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSreIntegrationAuthorizationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The AI SRE integration authorization doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "503": {
            "description": "The authorization couldn't be loaded right now. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "integration_type",
          "status",
          "integration_id",
          "expires_at"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "integration_type",
          "status",
          "status_reason",
          "authorization_url",
          "expires_at",
          "integration_id",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.ai_sre_github_integration.create"
        },
        "x-cli-wait": {
          "observe": "get_ai_sre_integration_authorization",
          "bindings": {
            "id": {
              "source": "params",
              "path": [
                "id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "completed"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "failed",
                "expired"
              ]
            }
          ],
          "messages": [
            "status_reason"
          ],
          "description": "The integration is connected."
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/chats/models": {
      "get": {
        "operationId": "list_chat_model",
        "summary": "List the models a chat can be created on or switched to, in the order the web app offers them.",
        "tags": [
          "chat_model"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/chats/models",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team whose default model is marked with `default`, such as `t123`. Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of chat_model objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatModelList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat model doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "A model that is no longer offered isn't listed, though a chat already on it keeps running on it."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "provider",
          "tier",
          "input_usd_per_million_tokens",
          "output_usd_per_million_tokens",
          "default"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "provider",
          "tier",
          "us_hosted",
          "capabilities",
          "input_usd_per_million_tokens",
          "output_usd_per_million_tokens",
          "default"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat_model.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/chats/{chat_id}/confirmations/{id}": {
      "patch": {
        "operationId": "resolve_chat_confirmation",
        "summary": "Approve or deny a pending confirmation.",
        "description": "The agent is told the result and carries on, so the chat's status returns to `processing`.",
        "tags": [
          "chat_confirmation"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v2/chats/:chat_id/confirmations/:id",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "12345"
              ]
            },
            "description": "The ID of the chat the confirmation belongs to.",
            "x-path-wildcard": false,
            "examples": {
              "resolve_a_chat_confirmation": {
                "summary": "Resolve a chat confirmation",
                "value": "12345"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "501"
              ]
            },
            "description": "Confirmation ID, from the chat's `pending_confirmations`.",
            "x-path-wildcard": false,
            "examples": {
              "resolve_a_chat_confirmation": {
                "summary": "Resolve a chat confirmation",
                "value": "501"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to look the chat up in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "200": {
            "description": "A single chat_confirmation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatConfirmationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, your role doesn't have the AI SRE `change` permission, or the chat's organization can't use AI SRE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No such chat, or no such confirmation in that chat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "409": {
            "description": "The confirmation is no longer pending, because it was already approved, denied or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `approved` attribute is missing or isn't a JSON boolean, or the body has an attribute other than `approved`, `comment` and `allow_tool_for_session`. The string `\"true\"` is refused too. `required_attributes` names a missing `approved`, `invalid_values` a value that isn't a boolean, and `invalid_attributes` an unknown attribute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approved": {
                    "type": "boolean",
                    "description": "`true` approves the tool call, `false` denies it. Must be a JSON boolean.",
                    "examples": [
                      true
                    ]
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment saved as `resolution_note`. When you deny the tool call, the agent sees the comment as the reason.",
                    "examples": [
                      "Approved: restart checkout-api during the incident."
                    ]
                  },
                  "allow_tool_for_session": {
                    "type": "boolean",
                    "description": "On an approval, also allow this tool for the rest of the agent's session, so it doesn't ask again.",
                    "examples": [
                      false
                    ]
                  }
                },
                "required": [
                  "approved"
                ]
              },
              "examples": {
                "resolve_a_chat_confirmation": {
                  "summary": "Resolve a chat confirmation",
                  "value": {
                    "approved": true,
                    "allow_tool_for_session": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "A confirmation resolved with OAuth is recorded under your name. A confirmation resolved with a team or global API token isn't recorded under anyone's name."
        ],
        "x-cli-default-fields": [
          "id",
          "tool_name",
          "status",
          "resolution_note",
          "confirmed_at"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "tool_name",
          "tool_input",
          "status",
          "resolution_note",
          "expires_at",
          "confirmed_at",
          "created_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat_confirmation.resolve"
        },
        "x-cli-wait": {
          "observe": "status_chat",
          "bindings": {
            "id": {
              "source": "params",
              "path": [
                "chat_id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "idle"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "awaiting_confirmation"
              ]
            }
          ],
          "result": {
            "operation": "get_chat",
            "bindings": {
              "id": {
                "source": "params",
                "path": [
                  "chat_id"
                ]
              }
            }
          },
          "description": "The agent has finished and the chat is idle. The answer is the text of the last agent message. Stops early when the agent asks for another confirmation."
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/chats": {
      "get": {
        "operationId": "list_chat",
        "summary": "List your chats in every team, most recently updated first.",
        "description": "Read a chat's messages via [Get a single chat](/docs/ai-sre/api/chats/get/).",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/chats",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to narrow the list to, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of chat objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` parameter isn't an integer, which `invalid_values` names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "status",
          "model",
          "last_message_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "status",
          "message_count",
          "last_message_at",
          "total_tokens",
          "model",
          "total_cost_usd",
          "created_at",
          "updated_at",
          "messages",
          "pending_confirmations",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_chat",
        "summary": "Create a chat and have the agent start working on its message.",
        "description": "Returns at once with the chat in status `processing` and no answer yet. Poll [Get chat status](/docs/ai-sre/api/chats/status/) until the status leaves `processing`, then read the answer via [Get a single chat](/docs/ai-sre/api/chats/get/).",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/chats",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to create the chat in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "201": {
            "description": "A single chat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatDocument"
                }
              }
            }
          },
          "400": {
            "description": "The `model` attribute isn't a model a chat can run on. The response lists the accepted slugs in `available_models`, next to `errors`. Nothing is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, your role doesn't have the AI SRE `change` permission, or your organization can't use AI SRE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `message` attribute is blank, and `invalid_values` names it. Send the question as a `message` with text in it. The `message` attribute is missing and `required_attributes` names it, the body has an attribute other than `message`, `name` and `model`, which `invalid_attributes` names, or the token can access more than one team and `team_id` isn't set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The first user message.",
                    "examples": [
                      "Why did checkout start returning 5xx at 10:15?"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "description": "Chat name.",
                    "examples": [
                      "Checkout 5xx spike"
                    ]
                  },
                  "model": {
                    "type": "string",
                    "description": "Slug of the model to run the chat on, one of the IDs [List chat models](/docs/ai-sre/api/models/list/) lists. Defaults to your team's default model.",
                    "examples": [
                      "anthropic/claude-opus-5.5"
                    ]
                  }
                },
                "required": [
                  "message"
                ]
              },
              "examples": {
                "create_a_chat": {
                  "summary": "Create a chat",
                  "value": {
                    "message": "Why did checkout start returning 5xx at 10:15?",
                    "name": "Checkout 5xx spike",
                    "model": "anthropic/claude-opus-5.5"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "A message posted with OAuth is posted under your name. A message posted with a team or global API token has no author.",
          "A model that was replaced by a newer version is accepted and runs the chat on its successor."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "status",
          "model",
          "messages",
          "pending_confirmations"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "status",
          "message_count",
          "last_message_at",
          "total_tokens",
          "model",
          "total_cost_usd",
          "created_at",
          "updated_at",
          "messages",
          "pending_confirmations",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat.list"
        },
        "x-cli-wait": {
          "observe": "status_chat",
          "bindings": {
            "id": {
              "source": "result",
              "path": [
                "id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "idle"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "awaiting_confirmation"
              ]
            }
          ],
          "result": {
            "operation": "get_chat",
            "bindings": {
              "id": {
                "source": "result",
                "path": [
                  "id"
                ]
              }
            }
          },
          "description": "The agent has finished and the chat is idle. The answer is the text of the last agent message. Stops early when the agent asks for a confirmation."
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/chats/{chat_id}/messages": {
      "post": {
        "operationId": "reply_chat",
        "summary": "Reply to a chat and have the agent start working on the reply.",
        "description": "Returns at once with the chat in status `processing`. The chat's transcript ends with your new message and an empty agent message, which the answer fills in. Poll [Get chat status](/docs/ai-sre/api/chats/status/) until the status leaves `processing`, then read the answer via [Get a single chat](/docs/ai-sre/api/chats/get/).",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/chats/:chat_id/messages",
        "parameters": [
          {
            "name": "chat_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "12345"
              ]
            },
            "description": "Chat ID.",
            "x-path-wildcard": false,
            "examples": {
              "reply_to_a_chat": {
                "summary": "Reply to a chat",
                "value": "12345"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to look the chat up in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "201": {
            "description": "A single chat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatDocument"
                }
              }
            }
          },
          "400": {
            "description": "The `model` attribute isn't a model the chat can run on. The response lists the accepted slugs in `available_models`, next to `errors`. The accepted slugs are the ones [List chat models](/docs/ai-sre/api/models/list/) lists, plus the chat's current model when that model is no longer offered. Nothing is posted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, your role doesn't have the AI SRE `change` permission, or the chat's organization can't use AI SRE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "409": {
            "description": "The agent is still working, so the status is `processing`. Nothing is posted. Poll status and retry once it's `idle`. The agent is waiting on a confirmation, so the status is `awaiting_confirmation`. Nothing is posted. Resolve the confirmation first, then reply.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A value is refused, and `invalid_values` names it. Either `message` is blank, or `model` was sent for a chat whose `model` is `null`. A chat without a `model` keeps the model it started with, so leave `model` out, or start a new chat on the model you want via [Create a chat](/docs/ai-sre/api/chats/create/). The `message` attribute is missing and `required_attributes` names it, or the body has an attribute other than `message` and `model`, which `invalid_attributes` names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The user message.",
                    "examples": [
                      "Was the payments service affected too?"
                    ]
                  },
                  "model": {
                    "type": "string",
                    "description": "Switches the chat to this model from this reply on. Accepts one of the IDs [List chat models](/docs/ai-sre/api/models/list/) lists, or the chat's current model. Omit to keep the current one.",
                    "examples": [
                      "anthropic/claude-opus-5.5"
                    ]
                  }
                },
                "required": [
                  "message"
                ]
              },
              "examples": {
                "reply_to_a_chat": {
                  "summary": "Reply to a chat",
                  "value": {
                    "message": "Was the payments service affected too?"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "A message posted with OAuth is posted under your name. A message posted with a team or global API token has no author."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "status",
          "model",
          "messages",
          "pending_confirmations"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "status",
          "message_count",
          "last_message_at",
          "total_tokens",
          "model",
          "total_cost_usd",
          "created_at",
          "updated_at",
          "messages",
          "pending_confirmations",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat.list"
        },
        "x-cli-wait": {
          "observe": "status_chat",
          "bindings": {
            "id": {
              "source": "params",
              "path": [
                "chat_id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "idle"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "awaiting_confirmation"
              ]
            }
          ],
          "result": {
            "operation": "get_chat",
            "bindings": {
              "id": {
                "source": "params",
                "path": [
                  "chat_id"
                ]
              }
            }
          },
          "description": "The agent has finished and the chat is idle. The answer is the text of the last agent message. Stops early when the agent asks for a confirmation."
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/chats/{id}": {
      "delete": {
        "operationId": "delete_chat",
        "summary": "Remove a chat and its transcript.",
        "description": "An agent still working on it is stopped.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/chats/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "12345"
              ]
            },
            "description": "Chat ID.",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_chat": {
                "summary": "Delete a chat",
                "value": "12345"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to look the chat up in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_chat",
        "summary": "Get a chat with its full transcript.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/chats/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "12345"
              ]
            },
            "description": "Chat ID.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_chat": {
                "summary": "Get a chat",
                "value": "12345"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to look the chat up in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "200": {
            "description": "A single chat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "status",
          "model",
          "messages",
          "pending_confirmations"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "status",
          "message_count",
          "last_message_at",
          "total_tokens",
          "model",
          "total_cost_usd",
          "created_at",
          "updated_at",
          "messages",
          "pending_confirmations",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat.list"
        },
        "x-cli-wait": {
          "observe": "status_chat",
          "bindings": {
            "id": {
              "source": "params",
              "path": [
                "id"
              ]
            }
          },
          "success": {
            "path": [
              "status"
            ],
            "expected": {
              "source": "literal",
              "value": "idle"
            }
          },
          "failure": [
            {
              "path": [
                "status"
              ],
              "in": [
                "awaiting_confirmation"
              ]
            }
          ],
          "result": {
            "operation": "get_chat",
            "bindings": {
              "id": {
                "source": "params",
                "path": [
                  "id"
                ]
              }
            }
          },
          "description": "The agent has finished and the chat is idle. The answer is the text of the last agent message. Stops early when the agent asks for a confirmation."
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/chats/{id}/status": {
      "get": {
        "operationId": "status_chat",
        "summary": "Check whether the agent is working on a chat or waiting, and which tool calls the agent is waiting for you to approve.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "chat",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/chats/:id/status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "12345"
              ]
            },
            "description": "Chat ID.",
            "x-path-wildcard": false,
            "examples": {
              "chat_status": {
                "summary": "Chat status",
                "value": "12345"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123456"
              ]
            },
            "description": "The team to look the chat up in, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Use it with a global or OAuth token."
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the chat's `status` and `pending_confirmations`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Chat ID.",
                          "examples": [
                            "12345"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "chat_status"
                          ],
                          "description": "Always `chat_status`.",
                          "examples": [
                            "chat_status"
                          ]
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "processing",
                                "awaiting_confirmation",
                                "idle"
                              ],
                              "description": "Whether the agent is working or waiting.",
                              "x-enum-descriptions": {
                                "processing": "The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.",
                                "awaiting_confirmation": "The agent is waiting for you to approve or deny a tool call.",
                                "idle": "The agent isn't working, and the chat accepts a reply."
                              },
                              "examples": [
                                "awaiting_confirmation"
                              ]
                            },
                            "pending_confirmations": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Confirmation ID, to resolve it via [Approve or deny a confirmation](/docs/ai-sre/api/chats/resolve-confirmation/)."
                                  },
                                  "tool_name": {
                                    "type": "string",
                                    "description": "Tool the agent wants to run."
                                  },
                                  "tool_input": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included."
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "pending",
                                      "approved",
                                      "denied",
                                      "expired"
                                    ],
                                    "description": "Always `pending` here."
                                  },
                                  "resolution_note": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "Note recorded when the confirmation was resolved."
                                  },
                                  "expires_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the confirmation expires if nobody resolves it."
                                  },
                                  "confirmed_at": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the confirmation was resolved."
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the agent asked for the confirmation."
                                  }
                                }
                              },
                              "description": "The pending confirmations the agent is waiting on that haven't expired, oldest first. Empty unless the status is `awaiting_confirmation`.",
                              "examples": [
                                [
                                  {
                                    "id": "501",
                                    "tool_name": "Bash",
                                    "tool_input": {
                                      "command": "kubectl rollout restart deployment/checkout-api -n production"
                                    },
                                    "status": "pending",
                                    "resolution_note": null,
                                    "expires_at": "2026-09-07T11:31:05.000Z",
                                    "confirmed_at": null,
                                    "created_at": "2026-09-07T10:31:05.000Z"
                                  }
                                ]
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chat doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-response-fields": [
          "id",
          "type",
          "status",
          "pending_confirmations"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.chat.chat.status"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "attributes_path": []
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "teamApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token scoped to one team."
      },
      "globalApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Organization-wide API token that can reach several teams."
      },
      "userOauth": {
        "type": "oauth2",
        "flows": {},
        "description": "OAuth access token bound to a signed-in user."
      }
    },
    "schemas": {
      "AiSreGitHubIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ai_sre_github_integration's id."
          },
          "type": {
            "type": "string",
            "const": "github_integration"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "account_login": {
                "type": "string",
                "description": "The GitHub user or organization the Better Stack GitHub App is installed on.",
                "readOnly": true,
                "examples": [
                  "acme"
                ]
              },
              "account_type": {
                "type": "string",
                "enum": [
                  "Organization",
                  "User"
                ],
                "description": "Whether the GitHub account is an organization or a user.",
                "readOnly": true,
                "examples": [
                  "Organization"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "suspended"
                ],
                "description": "The state of the GitHub App on this account.",
                "x-enum-descriptions": {
                  "active": "The GitHub App works on this account.",
                  "suspended": "The account's owner suspended the GitHub App on GitHub."
                },
                "readOnly": true,
                "examples": [
                  "active"
                ]
              },
              "can_create_pull_requests": {
                "type": "boolean",
                "description": "Whether the GitHub App can push branches and open pull requests. The value is `false` until the account's owner accepts the updated GitHub App permissions on GitHub.",
                "readOnly": true,
                "examples": [
                  true
                ]
              },
              "settings_url": {
                "type": "string",
                "description": "The GitHub page where the account's owner picks which repositories the GitHub App can access.",
                "readOnly": true,
                "examples": [
                  "https://github.com/organizations/acme/settings/installations/12345678"
                ]
              },
              "repositories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "description": "ID of the repository."
                    },
                    "full_name": {
                      "type": "string",
                      "description": "The repository's owner and name, such as `acme/api`.",
                      "readOnly": true
                    },
                    "default_branch": {
                      "type": "string",
                      "description": "The repository's default branch.",
                      "readOnly": true
                    }
                  }
                },
                "description": "The repositories of this GitHub account the team uses.",
                "examples": [
                  [
                    {
                      "id": 89949,
                      "full_name": "acme/api",
                      "default_branch": "main"
                    }
                  ]
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "ID of the team the GitHub account is connected to, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123456"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team the GitHub account is connected to.",
                "readOnly": true,
                "examples": [
                  "My team"
                ]
              }
            }
          }
        }
      },
      "AiSreGitHubIntegrationDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiSreGitHubIntegration"
          }
        }
      },
      "AiSreGitHubIntegrationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiSreGitHubIntegration"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "AiSreGitHubIntegrationUpdate": {
        "$ref": "#/components/schemas/AiSreGitHubIntegrationUpdateAttributes"
      },
      "AiSreGitHubIntegrationUpdateAttributes": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the repository."
                },
                "full_name": {
                  "type": "string",
                  "description": "The repository's owner and name, such as `acme/api`.",
                  "readOnly": true
                },
                "default_branch": {
                  "type": "string",
                  "description": "The repository's default branch.",
                  "readOnly": true
                }
              }
            },
            "description": "The repositories of this GitHub account the team uses. Send the repositories to keep, each by its `id`. The others are removed from the team. To add one, connect GitHub again.",
            "examples": [
              [
                {
                  "id": "89949",
                  "full_name": "acme/api",
                  "default_branch": "main"
                }
              ]
            ]
          }
        }
      },
      "AiSreIntegrationAuthorization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ai_sre_integration_authorization's id."
          },
          "type": {
            "type": "string",
            "const": "integration_authorization"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "integration_type": {
                "type": "string",
                "enum": [
                  "github"
                ],
                "description": "The integration being connected.",
                "readOnly": true,
                "examples": [
                  "github"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "completed",
                  "failed",
                  "expired"
                ],
                "description": "Whether the integration is connected yet.",
                "x-enum-descriptions": {
                  "pending": "Waiting for a person to open `authorization_url` and finish the sign-in.",
                  "completed": "GitHub is connected and the repositories are added.",
                  "failed": "The sign-in didn't connect the integration. `status_reason` says why.",
                  "expired": "Nobody finished the sign-in in time."
                },
                "readOnly": true,
                "examples": [
                  "pending"
                ]
              },
              "status_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why connecting failed, as the sign-in page showed it. `null` unless `status` is `failed`.",
                "readOnly": true
              },
              "authorization_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The link that connects the integration. Open it in a browser, sign in to Better Stack, then sign in with the provider. `null` once the link expires or the sign-in ends. A link created with your own sign-in rather than an API token opens only for you.",
                "readOnly": true,
                "examples": [
                  "https://chat.betterstack.com/team/t123/integrations/github/connect?authorization_id=hD0Ms9nZ2Yd4mVq1pX7bL8cT3rF6wK5jA0eS9uG2iNy"
                ]
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the link expires, 30 minutes after it was created. A sign-in started before then has 30 more minutes to finish.",
                "readOnly": true,
                "examples": [
                  "2026-11-24T16:30:00.000Z"
                ]
              },
              "integration_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The ID of the connected integration. Always `null` for GitHub.",
                "readOnly": true
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team the integration is connected to, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "AiSreIntegrationAuthorizationDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiSreIntegrationAuthorization"
          }
        }
      },
      "CLIResponse.chat.ai_sre_github_integration.create": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "integration_type": {
            "type": "string",
            "enum": [
              "github"
            ],
            "description": "The integration being connected.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed",
              "expired"
            ],
            "description": "Whether the integration is connected yet.\n\n- `pending`: Waiting for a person to open `authorization_url` and finish the sign-in.\n- `completed`: GitHub is connected and the repositories are added.\n- `failed`: The sign-in didn't connect the integration. `status_reason` says why.\n- `expired`: Nobody finished the sign-in in time.",
            "x-enum-descriptions": {
              "pending": "Waiting for a person to open `authorization_url` and finish the sign-in.",
              "completed": "GitHub is connected and the repositories are added.",
              "failed": "The sign-in didn't connect the integration. `status_reason` says why.",
              "expired": "Nobody finished the sign-in in time."
            },
            "nullable": false,
            "sensitive": false
          },
          "status_reason": {
            "type": "string",
            "description": "Why connecting failed, as the sign-in page showed it. `null` unless `status` is `failed`.",
            "nullable": true,
            "sensitive": false
          },
          "authorization_url": {
            "type": "string",
            "description": "The link that connects the integration. Open it in a browser, sign in to Better Stack, then sign in with the provider. `null` once the link expires or the sign-in ends. A link created with your own sign-in rather than an API token opens only for you.",
            "nullable": true,
            "sensitive": false
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the link expires, 30 minutes after it was created. A sign-in started before then has 30 more minutes to finish.",
            "nullable": false,
            "sensitive": false
          },
          "integration_id": {
            "type": "string",
            "description": "The ID of the connected integration. Always `null` for GitHub.",
            "nullable": true,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team the integration is connected to, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.chat.ai_sre_github_integration.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "account_login": {
            "type": "string",
            "description": "The GitHub user or organization the Better Stack GitHub App is installed on.",
            "nullable": false,
            "sensitive": false
          },
          "account_type": {
            "type": "string",
            "enum": [
              "Organization",
              "User"
            ],
            "description": "Whether the GitHub account is an organization or a user.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ],
            "description": "The state of the GitHub App on this account.\n\n- `active`: The GitHub App works on this account.\n- `suspended`: The account's owner suspended the GitHub App on GitHub.",
            "x-enum-descriptions": {
              "active": "The GitHub App works on this account.",
              "suspended": "The account's owner suspended the GitHub App on GitHub."
            },
            "nullable": false,
            "sensitive": false
          },
          "can_create_pull_requests": {
            "type": "boolean",
            "description": "Whether the GitHub App can push branches and open pull requests. The value is `false` until the account's owner accepts the updated GitHub App permissions on GitHub.",
            "nullable": false,
            "sensitive": false
          },
          "settings_url": {
            "type": "string",
            "description": "The GitHub page where the account's owner picks which repositories the GitHub App can access.",
            "nullable": false,
            "sensitive": false
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "format": "int64",
                  "description": "ID of the repository."
                },
                "full_name": {
                  "type": "string",
                  "description": "The repository's owner and name, such as `acme/api`.",
                  "readOnly": true
                },
                "default_branch": {
                  "type": "string",
                  "description": "The repository's default branch.",
                  "readOnly": true
                }
              }
            },
            "description": "The repositories of this GitHub account the team uses.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "ID of the team the GitHub account is connected to, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team the GitHub account is connected to.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.chat.chat.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The chat's name. A chat created without a name gets a title generated after the agent's first answer.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "awaiting_confirmation",
              "idle"
            ],
            "description": "Whether the agent is working or waiting.\n\n- `processing`: The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.\n- `awaiting_confirmation`: The agent is waiting for you to approve or deny a tool call.\n- `idle`: The agent isn't working, and the chat accepts a reply.",
            "x-enum-descriptions": {
              "processing": "The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.",
              "awaiting_confirmation": "The agent is waiting for you to approve or deny a tool call.",
              "idle": "The agent isn't working, and the chat accepts a reply."
            },
            "nullable": false,
            "sensitive": false
          },
          "message_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of messages in the chat, counting both user and agent messages.",
            "nullable": false,
            "sensitive": false
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the newest message was created. `null` for a chat with no messages.",
            "nullable": true,
            "sensitive": false
          },
          "total_tokens": {
            "type": "integer",
            "format": "int64",
            "description": "Tokens the chat has used so far, counting the input, output and cache-write tokens of every agent message.",
            "nullable": false,
            "sensitive": false
          },
          "model": {
            "type": "string",
            "description": "The slug of the model the chat runs on, from [List chat models](/docs/ai-sre/api/models/list/). A chat can also be on a model that's no longer offered. A model replaced by a newer version shows as the newer one. `null` for a chat created before you could pick a model, which keeps the model it started with.",
            "nullable": true,
            "sensitive": false
          },
          "total_cost_usd": {
            "type": "number",
            "description": "What the chat has cost so far, in US dollars at the public pay-as-you-go prices. Answers that ran on your own key, added under **Bring your own key**, count as zero.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the chat was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the chat was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Message ID."
                },
                "message_type": {
                  "type": "string",
                  "enum": [
                    "user",
                    "ai"
                  ],
                  "description": "Who wrote the message.\n\n- `user`: A person wrote the message, including a message posted through this API.\n- `ai`: The agent wrote the message.",
                  "x-enum-descriptions": {
                    "user": "A person wrote the message, including a message posted through this API.",
                    "ai": "The agent wrote the message."
                  }
                },
                "text": {
                  "type": "string",
                  "description": "The message text in Markdown. For a user message, the typed text. For an agent message, the agent's answer, with its narrative and code blocks in order, or `null` until the agent has written any. References to incidents, monitors, sources, dashboards and the like are Markdown links. The agent's working steps, such as tool runs, reasoning and charts, aren't included.",
                  "nullable": true
                },
                "artifacts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "Artifact type. On an agent message it's `report`. On a user message it's `file`, `incident`, `error`, `text_blob`, `investigation`, `prompt`, `live_tail_filter` or `session_replay_spans`. New types may be added, so ignore the ones you don't know."
                      },
                      "title": {
                        "type": "string",
                        "description": "Title, on a `report`, `investigation`, `prompt` or `live_tail_filter`."
                      },
                      "content": {
                        "type": "string",
                        "description": "Content. On a `report`, Markdown with resource references rendered as links. On a `text_blob`, the pasted text."
                      },
                      "name": {
                        "type": "string",
                        "description": "File name on a `file`, incident name on an `incident`, or the pasted text's name on a `text_blob`."
                      },
                      "url": {
                        "type": "string",
                        "description": "On a `file`, a signed download link that expires after about 15 minutes, so fetch the file soon after reading the message. On an `incident` or `error`, the web app page of the incident or error."
                      },
                      "size": {
                        "type": "integer",
                        "format": "int64",
                        "description": "File size in bytes, on a `file`.",
                        "nullable": true
                      },
                      "content_type": {
                        "type": "string",
                        "description": "MIME type, on a `file`.",
                        "nullable": true
                      },
                      "id": {
                        "type": "string",
                        "description": "Incident ID, on an `incident`."
                      },
                      "error_type": {
                        "type": "string",
                        "description": "Exception class, on an `error`."
                      },
                      "error_message": {
                        "type": "string",
                        "description": "Exception message, on an `error`."
                      },
                      "source_id": {
                        "type": "string",
                        "description": "Source or application the artifact comes from, on an `error`, `investigation` or `session_replay_spans`."
                      },
                      "pattern": {
                        "type": "string",
                        "description": "Error pattern hash, on an `error`."
                      },
                      "resource_type": {
                        "type": "string",
                        "description": "The kind of data attached from Live tail, Explore or Errors, a log, span, error or exception, on an `investigation`."
                      },
                      "dt": {
                        "type": "string",
                        "description": "Timestamp of what was attached, on an `investigation`."
                      },
                      "trace_id": {
                        "type": "string",
                        "description": "Trace ID of what was attached, on an `investigation`."
                      },
                      "span_id": {
                        "type": "string",
                        "description": "Span ID of what was attached, on an `investigation`."
                      },
                      "configuration_name": {
                        "type": "string",
                        "description": "Name of the AI SRE configuration the prompt belongs to, on a `prompt`."
                      },
                      "source_ids": {
                        "type": "string",
                        "description": "Comma-separated source IDs the Live tail filter covers, on a `live_tail_filter`."
                      },
                      "query": {
                        "type": "string",
                        "description": "Live tail query, on a `live_tail_filter`."
                      },
                      "from": {
                        "type": "string",
                        "description": "Start of the range. On a `live_tail_filter` it's a relative expression such as `now-3h`, and on a `session_replay_spans` it's microseconds since the epoch for the selected stretch."
                      },
                      "to": {
                        "type": "string",
                        "description": "End of the range, in the same form as `from`, on a `live_tail_filter` or `session_replay_spans`."
                      },
                      "range": {
                        "type": "string",
                        "description": "The range's label, for example `Last 3 hours`, on a `live_tail_filter`."
                      },
                      "session_id": {
                        "type": "string",
                        "description": "RUM session the spans were selected in, on a `session_replay_spans`."
                      },
                      "rf": {
                        "type": "string",
                        "description": "Start of the session page's own range, in microseconds since the epoch, on a `session_replay_spans`."
                      },
                      "rt": {
                        "type": "string",
                        "description": "End of the session page's own range, in microseconds since the epoch, on a `session_replay_spans`."
                      },
                      "trace_ids": {
                        "type": "string",
                        "description": "Comma-separated trace IDs of the selected spans, the slowest span's trace first, ten at most, on a `session_replay_spans`."
                      },
                      "span_count": {
                        "type": "string",
                        "description": "Number of selected spans, on a `session_replay_spans`."
                      },
                      "subtitle": {
                        "type": "string",
                        "description": "Display subtitle of the selection, on a `session_replay_spans`."
                      }
                    }
                  },
                  "description": "The structured parts of the message, in order. For an agent message, the reports it delivered. For a user message, its references, such as incidents, errors, pasted text, investigations, prompts, Live tail filters and session replay spans, followed by its attached files. Every entry has a `type`, and the other keys depend on it. A key without a value is left out."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the message was created."
                },
                "user": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^u[1-9][0-9]*$",
                      "description": "The author's user ID, such as `u123`."
                    },
                    "name": {
                      "type": "string",
                      "description": "The author's name."
                    },
                    "email": {
                      "type": "string",
                      "description": "The author's e-mail."
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "description": "The author. `null` for an agent message, and for a message posted with a team or global API token.",
                  "nullable": true
                }
              }
            },
            "description": "The transcript, oldest message first. Returned by get, create and reply only.",
            "nullable": false,
            "sensitive": false
          },
          "pending_confirmations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Confirmation ID, to resolve it via [Approve or deny a confirmation](/docs/ai-sre/api/chats/resolve-confirmation/)."
                },
                "tool_name": {
                  "type": "string",
                  "description": "Tool the agent wants to run."
                },
                "tool_input": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "denied",
                    "expired"
                  ],
                  "description": "Always `pending` here."
                },
                "resolution_note": {
                  "type": "string",
                  "description": "Note recorded when the confirmation was resolved.",
                  "nullable": true
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the confirmation expires if nobody resolves it."
                },
                "confirmed_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the confirmation was resolved.",
                  "nullable": true
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the agent asked for the confirmation."
                }
              }
            },
            "description": "The pending confirmations the agent is waiting on that haven't expired, oldest first. Empty unless the status is `awaiting_confirmation`. Returned by get, create and reply only.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "ID of the team the chat belongs to, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team the chat belongs to.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.chat.chat.status": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Chat ID.",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "enum": [
              "chat_status"
            ],
            "description": "Always `chat_status`.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "awaiting_confirmation",
              "idle"
            ],
            "description": "Whether the agent is working or waiting.\n\n- `processing`: The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.\n- `awaiting_confirmation`: The agent is waiting for you to approve or deny a tool call.\n- `idle`: The agent isn't working, and the chat accepts a reply.",
            "x-enum-descriptions": {
              "processing": "The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.",
              "awaiting_confirmation": "The agent is waiting for you to approve or deny a tool call.",
              "idle": "The agent isn't working, and the chat accepts a reply."
            },
            "nullable": false,
            "sensitive": false
          },
          "pending_confirmations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Confirmation ID, to resolve it via [Approve or deny a confirmation](/docs/ai-sre/api/chats/resolve-confirmation/)."
                },
                "tool_name": {
                  "type": "string",
                  "description": "Tool the agent wants to run."
                },
                "tool_input": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "denied",
                    "expired"
                  ],
                  "description": "Always `pending` here."
                },
                "resolution_note": {
                  "type": "string",
                  "description": "Note recorded when the confirmation was resolved.",
                  "nullable": true
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the confirmation expires if nobody resolves it."
                },
                "confirmed_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the confirmation was resolved.",
                  "nullable": true
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the agent asked for the confirmation."
                }
              }
            },
            "description": "The pending confirmations the agent is waiting on that haven't expired, oldest first. Empty unless the status is `awaiting_confirmation`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.chat.chat_confirmation.resolve": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "tool_name": {
            "type": "string",
            "description": "Tool the agent wants to run.",
            "nullable": false,
            "sensitive": false
          },
          "tool_input": {
            "type": "object",
            "additionalProperties": true,
            "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "denied",
              "expired"
            ],
            "description": "Status of the confirmation, `pending` until someone approves or denies it or it expires.",
            "nullable": false,
            "sensitive": false
          },
          "resolution_note": {
            "type": "string",
            "description": "The comment given when the confirmation was resolved.",
            "nullable": true,
            "sensitive": false
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the confirmation expires if nobody resolves it.",
            "nullable": false,
            "sensitive": false
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the confirmation was approved or denied.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the agent asked for the confirmation.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.chat.chat_model.list": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "id": {
            "type": "string",
            "description": "The model's slug, such as `anthropic/claude-opus-5.5`. Pass it as `model` when you [create a chat](/docs/ai-sre/api/chats/create/) or [reply to one](/docs/ai-sre/api/chats/reply/).",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Model name.",
            "nullable": false,
            "sensitive": false
          },
          "provider": {
            "type": "string",
            "description": "Company that makes the model.",
            "nullable": false,
            "sensitive": false
          },
          "tier": {
            "type": "string",
            "enum": [
              "fast",
              "advanced",
              "frontier"
            ],
            "description": "The model's AI SRE pricing tier.",
            "nullable": false,
            "sensitive": false
          },
          "us_hosted": {
            "type": "boolean",
            "description": "Whether the model runs only at companies headquartered in the US.",
            "nullable": false,
            "sensitive": false
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "images": {
                "type": "boolean",
                "description": "Whether the model reads images attached to a message."
              }
            },
            "description": "What the model can do.",
            "nullable": false,
            "sensitive": false
          },
          "input_usd_per_million_tokens": {
            "type": "number",
            "description": "What a million input tokens cost, in US dollars at the public pay-as-you-go prices.",
            "nullable": false,
            "sensitive": false
          },
          "output_usd_per_million_tokens": {
            "type": "number",
            "description": "What a million output tokens cost, in US dollars at the public pay-as-you-go prices.",
            "nullable": false,
            "sensitive": false
          },
          "default": {
            "type": "boolean",
            "description": "Whether this is your team's default model, which a chat created without `model` runs on. When the request names no team and the token can access several, no model is marked.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "Chat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The chat's id."
          },
          "type": {
            "type": "string",
            "const": "chat"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The chat's name. A chat created without a name gets a title generated after the agent's first answer.",
                "readOnly": true,
                "examples": [
                  "Checkout 5xx"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "processing",
                  "awaiting_confirmation",
                  "idle"
                ],
                "description": "Whether the agent is working or waiting.",
                "x-enum-descriptions": {
                  "processing": "The agent is working on the request, or the request is waiting in the queue. The status turns `idle` after an hour at most.",
                  "awaiting_confirmation": "The agent is waiting for you to approve or deny a tool call.",
                  "idle": "The agent isn't working, and the chat accepts a reply."
                },
                "readOnly": true,
                "examples": [
                  "idle"
                ]
              },
              "message_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of messages in the chat, counting both user and agent messages.",
                "readOnly": true,
                "examples": [
                  2
                ]
              },
              "last_message_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the newest message was created. `null` for a chat with no messages.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T10:32:18.000Z"
                ]
              },
              "total_tokens": {
                "type": "integer",
                "format": "int64",
                "description": "Tokens the chat has used so far, counting the input, output and cache-write tokens of every agent message.",
                "readOnly": true,
                "examples": [
                  15420
                ]
              },
              "model": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The slug of the model the chat runs on, from [List chat models](/docs/ai-sre/api/models/list/). A chat can also be on a model that's no longer offered. A model replaced by a newer version shows as the newer one. `null` for a chat created before you could pick a model, which keeps the model it started with.",
                "readOnly": true,
                "examples": [
                  "anthropic/claude-opus-5.5"
                ]
              },
              "total_cost_usd": {
                "type": "number",
                "description": "What the chat has cost so far, in US dollars at the public pay-as-you-go prices. Answers that ran on your own key, added under **Bring your own key**, count as zero.",
                "readOnly": true,
                "examples": [
                  0.0928
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the chat was created.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T10:30:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the chat was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T10:32:18.000Z"
                ]
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Message ID."
                    },
                    "message_type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "ai"
                      ],
                      "description": "Who wrote the message.\n\n- `user`: A person wrote the message, including a message posted through this API.\n- `ai`: The agent wrote the message.",
                      "x-enum-descriptions": {
                        "user": "A person wrote the message, including a message posted through this API.",
                        "ai": "The agent wrote the message."
                      }
                    },
                    "text": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The message text in Markdown. For a user message, the typed text. For an agent message, the agent's answer, with its narrative and code blocks in order, or `null` until the agent has written any. References to incidents, monitors, sources, dashboards and the like are Markdown links. The agent's working steps, such as tool runs, reasoning and charts, aren't included."
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Artifact type. On an agent message it's `report`. On a user message it's `file`, `incident`, `error`, `text_blob`, `investigation`, `prompt`, `live_tail_filter` or `session_replay_spans`. New types may be added, so ignore the ones you don't know."
                          },
                          "title": {
                            "type": "string",
                            "description": "Title, on a `report`, `investigation`, `prompt` or `live_tail_filter`."
                          },
                          "content": {
                            "type": "string",
                            "description": "Content. On a `report`, Markdown with resource references rendered as links. On a `text_blob`, the pasted text."
                          },
                          "name": {
                            "type": "string",
                            "description": "File name on a `file`, incident name on an `incident`, or the pasted text's name on a `text_blob`."
                          },
                          "url": {
                            "type": "string",
                            "description": "On a `file`, a signed download link that expires after about 15 minutes, so fetch the file soon after reading the message. On an `incident` or `error`, the web app page of the incident or error."
                          },
                          "size": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "format": "int64",
                            "description": "File size in bytes, on a `file`."
                          },
                          "content_type": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "MIME type, on a `file`."
                          },
                          "id": {
                            "type": "string",
                            "description": "Incident ID, on an `incident`."
                          },
                          "error_type": {
                            "type": "string",
                            "description": "Exception class, on an `error`."
                          },
                          "error_message": {
                            "type": "string",
                            "description": "Exception message, on an `error`."
                          },
                          "source_id": {
                            "type": "string",
                            "description": "Source or application the artifact comes from, on an `error`, `investigation` or `session_replay_spans`."
                          },
                          "pattern": {
                            "type": "string",
                            "description": "Error pattern hash, on an `error`."
                          },
                          "resource_type": {
                            "type": "string",
                            "description": "The kind of data attached from Live tail, Explore or Errors, a log, span, error or exception, on an `investigation`."
                          },
                          "dt": {
                            "type": "string",
                            "description": "Timestamp of what was attached, on an `investigation`."
                          },
                          "trace_id": {
                            "type": "string",
                            "description": "Trace ID of what was attached, on an `investigation`."
                          },
                          "span_id": {
                            "type": "string",
                            "description": "Span ID of what was attached, on an `investigation`."
                          },
                          "configuration_name": {
                            "type": "string",
                            "description": "Name of the AI SRE configuration the prompt belongs to, on a `prompt`."
                          },
                          "source_ids": {
                            "type": "string",
                            "description": "Comma-separated source IDs the Live tail filter covers, on a `live_tail_filter`."
                          },
                          "query": {
                            "type": "string",
                            "description": "Live tail query, on a `live_tail_filter`."
                          },
                          "from": {
                            "type": "string",
                            "description": "Start of the range. On a `live_tail_filter` it's a relative expression such as `now-3h`, and on a `session_replay_spans` it's microseconds since the epoch for the selected stretch."
                          },
                          "to": {
                            "type": "string",
                            "description": "End of the range, in the same form as `from`, on a `live_tail_filter` or `session_replay_spans`."
                          },
                          "range": {
                            "type": "string",
                            "description": "The range's label, for example `Last 3 hours`, on a `live_tail_filter`."
                          },
                          "session_id": {
                            "type": "string",
                            "description": "RUM session the spans were selected in, on a `session_replay_spans`."
                          },
                          "rf": {
                            "type": "string",
                            "description": "Start of the session page's own range, in microseconds since the epoch, on a `session_replay_spans`."
                          },
                          "rt": {
                            "type": "string",
                            "description": "End of the session page's own range, in microseconds since the epoch, on a `session_replay_spans`."
                          },
                          "trace_ids": {
                            "type": "string",
                            "description": "Comma-separated trace IDs of the selected spans, the slowest span's trace first, ten at most, on a `session_replay_spans`."
                          },
                          "span_count": {
                            "type": "string",
                            "description": "Number of selected spans, on a `session_replay_spans`."
                          },
                          "subtitle": {
                            "type": "string",
                            "description": "Display subtitle of the selection, on a `session_replay_spans`."
                          }
                        }
                      },
                      "description": "The structured parts of the message, in order. For an agent message, the reports it delivered. For a user message, its references, such as incidents, errors, pasted text, investigations, prompts, Live tail filters and session replay spans, followed by its attached files. Every entry has a `type`, and the other keys depend on it. A key without a value is left out."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the message was created."
                    },
                    "user": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^u[1-9][0-9]*$",
                          "description": "The author's user ID, such as `u123`."
                        },
                        "name": {
                          "type": "string",
                          "description": "The author's name."
                        },
                        "email": {
                          "type": "string",
                          "description": "The author's e-mail."
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "description": "The author. `null` for an agent message, and for a message posted with a team or global API token."
                    }
                  }
                },
                "description": "The transcript, oldest message first. Returned by get, create and reply only.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "id": "9001",
                      "message_type": "user",
                      "text": "Why did checkout start returning 5xx at 10:15?",
                      "artifacts": [],
                      "created_at": "2026-09-07T10:30:00.000Z",
                      "user": null
                    },
                    {
                      "id": "9002",
                      "message_type": "ai",
                      "text": "The 5xx responses come from checkout-api pods restarting after the 10:12 deploy of v2.4.0. The new version fails its readiness probe because PAYMENTS_URL is unset. Set it in the deployment manifest and roll out again.",
                      "artifacts": [
                        {
                          "type": "report",
                          "title": "Checkout 5xx investigation",
                          "content": "Summary: the deploy of v2.4.0 at 10:12 dropped the PAYMENTS_URL variable from the checkout-api deployment. Pods fail their readiness probe and restart in a loop. Setting the variable and rolling out again restores checkout."
                        }
                      ],
                      "created_at": "2026-09-07T10:32:18.000Z",
                      "user": null
                    }
                  ]
                ]
              },
              "pending_confirmations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Confirmation ID, to resolve it via [Approve or deny a confirmation](/docs/ai-sre/api/chats/resolve-confirmation/)."
                    },
                    "tool_name": {
                      "type": "string",
                      "description": "Tool the agent wants to run."
                    },
                    "tool_input": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "denied",
                        "expired"
                      ],
                      "description": "Always `pending` here."
                    },
                    "resolution_note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Note recorded when the confirmation was resolved."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the confirmation expires if nobody resolves it."
                    },
                    "confirmed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the confirmation was resolved."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the agent asked for the confirmation."
                    }
                  }
                },
                "description": "The pending confirmations the agent is waiting on that haven't expired, oldest first. Empty unless the status is `awaiting_confirmation`. Returned by get, create and reply only.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "id": "501",
                      "tool_name": "Bash",
                      "tool_input": {
                        "command": "kubectl rollout restart deployment/checkout-api -n production"
                      },
                      "status": "pending",
                      "resolution_note": null,
                      "expires_at": "2026-09-07T11:31:05.000Z",
                      "confirmed_at": null,
                      "created_at": "2026-09-07T10:31:05.000Z"
                    }
                  ]
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "ID of the team the chat belongs to, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123456"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team the chat belongs to.",
                "readOnly": true,
                "examples": [
                  "Production"
                ]
              }
            }
          }
        }
      },
      "ChatConfirmation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The chat_confirmation's id."
          },
          "type": {
            "type": "string",
            "const": "confirmation"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "tool_name": {
                "type": "string",
                "description": "Tool the agent wants to run.",
                "readOnly": true,
                "examples": [
                  "Bash"
                ]
              },
              "tool_input": {
                "type": "object",
                "additionalProperties": true,
                "description": "Arguments the agent wants to run the tool with. Keys starting with an underscore aren't included.",
                "readOnly": true,
                "examples": [
                  {
                    "command": "kubectl rollout restart deployment/checkout-api -n production"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "approved",
                  "denied",
                  "expired"
                ],
                "description": "Status of the confirmation, `pending` until someone approves or denies it or it expires.",
                "readOnly": true,
                "examples": [
                  "approved"
                ]
              },
              "resolution_note": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The comment given when the confirmation was resolved.",
                "readOnly": true,
                "examples": [
                  "Approved: restart checkout-api during the incident."
                ]
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the confirmation expires if nobody resolves it.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T11:31:05.000Z"
                ]
              },
              "confirmed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the confirmation was approved or denied.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T10:33:40.000Z"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the agent asked for the confirmation.",
                "readOnly": true,
                "examples": [
                  "2026-09-07T10:31:05.000Z"
                ]
              }
            }
          }
        }
      },
      "ChatConfirmationDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChatConfirmation"
          }
        }
      },
      "ChatDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Chat"
          }
        }
      },
      "ChatList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chat"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "ChatModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The chat_model's id."
          },
          "type": {
            "type": "string",
            "const": "model"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The model's slug, such as `anthropic/claude-opus-5.5`. Pass it as `model` when you [create a chat](/docs/ai-sre/api/chats/create/) or [reply to one](/docs/ai-sre/api/chats/reply/).",
                "readOnly": true,
                "examples": [
                  "anthropic/claude-opus-5.5"
                ]
              },
              "name": {
                "type": "string",
                "description": "Model name.",
                "readOnly": true,
                "examples": [
                  "Claude Opus 5.5"
                ]
              },
              "provider": {
                "type": "string",
                "description": "Company that makes the model.",
                "readOnly": true,
                "examples": [
                  "Anthropic"
                ]
              },
              "tier": {
                "type": "string",
                "enum": [
                  "fast",
                  "advanced",
                  "frontier"
                ],
                "description": "The model's AI SRE pricing tier.",
                "readOnly": true,
                "examples": [
                  "frontier"
                ]
              },
              "us_hosted": {
                "type": "boolean",
                "description": "Whether the model runs only at companies headquartered in the US.",
                "readOnly": true,
                "examples": [
                  false
                ]
              },
              "capabilities": {
                "type": "object",
                "properties": {
                  "images": {
                    "type": "boolean",
                    "description": "Whether the model reads images attached to a message."
                  }
                },
                "description": "What the model can do.",
                "readOnly": true,
                "examples": [
                  {
                    "images": true
                  }
                ]
              },
              "input_usd_per_million_tokens": {
                "type": "number",
                "description": "What a million input tokens cost, in US dollars at the public pay-as-you-go prices.",
                "readOnly": true,
                "examples": [
                  4.4
                ]
              },
              "output_usd_per_million_tokens": {
                "type": "number",
                "description": "What a million output tokens cost, in US dollars at the public pay-as-you-go prices.",
                "readOnly": true,
                "examples": [
                  22.0
                ]
              },
              "default": {
                "type": "boolean",
                "description": "Whether this is your team's default model, which a chat created without `model` runs on. When the request names no team and the token can access several, no model is marked.",
                "readOnly": true,
                "examples": [
                  false
                ]
              }
            }
          }
        }
      },
      "ChatModelList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatModel"
            }
          }
        }
      },
      "PaginationPageNumber": {
        "type": "object",
        "description": "Pick a page with the `page` and `per_page` query parameters. The response has a `pagination` object with links to the other pages.",
        "properties": {
          "first": {
            "type": "string"
          },
          "last": {
            "type": "string"
          },
          "prev": {
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_count": {
            "type": "integer",
            "description": "How many results the whole list holds, across every page."
          }
        }
      },
      "TelemetryError": {
        "type": "object",
        "description": "An object whose `errors` key holds the message.",
        "properties": {
          "errors": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Human-readable failure message."
          },
          "required_attributes": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Required attributes."
          },
          "invalid_attributes": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Invalid attributes."
          },
          "invalid_values": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Invalid values."
          }
        }
      }
    }
  }
}
