openapi: 3.0.1
info:
  title: HetrixTools - API v3
  version: '3.0'
  description: |
    # Introduction
    The HetrixTools v3 API is a REST API which you can use to programmatically perform different CRUD (create, retrieve, update, delete) operations on your HetrixTools account.
  
    ## Request Methods
    
    |Method|Usage|
    |--- |--- |
    |GET|Read-only request used to fetch information as a JSON object.|
    |POST|Used to create a new object.|
    |PUT|Used to update an existing object.|
    |DELETE|Used to delete an existing object.|
    
    ## HTTP Statuses
    
    |Code|Meaning|
    |--- |--- |
    |200|Successful Request - object(s) returned.|
    |204|No Content - the request was performed successfully, but there was no content found/returned.|
    |400|Bad Request - the API request is invalid or formatted wrong.|
    |401|Unauthorized - invalid authorization method, missing or invalid bearer token.|
    |403|Forbidden - the specified API key (bearer token) does not have access to perform the requested action. [Learn how to configure API access](https://docs.hetrixtools.com/api-keys-access/).|
    |404|Not Found - the resource you have requested was not found.|
    |429|Rate Limited - you are performing API requests too frequently.|
    |5xx|Server Error - our API server either encountered an internal error or is unable to serve your API request at this time.|
    
    ## Rate Limiting
    Our API has two types of rate limiting:
     - Per user - your account can only perform a maximum number of API calls per minute or per hour, based on your pricing plan.
     - Per endpoint - some endpoints may have their own rate limiting, which is not affected by the user's pricing plan.
     
    If you ever hit any of the rate limits, you will receive the `429` HTTP response code.
    
    ### User Response Headers
    ```
    ratelimit-limit-user: 200
    ratelimit-remaining-user: 199
    ratelimit-reset-user: 1640005680
    ```
    
    ### Endpoint Response Headers
    ```
    ratelimit-limit-endpoint: 100
    ratelimit-remaining-endpoint: 99
    ratelimit-reset-endpoint: 1640005680
    ```
    
    ### Response Headers Explained
    - **ratelimit-limit-{user/endpoint}** - the maximum limit of API calls that can be performed
    - **ratelimit-remaining-{user/endpoint}** - the remaining number of API calls that can be performed until the reset time
    - **ratelimit-reset-{user/endpoint}** - the time when the two values listed above will reset
    
    ### Rate Limiting Sample Response
    ```
    429 Too Many Requests
    {
      "status": "too_many_requests",
      "message": "user api rate limit exceeded"
    }
    ```
    
servers:
  - url: https://api.hetrixtools.com/v3/
    description: HetrixTools API Server
paths:
  /account/limits:
    get:
      summary: Account Limits
      description: |
        API call used to get the current usage and limits for your HetrixTools account.
        This endpoint is not paginated.
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  uptime:
                    type: object
                    properties:
                      monitors:
                        type: object
                        properties:
                          usage:
                            type: integer
                            description: The current number of uptime monitors in use.
                          limit:
                            type: integer
                            description: The maximum number of uptime monitors allowed.
                  blacklist:
                    type: object
                    properties:
                      monitors:
                        type: object
                        properties:
                          usage:
                            type: integer
                            description: The current number of blacklist monitors in use.
                          limit:
                            type: integer
                            description: The maximum number of blacklist monitors allowed.
                      api_check_credits:
                        type: object
                        properties:
                          usage:
                            type: integer
                            description: The number of blacklist API checks used this month (plan + extra credits).
                          limit:
                            type: integer
                            description: The total number of blacklist API checks available this month (plan + extra credits).
                          details:
                            type: object
                            properties:
                              monthly_from_plans:
                                type: integer
                                description: The number of monthly blacklist API checks included in your plan(s).
                              extra_credits:
                                type: integer
                                description: Extra purchased blacklist API check credits.
                  sub_accounts:
                    type: object
                    properties:
                      usage:
                        type: integer
                        description: The current number of sub-accounts and pending invites.
                      limit:
                        type: integer
                        description: The maximum number of sub-accounts allowed.
                  sms_credits:
                    type: object
                    properties:
                      usage:
                        type: integer
                        description: The number of SMS credits used this month (plan + extra credits).
                      limit:
                        type: integer
                        description: The total number of SMS credits available this month (plan + extra credits).
                      details:
                        type: object
                        properties:
                          monthly_from_plans:
                            type: integer
                            description: The number of monthly SMS credits included in your plan(s).
                          extra_credits:
                            type: integer
                            description: Extra purchased SMS credits.
                  account_credit:
                    type: object
                    properties:
                      balance:
                        type: number
                        format: float
                        description: The current prepaid account credit balance.
                  api_v1_v2:
                    type: object
                    properties:
                      usage:
                        type: integer
                        description: The number of API v1/v2 calls used this month.
                      limit:
                        type: integer
                        description: The maximum number of API v1/v2 calls allowed per month.
              example:
                uptime:
                  monitors:
                    usage: 12
                    limit: 50
                blacklist:
                  monitors:
                    usage: 3
                    limit: 20
                  api_check_credits:
                    usage: 40
                    limit: 100
                    details:
                      monthly_from_plans: 100
                      extra_credits: 0
                sub_accounts:
                  usage: 1
                  limit: 5
                sms_credits:
                  usage: 2
                  limit: 50
                  details:
                    monthly_from_plans: 50
                    extra_credits: 0
                account_credit:
                  balance: 12.5
                api_v1_v2:
                  usage: 300
                  limit: 1000
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Account Limits

  /contact-lists:
    get:
      summary: Contact Lists
      description: |
        API call used to get contact lists and their details.
      parameters:
        - name: per_page
          in: query
          description: Number of monitors returned per page.
          style: form
          explode: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 200
        - name: page
          in: query
          description: Which page of the paginated results to return.
          style: form
          explode: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 10000
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      contact_lists:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 32
                              maxLength: 32
                              description: The unique contact list ID.
                            name:
                              type: string
                              description: The contact list's name.
                            default:
                              type: boolean
                              description: Whether or not this is the default contact list.
                            email:
                              type: array
                              description: Emails in this contact list.
                              items:
                                type: string
                            phone_sms:
                              type: array
                              description: SMS numbers in this contact list.
                              items:
                                type: string
                            telegram:
                              type: array
                              description: Telegram usernames in this contact list.
                              items:
                                type: string
                            pushbullet:
                              type: array
                              description: Pushbullet usernames in this contact list.
                              items:
                                type: string
                            pushover:
                              type: object
                              properties:
                                key:
                                  type: string
                                  description: The Pushover API key.
                                priority:
                                  type: integer
                                  description: The Pushover priority.
                            twitter:
                              type: array
                              description: \[DEPRECATED\] Twitter usernames in this contact list.
                              items:
                                type: string
                            slack:
                              type: object
                              properties:
                                webhook:
                                  type: string
                                  description: The Slack webhook URL.
                                target:
                                  type: string
                                  description: The Slack target channel.
                                hide_target:
                                  type: boolean
                                  description: Whether or not to hide the monitored target in the notification.
                            discord:
                              type: object
                              properties:
                                webhook:
                                  type: string
                                  description: The Discord webhook URL.
                                target:
                                  type: string
                                  description: The Discord target channel.
                                hide_target:
                                  type: boolean
                                  description: Whether or not to hide the monitored target in the notification.
                            mattermost_rocketchat:
                              type: object
                              properties:
                                webhook:
                                  type: string
                                  description: The Mattermost/Rocket.Chat webhook URL.
                                target:
                                  type: string
                                  description: The Mattermost/Rocket.Chat target channel.
                                hide_target:
                                  type: boolean
                                  description: Whether or not to hide the monitored target in the notification.
                            microsoft_teams:
                              type: object
                              properties:
                                webhook:
                                  type: string
                                  description: The Microsoft Teams webhook URL.
                            pagerduty:
                              type: object
                              properties:
                                key:
                                  type: string
                                  description: The PagerDuty API key.
                            opsgenie:
                              type: object
                              properties:
                                key:
                                  type: string
                                  description: The OpsGenie API key.
                                priority:
                                  type: string
                                  description: The OpsGenie priority.
                            victorops:
                              type: object
                              properties:
                                key:
                                  type: string
                                  description: The VictorOps API key.
                                route:
                                  type: string
                                  description: The VictorOps route.
                                priority:
                                  type: string
                                  description: The VictorOps priority.
                            webhook:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: The Webhook URL.
                                authentication:
                                  type: string
                                  description: The Webhook authentication method.
                            dnd:
                              type: array
                              items:
                                type: object
                                properties:
                                  day:
                                    type: string
                                    description: The day of the week.
                                  hour:
                                    type: string
                                    description: The hour of the day.
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: The total number of contact lists found.
                          returned:
                            type: integer
                            description: The number of contact lists returned in this response.
                          pagination:
                            type: object
                            properties:
                              current:
                                type: integer
                                description: The current page number.
                              last:
                                type: integer
                                description: The last available page number.
                              previous:
                                type: integer
                                nullable: true
                                description: The previous page number; `null` returned if no previous pages available.
                              next:
                                type: integer
                                nullable: true
                                description: The next page number; `null` returned if no further pages available.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Contact Lists
  /blacklists:
    get:
      summary: Blacklists
      description: |
        API call used to get the list of blacklists (RBLs) checked by our platform.
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ipv4:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The unique identifier for the RBL entry.
                        rbl:
                          type: string
                          description: The RBL (Real-time Blackhole List) name.
                        optional:
                          type: boolean
                          description: Whether the RBL is optional (opt-in).
                        ignored:
                          type: boolean
                          description: Whether the RBL is ignored.
                  domains:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The unique identifier for the RBL entry.
                        rbl:
                          type: string
                          description: The RBL (Real-time Blackhole List) name.
                        optional:
                          type: boolean
                          description: Whether the RBL is optional (opt-in).
                        ignored:
                          type: boolean
                          description: Whether the RBL is ignored.
              example:
                ipv4:
                  - id: "hostkarma.junkemailfilter.com"
                    rbl: "hostkarma.junkemailfilter.com"
                    optional: false
                    ignored: false
                  - id: "invaluement_sip"
                    rbl: "invaluement SIP"
                    optional: false
                    ignored: false
                  - id: "invaluement_sip_24"
                    rbl: "invaluement SIP/24"
                    optional: false
                    ignored: false
                  - id: "nordspam"
                    rbl: "NordSpam"
                    optional: false
                    ignored: false
                  - id: "ips.backscatterer.org"
                    rbl: "ips.backscatterer.org"
                    optional: false
                    ignored: false
                domains:
                  - id: "dnsbl.spfbl.net"
                    rbl: "dnsbl.spfbl.net"
                    optional: false
                    ignored: false
                  - id: "phishtank"
                    rbl: "PhishTank"
                    optional: false
                    ignored: false
                  - id: "nordspam"
                    rbl: "NordSpam"
                    optional: false
                    ignored: false
                  - id: "hostkarma.junkemailfilter.com"
                    rbl: "hostkarma.junkemailfilter.com"
                    optional: false
                    ignored: false
                  - id: "invaluement_uri"
                    rbl: "invaluement URI"
                    optional: false
                    ignored: false
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Blacklists
  /blacklist-monitors:
    get:
      summary: Blacklist Monitors
      description: |
        API call used to get blacklist monitors and their details.
      parameters:
        - name: per_page
          in: query
          description: Number of monitors returned per page.
          style: form
          explode: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 1024
        - name: page
          in: query
          description: Which page of the paginated results to return.
          style: form
          explode: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 10000
        - name: name
          in: query
          description: Filter results by name (accepts partial or full name).
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9 .-]+$"
        - name: exact_name
          in: query
          description: If set to `true`, the `name` filter will perform an exact match on the monitored name; all other filters will be ignored.
          required: false
          style: form
          schema:
            type: boolean
        - name: target
          in: query
          description: Filter results by monitored target (accepts partial or full target).
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9.-]+$"
        - name: exact_target
          in: query
          description: If set to `true`, the `target` filter will perform an exact match on the monitored target; all other filters will be ignored.
          required: false
          style: form
          schema:
            type: boolean
        - name: cidr
          in: query
          description: If specified, the `target` filter will be treated as a CIDR range with the specified prefix length and will match all IPs within that range.
          required: false
          style: form
          schema:
            type: integer
            minimum: 21
            maximum: 32
        - name: type
          in: query
          description: Filter results by monitor type.
          required: false
          style: form
          schema:
            type: string
            enum: [ipv4, domain]
        - name: listed
          in: query
          description: Filter results by listed status.
          required: false
          style: form
          schema:
            type: boolean
        - name: order
          in: query
          description: Order results ascending or descending.
          required: false
          style: form
          schema:
            type: string
            enum: [asc, desc]
        - name: order_by
          in: query
          description: Order results by a specific field.
          required: false
          style: form
          schema:
            type: string
            enum: [name, target, listed, created_at, last_check]
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      monitors:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 32
                              maxLength: 32
                              description: The unique blacklist monitor ID.
                            name:
                              type: string
                              description: The blacklist monitor's name.
                            type:
                              type: string
                              enum: [ipv4, domain]
                              description: The type of blacklist monitor.
                            target:
                              type: string
                              description: The monitored target.
                            rdns:
                              type: string
                              nullable: true
                              description: The reverse DNS for the monitored target, if it exists; otherwise `null`.
                            report_id:
                              type: string
                              minLength: 32
                              maxLength: 32
                              description: |
                                The unique blacklist report ID for this blacklist monitor.  
                                Can be used to form the non white-label report URL: `https://hetrixtools.com/report/blacklist/{report_id}/`  
                                And the white-label report URL: `https://yourdomain.com/report/blacklist/{report_id}/`
                            status:
                              type: string
                              enum: [active, disabled, processing]
                              description: The current status of this blacklist monitor.
                            contact_lists:
                              type: array
                              description: The unique contact list IDs assigned to this blacklist monitor. Currently supporting a maximum of one contact list ID per blacklist monitor.
                              items:
                                type: string
                                minLength: 32
                                maxLength: 32
                            listed:
                              type: array
                              description: The array of blacklists that have listed the monitored target.
                              items:
                                type: object
                                properties:
                                  rbl:
                                    type: string
                                    description: The RBL name.
                                  delist:
                                    type: string
                                    description: The delist URL for this RBL.
                            created_at:
                              type: integer
                              description: Timestamp when the blacklist monitor was created.
                            last_check:
                              type: integer
                              description: Timestamp when the blacklist monitor was last checked.
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: The total number of uptime monitors available in your account.
                          total_filtered:
                            type: integer
                            description: The number of uptime monitors found after filtering has been applied.
                          returned:
                            type: integer
                            description: The number of uptime monitors returned by this API call.
                          pagination:
                            type: object
                            properties:
                              current:
                                type: integer
                                description: The current page number.
                              last:
                                type: integer
                                description: The last available page number.
                              previous:
                                type: integer
                                nullable: true
                                description: The previous page number; `null` returned if no previous pages available.
                              next:
                                type: integer
                                nullable: true
                                description: The next page number; `null` returned if no further pages available.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Blacklist Monitors
  /blacklist-monitors/{identifier}/report:
    get:
      summary: Blacklist Report
      description: |
        API call used to get the blacklist report for a specific blacklist monitor.
      parameters:
        - name: identifier
          in: path
          description: The blacklist monitor identifier; can be the 32 characters long monitor ID, the IP address or the hostname of the blacklist monitor.
          required: true
          style: simple
          schema:
            type: string
        - name: date
          in: query
          description: Report date in `YYYY-MM-DD` format. Defaults to the current date.
          required: false
          style: form
          schema:
            type: string
            pattern: "^(19|20)\\d{2}-(0[1-9]|1[0-2])-([0-2][0-9]|3[01])$"
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 32
                    maxLength: 32
                    description: The unique blacklist monitor ID.
                  name:
                    type: string
                    description: The blacklist monitor's name.
                  type:
                    type: string
                    enum: [ipv4, domain]
                    description: The type of blacklist monitor.
                  target:
                    type: string
                    description: The monitored target.
                  report_id:
                    type: string
                    minLength: 32
                    maxLength: 32
                    description: | 
                     The unique blacklist report ID for this blacklist monitor. Can be used to form the non white-label report URL: `https://hetrixtools.com/report/blacklist/{report_id}/` and the white-label report URL: `https://yourdomain.com/report/blacklist/{report_id}/`.
                  listed:
                    type: array
                    description: The array of blacklists that have listed the monitored target on the requested date.
                    items:
                      type: object
                      properties:
                        rbl:
                          type: string
                          description: The RBL name.
                        delist:
                          type: string
                          description: The delist URL for this RBL.
              example:
                id: "3f1b14944123c3878d9a372d54c3e003"
                name: "my-monitor"
                type: ipv4
                target: "203.0.113.1"
                report_id: "abcdef1234567890abcdef1234567890"
                listed:
                  - rbl: "all.spamrats.com"
                    delist: "http://www.spamrats.com/lookup.php?ip=203.0.113.1"
                  - rbl: "b.barracudacentral.org"
                    delist: "http://www.barracudacentral.org/rbl/removal-request/203.0.113.1"
                  - rbl: "zen.spamhaus.org"
                    delist: "https://check.spamhaus.org/results/?query=203.0.113.1"
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Blacklist Report
  /uptime-monitors:
    get:
      summary: Uptime Monitors
      description: |
        API call used to get uptime monitors and their details.
      parameters:
        - name: per_page
          in: query
          description: Number of monitors returned per page.
          style: form
          explode: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 200
        - name: page
          in: query
          description: Which page of the paginated results to return.
          style: form
          explode: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 10000
        - name: id
          in: query
          description: Filter results by monitor ID. This will fetch just the monitor with the specified ID and ignore all other filters.
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9]{32}$"
            minLength: 32
            maxLength: 32
        - name: name
          in: query
          description: Filter results by name (accepts partial or full name).
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9 .-]+$"
        - name: target
          in: query
          description: Filter results by monitored target (accepts partial or full target).
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9:.-]+$"
        - name: category
          in: query
          description: Filter results by category (accepts partial or full category name).
          required: false
          style: form
          schema:
            type: string
            pattern: "^[a-zA-Z0-9 .-]+$"
        - name: type
          in: query
          description: Filter results by monitor type.
          required: false
          style: form
          schema:
            type: string
            enum: [website, ping, service, smtp, heartbeat]
        - name: uptime_status
          in: query
          description: Filter results by uptime status.
          required: false
          style: form
          schema:
            type: string
            enum: [up, down]
        - name: monitor_status
          in: query
          description: Filter results by monitor status.
          required: false
          style: form
          schema:
            type: string
            enum: [active, paused, disabled, maint, maint_dnd]
        - name: order
          in: query
          description: Order results ascending or descending.
          required: false
          style: form
          schema:
            type: string
            enum: [asc, desc]
        - name: order_by
          in: query
          description: Order results by a specific field.
          required: false
          style: form
          schema:
            type: string
            enum: [name, created_at, last_check, last_status_change, uptime_status, monitor_status]
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      monitors:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 32
                              maxLength: 32
                              description: The unique uptime monitor ID.
                            name:
                              type: string
                              description: The uptime monitor's name.
                            type:
                              type: string
                              enum: [website, ping, service, smtp, heartbeat]
                              description: The type of uptime monitor.
                            target:
                              type: string
                              nullable: true
                              description: The monitored target; `null` returned for `heartbeat` uptime monitors.
                            resolve_address:
                              type: string
                              description: The IP address (IPv4 or IPv6) that the monitored target is resolved to by our platform. In the case of the `heartbeat` monitor type, this is the IP address that is sending server agent data towards our platform.
                            resolve_address_info:
                              type: object
                              description: Extra info related to the resolving IP address.
                              properties:
                                ASN:
                                  type: string
                                ISP:
                                  type: string
                                City:
                                  type: string
                                Region:
                                  type: string
                                Country:
                                  type: string
                            port:
                              type: integer
                              nullable: true
                              description: The monitored port; `null` returned for `website`, `ping`, and `heartbeat` uptime monitors.
                            keyword:
                              type: string
                              nullable: true
                              description: The keyword to look for on the monitored website; returns `null` non `website` monitor types.
                            category:
                              type: string
                              description: The category name assigned to this uptime monitor.
                            timeout:
                              type: integer
                              description: The number of seconds the monitored target has to respond before considered 'down'.
                            grace:
                              type: integer
                              description: Only for Heartbeat Uptime Monitors. Represents the number of seconds above the timeout before considered 'down'.
                            check_frequency:
                              type: integer
                              enum: [1, 3, 5, 10]
                              nullable: true
                              description: The frequency (in minutes) that the uptime monitor is checked at.
                            contact_lists:
                              type: array
                              description: The unique contact list IDs assigned to this uptime monitor. Currently supporting a maximum of one contact list ID per uptime monitor.
                              items:
                                type: string
                                minLength: 32
                                maxLength: 32
                            created_at:
                              type: integer
                              description: Timestamp when the uptime monitor was created.
                            last_check:
                              type: integer
                              description: Timestamp when the uptime monitor was last checked.
                            last_status_change:
                              type: integer
                              description: Timestamp when the uptime monitor's `uptime_status` has changed.
                            uptime_status:
                              type: string
                              enum: [up, down]
                              description: The monitor's current overall uptime status.
                            monitor_status:
                              enum: [active, paused, disabled, maint, maint_dnd]
                              description: |
                                The current status of this uptime monitor.
                                - `active` - the normal status, when the monitor is not under maintenance
                                - `paused` - the monitor is paused and not checked at all (currently unavailable, still under development)
                                - `disabled` - the monitor is not checked at all
                                - `maint` - the monitor is under maintenance mode with notifications enabled
                                - `maint_dnd` - the monitor is under maintenance mode without notifications
                                [Learn more here](https://docs.hetrixtools.com/maintenance-mode/).
                            uptime:
                              type: string
                              description: The overall uptime percentage, not including downtimes during maintenance.
                            uptime_incl_maint:
                              type: string
                              description: The overall uptime percentage, including downtimes during maintenance.
                            locations:
                              type: array
                              description: |
                                  The array of locations that monitor this specific uptime monitor.
                                  Possible entries are `new_york`, `san_francisco`, `dallas`, `amsterdam`, `london`, `frankfurt`, `singapore`, `sydney`, `sao_paulo`, `tokyo`, `mumbai`, `moscow`.
                              items:
                                type: object
                                properties:
                                  new_york:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        uptime_status:
                                          type: string
                                          enum: [up, down]
                                          description: The last uptime status as observed by this specific location.
                                        response_time:
                                          type: integer
                                          description: The last response time from this specific location in `milliseconds`.
                                        last_check:
                                          type: integer
                                          description: The timestamp of the last checkup from this specific location.
                            ssl_expiration_date:
                              type: string
                              nullable: true
                              description: The SSL expiration date for the monitored hostname; returns `null` if unavailable.
                            ssl_expiration_warn:
                              type: boolean
                              description: Whether or not the SSL expiration warning is enabled.
                            ssl_expiration_warn_days:
                              type: integer
                              description: The number of days before the SSL expiration when the warning is triggered.
                            domain_expiration_date:
                              type: string
                              nullable: true
                              description: The monitored domain's expiration date; returns `null` if unavailable.
                            domain_expiration_warn:
                              type: boolean
                              description: Whether or not the domain expiration warning is enabled.
                            domain_expiration_warn_days:
                              type: integer
                              description: The number of days before the domain expiration when the warning is triggered.
                            nameservers:
                              type: array
                              description: The monitored domain's nameservers; returns `null` if unavailable.
                              items:
                                type: string
                            nameservers_change_warn:
                              type: boolean
                              description: Whether or not the nameservers change warning is enabled.
                            public_report:
                              type: boolean
                              description: "Is `false` if this monitor's uptime report is private."
                            public_target:
                              type: boolean
                              description: "Is `false` if this monitor's monitored target is hidden on the monitor's uptime report."
                            max_redirects:
                              type: integer
                              nullable: true
                              description: The maximum number of HTTP redirects the system will follow when monitoring a website; returns `null` for non `website` monitor types.
                            http_method:
                              type: string
                              nullable: true
                              description: The HTTP method used when monitoring a website; returns `null` for non `website` types.
                            accepted_http_codes:
                              type: array
                              nullable: true
                              description: The array of HTTP codes that are considered `healthy` if returned by the monitored website; returns `null` for non `website` types.
                              items:
                                type: integer
                            verify_ssl_certificate:
                              type: boolean
                              description: "Is `true` if the monitor will also check the SSL certificate validity of the monitored target (if applicable)."
                            verify_ssl_hostname:
                              type: boolean
                              description: "Is `true` if the monitor will also check if the SSL certificate matches the monitored hostname (if applicable)."
                            number_of_tries:
                              type: integer
                              nullable: true
                              description: The number of tries/retries each monitoring location will perform before changing the monitor's `uptime_status`; returns `null` for the `heartbeat` monitor type.
                            triggering_locations:
                              type: integer
                              nullable: true
                              description: The number of monitoring locations that will decide the `uptime_status`. This value can never be smaller than `50%+1` of the number of monitoring locations.
                            alert_after_minutes:
                              type: integer
                              description: The number of `minutes` after `up`/`down` alerts are dispatched. Any downtime smaller than this time will not generate alerts. [Learn more here](https://docs.hetrixtools.com/alert-only-after-x-minutes-of-downtime/).
                            repeat_alert_times:
                              type: integer
                              description: The number of times a `down` alert will be repeated if the downtime is still ongoing. [Learn more here](https://docs.hetrixtools.com/repeated-alerts/).
                            repeat_alert_frequency:
                              type: integer
                              description: The frequency (`minutes`) at which the repeated alerts are sent out. [Learn more here](https://docs.hetrixtools.com/repeated-alerts/).
                            agent_id:
                              type: string
                              nullable: true
                              description: The unique server agent monitor ID that is attached to this uptime monitor; returns `null` if no server agent monitor is attached. [Learn more here](https://docs.hetrixtools.com/attach-a-server-monitor-to-any-of-your-uptime-monitors/).
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: The total number of uptime monitors available in your account.
                          total_filtered:
                            type: integer
                            description: The number of uptime monitors found after filtering has been applied.
                          returned:
                            type: integer
                            description: The number of uptime monitors returned by this API call.
                          pagination:
                            type: object
                            properties:
                              current:
                                type: integer
                                description: The current page number.
                              last:
                                type: integer
                                description: The last available page number.
                              previous:
                                type: integer
                                nullable: true
                                description: The previous page number; `null` returned if no previous pages available.
                              next:
                                type: integer
                                nullable: true
                                description: The next page number; `null` returned if no further pages available.
              example:
                monitors:
                  - id: e34334dt5t755b034606y54ccabe62e8
                    name: Uptime Monitor Name
                    type: website
                    target: "http://demo-website.com"
                    resolve_address: "1.2.3.4"
                    resolve_address_info:
                      ASN: "AS394303"
                      ISP: "Steadfast"
                      City: "Tampa"
                      Region: "Florida"
                      Country: "US"
                    port: null
                    keyword: ""
                    category: My Websites
                    timeout: 10
                    check_frequency: 1
                    contact_lists:
                      - f1da3895ty67b5de605y6grcd3c23f0e
                    created_at: 1499315164
                    last_check: 1641832650
                    last_status_change: 1641367229
                    uptime_status: up
                    monitor_status: active
                    uptime: 99.9588
                    uptime_incl_maint: 99.9588
                    locations:
                      new_york:
                        uptime_status: up
                        response_time: 74
                        last_check: 1641832627
                      san_francisco:
                        uptime_status: up
                        response_time: 123
                        last_check: 1641832638
                      amsterdam:
                        uptime_status: up
                        response_time: 227
                        last_check: 1641832635
                    ssl_expiration_date: "2022-03-06"
                    ssl_expiration_warn: true
                    ssl_expiration_warn_days: 7
                    domain_expiration_date: "2022-05-10"
                    domain_expiration_warn: true
                    domain_expiration_warn_days: 15
                    nameservers:
                      - "adi.ns.cloudflare.com"
                      - "dave.ns.cloudflare.com"
                    nameservers_change_warn: true
                    public_report: true
                    public_target: true
                    max_redirects: 5
                    http_method: GET
                    accepted_http_codes:
                      - 200
                    verify_ssl_certificate: false
                    verify_ssl_hostname: false
                    number_of_tries: 3
                    triggering_locations: 2
                    alert_after_minutes: 0
                    repeat_alert_times: 0
                    repeat_alert_frequency: 0
                    agent_id: 9b7e53ddrfc12342r45ed234cfbf07c
                meta:
                  total: 202
                  total_filtered: 1
                  returned: 1
                  pagination:
                    current: 1
                    last: 1
                    previous: null
                    next: null
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Monitors
  /uptime-monitors/{monitor_id}/report:
    get:
      summary: Uptime Report
      description: |
        API call used to get the uptime report for a specific uptime monitor.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor ID.
          required: true
          style: simple
          schema:
            type: string
        - name: days
          in: query
          description: Number of recent days to display (1-30). Defaults to 7.
          required: false
          style: form
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 7
        - name: month
          in: query
          description: The month to display the uptime report for, in YYYY-MM format. If specified, `days` has no effect.
          required: false
          style: form
          schema:
            type: string
            pattern: "^(19|20)\\d{2}-(0[1-9]|1[0-2])$"
        - name: timezone
          in: query
          description: The timezone used for the report (e.g., +02:00 or -5:30). Defaults to +00:00 (UTC).
          required: false
          style: form
          schema:
            type: string
        - name: hourly_stats
          in: query
          description: Whether to include hourly stats for website uptime monitors. Defaults to false.
          required: false
          style: form
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  timezone:
                    type: string
                    description: The timezone used in the report.
                  data:
                    type: object
                    additionalProperties:
                      type: object
                      description: The date of the report in YYYY-MM-DD format.
                      properties:
                        uptime:
                          type: object
                          properties:
                            percentage:
                              type: number
                              format: float
                              description: Uptime percentage excluding maintenance.
                            percentage_incl_maint:
                              type: number
                              format: float
                              description: Uptime percentage including maintenance.
                            downtimes:
                              type: integer
                              description: Number of recorded downtimes.
                            downtimes_incl_maint:
                              type: integer
                              description: Number of recorded downtimes including maintenance.
                        response_time:
                          type: object
                          additionalProperties:
                            type: number
                            format: float
                            description: Average response time in milliseconds per location.
                        hourly_stats:
                          type: object
                          description: Hourly stats for website uptime monitors.
                          additionalProperties:
                            type: object
                            description: The hour of the day, in 2 digit format, 00-23.
                            additionalProperties:
                              type: object
                              description: The uptime monitoring location (e.g., frankfurt, singapore).
                              properties:
                                dns_lookup:
                                  type: number
                                  format: float
                                  description: Time taken for DNS lookup (ms).
                                tcp_connect:
                                  type: number
                                  format: float
                                  description: Time taken for TCP connection (ms).
                                tls_connect:
                                  type: number
                                  format: float
                                  description: Time taken for TLS connection (ms).
                                ttfb:
                                  type: number
                                  format: float
                                  description: Time taken to first byte (ms).
                                download:
                                  type: number
                                  format: float
                                  description: Time taken to download (ms).
                                total:
                                  type: number
                                  format: float
                                  description: Total response time (ms).
                  summary:
                    type: object
                    properties:
                      uptime:
                        type: object
                        properties:
                          percentage:
                            type: number
                            format: float
                            description: Overall uptime percentage.
                          percentage_incl_maint:
                            type: number
                            format: float
                            description: Overall uptime percentage including maintenance.
                          downtimes:
                            type: integer
                            description: Total number of downtimes recorded.
                          downtimes_incl_maint:
                            type: integer
                            description: Total number of downtimes including maintenance.
                      response_time:
                        type: object
                        additionalProperties:
                          type: number
                          format: float
                          description: Average response time per location in milliseconds.
                  history:
                    type: object
                    description: Historical uptime data for all available months.
                    additionalProperties:
                      type: object
                      description: The date of the report in YYYY-MM format.
                      properties:
                        uptime:
                          type: object
                          properties:
                            percentage:
                              type: number
                              format: float
                              description: Uptime percentage for that month.
                            percentage_incl_maint:
                              type: number
                              format: float
                              description: Uptime percentage including maintenance for that month.
              example:
                timezone: "UTC+02:00"
                data:
                  "2025-02-24":
                    uptime:
                      percentage: 81.9444
                      percentage_incl_maint: 81.9444
                      downtimes: 3
                      downtimes_incl_maint: 3
                    response_time:
                      frankfurt: 131.74
                      singapore: 586.48
                    hourly_stats:
                      "00":
                        frankfurt:
                          dns_lookup: 8.51
                          tcp_connect: 15.31
                          tls_connect: 86.8
                          ttfb: 28.61
                          download: 0.14
                          total: 139.37
                        singapore:
                          dns_lookup: 3.13
                          tcp_connect: 189.97
                          tls_connect: 211.13
                          ttfb: 196.84
                          download: 0.21
                          total: 601.28
                summary:
                  uptime:
                    percentage: 81.9444
                    percentage_incl_maint: 81.9444
                    downtimes: 3
                    downtimes_incl_maint: 3
                  response_time:
                    frankfurt: 131.74
                    singapore: 586.48
                history:
                  "2025-02":
                    uptime:
                      percentage: 79.0377
                      percentage_incl_maint: 79.0377
                  "2025-01":
                    uptime:
                      percentage: 91.9758
                      percentage_incl_maint: 91.9758
                  "2024-12":
                    uptime:
                      percentage: 81.1895
                      percentage_incl_maint: 81.1895
                  "2024-11":
                    uptime:
                      percentage: 74.1898
                      percentage_incl_maint: 74.1898
                  "2024-10":
                    uptime:
                      percentage: 95.7348
                      percentage_incl_maint: 95.7348
                  "2024-09":
                    uptime:
                      percentage: 99.9051
                      percentage_incl_maint: 99.9051
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Report
  /uptime-monitors/{monitor_id}/downtimes:
    get:
      summary: Downtimes
      description: |
        API call used to get an uptime monitor's Downtimes.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: per_page
          in: query
          description: Number of monitors returned per page.
          style: form
          explode: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 200
        - name: page
          in: query
          description: Which page of the paginated results to return.
          style: form
          explode: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 10000
        - name: start_before
          in: query
          description: |
            Filter the downtime entries to only those that have started before the specified timestamp.
            *Example:* A value of `1641832650` will fetch downtimes that started at and before the timestamp `1641832650`.
          required: false
          style: form
          explode: false
          schema:
            type: integer
        - name: start_after
          in: query
          description: |
            The timestamp after which to start scanning for downtime entries.  
            *Example:* A value of `1641832650` will fetch downtimes that started at and after the timestamp `1641832650`.
          required: false
          style: form
          explode: false
          schema:
            type: integer
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      downtimes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              minLength: 32
                              maxLength: 32
                              description: The unique downtime id.
                            start:
                              type: integer
                              description: The timestamp when the downtime started.
                            end:
                              type: integer
                              description: The timestamp when the downtime ended.
                            maintenance:
                              type: boolean
                              description: Whether the downtime happened during a maintenance window or not.
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: The total number of downtimes for the uptime monitor.
                          total_filtered:
                            type: integer
                            description: The number of downtimes filtered by the API call.
                          returned:
                            type: integer
                            description: The number of downtimes returned by the API call.
                          pagination:
                            type: object
                            properties:
                              current:
                                type: integer
                                description: The current page number.
                              last:
                                type: integer
                                description: The last available page number.
                              previous:
                                type: integer
                                nullable: true
                                description: The previous page number; `null` returned if no previous pages available.
                              next:
                                type: integer
                                nullable: true
                                description: The next page number; `null` returned if no further pages available.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Monitors
  /uptime-monitors/{monitor_id}/location-fail-log:
    get:
      summary: Location Fail Log
      description: |
        API call used to get an uptime monitor's Location Fail Log.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: timestamp
          in: query
          description: The timestamp when to start scanning for log entries. If no timestamp is provided, the scanning will start at the current timestamp.
          required: false
          style: form
          explode: false
          schema:
            type: integer
        - name: minutes
          in: query
          description: |
            The number of minutes containing log entries to get. Minutes without log entries are not counted/considered, and each minute may contain multiple log entries.  
            *Example:* A value of `10` will scan through the logs, in a descending order starting from the `timestamp`, until it finds 10 different minutes containing log entries.
          style: form
          explode: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      entries:
                        type: array
                        items:
                          type: object
                          properties:
                            timestamp:
                              type: integer
                              description: Timestamp at which this error has been encountered by the monitoring node.
                            location:
                              type: string
                              description: The location and the specific monitoring node from that location that has logged in the error.
                            data:
                              type: string
                              description: The exact error that has been encountered by the monitoring node.
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          returned:
                            type: integer
                            description: The number of log entries that have been returned by this API call.
                          start_timestamp:
                            type: integer
                            description: The timestamp from which scanning for log entries began.
                          end_timestamp:
                            type: integer
                            description: The timestamp until which scanning for log entries has run down to.
                          next_page_timestamp:
                            type: integer
                            nullable: true
                            description: The timestamp you'll need to put in this API's `timestamp` optional query parameter in order to get the next page of entries; returns `null` if there are no next pages of log entries.
              example:
                entries:
                  - timestamp: 1641909671
                    location: "London 6"
                    data: 'Error 28: Connection timed out after 10001 milliseconds (10001ms)'
                  - timestamp: 1641588609
                    location: "Amsterdam 1"
                    data: 'Error 28: Connection timed out after 10001 milliseconds (10001ms)'
                meta:
                  returned: 2
                  start_timestamp: 1641926870
                  end_timestamp: 1641588600
                  next_page_timestamp: 1641588599
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Monitors
  /uptime-monitors/{monitor_id}/server-agent:
    get:
      summary: Server Agent ID
      description: |
        API call used to get an uptime monitor's Server Monitoring Agent ID. This Server ID (SID) is unique for each Server Monitoring Agent.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
            pattern: '^[A-Za-z0-9]{32}$'
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      agent_id:
                        type: string
                        nullable: true
                        description: The unique server agent monitor ID that is attached to this uptime monitor; returns `null` if no server agent monitor is attached. <a href="https://docs.hetrixtools.com/attach-a-server-monitor-to-any-of-your-uptime-monitors/" target="_blank">Learn more here</a>.
                example:
                  agent_id: e34334f5gt755b034606y54ccabe62e8
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    post:
      summary: Server Agent ID
      description: |
        API call used to attach a new Server Monitoring Agent ID to an uptime monitor. This will generate and return a unique Agent ID for the specified monitor, if one is not already attached.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
            pattern: '^[A-Za-z0-9]{32}$'
      responses:
        '200':
          description: Agent ID successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_id:
                    type: string
                    description: The newly created unique server agent monitor ID that is attached to this uptime monitor.
              example:
                agent_id: 9b7e53ddrfc12342r45ed234cfbf07c
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
    delete:
      summary: Server Agent ID
      description: |
        API call used to detach (delete) the Server Monitoring Agent ID from an uptime monitor. This will remove the attached server agent from the monitor and delete all of the collected server metrics.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
            pattern: '^[A-Za-z0-9]{32}$'
      responses:
        '200':
          description: Server Agent successfully removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: server agent removed
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Monitors
  /uptime-monitors/{monitor_id}/server-agent/warning-policies:
    get:
      summary: Warning Policies
      description: |
        API call used to get an uptime monitor's Server Agent warning policies.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      agent_data_warn:
                          type: object
                          description: Issue warnings when the server monitoring agent hasn't sent data.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              enum: [3, 5, 10, 15, 30, 60]
                              description: The number of consecutive minutes without agent data received required to trigger a warning.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      cpu_usage_warn:
                          type: object
                          description: Issue warnings when cpu usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 100
                              description: The usage (percent) at which and over which a warning is issued.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      iowait_usage_warn:
                          type: object
                          description: Issue warnings when iowait usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 100
                              description: The usage (percent) at which and over which a warning is issued.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      ram_usage_warn:
                          type: object
                          description: Issue warnings when ram usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 100
                              description: The usage (percent) at which and over which a warning is issued.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      swap_usage_warn:
                          type: object
                          description: Issue warnings when swap usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 100
                              description: The usage (percent) at which and over which a warning is issued.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      disk_usage_warn:
                          type: object
                          description: Issue warnings when disk usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 100
                              description: The usage (percent) at which and over which a warning is issued.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                            warn_disks:
                              type: array
                              description: The array of disks that can generate usage warnings.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 32
                                    maxLength: 32
                                    description: The unique identifier for this disk.
                                  enabled:
                                    type: boolean
                                    description: Defines whether or not this disk generates usage warnings.
                                  mount:
                                    type: string
                                    description: This disk's mount point on the system.
                      raid_warn:
                          type: object
                          description: Issue warnings RAID status is not completely healthy.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            warn_type:
                              type: string
                              enum: ['not_ideal', 'critical']
                              description: |
                                The severity of the encountered RAID status at which a warning is issued.  
                                - `not_ideal` - includes statuses such as: `check`, `recover`, `resync`
                                - `critical` - includes statuses such as: `degraded`, `failed`
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      drive_errors_warn:
                          type: object
                          description: Issue warnings when drive errors reach a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              description: The number of errors at which and over which a warning is issued.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      drive_wearout_warn:
                          type: object
                          description: Issue warnings when drive wearout reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 255
                              description: The wearout (percent) at which and over which a warning is issued.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      drive_smart_warn:
                          type: object
                          description: Issue warnings when S.M.A.R.T. test fails.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                      network_in_warn:
                          type: object
                          description: Issue warnings when inbound usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 1000000
                              description: The threshold at which and over which a warning is issued.
                            threshold_type:
                              type: string
                              enum: ['kbps', 'mbps', 'gbps']
                              description: |
                                The threshold's measuring unit.  
                                Example: if `threshold` is set to `10` and `threshold_type` is set to `mbps`, that means the warning threshold is 10Mbps.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                            warn_nics:
                              type: array
                              description: The array of network interfaces that can generate usage warnings.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 32
                                    maxLength: 32
                                    description: The unique identifier for this network interface.
                                  enabled:
                                    type: boolean
                                    description: Defines whether or not this network interface generates usage warnings.
                                  name:
                                    type: string
                                    description: The network interface name.
                      network_out_warn:
                          type: object
                          description: Issue warnings when outbound usage reaches a threshold.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            threshold:
                              type: integer
                              minimum: 1
                              maximum: 1000000
                              description: The threshold at which and over which a warning is issued.
                            threshold_type:
                              type: string
                              enum: ['kbps', 'mbps', 'gbps']
                              description: |
                                The threshold's measuring unit.  
                                Example: if `threshold` is set to `10` and `threshold_type` is set to `mbps`, that means the warning threshold is 10Mbps.
                            time_frame:
                              type: integer
                              enum: [1, 3, 5, 10, 15, 30, 60]
                              description: The last `X` minutes over which the usage average is calculated.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                            warn_nics:
                              type: array
                              description: The array of network interfaces that can generate usage warnings.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 32
                                    maxLength: 32
                                    description: The unique identifier for this network interface.
                                  enabled:
                                    type: boolean
                                    description: Defines whether or not this network interface generates usage warnings.
                                  name:
                                    type: string
                                    description: The network interface name.
                      services_warn:
                          type: object
                          description: Issue warnings when a service goes down.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                            warn_services:
                              type: array
                              description: The array of services that can generate warnings.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 32
                                    maxLength: 32
                                    description: The unique identifier for this service.
                                  enabled:
                                    type: boolean
                                    description: Defines whether or not this service generates warnings.
                                  name:
                                    type: string
                                    description: The service name.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    put:
      summary: Warning Policies
      description: |
        API call used to update an uptime monitor's Server Agent warning policies.
      parameters:
        - name: monitor_id
          in: path
          description: The unique uptime monitor id, which can be found by running the [GET - Uptime Monitors](https://docs.hetrixtools.com/api/v3/#/paths/~1uptime-monitors/get) API.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    agent_data_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          enum: [3, 5, 10, 15, 30, 60]
                          description: The number of consecutive minutes without agent data would issue a warning.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                    cpu_usage_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          minimum: 1
                          maximum: 100
                          description: The usage (percent) at which and over which a warning is issued.
                        time_frame:
                          type: integer
                          enum: [1, 3, 5, 10, 15, 30, 60]
                          description: The last `X` minutes over which the usage average is calculated.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                    iowait_usage_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          minimum: 1
                          maximum: 100
                          description: The usage (percent) at which and over which a warning is issued.
                        time_frame:
                          type: integer
                          enum: [1, 3, 5, 10, 15, 30, 60]
                          description: The last `X` minutes over which the usage average is calculated.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                    ram_usage_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          minimum: 1
                          maximum: 100
                          description: The usage (percent) at which and over which a warning is issued.
                        time_frame:
                          type: integer
                          enum: [1, 3, 5, 10, 15, 30, 60]
                          description: The last `X` minutes over which the usage average is calculated.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                    swap_usage_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          minimum: 1
                          maximum: 100
                          description: The usage (percent) at which and over which a warning is issued.
                        time_frame:
                          type: integer
                          enum: [1, 3, 5, 10, 15, 30, 60]
                          description: The last `X` minutes over which the usage average is calculated.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                    disk_usage_warn:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Defines whether or not this policy is enabled.
                        threshold:
                          type: integer
                          minimum: 1
                          maximum: 100
                          description: The usage (percent) at which and over which a warning is issued.
                        time_frame:
                          type: integer
                          enum: [1, 3, 5, 10, 15, 30, 60]
                          description: The last `X` minutes over which the usage average is calculated.
                        warn_frequency:
                          type: integer
                          enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                          description: The minimum number of minutes between each issued warning.
                        warn_disks:
                              type: array
                              description: The array of disks that can generate usage warnings.
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 32
                                    maxLength: 32
                                    description: The unique identifier for this disk.
                                  enabled:
                                    type: boolean
                                    description: Defines whether or not this disk generates usage warnings.
                                  mount:
                                    type: string
                                    description: This disk's mount point on the system.
                    raid_warn:
                          type: object
                          description: Issue warnings RAID status is not completely healthy.
                          properties:
                            enabled:
                              type: boolean
                              description: Defines whether or not this policy is enabled.
                            warn_type:
                              type: string
                              enum: ['not_ideal', 'critical']
                              description: |
                                The severity of the encountered RAID status at which a warning is issued.  
                                - `not_ideal` - includes statuses such as: `check`, `recover`, `resync`
                                - `critical` - includes statuses such as: `degraded`, `failed`
                            warn_frequency:
                              type: integer
                              enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                              description: The minimum number of minutes between each issued warning.
                    drive_errors_warn:
                        type: object
                        description: Issue warnings when drive errors reach a threshold.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          threshold:
                            type: integer
                            minimum: 1
                            description: The number of errors at which and over which a warning is issued.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                    drive_wearout_warn:
                        type: object
                        description: Issue warnings when drive wearout reaches a threshold.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          threshold:
                            type: integer
                            minimum: 1
                            maximum: 255
                            description: The wearout (percent) at which and over which a warning is issued.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                    drive_smart_warn:
                        type: object
                        description: Issue warnings when S.M.A.R.T. test fails.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                    network_in_warn:
                        type: object
                        description: Issue warnings when inbound usage reaches a threshold.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          threshold:
                            type: integer
                            minimum: 1
                            maximum: 1000000
                            description: The threshold at which and over which a warning is issued.
                          threshold_type:
                            type: string
                            enum: ['kbps', 'mbps', 'gbps']
                            description: |
                              The threshold's measuring unit.  
                              Example: if `threshold` is set to `10` and `threshold_type` is set to `mbps`, that means the warning threshold is 10Mbps.
                          time_frame:
                            type: integer
                            enum: [1, 3, 5, 10, 15, 30, 60]
                            description: The last `X` minutes over which the usage average is calculated.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                          warn_nics:
                            type: array
                            description: The array of network interfaces that can generate usage warnings.
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 32
                                  maxLength: 32
                                  description: The unique identifier for this network interface.
                                enabled:
                                  type: boolean
                                  description: Defines whether or not this network interface generates usage warnings.
                                name:
                                  type: string
                                  description: The network interface name.
                    network_out_warn:
                        type: object
                        description: Issue warnings when outbound usage reaches a threshold.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          threshold:
                            type: integer
                            minimum: 1
                            maximum: 1000000
                            description: The threshold at which and over which a warning is issued.
                          threshold_type:
                            type: string
                            enum: ['kbps', 'mbps', 'gbps']
                            description: |
                              The threshold's measuring unit.  
                              Example: if `threshold` is set to `10` and `threshold_type` is set to `mbps`, that means the warning threshold is 10Mbps.
                          time_frame:
                            type: integer
                            enum: [1, 3, 5, 10, 15, 30, 60]
                            description: The last `X` minutes over which the usage average is calculated.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                          warn_nics:
                            type: array
                            description: The array of network interfaces that can generate usage warnings.
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 32
                                  maxLength: 32
                                  description: The unique identifier for this network interface.
                                enabled:
                                  type: boolean
                                  description: Defines whether or not this network interface generates usage warnings.
                                name:
                                  type: string
                                  description: The network interface name.
                    services_warn:
                        type: object
                        description: Issue warnings when a service goes down.
                        properties:
                          enabled:
                            type: boolean
                            description: Defines whether or not this policy is enabled.
                          warn_frequency:
                            type: integer
                            enum: [5, 10, 15, 30, 60, 180, 360, 720, 1440]
                            description: The minimum number of minutes between each issued warning.
                          warn_services:
                            type: array
                            description: The array of services that can generate warnings.
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 32
                                  maxLength: 32
                                  description: The unique identifier for this service.
                                enabled:
                                  type: boolean
                                  description: Defines whether or not this service generates warnings.
                                name:
                                  type: string
                                  description: The service name.
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
              example:
                status: created
                message: warning policies updated
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    x-summary: Uptime Monitors
  /status-pages:
    get:
     summary: Status Pages
     description: |
      API call used to get a list of all your status pages.
     parameters:
      - name: page
        in: query
        description: The page number that you want to retrieve.
        required: false
        style: form
        explode: false
        schema:
          type: integer
          minimum: 1
      - name: per_page
        in: query
        description: The number of status pages that you want to retrieve per page.
        required: false
        style: form
        explode: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: name
        in: query
        description: The name of the status page that you want to retrieve.
        required: false
        style: form
        explode: false
        schema:
          type: string
     responses:
      '200':
        description: Successful Response.
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    status_pages:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 32
                            maxLength: 32
                            description: The unique identifier for this status page.
                          name:
                            type: string
                            description: The name of this status page.
                          type:
                            type: string
                            enum: ['blacklist', 'uptime']
                            description: |
                              The type of this status page.  
                              - `blacklist` - a status page containing blacklist monitors.
                              - `uptime` - a status page containing uptime monitors.
                          monitors:
                            type: array
                            description: The array of monitors that are on this status page.
                            items:
                              type: string
                              minLength: 32
                              maxLength: 32
                          password_protected:
                            type: boolean
                            description: Defines whether or not this status page is password protected.
                          announcement_type:
                            type: string
                            enum: ['none', 'positive', 'info', 'warning', 'critical']
                            description: |
                              The type of announcement that is displayed on this status page.
                          announcement_title:
                            type: string
                            description: The title of the announcement that is displayed on this status page.
                          announcement_body:
                            type: string
                            description: The body of the announcement that is displayed on this status page.
                          announcement_affected:
                            type: array
                            description: The array of monitors that are affected by the announcement that is displayed on this status page.
                            items:
                              type: string
                              minLength: 32
                              maxLength: 32
                          twitter_feed:
                            type: boolean
                            description: Defines whether or not the Twitter feed is displayed on this status page.
                          twitter_user:
                            type: string
                            description: The Twitter username's profile feed that is displayed on this status page.
                          twitter_pos:
                            type: string
                            enum: ['right', 'left']
                            description: The position of the Twitter feed on this status page.
                - type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        total:
                          type: integer
                          description: The total number of uptime monitors available in your account.
                        total_filtered:
                          type: integer
                          description: The number of uptime monitors found after filtering has been applied.
                        returned:
                          type: integer
                          description: The number of uptime monitors returned by this API call.
                        pagination:
                          type: object
                          properties:
                            current:
                              type: integer
                              description: The current page number.
                            last:
                              type: integer
                              description: The last available page number.
                            previous:
                              type: integer
                              nullable: true
                              description: The previous page number; `null` returned if no previous pages available.
                            next:
                              type: integer
                              nullable: true
                              description: The next page number; `null` returned if no further pages available.
      '400':
        $ref: '#/components/responses/BadRequestError'
      '401':
        $ref: '#/components/responses/UnauthorizedError'
      '403':
        $ref: '#/components/responses/ForbiddenError'
      '429':
        $ref: '#/components/responses/RateLimitedError'
     security:
      - bearerAuth: []
    x-summary: Status Pages
  /status-pages/{status_page_id}/monitors:
    post:
     summary: Status Pages - Monitors
     description: |
      API call used to add monitors to a status page.
     parameters:
      - name: status_page_id
        in: path
        description: |
          The unique status page id, which can be found in the URL of each status page, in your [HetrixTools account](https://hetrixtools.com/dashboard/status-pages/).
          Example: `https://hetrixtools.com/r/{status_page_id}/`
        required: true
        style: simple
        explode: false
        schema:
          type: string
     requestBody:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: array
                description: | 
                 The array of monitors that you want to add to the status page.
                items:
                  type: string
                  minLength: 32
                  maxLength: 32
                  description: The unique `monitor_id` for the monitor that you want to add to the status page.
     responses:
      '200':
        description: Successful Response.
        content:
          application/json:
            schema:
              type: object
            example:
              status: success
              message: x monitor(s) added to status page
      '400':
        $ref: '#/components/responses/BadRequestError'
      '401':
        $ref: '#/components/responses/UnauthorizedError'
      '403':
        $ref: '#/components/responses/ForbiddenError'
      '404':
        $ref: '#/components/responses/NotFoundError'
      '429':
        $ref: '#/components/responses/RateLimitedError'
     security:
      - bearerAuth: []
     x-summary: Status Pages
    delete:
     summary: Status Pages - Monitors
     description: |
      API call used to remove monitors from a status page.
     parameters:
      - name: status_page_id
        in: path
        description: |
          The unique status page id, which can be found in the URL of each status page, in your [HetrixTools account](https://hetrixtools.com/dashboard/status-pages/).
          Example: `https://hetrixtools.com/r/{status_page_id}/`
        required: true
        style: simple
        explode: false
        schema:
          type: string
     requestBody:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - type: array
                description: | 
                 The array of monitors that you want to remove from the status page.
                items:
                  type: string
                  minLength: 32
                  maxLength: 32
                  description: The unique `monitor_id` for the monitor that you want to remove from the status page.
     responses:
      '200':
        description: Successful Response.
        content:
          application/json:
            schema:
              type: object
            example:
              status: success
              message: x monitor(s) removed from status page
      '400':
        $ref: '#/components/responses/BadRequestError'
      '401':
        $ref: '#/components/responses/UnauthorizedError'
      '403':
        $ref: '#/components/responses/ForbiddenError'
      '404':
        $ref: '#/components/responses/NotFoundError'
      '429':
        $ref: '#/components/responses/RateLimitedError'
     security:
      - bearerAuth: []
     x-summary: Status Pages
  /schedule-maintenance:
    get:
      summary: Schedule Maintenance
      description: |
        API call used to list all scheduled maintenance windows.
      parameters:
        - name: per_page
          in: query
          description: Number of maintenance windows returned per page.
          style: form
          explode: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 200
        - name: page
          in: query
          description: Which page of the paginated results to return.
          style: form
          explode: false
          schema:
            type: integer
            default: 1
            minimum: 1
            maximum: 10000
        - name: monitor_id
          in: query
          description: Optional. Filter by uptime monitor ID.
          required: false
          style: form
          explode: false
          schema:
            type: string
            minLength: 32
            maxLength: 32
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      scheduled_maintenances:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: The unique schedule maintenance ID.
                            monitor_id:
                              type: string
                              description: The ID of the monitor under maintenance.
                            start:
                              type: string
                              format: date-time
                              description: Maintenance start time as string (YYYY-MM-DD HH:MM).
                            end:
                              type: string
                              format: date-time
                              description: Maintenance end time as string (YYYY-MM-DD HH:MM).
                            timezone:
                              type: string
                              description: Timezone of the maintenance window.
                            with_notifications:
                              type: boolean
                              description: Whether notifications are enabled for this maintenance.
                            recurring:
                              type: boolean
                              description: Whether this maintenance is recurring.
                            recurring_time:
                              type: integer
                              description: Recurring interval value.
                            recurring_time_type:
                              type: string
                              description: Recurring interval type (hour, day, week, month, year).
                  - type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Total number of scheduled maintenance windows.
                          total_filtered:
                            type: integer
                            description: Total number of filtered scheduled maintenance windows.
                          returned:
                            type: integer
                            description: Number of scheduled maintenance windows returned in this response.
                          pagination:
                            type: object
                            properties:
                              current:
                                type: integer
                              last:
                                type: integer
                              previous:
                                type: integer
                                nullable: true
                              next:
                                type: integer
                                nullable: true
              example:
                  scheduled_maintenances:
                  - id: abc123def456ghi789jkl012mno345pq
                    monitor_id: e34334dt5t755b034606y54ccabe62e8
                    start: "2025-06-06 10:00"
                    end: "2025-06-06 12:00"
                    timezone: "America/New_York"
                    with_notifications: true
                    recurring: false
                    recurring_time: 0
                    recurring_time_type: ""
                  meta:
                    total: 1
                    total_filtered: 1
                    returned: 1
                    pagination:
                      current: 1
                      last: 1
                      previous: null
                      next: null
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
    post:
      summary: Schedule Maintenance
      description: |
        API call used to create a new schedule maintenance for a monitor.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - monitor_id
                - start
                - end
                - timezone
              properties:
                monitor_id:
                  type: string
                  description: The monitor ID to schedule maintenance for.
                start:
                  type: string
                  format: date-time
                  description: Maintenance start time as string (YYYY-MM-DD HH:MM).
                end:
                  type: string
                  format: date-time
                  description: Maintenance end time as string (YYYY-MM-DD HH:MM).
                timezone:
                  type: string
                  description: Timezone of the maintenance window.
                with_notifications:
                  type: boolean
                  description: Whether notifications are enabled for this maintenance.
                recurring_time:
                  type: integer
                  description: Recurring interval value. In set, along with `recurring_time_type`, the maintenance will be recurring.
                recurring_time_type:
                  type: string
                  description: Recurring interval type (hour, day, week, month, year). If set, along with `recurring_time`, the maintenance will be recurring.
            example:
              monitor_id: e34334dt5t755b034606y54ccabe62e8
              start: "2025-06-06 10:00"
              end: "2025-06-06 12:00"
              timezone: "America/New_York"
              with_notifications: true
              recurring: false
              recurring_time: 0
              recurring_time_type: ""
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  monitor_id:
                    type: string
                  start:
                    type: string
                  end:
                    type: string
                  timezone:
                    type: string
                  with_notifications:
                    type: boolean
                  recurring:
                    type: boolean
                  recurring_time:
                    type: integer
                  recurring_time_type:
                    type: string
              example:
                id: abc123def456ghi789jkl012mno345pq
                monitor_id: e34334dt5t755b034606y54ccabe62e8
                start: "2025-06-06 10:00"
                end: "2025-06-06 12:00"
                timezone: "America/New_York"
                with_notifications: true
                recurring: false
                recurring_time: 0
                recurring_time_type: ""
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
  /schedule-maintenance/{id}:
    delete:
      summary: Schedule Maintenance
      description: |
        API call used to delete an existing scheduled maintenance.
      parameters:
        - name: id
          in: path
          description: The unique schedule maintenance ID.
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                type: object
              example:
                status: success
                message: scheduled maintenance removed
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - bearerAuth: []
components:
  schemas: {}
  responses:
    NoContentMsg:
      description: No Content - API request returned no content.
    BadRequestError:
      description: Bad Request - API request is invalid or not properly formatted.
      content:
        application/json:
          schema:
            type: object
          example:
            status: bad_request
            message: invalid endpoint
    UnauthorizedError:
      description: Unauthorized - Missing or invalid authentication API key (bearer token).
      content:
        application/json:
          schema:
            type: object
          example:
            status: unauthorized
            message: invalid authorization
    ForbiddenError:
      description: Forbidden - Your API key does not have access to perform this request.
      content:
        application/json:
          schema:
            type: object
          example:
            status: forbidden
            message: api key not allowed to perform this action
    ConflictError:
      description: Conflict - The request could not be completed due to a conflict with the current state of the resource.
      content: 
        application/json:
          schema:
            type: object
          example:
            status: conflict
            message: resource already exists or is in an invalid state
    NotFoundError:
      description: Not Found - The resource you have requested was not found.
      content:
        application/json:
          schema:
            type: object
          example:
            status: not_found
            message: error message
    RateLimitedError:
      description: Rate Limited - You are performing API requests too frequently.
      content:
        application/json:
          schema:
            type: object
          example:
            status: too_many_requests
            message: user api rate limit exceeded
    InternalServerError:
      description: Internal Server Error - An error occurred on the server.
      content:
        application/json:
          schema:
            type: object
          example:
            status: internal_server_error
            message: unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        ## Getting The API Key (Bearer Token)
        This can be obtained from your HetrixTools account at the following link: [https://hetrixtools.com/dashboard/account/api/](https://hetrixtools.com/dashboard/account/api/)
        
        ## Using The API Key (Bearer Token)
        Include your API Key (Bearer Token) in the `Authorization` header with all of your API requests, as shown in the example below.
        ```
        curl -X GET -H "Authorization: Bearer {BEARER_TOKEN}" "https://api.hetrixtools.com/v3/{ENDPOINT}"
        ```