openapi: 3.1.0 info: title: Better Stack Uptime Heartbeats Monitors API description: 'Programmatic access to Better Stack''s uptime monitoring, heartbeat monitoring, incident management, status pages, escalation policies, and on-call surfaces. Responses follow the JSON:API specification. This document is a best-effort reconstruction from Better Stack''s public documentation and is not exhaustive. Refer to https://betterstack.com/docs/uptime/api/ for authoritative reference. ' version: 2.0.0 contact: name: Better Stack url: https://betterstack.com/docs/uptime/api/getting-started/ license: name: Proprietary servers: - url: https://uptime.betterstack.com/api/v2 description: Better Stack Uptime API (v2 surface — monitors, heartbeats, status pages, on-call) - url: https://uptime.betterstack.com/api/v3 description: Better Stack Uptime API (v3 surface — incidents) security: - bearerAuth: [] tags: - name: Monitors paths: /monitors: get: tags: - Monitors summary: List monitors operationId: listMonitors parameters: - $ref: '#/components/parameters/PerPage' - $ref: '#/components/parameters/Page' - name: url in: query schema: type: string - name: pronounceable_name in: query schema: type: string responses: '200': description: A page of monitors. content: application/json: schema: $ref: '#/components/schemas/MonitorList' post: tags: - Monitors summary: Create monitor operationId: createMonitor requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MonitorCreate' responses: '201': description: Created monitor. content: application/json: schema: $ref: '#/components/schemas/MonitorResource' /monitors/{id}: parameters: - $ref: '#/components/parameters/Id' get: tags: - Monitors summary: Get monitor operationId: getMonitor responses: '200': description: Monitor. content: application/json: schema: $ref: '#/components/schemas/MonitorResource' patch: tags: - Monitors summary: Update monitor operationId: updateMonitor requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MonitorUpdate' responses: '200': description: Updated monitor. content: application/json: schema: $ref: '#/components/schemas/MonitorResource' delete: tags: - Monitors summary: Delete monitor operationId: deleteMonitor responses: '204': description: Removed. /monitors/{id}/response-times: parameters: - $ref: '#/components/parameters/Id' get: tags: - Monitors summary: Monitor response times operationId: getMonitorResponseTimes responses: '200': description: Response time series. /monitors/{id}/availability: parameters: - $ref: '#/components/parameters/Id' get: tags: - Monitors summary: Monitor availability operationId: getMonitorAvailability responses: '200': description: Availability summary. components: schemas: JsonApiResource: type: object properties: id: type: string type: type: string attributes: type: object additionalProperties: true relationships: type: object additionalProperties: true MonitorUpdate: allOf: - $ref: '#/components/schemas/MonitorCreate' MonitorList: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' pagination: type: object additionalProperties: true MonitorCreate: type: object required: - url - monitor_type properties: url: type: string format: uri monitor_type: type: string enum: - status - expected_status_code - keyword - keyword_absence - ping - tcp - udp - smtp - pop - imap - dns - playwright pronounceable_name: type: string check_frequency: type: integer description: Seconds between checks. request_headers: type: array items: type: object properties: name: type: string value: type: string request_body: type: string request_timeout: type: integer recovery_period: type: integer confirmation_period: type: integer regions: type: array items: type: string email: type: boolean sms: type: boolean call: type: boolean push: type: boolean team_wait: type: integer paused: type: boolean follow_redirects: type: boolean verify_ssl: type: boolean ssl_expiration: type: integer domain_expiration: type: integer expected_status_codes: type: array items: type: integer MonitorResource: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' parameters: PerPage: name: per_page in: query schema: type: integer minimum: 1 maximum: 50 Id: name: id in: path required: true schema: type: string Page: name: page in: query schema: type: integer minimum: 1 securitySchemes: bearerAuth: type: http scheme: bearer description: 'Bearer token. Provide either a Global API Token (account-wide) or a team-scoped Uptime API Token. Issued from Better Stack → API tokens. '