{
  "openapi": "3.1.0",
  "info": {
    "title": "Teams and account API",
    "version": "1.4.6",
    "description": "Create and change the teams and team members of a Better Stack organization, and read its roles, billing usage and prices."
  },
  "servers": [
    {
      "url": "https://betterstack.com"
    },
    {
      "url": "https://direct.betterstack.com",
      "description": "Alias host serving the same API."
    }
  ],
  "x-cli-token-env": "BETTERSTACK_GLOBAL_API_TOKEN",
  "security": [
    {
      "globalApiToken": []
    },
    {
      "teamApiToken": []
    },
    {
      "userOauth": []
    }
  ],
  "tags": [
    {
      "name": "documentation",
      "description": "Search the Better Stack documentation and read its articles."
    },
    {
      "name": "feedback",
      "description": "Tell Better Stack about a bug, a missing feature or anything confusing."
    },
    {
      "name": "pricing",
      "description": "Pricing for your plans. Each price says what one unit of a product or add-on costs, and how much the plan includes.",
      "x-wire-type": "price"
    },
    {
      "name": "role",
      "description": "A role in the organization, either a system role or a custom role built in the role editor."
    },
    {
      "name": "team",
      "description": "A team in the organization. Everything you create in any Better Stack product belongs to a team."
    },
    {
      "name": "team_member",
      "description": "A member of a team, or a pending invitation to join it, with the member's role or the role the invitation gives."
    },
    {
      "name": "usage",
      "description": "The organization's billing usage per product.",
      "x-wire-type": "usage_product"
    }
  ],
  "paths": {
    "/api/v2/documentation": {
      "get": {
        "operationId": "documentation",
        "summary": "Search the documentation, or get one article by its URL.",
        "description": "A search returns up to 5 articles, best match first.",
        "tags": [
          "documentation"
        ],
        "security": [],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/documentation",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "cron job monitoring"
              ]
            },
            "description": "What to search for, up to 512 bytes. The rest is ignored. Required unless you send `url`.",
            "examples": {
              "search": {
                "summary": "Search",
                "value": "cron job monitoring"
              }
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "https://betterstack.com/docs/uptime/cron-and-heartbeat-monitor/"
              ]
            },
            "description": "The URL of the article to get. When you also send `query`, only `url` is used.",
            "examples": {
              "one_article": {
                "summary": "One article",
                "value": "https://betterstack.com/docs/uptime/cron-and-heartbeat-monitor/"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of documentation objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationList"
                }
              }
            }
          },
          "404": {
            "description": "No documentation article has this `url`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "Neither `query` nor `url` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "429": {
            "description": "More than 60 requests were sent within a minute with the same token, or from the same IP address without one. Requests from one IP address are also limited to 300 a minute in total. Retry after the number of seconds the `Retry-After` header gives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "503": {
            "description": "The search isn't available right now. Retry after the number of seconds the `Retry-After` header gives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-response-fields": [
          "id",
          "type",
          "title",
          "url",
          "content"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.documentation.documentation"
        },
        "x-cli-default-action": true,
        "x-cli-query-alternatives": [
          [
            "query"
          ],
          [
            "url"
          ]
        ],
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/feedback": {
      "post": {
        "operationId": "submit_feedback",
        "summary": "Report a bug, a missing feature or something confusing in Better Stack.",
        "description": "Better Stack's team reads every report. Each report includes your e-mail address, or the agent's name when no person sends it, and your organizations.",
        "tags": [
          "feedback"
        ],
        "security": [
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "POST /api/v2/feedback",
        "parameters": [],
        "responses": {
          "201": {
            "description": "A single feedback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackDocument"
                }
              }
            }
          },
          "401": {
            "description": "The request isn't signed in as a user. Sign in with OAuth to send it, since an API token can't.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The feedback doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `message` is missing, an argument has the wrong type or is over its limit, `type` isn't one of its values, or the body has an attribute the action doesn't accept. The error message says which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "429": {
            "description": "More than 20 reports were sent by the same user in the same clock hour. Retry after the number of seconds the `Retry-After` header gives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "What went wrong or what was missing, in plain words. Up to 10,000 characters.",
                    "examples": [
                      "The `query` tool returned a 500 error for a query over the last 15 minutes of logs, and the same query worked in the web app."
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "bug",
                      "missing_feature",
                      "confusing",
                      "other"
                    ],
                    "description": "What kind of problem it is.",
                    "examples": [
                      "bug"
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The names of the tools involved. Up to 20 names, each up to 100 characters.",
                    "examples": [
                      [
                        "query"
                      ]
                    ]
                  },
                  "errors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The error messages the tools returned. Up to 10 messages, each up to 2,000 characters.",
                    "examples": [
                      [
                        "Internal server error"
                      ]
                    ]
                  },
                  "expected": {
                    "type": "string",
                    "description": "What you expected to happen. Up to 2,000 characters.",
                    "examples": [
                      "The rows of the last 15 minutes."
                    ]
                  },
                  "actual": {
                    "type": "string",
                    "description": "What happened instead. Up to 2,000 characters.",
                    "examples": [
                      "A 500 error."
                    ]
                  },
                  "task": {
                    "type": "string",
                    "description": "What you were trying to do. Up to 2,000 characters.",
                    "examples": [
                      "Find the errors behind a spike in checkout latency."
                    ]
                  },
                  "url": {
                    "type": "string",
                    "description": "The Better Stack page the problem is on, if there is one. Up to 2,000 characters.",
                    "examples": [
                      "https://telemetry.betterstack.com/team/t123/tail"
                    ]
                  }
                },
                "required": [
                  "message"
                ]
              },
              "examples": {
                "report_a_failing_tool": {
                  "summary": "Report a failing tool",
                  "value": {
                    "message": "The `query` tool returned a 500 error for a query over the last 15 minutes of logs, and the same query worked in the web app.",
                    "type": "bug",
                    "tools": [
                      "query"
                    ],
                    "errors": [
                      "Internal server error"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-response-fields": [
          "id",
          "type",
          "message"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.feedback.submit"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/pricing": {
      "get": {
        "operationId": "pricing",
        "summary": "List the prices on your plans, in the usages menu's order.",
        "tags": [
          "pricing"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/pricing",
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/).",
            "examples": {
              "one_organization": {
                "summary": "One organization",
                "value": "123456"
              }
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "examples": [
                true
              ]
            },
            "description": "Set to `true` to list the full price list for the organization's plan. The full list adds every telemetry bundle the organization can still buy after the prices of its current plans. `in_effect` tells the bundles and the current prices apart. Defaults to `false`.",
            "examples": {
              "full_price_list": {
                "summary": "Full price list",
                "value": true
              }
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Observability"
              ]
            },
            "description": "Only prices in this usage menu section. Accepts its name or its dashed form, and letter case doesn't matter."
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "monitors"
              ]
            },
            "description": "Only prices of this product. Accepts its name, its dashed form or its key, and letter case doesn't matter.",
            "examples": {
              "one_product": {
                "summary": "One product",
                "value": "monitors"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "europe"
              ]
            },
            "description": "Only prices in this region."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of pricing objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingList"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role doesn't allow viewing billing in the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "Signed in with OAuth, and `organization_id` isn't an organization you can access, or you can't access any organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "An unknown query parameter was sent, `all` isn't `true` or `false`, `organization_id` isn't a positive integer, or you can access more than one organization and named none.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-notes": [
          "A price's `id` is the product, the price and the region joined with colons, such as `logs-usage:ingestion:europe`. Parts that don't apply are left out, as in `exceptions:europe`."
        ],
        "x-cli-default-fields": [
          "id",
          "product",
          "description",
          "price",
          "unit",
          "period"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "category",
          "product",
          "description",
          "price",
          "currency",
          "quantity",
          "unit",
          "period",
          "included",
          "included_unit",
          "region",
          "in_effect"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.pricing.pricing"
        },
        "x-cli-default-action": true,
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/roles": {
      "get": {
        "operationId": "list_role",
        "summary": "List your organization's built-in and custom roles.",
        "description": "Use their IDs to assign them to team members.",
        "tags": [
          "role"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "teamApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/roles",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "name"
              ]
            },
            "description": "Sort by `name`, or by `-name` for descending order. Ties are broken by ID. Any other value keeps the default order."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of role objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role lacks the permission to change teams.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The role doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "role"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "role"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.role.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/usage": {
      "get": {
        "operationId": "list_usage",
        "summary": "List your organization's products with their cost over a date range.",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/usage",
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-26"
              ]
            },
            "description": "Start of the date range, as `YYYY-MM-DD`. Defaults to 29 days before `to`. `from` and `to` can be at most 400 days apart."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-29"
              ]
            },
            "description": "End of the date range, as `YYYY-MM-DD`. Defaults to today, and a later date counts as today."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of usage objects.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/UsageList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "meta": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "description": "Start of the date range the costs cover, as `YYYY-MM-DD`.",
                              "examples": [
                                "2026-07-26"
                              ]
                            },
                            "to": {
                              "type": "string",
                              "description": "End of the date range the costs cover, as `YYYY-MM-DD`.",
                              "examples": [
                                "2026-07-29"
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view billing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The organization has no active plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `from` parameter is after `to`, a date isn't in the `YYYY-MM-DD` format, or the range is longer than 400 days.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "429": {
            "description": "The token made more than 60 requests to the usage endpoints within a minute. Retry after the number of seconds the `Retry-After` header gives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-notes": [
          "A product's `id` is its slug, such as `logs`, and its `type` is `usage_product`. Products come in the usage menu's order.",
          "Limited to 60 requests per minute per token, counted together with [Get usage per product](/docs/uptime/api/usage/per-product/)."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "cost"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "cost",
          "default_dimension",
          "dimensions"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.usage.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/usage/{product}": {
      "get": {
        "operationId": "get_usage",
        "summary": "Get one product's usage over a date range, broken down by a dimension, as the usage page in your billing settings shows it.",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/usage/:product",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "logs"
              ]
            },
            "description": "The product's slug, such as `logs`, from [List usage by product](/docs/uptime/api/usage/overview/). An unknown slug returns a 404 error that lists the available ones.",
            "x-path-wildcard": false,
            "examples": {
              "log_volume": {
                "summary": "Log volume",
                "value": "logs"
              },
              "responders": {
                "summary": "Responders",
                "value": "responders"
              },
              "weekly_cost_of_transaction_monitors": {
                "summary": "Weekly cost of transaction monitors",
                "value": "transaction-monitors"
              }
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-26"
              ]
            },
            "description": "Start of the date range, as `YYYY-MM-DD`. Defaults to 29 days before `to`. `from` and `to` can be at most 400 days apart.",
            "examples": {
              "weekly_cost_of_transaction_monitors": {
                "summary": "Weekly cost of transaction monitors",
                "value": "2026-01-01"
              }
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-29"
              ]
            },
            "description": "End of the date range, as `YYYY-MM-DD`. Defaults to today, and a later date counts as today.",
            "examples": {
              "weekly_cost_of_transaction_monitors": {
                "summary": "Weekly cost of transaction monitors",
                "value": "2026-02-22"
              }
            }
          },
          {
            "name": "dimension",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "volume"
              ]
            },
            "description": "Dimension to break the product's usage down by, a `name` from the product's `dimensions` in [List usage by product](/docs/uptime/api/usage/overview/), such as `cost` for the incurred cost in the plan's currency. Defaults to the product's `default_dimension`. An unknown dimension returns a 404 error that lists the available ones.",
            "examples": {
              "weekly_cost_of_transaction_monitors": {
                "summary": "Weekly cost of transaction monitors",
                "value": "cost"
              }
            }
          },
          {
            "name": "resolution",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month",
                "quarter"
              ],
              "examples": [
                "day"
              ]
            },
            "description": "How long each period in `values` is. Defaults to `day`.",
            "examples": {
              "weekly_cost_of_transaction_monitors": {
                "summary": "Weekly cost of transaction monitors",
                "value": "week"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the product's usage line items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of what was used, such as a team, source or application ID, or the product's item type when there's no such ID.",
                            "examples": [
                              "142"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "description": "`usage_<product slug>_<dimension>_item`, for example `usage_logs_volume_item`.",
                            "examples": [
                              "usage_logs_volume_item"
                            ]
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The line item's name. A line item without a name shows the dimension's label for unnamed items, or the product's name.",
                                "examples": [
                                  "production-app"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Link to the line item in the product's UI, when it has one.",
                                "examples": [
                                  "https://telemetry.betterstack.com/team/t123456/sources/311278/edit"
                                ]
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "date": {
                                      "type": "string",
                                      "description": "The day, as `YYYY-MM-DD`, when `resolution` is `day`."
                                    },
                                    "date_from": {
                                      "type": "string",
                                      "description": "The period's first day, as `YYYY-MM-DD`, when `resolution` isn't `day`."
                                    },
                                    "date_to": {
                                      "type": "string",
                                      "description": "The period's last day, as `YYYY-MM-DD`, when `resolution` isn't `day`."
                                    },
                                    "value": {
                                      "type": [
                                        "number",
                                        "null"
                                      ],
                                      "description": "The usage in the period, in the dimension's unit. A value in money, with the unit `$`, keeps its decimals and is `0.0` when there was none. A value in another numeric unit is rounded to 6 decimal places, is a whole number when it has no fraction, and is `0` when there was none. A value in a `text` unit is the text as reported, and `null` when missing."
                                    },
                                    "finalized": {
                                      "type": "boolean",
                                      "description": "Whether the period has ended. `false` for a period that ends today or later, whose value can still grow."
                                    }
                                  }
                                },
                                "description": "One entry per day, week, month or quarter in the range, oldest first, even without usage. Weeks start on Monday, and weeks, months and quarters follow the calendar, so the first and last entry can start before `from` or end after `to`.",
                                "examples": [
                                  [
                                    {
                                      "date": "2026-07-28",
                                      "value": 2147483648,
                                      "finalized": true
                                    }
                                  ]
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "product": {
                          "type": "string",
                          "description": "The product's slug.",
                          "examples": [
                            "logs"
                          ]
                        },
                        "dimension": {
                          "type": "string",
                          "description": "Name of the dimension the usage is broken down by.",
                          "examples": [
                            "volume"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "description": "The dimension's label.",
                          "examples": [
                            "Ingested volume"
                          ]
                        },
                        "unit": {
                          "type": "string",
                          "description": "The dimension's unit, for example `bytes`, `count`, `text` or `$`.",
                          "examples": [
                            "bytes"
                          ]
                        },
                        "resolution": {
                          "type": "string",
                          "enum": [
                            "day",
                            "week",
                            "month",
                            "quarter"
                          ],
                          "description": "How long each period in `values` is.",
                          "examples": [
                            "day"
                          ]
                        },
                        "from": {
                          "type": "string",
                          "description": "Start of the date range, as `YYYY-MM-DD`.",
                          "examples": [
                            "2026-07-26"
                          ]
                        },
                        "to": {
                          "type": "string",
                          "description": "End of the date range, as `YYYY-MM-DD`. A date later than today shows as today.",
                          "examples": [
                            "2026-07-29"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view billing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No product has that slug, no dimension has that name, or the organization has no active plan. The message lists the available slugs or dimensions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `from` parameter is after `to`, a date isn't in the `YYYY-MM-DD` format, the range is longer than 400 days, or `resolution` is unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "429": {
            "description": "The token made more than 60 requests within a minute, counted together with [List usage by product](/docs/uptime/api/usage/overview/). Retry after the number of seconds the `Retry-After` header gives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "url",
          "values"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.usage.get"
        }
      }
    },
    "/api/v3/team-members": {
      "delete": {
        "operationId": "delete_by_email_team_member",
        "summary": "Remove a team member by e-mail address.",
        "description": "When no member has that address, the pending invitation to it is cancelled instead. A member on no other team of the organization is removed from the organization, and their sign-in is unlinked from it.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/team-members",
        "x-team-required": true,
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "charlie@example.com"
              ]
            },
            "description": "E-mail address of the member to remove, or of the pending invitation to cancel, ignoring letter case. Can also go in the JSON request body.",
            "examples": {
              "remove_a_team_member_by_e_mail": {
                "summary": "Remove a team member by e-mail",
                "value": "bob@example.com"
              }
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "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": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only. Use a token with write access. Also returned when the member is an admin, has a higher role than yours when you sign in with OAuth, or is a billing admin and you use a team API token or sign in with OAuth without the Admin role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No member and no pending invitation of the team has that e-mail address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `email` parameter is missing, the member is the last one in the organization, or you sign in with OAuth and your role doesn't allow removing them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list_team_member",
        "summary": "List your team's members in ID order, then its pending invitations in e-mail order.",
        "description": "Tell members and invitations apart by `type`. A member is a `team_member` with its user ID as `id`, such as `u123`, and a pending invitation is an `invitation` with the invited e-mail address as `id`.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/team-members",
        "x-team-required": true,
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "-created_at"
              ]
            },
            "description": "Sort members and invitations together by `email` or `created_at`, or by `-email` or `-created_at` for descending order. Invitations come last with `created_at` and first with `-created_at`. Ties are broken by ID, with a member first. Any other value keeps the default order."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "alice@example.com"
              ]
            },
            "description": "Look up one member or invitation by e-mail address. Letter case doesn't matter.",
            "examples": {
              "find_by_e_mail": {
                "summary": "Find by e-mail",
                "value": "alice@example.com"
              }
            }
          },
          {
            "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 team_member objects. / A single team_member. (`email` is given. `data` is then the member with that address, or the invitation to it when no member has it, and the response isn't paginated)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TeamMemberList"
                    },
                    {
                      "$ref": "#/components/schemas/TeamMemberDocument"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view team members in this team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The `email` parameter was given and no member or invitation of the team has that address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The token can access more than one team and the request named none. Pass `team_id`. Also returned when `team_id` isn't a team you can access, or `page` or `per_page` isn't a positive integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-notes": [
          "A pending invitation to the e-mail address of someone already on the team shows up only as that member, so the count can be lower than members plus invitations."
        ],
        "x-cli-default-fields": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "invited_at"
        ],
        "x-cli-name-fields": [
          "email"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "email",
          "first_name",
          "last_name",
          "role",
          "role_id",
          "mobile_app_platforms",
          "phone_numbers",
          "invited_at",
          "created_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team_member.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_team_member",
        "summary": "Invite someone to the team by e-mail, optionally with a role.",
        "description": "When the address already belongs to a member of the team, returns that member instead and sends nothing.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/team-members",
        "x-team-required": true,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "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 team_member. (the address already belongs to a member of the team)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TeamMemberDocument"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "description": "What happened, in a sentence, either `Invitation sent`, or `User is already a member of the team` when the address already belongs to a member.",
                          "examples": [
                            "Invitation sent"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "A single team_member.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TeamMemberDocument"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "description": "What happened, in a sentence, either `Invitation sent`, or `User is already a member of the team` when the address already belongs to a member.",
                          "examples": [
                            "Invitation sent"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only. Use a token with write access. Also returned when `role` or `role_id` is the admin role, the role has permissions you don't have, or you're signed in with OAuth and aren't on the team. To invite a billing admin or team lead, use a global API token rather than a team API token. Signed in with OAuth, you can invite a team lead, and inviting a billing admin needs the Admin role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The team member doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `email` attribute is missing or invalid, `role` is unknown, `role_id` names no role, `role` and `role_id` name different roles, the organization's or team's limit of team members or the limit of responders is reached, or the invitation couldn't be sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "429": {
            "description": "Too many invitations were sent recently.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMemberCreate"
              },
              "examples": {
                "invite_team_member": {
                  "summary": "Invite team member",
                  "value": {
                    "email": "new.user@example.com"
                  }
                },
                "invite_as_team_lead": {
                  "summary": "Invite as team lead",
                  "value": {
                    "email": "new.user@example.com",
                    "role": "team_lead"
                  }
                },
                "invite_into_a_custom_role_by_id": {
                  "summary": "Invite into a custom role by ID",
                  "value": {
                    "email": "new.user@example.com",
                    "role_id": "206"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "When the address belongs to someone already in another team of the organization, they join this team at once, with no invitation, and the response is 201 with `data` set to `null`. Someone who is an Admin in the organization stays an Admin here, whatever role was requested."
        ],
        "x-cli-default-fields": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "invited_at"
        ],
        "x-cli-name-fields": [
          "email"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "email",
          "first_name",
          "last_name",
          "role",
          "role_id",
          "mobile_app_platforms",
          "phone_numbers",
          "invited_at",
          "created_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team_member.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/team-members/{id}": {
      "delete": {
        "operationId": "delete_team_member",
        "summary": "Remove a member from the team, or cancel the pending invitation to an e-mail address no member has.",
        "description": "A removed member keeps organization access when another team still includes them, and is otherwise removed from the organization.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/team-members/:id",
        "x-team-required": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(u[1-9][0-9]*|[^@/\\s]+@[^@/\\s]+)$",
              "examples": [
                "u101"
              ]
            },
            "description": "The member as `u123` or their e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). Letter case doesn't matter in an e-mail address.",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_team_member": {
                "summary": "Delete a team member",
                "value": "u102"
              }
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "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": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only. Use a token with write access. Also returned when the member is an admin, has a higher role than yours when you sign in with OAuth, or is a billing admin and you use a team API token or sign in with OAuth without the Admin role. The API never removes an admin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No member and no pending invitation of the team has that user ID or e-mail address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The member is the last one in the organization, or you sign in with OAuth and your role doesn't allow removing them. The `id` value isn't `u123` or an e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_team_member",
        "summary": "Get one member of the team, with their role in it, or the pending invitation to an e-mail address no member has.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/team-members/:id",
        "x-team-required": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(u[1-9][0-9]*|[^@/\\s]+@[^@/\\s]+)$",
              "examples": [
                "u101"
              ]
            },
            "description": "The member as `u123` or their e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). Letter case doesn't matter in an e-mail address.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_team_member": {
                "summary": "Get a team member",
                "value": "u101"
              }
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "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 team_member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view team members in this team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No member and no pending invitation of the team has that user ID or e-mail address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `id` value isn't `u123` or an e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "invited_at"
        ],
        "x-cli-name-fields": [
          "email"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "email",
          "first_name",
          "last_name",
          "role",
          "role_id",
          "mobile_app_platforms",
          "phone_numbers",
          "invited_at",
          "created_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team_member.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_team_member",
        "summary": "Change a team member's `phone_numbers`.",
        "description": "The member can be in any team of the organization.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v3/team-members/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(u[1-9][0-9]*|[^@/\\s]+@[^@/\\s]+)$",
              "examples": [
                "u101"
              ]
            },
            "description": "The member as `u123` or their e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). Letter case doesn't matter in an e-mail address.",
            "x-path-wildcard": false,
            "examples": {
              "replace_phone_numbers": {
                "summary": "Replace phone numbers",
                "value": "u101"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$",
              "examples": [
                "t123"
              ]
            },
            "description": "The team to return the member's role for, such as `t123`. Get the team ID via [List teams](/docs/uptime/api/teams/list/). Leave it out to show the member's role in their first team."
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          }
        ],
        "responses": {
          "200": {
            "description": "A single team_member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only or a team API token, or you signed in with OAuth without the Admin role. Use a global API token with write access. A member who also belongs to another organization can't be changed here. Only that member can change their own `phone_numbers`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No member of the organization has that user ID, or the member isn't in the team that `team_id` names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `id` value is neither `u123` nor an e-mail address. A phone number isn't valid, is blocked, or is in a country where calls aren't enabled. Also returned when the list has more than three numbers, leaves out a number your identity provider manages through SCIM, or `team_id` names no team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMemberUpdate"
              },
              "examples": {
                "replace_phone_numbers": {
                  "summary": "Replace phone numbers",
                  "value": {
                    "phone_numbers": [
                      "+14155550123",
                      "+14155550199"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Without `phone_numbers`, nothing changes and the member is returned."
        ],
        "x-cli-default-fields": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "invited_at"
        ],
        "x-cli-name-fields": [
          "email"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "email",
          "first_name",
          "last_name",
          "role",
          "role_id",
          "mobile_app_platforms",
          "phone_numbers",
          "invited_at",
          "created_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team_member.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/team-members/{id}/change-role/{role_id}": {
      "post": {
        "operationId": "change_team_member_role",
        "summary": "Change a member's role in the team, custom roles included.",
        "description": "Pending invitations can't be changed here.",
        "tags": [
          "team_member"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/team-members/:id/change-role/:role_id",
        "x-team-required": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(u[1-9][0-9]*|[^@/\\s]+@[^@/\\s]+)$",
              "examples": [
                "u101"
              ]
            },
            "description": "The member as `u123` or their e-mail address. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). Letter case doesn't matter in an e-mail address.",
            "x-path-wildcard": false,
            "examples": {
              "change_role": {
                "summary": "Change role",
                "value": "u101"
              }
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "206"
              ]
            },
            "description": "ID of the new role, from [List roles](/docs/uptime/api/roles/list/).",
            "x-path-wildcard": false,
            "examples": {
              "change_role": {
                "summary": "Change role",
                "value": "103"
              }
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to use, such as `123`. Required when you sign in with OAuth and can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/)."
          },
          {
            "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 team_member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only. Use a token with write access. Also returned when the new role is admin, the member is an admin, or the new role has permissions you don't have. Assigning billing admin or team lead, or changing a billing admin's role, needs a global API token rather than a team API token. Signed in with OAuth, assigning billing admin or changing a billing admin's role needs the Admin role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "No member of the team has that user ID or e-mail address, or no role of the organization has that role ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "409": {
            "description": "Another role change for the same member is in progress. Try again in a moment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The `id` value is neither `u123` nor an e-mail address, the responder quota is reached for the new role, or the e-mail address belongs to someone invited to the team who hasn't joined yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Setting the role the member already has changes nothing and returns the member. The new role applies across Better Stack by the time the response arrives."
        ],
        "x-cli-default-fields": [
          "id",
          "email",
          "first_name",
          "last_name",
          "role",
          "invited_at"
        ],
        "x-cli-name-fields": [
          "email"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "email",
          "first_name",
          "last_name",
          "role",
          "role_id",
          "mobile_app_platforms",
          "phone_numbers",
          "invited_at",
          "created_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team_member.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/teams": {
      "get": {
        "operationId": "list_team",
        "summary": "List teams in ID order.",
        "description": "Signed in with OAuth, the list has your teams in every organization where your role can view teams, or only in the organization `organization_id` names.",
        "tags": [
          "team"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/teams",
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to list teams from, such as `123`, when you sign in with OAuth. Each team in the list has its organization's ID in `organization_id`."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "platform"
              ]
            },
            "description": "Only teams whose name contains this text, ignoring letter case."
          },
          {
            "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 team objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamList"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view teams in any of your organizations, or in the one `organization_id` names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The team doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "organization_id",
          "incident_grouping_period",
          "incident_grouping_metadata_scope",
          "notify_about_all_incidents_in_a_group",
          "reporting_enabled",
          "opened_emails_tracking_enabled",
          "on_call_reminder_lead_time",
          "on_call_reminder_sms",
          "on_call_reminder_email",
          "on_call_reminder_push",
          "logo_url",
          "logo_remote_url",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_team",
        "summary": "Create a team in the organization.",
        "description": "The new team has no members.",
        "tags": [
          "team"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/teams",
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]*$",
              "examples": [
                "123"
              ]
            },
            "description": "The organization to create the team in, such as `123`, when you sign in with OAuth. Required when you can access more than one organization. Get the ID from `organization_id` in [List teams](/docs/uptime/api/teams/list/). Leave it out with a global API token, which creates the team in the token's own organization."
          }
        ],
        "responses": {
          "201": {
            "description": "A single team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDocument"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or you signed in with OAuth and your role doesn't include `teams.change`, which the web teams page also needs to create a team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "Signed in with OAuth, and `organization_id` isn't an organization you can access, or the organization requires SSO and you didn't sign in with it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "409": {
            "description": "Another change for this organization is in progress. Try again in a moment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The name is missing, taken or not a string, or the organization is at its team quota. Pick a name no other team in the organization has. Signed in with OAuth, you can access more than one organization and named none, or `organization_id` isn't a positive integer. Also returned when a global API token sends `organization_id`. The URL sent for the logo isn't absolute, or we couldn't fetch a jpg, png, webp or gif image under 20 MB from it. `errors` says which, and nothing changes. A setting is invalid or needs a plan upgrade, such as turning on `reporting_enabled`. `errors` says which, and no team is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "503": {
            "description": "The team's incident settings couldn't be applied, so the new team is removed again. Try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamCreate"
              },
              "examples": {
                "create_a_team": {
                  "summary": "Create a team",
                  "value": {
                    "name": "Platform team",
                    "incident_grouping_period": 600,
                    "incident_grouping_metadata_scope": [
                      "environment"
                    ]
                  }
                },
                "remind_on_call_people_an_hour_ahead_by_push_only": {
                  "summary": "Remind on-call people an hour ahead by push only",
                  "value": {
                    "name": "Support team",
                    "on_call_reminder_lead_time": 3600,
                    "on_call_reminder_email": false,
                    "on_call_reminder_push": true
                  }
                },
                "alert_only_for_the_first_incident_in_a_group": {
                  "summary": "Alert only for the first incident in a group",
                  "value": {
                    "name": "Payments team",
                    "incident_grouping_period": 1800,
                    "notify_about_all_incidents_in_a_group": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "organization_id",
          "incident_grouping_period",
          "incident_grouping_metadata_scope",
          "notify_about_all_incidents_in_a_group",
          "reporting_enabled",
          "opened_emails_tracking_enabled",
          "on_call_reminder_lead_time",
          "on_call_reminder_sms",
          "on_call_reminder_email",
          "on_call_reminder_push",
          "logo_url",
          "logo_remote_url",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/teams/{id}": {
      "delete": {
        "operationId": "delete_team",
        "summary": "Remove an empty team from the organization.",
        "description": "Removing a team can't be undone. Remove the team's members first with [Remove a team member](/docs/uptime/api/team-members/delete/). An admin can't be removed through the API. The organization's last team can't be removed.",
        "tags": [
          "team"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/teams/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t?[1-9][0-9]*$",
              "examples": [
                "t123"
              ]
            },
            "description": "The ID of the team to remove, such as `t123`, from [List teams](/docs/uptime/api/teams/list/).",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_team": {
                "summary": "Delete a team",
                "value": "t123"
              }
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or your role doesn't include the `teams.change` permission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The team doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The team still has members, who must be removed first, or it's the organization's last team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_team",
        "summary": "Get one of your organization's teams by ID.",
        "tags": [
          "team"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/teams/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t?[1-9][0-9]*$",
              "examples": [
                "t123"
              ]
            },
            "description": "The ID of the team to get, such as `t123`, from [List teams](/docs/uptime/api/teams/list/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_team": {
                "summary": "Get a team",
                "value": "t123"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDocument"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "Signed in with OAuth, and your role can't view this team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The team doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "organization_id",
          "incident_grouping_period",
          "incident_grouping_metadata_scope",
          "notify_about_all_incidents_in_a_group",
          "reporting_enabled",
          "opened_emails_tracking_enabled",
          "on_call_reminder_lead_time",
          "on_call_reminder_sms",
          "on_call_reminder_email",
          "on_call_reminder_push",
          "logo_url",
          "logo_remote_url",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_team",
        "summary": "Rename a team or change its settings.",
        "description": "Only the attributes sent change. When any attribute is refused, nothing changes.",
        "tags": [
          "team"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "betterstack",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v3/teams/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t?[1-9][0-9]*$",
              "examples": [
                "t123"
              ]
            },
            "description": "The ID of the team to update, such as `t123`, from [List teams](/docs/uptime/api/teams/list/).",
            "x-path-wildcard": false,
            "examples": {
              "update_a_team": {
                "summary": "Update a team",
                "value": "t123"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDocument"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or you signed in with OAuth and your role has neither `teams.change` nor, for a team you're on, `teams.change_own`. The web teams page needs the same permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "404": {
            "description": "The team doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "422": {
            "description": "The name is empty, taken or not a string. Pick a name no other team in the organization has. The URL sent for the logo isn't absolute, or we couldn't fetch a jpg, png, webp or gif image under 20 MB from it. `errors` says which, and nothing changes. A setting is invalid or needs a plan upgrade. `errors` says which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          },
          "503": {
            "description": "The team's incident settings couldn't be applied right now. Nothing changed, so try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BetterstackError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpdate"
              },
              "examples": {
                "update_a_team": {
                  "summary": "Update a team",
                  "value": {
                    "name": "Platform engineering",
                    "on_call_reminder_lead_time": 3600
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Sending a setting's current value always works, even one that needs a paid plan to change."
        ],
        "x-cli-default-fields": [
          "id",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "organization_id",
          "incident_grouping_period",
          "incident_grouping_metadata_scope",
          "notify_about_all_incidents_in_a_group",
          "reporting_enabled",
          "opened_emails_tracking_enabled",
          "on_call_reminder_lead_time",
          "on_call_reminder_sms",
          "on_call_reminder_email",
          "on_call_reminder_push",
          "logo_url",
          "logo_remote_url",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.betterstack.team.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "globalApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Organization-wide API token that can reach several teams."
      },
      "teamApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token scoped to one team."
      },
      "userOauth": {
        "type": "oauth2",
        "flows": {},
        "description": "OAuth access token bound to a signed-in user."
      }
    },
    "schemas": {
      "BetterstackError": {
        "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."
          }
        }
      },
      "CLIResponse.betterstack.documentation.documentation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "title": {
            "type": "string",
            "description": "The article's title.",
            "nullable": false,
            "sensitive": false
          },
          "url": {
            "type": "string",
            "description": "The article's URL.",
            "nullable": false,
            "sensitive": false
          },
          "content": {
            "type": "string",
            "description": "The article's full text, in Markdown.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.feedback.submit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "message": {
            "type": "string",
            "description": "Confirms that Better Stack received the feedback.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.pricing.pricing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "category": {
            "type": "string",
            "enum": [
              "Incident management",
              "Observability",
              "Status pages",
              "Enterprise",
              "Infrastructure",
              "Warehouse",
              null
            ],
            "description": "The section of the usage menu the product is in. `null` for a product with no category.",
            "nullable": true,
            "sensitive": false
          },
          "product": {
            "type": "string",
            "description": "The product's name. For a Telemetry price, the name includes the region when it doesn't already say it.",
            "nullable": false,
            "sensitive": false
          },
          "description": {
            "type": "string",
            "description": "What the price buys, for example `Logs ingested`.",
            "nullable": false,
            "sensitive": false
          },
          "price": {
            "type": "number",
            "description": "The price for `quantity` units, in `currency`. `null` when there's no fixed price, such as on a free plan or for a price set by model usage.",
            "nullable": true,
            "sensitive": false
          },
          "currency": {
            "type": "string",
            "description": "Currency of `price`. Always USD.",
            "nullable": false,
            "sensitive": false
          },
          "quantity": {
            "type": "number",
            "description": "How many units the price is for, for example 1000000 data points. `null` for a price set by model usage.",
            "nullable": true,
            "sensitive": false
          },
          "unit": {
            "type": "string",
            "description": "The unit priced, for example `GB`, `monitor` or `responder license`.",
            "nullable": true,
            "sensitive": false
          },
          "period": {
            "type": "string",
            "description": "The period the price covers, `month`, `30 days` or `year`. `null` for a one-off usage price.",
            "nullable": true,
            "sensitive": false
          },
          "included": {
            "type": "number",
            "description": "How much the plans include before this price applies, summed across the organization's current plans. `null` when nothing is included.",
            "nullable": true,
            "sensitive": false
          },
          "included_unit": {
            "type": "string",
            "description": "The unit of `included`, only when it differs from `unit`, for example `day` for retention.",
            "nullable": false,
            "sensitive": false
          },
          "region": {
            "type": "string",
            "description": "The region the price applies to.",
            "nullable": false,
            "sensitive": false
          },
          "in_effect": {
            "type": "boolean",
            "description": "Whether the organization has the plan this price is on. `false` for a telemetry bundle the organization can still buy. Present only with `all=true`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.role.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Role name.",
            "nullable": false,
            "sensitive": false
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "billing_admin",
              "team_lead",
              "responder",
              "member",
              "custom"
            ],
            "description": "Which built-in role this is. A team member's `role` has the same values.\n\n- `admin`: Can access every feature in every team, including billing, organization settings and API tokens.\n- `billing_admin`: Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.\n- `team_lead`: Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.\n- `responder`: Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.\n- `member`: Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.\n- `custom`: A role the organization made itself in the role editor.",
            "x-enum-descriptions": {
              "admin": "Can access every feature in every team, including billing, organization settings and API tokens.",
              "billing_admin": "Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.",
              "team_lead": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.",
              "responder": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.",
              "member": "Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.",
              "custom": "A role the organization made itself in the role editor."
            },
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.team.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The team's name. Must be unique in the organization, ignoring letter case.",
            "nullable": false,
            "sensitive": false
          },
          "organization_id": {
            "type": "integer",
            "format": "int64",
            "description": "ID of the organization the team belongs to.",
            "nullable": false,
            "sensitive": false
          },
          "incident_grouping_period": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds within which a new incident is grouped with an earlier one that's still open, for example `300` for 5 minutes. `0` never groups incidents. From `0` to `2147483647`, and new teams start at `300`.",
            "nullable": false,
            "sensitive": false
          },
          "incident_grouping_metadata_scope": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metadata keys whose values must match for incidents to be grouped. New teams start with `[\"Origin\"]`. `null` groups the same way as `[\"Origin\"]`.",
            "nullable": true,
            "sensitive": false
          },
          "notify_about_all_incidents_in_a_group": {
            "type": "boolean",
            "description": "Whether every incident in a group alerts, rather than only the first. New teams start at `true`.",
            "nullable": false,
            "sensitive": false
          },
          "reporting_enabled": {
            "type": "boolean",
            "description": "Whether reporting is on, which unlocks the reports in Incidents. New teams start at `false`.",
            "nullable": false,
            "sensitive": false
          },
          "opened_emails_tracking_enabled": {
            "type": "boolean",
            "description": "Whether the incident timeline records when a team member opens the e-mail about a new incident. New teams start at `true`.",
            "nullable": false,
            "sensitive": false
          },
          "on_call_reminder_lead_time": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds before an on-call shift starts to remind the person, or `0` for no reminder. The other values are `3600`, `21600`, `43200`, `86400`, `172800` and `604800`. New teams start at `86400`.",
            "nullable": false,
            "sensitive": false
          },
          "on_call_reminder_sms": {
            "type": "boolean",
            "description": "Send on-call reminders by SMS. New teams start at `false`.",
            "nullable": false,
            "sensitive": false
          },
          "on_call_reminder_email": {
            "type": "boolean",
            "description": "Send on-call reminders by e-mail. New teams start at `true`.",
            "nullable": false,
            "sensitive": false
          },
          "on_call_reminder_push": {
            "type": "boolean",
            "description": "Send on-call reminders as push notifications. New teams start at `true`.",
            "nullable": false,
            "sensitive": false
          },
          "logo_url": {
            "type": "string",
            "description": "The team's logo. Send the URL of a jpg, png, webp or gif image under 20 MB, and we fetch the logo from it. Responses return the URL of the stored logo. Send `null` to remove the logo.",
            "nullable": true,
            "sensitive": false
          },
          "logo_remote_url": {
            "type": "string",
            "description": "The URL the team's logo was fetched from.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the team was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the team was last updated.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.team_member.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "email": {
            "type": "string",
            "description": "E-mail address.",
            "nullable": false,
            "sensitive": false
          },
          "first_name": {
            "type": "string",
            "description": "The member's first name, or `null` when they haven't set one. Absent on a pending invitation.",
            "nullable": true,
            "sensitive": false
          },
          "last_name": {
            "type": "string",
            "description": "The member's last name, or `null` when they haven't set one. Absent on a pending invitation.",
            "nullable": true,
            "sensitive": false
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "billing_admin",
              "team_lead",
              "responder",
              "member",
              "custom",
              null
            ],
            "description": "The member's built-in role in this team. A user can have a different role in each team. `null` on an invitation to a custom role. With neither `role` nor `role_id`, an invitation gets the responder role.\n\n- `admin`: Can access every feature in every team, including billing, organization settings and API tokens. The API never assigns it.\n- `billing_admin`: Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.\n- `team_lead`: Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.\n- `responder`: Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.\n- `member`: Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.\n- `custom`: The member has a custom role. Assign one with `role_id` instead.",
            "x-enum-descriptions": {
              "admin": "Can access every feature in every team, including billing, organization settings and API tokens. The API never assigns it.",
              "billing_admin": "Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.",
              "team_lead": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.",
              "responder": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.",
              "member": "Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.",
              "custom": "The member has a custom role. Assign one with `role_id` instead."
            },
            "nullable": true,
            "sensitive": false
          },
          "role_id": {
            "type": "string",
            "description": "ID of the member's role, or of the role an invitation gives, custom roles included. Get the IDs via [List roles](/docs/uptime/api/roles/list/). When `role` is also given, both must name the same role.",
            "nullable": true,
            "sensitive": false
          },
          "mobile_app_platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The platforms the member's mobile apps receive push notifications on, `ios` and `android`, or empty when none. Absent on a pending invitation.",
            "nullable": false,
            "sensitive": false
          },
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The member's phone numbers in international format, like `+14155550123`, sorted. Absent on a pending invitation. An update replaces the whole list, and `[]` removes every number.",
            "nullable": false,
            "sensitive": false
          },
          "invited_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the invitation was created. Present only on a pending invitation.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the user account was created. Absent on a pending invitation.",
            "nullable": true,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team the membership is in, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.usage.get": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of what was used, such as a team, source or application ID, or the product's item type when there's no such ID.",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "description": "`usage_<product slug>_<dimension>_item`, for example `usage_logs_volume_item`.",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The line item's name. A line item without a name shows the dimension's label for unnamed items, or the product's name.",
            "nullable": true,
            "sensitive": false
          },
          "url": {
            "type": "string",
            "description": "Link to the line item in the product's UI, when it has one.",
            "nullable": true,
            "sensitive": false
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "description": "The day, as `YYYY-MM-DD`, when `resolution` is `day`."
                },
                "date_from": {
                  "type": "string",
                  "description": "The period's first day, as `YYYY-MM-DD`, when `resolution` isn't `day`."
                },
                "date_to": {
                  "type": "string",
                  "description": "The period's last day, as `YYYY-MM-DD`, when `resolution` isn't `day`."
                },
                "value": {
                  "type": "number",
                  "description": "The usage in the period, in the dimension's unit. A value in money, with the unit `$`, keeps its decimals and is `0.0` when there was none. A value in another numeric unit is rounded to 6 decimal places, is a whole number when it has no fraction, and is `0` when there was none. A value in a `text` unit is the text as reported, and `null` when missing.",
                  "nullable": true
                },
                "finalized": {
                  "type": "boolean",
                  "description": "Whether the period has ended. `false` for a period that ends today or later, whose value can still grow."
                }
              }
            },
            "description": "One entry per day, week, month or quarter in the range, oldest first, even without usage. Weeks start on Monday, and weeks, months and quarters follow the calendar, so the first and last entry can start before `from` or end after `to`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.betterstack.usage.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The product's name. Returned by the list only.",
            "nullable": false,
            "sensitive": false
          },
          "cost": {
            "type": "number",
            "description": "The product's incurred cost over the date range, in the plan's currency. `0` rather than `null` when the product had no cost. Returned by the list only.",
            "nullable": false,
            "sensitive": false
          },
          "default_dimension": {
            "type": "string",
            "description": "Name of the product's default usage dimension, or `cost` when the product has no dimension of its own.",
            "nullable": false,
            "sensitive": false
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The dimension's name, to send as `dimension` in [Get usage per product](/docs/uptime/api/usage/per-product/)."
                },
                "label": {
                  "type": "string",
                  "description": "The dimension's label, such as `Ingested volume`."
                },
                "unit": {
                  "type": "string",
                  "description": "The dimension's unit, for example `bytes`, `count`, `text` or `$`."
                }
              }
            },
            "description": "The dimensions the product's usage can be broken down by. The last one is always incurred cost, `{name: \"cost\", label: \"Incurred cost\", unit: \"$\"}`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "Documentation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The documentation's id."
          },
          "type": {
            "type": "string",
            "const": "documentation"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "The article's title.",
                "readOnly": true,
                "examples": [
                  "Cron and heartbeat monitor"
                ]
              },
              "url": {
                "type": "string",
                "description": "The article's URL.",
                "readOnly": true,
                "examples": [
                  "https://betterstack.com/docs/uptime/cron-and-heartbeat-monitor/"
                ]
              },
              "content": {
                "type": "string",
                "description": "The article's full text, in Markdown.",
                "readOnly": true,
                "examples": [
                  "A heartbeat monitor helps you track periodic tasks by expecting regular requests to a unique URL."
                ]
              }
            }
          }
        }
      },
      "DocumentationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Documentation"
            }
          }
        }
      },
      "Feedback": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The feedback's id."
          },
          "type": {
            "type": "string",
            "const": "feedback"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Confirms that Better Stack received the feedback.",
                "readOnly": true,
                "examples": [
                  "Better Stack received the feedback. Thank you."
                ]
              }
            }
          }
        }
      },
      "FeedbackDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Feedback"
          }
        }
      },
      "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."
          }
        }
      },
      "Pricing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The pricing's id."
          },
          "type": {
            "type": "string",
            "const": "price"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "category": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "Incident management",
                  "Observability",
                  "Status pages",
                  "Enterprise",
                  "Infrastructure",
                  "Warehouse",
                  null
                ],
                "description": "The section of the usage menu the product is in. `null` for a product with no category.",
                "readOnly": true,
                "examples": [
                  "Observability"
                ]
              },
              "product": {
                "type": "string",
                "description": "The product's name. For a Telemetry price, the name includes the region when it doesn't already say it.",
                "readOnly": true,
                "examples": [
                  "Traces (Europe)"
                ]
              },
              "description": {
                "type": "string",
                "description": "What the price buys, for example `Logs ingested`.",
                "readOnly": true,
                "examples": [
                  "Logs data retention"
                ]
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The price for `quantity` units, in `currency`. `null` when there's no fixed price, such as on a free plan or for a price set by model usage.",
                "readOnly": true,
                "examples": [
                  0.05
                ]
              },
              "currency": {
                "type": "string",
                "description": "Currency of `price`. Always USD.",
                "readOnly": true,
                "examples": [
                  "USD"
                ]
              },
              "quantity": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "How many units the price is for, for example 1000000 data points. `null` for a price set by model usage.",
                "readOnly": true,
                "examples": [
                  1
                ]
              },
              "unit": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The unit priced, for example `GB`, `monitor` or `responder license`.",
                "readOnly": true,
                "examples": [
                  "GB"
                ]
              },
              "period": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The period the price covers, `month`, `30 days` or `year`. `null` for a one-off usage price.",
                "readOnly": true,
                "examples": [
                  "month"
                ]
              },
              "included": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "How much the plans include before this price applies, summed across the organization's current plans. `null` when nothing is included.",
                "readOnly": true,
                "examples": [
                  3
                ]
              },
              "included_unit": {
                "type": "string",
                "description": "The unit of `included`, only when it differs from `unit`, for example `day` for retention.",
                "readOnly": true,
                "examples": [
                  "day"
                ]
              },
              "region": {
                "type": "string",
                "description": "The region the price applies to.",
                "readOnly": true,
                "examples": [
                  "europe"
                ]
              },
              "in_effect": {
                "type": "boolean",
                "description": "Whether the organization has the plan this price is on. `false` for a telemetry bundle the organization can still buy. Present only with `all=true`.",
                "readOnly": true,
                "examples": [
                  false
                ]
              }
            }
          }
        }
      },
      "PricingList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Pricing"
            }
          }
        }
      },
      "Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The role's id."
          },
          "type": {
            "type": "string",
            "const": "role"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Role name.",
                "readOnly": true,
                "examples": [
                  "On-call lead"
                ]
              },
              "role": {
                "type": "string",
                "enum": [
                  "admin",
                  "billing_admin",
                  "team_lead",
                  "responder",
                  "member",
                  "custom"
                ],
                "description": "Which built-in role this is. A team member's `role` has the same values.",
                "x-enum-descriptions": {
                  "admin": "Can access every feature in every team, including billing, organization settings and API tokens.",
                  "billing_admin": "Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.",
                  "team_lead": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.",
                  "responder": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.",
                  "member": "Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.",
                  "custom": "A role the organization made itself in the role editor."
                },
                "readOnly": true,
                "examples": [
                  "custom"
                ]
              }
            }
          }
        }
      },
      "RoleList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          }
        }
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team's id."
          },
          "type": {
            "type": "string",
            "const": "team"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The team's name. Must be unique in the organization, ignoring letter case.",
                "examples": [
                  "Platform team"
                ]
              },
              "organization_id": {
                "type": "integer",
                "format": "int64",
                "description": "ID of the organization the team belongs to.",
                "readOnly": true,
                "examples": [
                  123
                ]
              },
              "incident_grouping_period": {
                "type": "integer",
                "format": "int64",
                "description": "Seconds within which a new incident is grouped with an earlier one that's still open, for example `300` for 5 minutes. `0` never groups incidents. From `0` to `2147483647`, and new teams start at `300`.",
                "default": 300,
                "examples": [
                  300
                ]
              },
              "incident_grouping_metadata_scope": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Metadata keys whose values must match for incidents to be grouped. New teams start with `[\"Origin\"]`. `null` groups the same way as `[\"Origin\"]`.",
                "default": [
                  "Origin"
                ],
                "examples": [
                  [
                    "Origin"
                  ]
                ]
              },
              "notify_about_all_incidents_in_a_group": {
                "type": "boolean",
                "description": "Whether every incident in a group alerts, rather than only the first. New teams start at `true`.",
                "default": true,
                "examples": [
                  true
                ]
              },
              "reporting_enabled": {
                "type": "boolean",
                "description": "Whether reporting is on, which unlocks the reports in Incidents. New teams start at `false`.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "opened_emails_tracking_enabled": {
                "type": "boolean",
                "description": "Whether the incident timeline records when a team member opens the e-mail about a new incident. New teams start at `true`.",
                "default": true,
                "examples": [
                  true
                ]
              },
              "on_call_reminder_lead_time": {
                "type": "integer",
                "format": "int64",
                "description": "Seconds before an on-call shift starts to remind the person, or `0` for no reminder. The other values are `3600`, `21600`, `43200`, `86400`, `172800` and `604800`. New teams start at `86400`.",
                "examples": [
                  86400
                ]
              },
              "on_call_reminder_sms": {
                "type": "boolean",
                "description": "Send on-call reminders by SMS. New teams start at `false`.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "on_call_reminder_email": {
                "type": "boolean",
                "description": "Send on-call reminders by e-mail. New teams start at `true`.",
                "examples": [
                  true
                ]
              },
              "on_call_reminder_push": {
                "type": "boolean",
                "description": "Send on-call reminders as push notifications. New teams start at `true`.",
                "examples": [
                  true
                ]
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The team's logo. Send the URL of a jpg, png, webp or gif image under 20 MB, and we fetch the logo from it. Responses return the URL of the stored logo. Send `null` to remove the logo.",
                "examples": [
                  "https://example.com/logo.png"
                ]
              },
              "logo_remote_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The URL the team's logo was fetched from.",
                "examples": [
                  "https://example.com/logo.png"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the team was created.",
                "readOnly": true,
                "examples": [
                  "2026-11-16T09:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the team was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-11-16T09:00:00.000Z"
                ]
              }
            }
          }
        }
      },
      "TeamCreate": {
        "$ref": "#/components/schemas/TeamCreateAttributes"
      },
      "TeamCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The team's name. Must be unique in the organization, ignoring letter case.",
            "examples": [
              "Platform team"
            ]
          },
          "incident_grouping_period": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds within which a new incident is grouped with an earlier one that's still open, for example `300` for 5 minutes. `0` never groups incidents. From `0` to `2147483647`, and new teams start at `300`.",
            "default": 300,
            "examples": [
              300
            ]
          },
          "incident_grouping_metadata_scope": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Metadata keys whose values must match for incidents to be grouped. New teams start with `[\"Origin\"]`. `null` groups the same way as `[\"Origin\"]`.",
            "default": [
              "Origin"
            ],
            "examples": [
              [
                "Origin"
              ]
            ]
          },
          "notify_about_all_incidents_in_a_group": {
            "type": "boolean",
            "description": "Whether every incident in a group alerts, rather than only the first. New teams start at `true`.",
            "default": true,
            "examples": [
              true
            ]
          },
          "reporting_enabled": {
            "type": "boolean",
            "description": "Whether reporting is on, which unlocks the reports in Incidents. New teams start at `false`.",
            "default": false,
            "examples": [
              false
            ]
          },
          "opened_emails_tracking_enabled": {
            "type": "boolean",
            "description": "Whether the incident timeline records when a team member opens the e-mail about a new incident. New teams start at `true`.",
            "default": true,
            "examples": [
              true
            ]
          },
          "on_call_reminder_lead_time": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds before an on-call shift starts to remind the person, or `0` for no reminder. The other values are `3600`, `21600`, `43200`, `86400`, `172800` and `604800`. New teams start at `86400`.",
            "examples": [
              86400
            ]
          },
          "on_call_reminder_sms": {
            "type": "boolean",
            "description": "Send on-call reminders by SMS. New teams start at `false`.",
            "default": false,
            "examples": [
              false
            ]
          },
          "on_call_reminder_email": {
            "type": "boolean",
            "description": "Send on-call reminders by e-mail. New teams start at `true`.",
            "examples": [
              true
            ]
          },
          "on_call_reminder_push": {
            "type": "boolean",
            "description": "Send on-call reminders as push notifications. New teams start at `true`.",
            "examples": [
              true
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The team's logo. Send the URL of a jpg, png, webp or gif image under 20 MB, and we fetch the logo from it. Responses return the URL of the stored logo. Send `null` to remove the logo.",
            "examples": [
              "https://example.com/logo.png"
            ]
          },
          "logo_remote_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The URL the team's logo was fetched from. Accepts an image URL, and we fetch the logo from it. Send `null` to remove the logo. When both are sent, `logo_url` wins.",
            "examples": [
              "https://example.com/logo.png"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "TeamDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Team"
          }
        }
      },
      "TeamList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "TeamMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The team_member's id."
          },
          "type": {
            "type": "string",
            "enum": [
              "team_member",
              "invitation"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "description": "E-mail address.",
                "examples": [
                  "alice@example.com"
                ]
              },
              "first_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The member's first name, or `null` when they haven't set one. Absent on a pending invitation.",
                "readOnly": true,
                "examples": [
                  "Alice"
                ]
              },
              "last_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The member's last name, or `null` when they haven't set one. Absent on a pending invitation.",
                "readOnly": true,
                "examples": [
                  "Smith"
                ]
              },
              "role": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "admin",
                  "billing_admin",
                  "team_lead",
                  "responder",
                  "member",
                  "custom",
                  null
                ],
                "description": "The member's built-in role in this team. A user can have a different role in each team. `null` on an invitation to a custom role. With neither `role` nor `role_id`, an invitation gets the responder role.",
                "x-enum-descriptions": {
                  "admin": "Can access every feature in every team, including billing, organization settings and API tokens. The API never assigns it.",
                  "billing_admin": "Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.",
                  "team_lead": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.",
                  "responder": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.",
                  "member": "Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.",
                  "custom": "The member has a custom role. Assign one with `role_id` instead."
                },
                "examples": [
                  "responder"
                ]
              },
              "role_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the member's role, or of the role an invitation gives, custom roles included. Get the IDs via [List roles](/docs/uptime/api/roles/list/). When `role` is also given, both must name the same role.",
                "examples": [
                  "104"
                ]
              },
              "mobile_app_platforms": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The platforms the member's mobile apps receive push notifications on, `ios` and `android`, or empty when none. Absent on a pending invitation.",
                "readOnly": true,
                "examples": [
                  [
                    "ios",
                    "android"
                  ]
                ]
              },
              "phone_numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The member's phone numbers in international format, like `+14155550123`, sorted. Absent on a pending invitation. An update replaces the whole list, and `[]` removes every number.",
                "examples": [
                  [
                    "+14155550123"
                  ]
                ]
              },
              "invited_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the invitation was created. Present only on a pending invitation.",
                "readOnly": true,
                "examples": [
                  "2023-10-28T12:00:00.000Z"
                ]
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the user account was created. Absent on a pending invitation.",
                "readOnly": true,
                "examples": [
                  "2023-10-26T10:00:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team the membership is in, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "TeamMemberCreate": {
        "$ref": "#/components/schemas/TeamMemberCreateAttributes"
      },
      "TeamMemberCreateAttributes": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "E-mail address. Required to invite, and can't be changed afterward.",
            "examples": [
              "alice@example.com"
            ]
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "admin",
              "billing_admin",
              "team_lead",
              "responder",
              "member",
              "custom",
              null
            ],
            "description": "The member's built-in role in this team. A user can have a different role in each team. `null` on an invitation to a custom role. With neither `role` nor `role_id`, an invitation gets the responder role.",
            "x-enum-descriptions": {
              "admin": "Can access every feature in every team, including billing, organization settings and API tokens. The API never assigns it.",
              "billing_admin": "Can manage subscriptions, invoices and payment settings for the whole organization, without access to operational features.",
              "team_lead": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, invite team members and change their roles.",
              "responder": "Can access monitors, incidents, on-call, status pages, telemetry and AI SRE, and invite team members.",
              "member": "Can access sources, Live tail, dashboards, error tracking, session replays and AI SRE, without monitors, incidents or on-call.",
              "custom": "The member has a custom role. Assign one with `role_id` instead."
            },
            "examples": [
              "responder"
            ]
          },
          "role_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the member's role, or of the role an invitation gives, custom roles included. Get the IDs via [List roles](/docs/uptime/api/roles/list/). When `role` is also given, both must name the same role.",
            "examples": [
              "104"
            ]
          }
        },
        "required": [
          "email"
        ]
      },
      "TeamMemberDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TeamMember"
          }
        }
      },
      "TeamMemberList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMember"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "TeamMemberUpdate": {
        "$ref": "#/components/schemas/TeamMemberUpdateAttributes"
      },
      "TeamMemberUpdateAttributes": {
        "type": "object",
        "properties": {
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The member's phone numbers in international format, like `+14155550123`, sorted. Absent on a pending invitation. An update replaces the whole list, and `[]` removes every number.",
            "examples": [
              [
                "+14155550123"
              ]
            ]
          }
        }
      },
      "TeamUpdate": {
        "$ref": "#/components/schemas/TeamUpdateAttributes"
      },
      "TeamUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The team's name. Must be unique in the organization, ignoring letter case.",
            "examples": [
              "Platform team"
            ]
          },
          "incident_grouping_period": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds within which a new incident is grouped with an earlier one that's still open, for example `300` for 5 minutes. `0` never groups incidents. From `0` to `2147483647`, and new teams start at `300`.",
            "default": 300,
            "examples": [
              300
            ]
          },
          "incident_grouping_metadata_scope": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Metadata keys whose values must match for incidents to be grouped. New teams start with `[\"Origin\"]`. `null` groups the same way as `[\"Origin\"]`.",
            "default": [
              "Origin"
            ],
            "examples": [
              [
                "Origin"
              ]
            ]
          },
          "notify_about_all_incidents_in_a_group": {
            "type": "boolean",
            "description": "Whether every incident in a group alerts, rather than only the first. New teams start at `true`.",
            "default": true,
            "examples": [
              true
            ]
          },
          "reporting_enabled": {
            "type": "boolean",
            "description": "Whether reporting is on, which unlocks the reports in Incidents. New teams start at `false`.",
            "default": false,
            "examples": [
              false
            ]
          },
          "opened_emails_tracking_enabled": {
            "type": "boolean",
            "description": "Whether the incident timeline records when a team member opens the e-mail about a new incident. New teams start at `true`.",
            "default": true,
            "examples": [
              true
            ]
          },
          "on_call_reminder_lead_time": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds before an on-call shift starts to remind the person, or `0` for no reminder. The other values are `3600`, `21600`, `43200`, `86400`, `172800` and `604800`. New teams start at `86400`.",
            "examples": [
              86400
            ]
          },
          "on_call_reminder_sms": {
            "type": "boolean",
            "description": "Send on-call reminders by SMS. New teams start at `false`.",
            "default": false,
            "examples": [
              false
            ]
          },
          "on_call_reminder_email": {
            "type": "boolean",
            "description": "Send on-call reminders by e-mail. New teams start at `true`.",
            "examples": [
              true
            ]
          },
          "on_call_reminder_push": {
            "type": "boolean",
            "description": "Send on-call reminders as push notifications. New teams start at `true`.",
            "examples": [
              true
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The team's logo. Send the URL of a jpg, png, webp or gif image under 20 MB, and we fetch the logo from it. Responses return the URL of the stored logo. Send `null` to remove the logo.",
            "examples": [
              "https://example.com/logo.png"
            ]
          },
          "logo_remote_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The URL the team's logo was fetched from. Accepts an image URL, and we fetch the logo from it. Send `null` to remove the logo. When both are sent, `logo_url` wins.",
            "examples": [
              "https://example.com/logo.png"
            ]
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The usage's id."
          },
          "type": {
            "type": "string",
            "const": "usage_product"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The product's name. Returned by the list only.",
                "readOnly": true,
                "examples": [
                  "Logs"
                ]
              },
              "cost": {
                "type": "number",
                "description": "The product's incurred cost over the date range, in the plan's currency. `0` rather than `null` when the product had no cost. Returned by the list only.",
                "readOnly": true,
                "examples": [
                  267.4
                ]
              },
              "default_dimension": {
                "type": "string",
                "description": "Name of the product's default usage dimension, or `cost` when the product has no dimension of its own.",
                "readOnly": true,
                "examples": [
                  "volume"
                ]
              },
              "dimensions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The dimension's name, to send as `dimension` in [Get usage per product](/docs/uptime/api/usage/per-product/)."
                    },
                    "label": {
                      "type": "string",
                      "description": "The dimension's label, such as `Ingested volume`."
                    },
                    "unit": {
                      "type": "string",
                      "description": "The dimension's unit, for example `bytes`, `count`, `text` or `$`."
                    }
                  }
                },
                "description": "The dimensions the product's usage can be broken down by. The last one is always incurred cost, `{name: \"cost\", label: \"Incurred cost\", unit: \"$\"}`.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "name": "volume",
                      "label": "Ingested volume",
                      "unit": "bytes"
                    },
                    {
                      "name": "cost",
                      "label": "Incurred cost",
                      "unit": "$"
                    }
                  ]
                ]
              }
            }
          }
        }
      },
      "UsageList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Usage"
            }
          }
        }
      }
    }
  }
}
