openapi: 3.0.1
info:
  title: StatusPal API Reference
  x-logo:
    url: /favicon.ico
    altText: StatusPal logo
  description: |
    Welcome to the [StatusPal](https://www.statuspal.io?utm_campaign=api-docs&utm_source=docs.statuspal.io/platform/api-reference&utm_medium=top-link) API reference.

    <br>

    [← Go back to StatusPal](https://www.statuspal.io?utm_campaign=api-docs&utm_source=docs.statuspal.io/platform/api-reference&utm_medium=back-link)

    # Introduction

    Here you'll learn how to leverage the power of StatusPal through its API to query your
    status page's status, create and update incidents, push custom metrics and more.


    ### Servers

    - `https://statuspal.io/api/v2` (US servers)
    - `https://statuspal.eu/api/v2` (EU servers)

    If you need some assistance please email us at support@statuspal.io.

    ### Example request

    ```bash
    curl https://statuspal.io/api/v2/hello \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json'
    ```

    ### Datetimes

    All datetime fields are stored in UTC and follow ISO 8601 standard (`2022-01-01T00:00:00`).

    # Authentication

    Some endpoints require authentication in order to be used, you'll need to pass your API
    key in the `Authorization` header, you can find your API key in your
    [User Account page](https://statuspal.io/admin/profile) or under your organization's
    "Security > API" Keys page.

    <SecurityDefinitions />

    #### Example authenticated request:

    ```bash
    curl -X POST \
      https://statuspal.io/api/v2/status_pages/:subdomain/incidents \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: <your-api-key>' \
      -d '{
       "incident": {
          "type": "major",
          "title": "DB connection issues",
          "service_ids": [1],
          "updates": [{ "type": "issue", "description": "We are investigating" }]
        }
      }'
    ```

    # Rate Limits

    Our API has the following rate limits:

    ### EU Region

    300 requests per 10 seconds

    ### US Region

    100 requests per 10 seconds

    ### What happens when the rate limit is exceeded?

    If the rate limit is exceeded, the API will return a `429` status code.

    ### Need a custom rate limit?

    Please contact us at support@statuspal.io and we'll be happy to help you.

    ---

  contact:
    url: https://www.statuspal.io
    email: contact@statuspal.io
  version: 2.0.0
servers:
  - url: https://statuspal.io/api/v2
  - url: https://statuspal.eu/api/v2

tags:
  - name: Test
    description: Test endpoints
  - name: Status
    description: Status endpoints
  - name: Summary
    description: Summary endpoints
  - name: Incidents
    description: Incidents endpoints
  - name: Incident Updates
    description: Incident Updates endpoints
  - name: Incident Templates
    description: Incident Templates endpoints
  - name: Information Notices
    description: |
      Information Notices endpoints

      ## Information Notice Updates

      These endpoints are the same as [Incident Updates endpoints](/platform/api-reference/incident-updates), but it doesn't support the `type` attribute.
  - name: Metrics
    description: Metrics endpoints
  - name: Integrations
    description: Integrations endpoints
  - name: Status Pages
    description: |
      Manage your organization's status pages — create, update, delete, and configure custom domains.

      ## Custom Domains

      You can serve your status page on a custom domain (e.g. `status.example.com`) by configuring the `domain_config` object on a status page. StatusPal supports two CDN providers: **Cloudflare** and **Bunny**.

      ### Setup flow

      **1. Enable the custom domain:** Update the status page with `domain_config.provider` and `domain_config.domain`:

      ```bash
      curl -X PUT \
        https://statuspal.eu/api/v2/orgs/{organizationId}/status_pages/{subdomain} \
        -H 'Authorization: <your-api-key>' \
        -H 'Content-Type: application/json' \
        -d '{
          "status_page": {
            "domain_config": {
              "provider": "cloudflare",
              "domain": "status.example.com"
            }
          }
        }'
      ```

      StatusPal begins provisioning the domain asynchronously. The `domain_config.status` field starts as `configuring`.

      **2. Retrieve DNS records:** Poll `GET /orgs/{organizationId}/status_pages/{subdomain}` until `domain_config.validation_records` is populated (typically a few seconds). The records you need depend on the provider:

      | Provider | Records required |
      |---|---|
      | **Cloudflare** | 1 CNAME (`hostname_cname_name` → `hostname_cname_value`), 1 TXT for hostname verification (`hostname_txt_name` / `hostname_txt_value`), and 1 TXT for SSL certificate (`certificate_txt_name` / `certificate_txt_value`) |
      | **Bunny** | 1 CNAME (`hostname_cname_name` → `hostname_cname_value`) |

      > **Note:** For the Cloudflare provider, the `certificate_txt_*` fields may not appear immediately. Poll every 10–15 seconds until they are present.

      > **Note:** For the Bunny provider, the `hostname_cname_value` field may be empty on the initial response while the pull zone is being created. Poll every 2–5 seconds until it is populated (typically a few seconds).

      **3. Create DNS records:** Add the records at your DNS provider. If your DNS provider is Cloudflare, make sure the CNAME has **proxy disabled** (DNS-only / grey cloud).

      **4. Wait for activation:** Poll the status page until `domain_config.status` becomes `active`. This typically takes 1–10 minutes.

      ### Removing a custom domain

      Set `domain_config.provider` and `domain_config.domain` to `null`:

      ```bash
      curl -X PUT \
        https://statuspal.eu/api/v2/orgs/{organizationId}/status_pages/{subdomain} \
        -H 'Authorization: <your-api-key>' \
        -H 'Content-Type: application/json' \
        -d '{
          "status_page": {
            "domain_config": {
              "provider": null,
              "domain": null
            }
          }
        }'
      ```

      ### Retrying a failed configuration

      If `domain_config.status` is `failed_to_configure`, re-submit the same `domain_config` to restart provisioning.

      ### Changing the domain

      Update `domain_config.domain` to the new value. StatusPal will revoke the old domain's certificate and begin provisioning the new one. Follow steps 2–4 again.

      ### Domain status values

      | Status | Meaning |
      |---|---|
      | `disabled` | No custom domain configured. |
      | `configuring` | Provisioning in progress or waiting for DNS verification. |
      | `active` | Domain is live with SSL. |
      | `failed_to_configure` | Setup failed — check `domain_config.error` for details. |
  - name: Subscriptions
    description: Subscriptions endpoints
  - name: Services
    description: Services endpoints
  - name: Webhooks
    description: Webhooks endpoints
  - name: Access Groups
    description: Access Groups endpoints
  - name: Status Page Members
    description: Status Page Members endpoints
  - name: Organization Members
    description: Organization Members endpoints

paths:
  /hello:
    get:
      tags:
        - Test
      summary: Says hello
      operationId: sayHello
      security: []
      responses:
        429:
          description: Too many requests — the rate limit has been exceeded.
        200:
          description: A hello message
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A string "hello"
                    example: hello
  /status_pages/{subdomain}/status:
    get:
      tags: [Status]
      summary: Get the status reported on a status page
      operationId: getStatusPageStatus
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A status page's status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusPageStatus'
  /status_pages/{subdomain}/services/{serviceId}/status:
    get:
      tags: [Status]
      summary: Get the status reported on a status page service
      operationId: getServiceStatus
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/ServiceId'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A service's status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceStatus'
  /status_pages/{subdomain}/summary:
    get:
      tags: [Summary]
      summary: Get the summary of a status page (status, services and active incidents and maintenances)
      operationId: getStatusPageSummary
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A status page's status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusPageSummary'
  /status_pages/{subdomain}/services/{serviceId}/summary:
    get:
      tags: [Summary]
      summary: Get the summary of a service (status, services and active incidents and maintenances)
      operationId: getServiceSummary
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/ServiceId'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A service's status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceSummary'
  /status_pages/{subdomain}/subscriptions:
    get:
      tags:
        - Subscriptions
      summary: List subscriptions
      operationId: getSubscriptions
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - name: filter
          in: query
          description: |
            Filters by email address or phone number.

            In order to search by phone number, the following is supported:

            1. Full phone number. Ensure the country code is prefixed by a + sign and
              include a space between the country code and phone number (e.g. `+49 000000000` or `+49 000 000 000`)
            2. Country code (e.g. `+49`)
            3. Phone number without country code  (e.g. `000000000`)
          schema:
            type: string
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of subscriptions to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of subscriptions
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/subscriptions?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of subscriptions.
                        example: 100
      security:
        - api_key: []
    post:
      tags:
        - Subscriptions
      summary: Adds a new subscription email, SMS or discord subscription
      operationId: addSubscription
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The subscription
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The subscription was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/subscriptions/{subscriptionId}:
    get:
      tags:
        - Subscriptions
      summary: Get a subscription
      operationId: getSubscription
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/SubscriptionId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionObj'
      security:
        - api_key: []
    put:
      tags:
        - Subscriptions
      summary: Update the subscription
      operationId: updateSubscription
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/SubscriptionId'
      requestBody:
        description: The subscription
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The subscription was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionObj'
      security:
        - api_key: []
    delete:
      tags:
        - Subscriptions
      summary: Deletes the subscription
      operationId: deleteSubscription
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/SubscriptionId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        204:
          description: Subscription deleted successfully
          content: {}
      security:
        - api_key: []
  /orgs/{organizationId}/status_pages:
    get:
      tags:
        - Status Pages
      summary: List status pages
      operationId: getOrganizationStatusPages
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of Status Pages
          content:
            application/json:
              schema:
                properties:
                  status_pages:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrganizationStatusPage'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of status pages.
                        example: 100

      security:
        - api_key: []
    post:
      tags:
        - Status Pages
      summary: Adds a new status page
      operationId: addOrganizationStatusPage
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        description: The status page
        content:
          application/json:
            schema:
              type: object
              properties:
                status_page:
                  $ref: '#/components/schemas/OrganizationStatusPage'
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        201:
          description: The Status Page was created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_page:
                    $ref: '#/components/schemas/OrganizationStatusPage'
      security:
        - api_key: []
  /orgs/{organizationId}/status_pages/{subdomain}:
    get:
      tags:
        - Status Pages
      summary: Get a status page
      operationId: getOrganizationStatusPage
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The Status Page
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_page:
                    $ref: '#/components/schemas/OrganizationStatusPage'
      security:
        - api_key: []
    put:
      tags:
        - Status Pages
      summary: Updates a status page
      operationId: updateOrganizationStatusPage
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The status page
        content:
          application/json:
            schema:
              type: object
              properties:
                status_page:
                  $ref: '#/components/schemas/OrganizationStatusPage'
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The Status Page was updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_page:
                    $ref: '#/components/schemas/OrganizationStatusPage'
      security:
        - api_key: []
    delete:
      tags:
        - Status Pages
      summary: Deletes a status page permanently
      operationId: deleteOrganizationStatusPage
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The Status Page was deleted
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/services:
    get:
      tags:
        - Services
      summary: List services
      operationId: getServices
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of Services
          content:
            application/json:
              schema:
                properties:
                  services:
                    type: array
                    items:
                      $ref: '#/components/schemas/Service'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of services.
                        example: 100

      security:
        - api_key: []
    post:
      tags:
        - Services
      summary: Adds a new service
      operationId: addService
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The service
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        201:
          description: The service was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/services/{serviceId}:
    get:
      operationId: getService
      summary: 'Get a service'
      tags: [Services]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/ServiceId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: 'The service'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceObj'
    put:
      tags:
        - Services
      summary: Updates existing service
      operationId: updateService
      parameters:
        - $ref: '#/components/parameters/ServiceId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The service
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The service was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceObj'
      security:
        - api_key: []
    delete:
      operationId: deleteService
      summary: 'Deletes service permanently'
      tags: [Services]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/ServiceId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Service deleted successfully
          content: {}
  /status_pages/{subdomain}/incidents:
    get:
      tags:
        - Incidents
      summary: Get the list of incidents of a status page
      operationId: getIncidents
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of incidents to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
        - name: type
          in: query
          description: Filter incidents by incident type key.
          schema:
            type: string
          example: 'major'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of incidents
          content:
            application/json:
              schema:
                type: object
                properties:
                  incidents:
                    type: array
                    items:
                      $ref: '#/components/schemas/Incident'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/incidents?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of incidents.
                        example: 100
    post:
      tags:
        - Incidents
      summary: Adds a new incident associated to one or more services
      operationId: addIncident
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The incident
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentObj'
        required: true
      responses:
        500: { $ref: '#/components/responses/ServerError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        422: { $ref: '#/components/responses/ValidationError' }
        400: { $ref: '#/components/responses/BadRequestError' }
        200:
          description: The incident was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/incidents/{incidentId}:
    get:
      tags:
        - Incidents
      summary: Get an incident
      operationId: getIncident
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentId'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Incident object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentObj'
    put:
      tags:
        - Incidents
      summary: Updates existing incident
      operationId: updateIncident
      parameters:
        - $ref: '#/components/parameters/IncidentId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The incident
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The incident was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentObj'
      security:
        - api_key: []
    delete:
      tags:
        - Incidents
      summary: Deletes incident permanently
      operationId: deleteIncident
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Incident deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/incidents/{incidentId}/updates:
    post:
      tags:
        - Incident Updates
      summary: Adds a new update to the given incident
      operationId: addActivity
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentId'
      requestBody:
        description: The update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentActivityObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The update was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentActivityObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/incidents/{incidentId}/updates/{updateId}:
    put:
      tags:
        - Incident Updates
      summary: Updates an incident update
      operationId: updateActivity
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentId'
        - $ref: '#/components/parameters/IncidentActivityId'
      requestBody:
        description: The update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentActivityObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The incident update was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentActivityObj'
      security:
        - api_key: []
    delete:
      tags:
        - Incident Updates
      summary: Deletes incident update permanently
      operationId: deleteIncidentActivity
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentId'
        - $ref: '#/components/parameters/IncidentActivityId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Activity deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/info_notices:
    get:
      tags:
        - Information Notices
      summary: Get the list of information notices of a status page
      operationId: getInfoNotices
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of information notices to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of information notices
          content:
            application/json:
              schema:
                type: object
                properties:
                  info_notices:
                    type: array
                    items:
                      $ref: '#/components/schemas/InfoNotice'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/info_notices?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of information notices.
                        example: 100
    post:
      tags:
        - Information Notices
      summary: Adds a new information notice associated to one or more services
      operationId: addInfoNotice
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The information notice
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InfoNoticeObj'
        required: true
      responses:
        500: { $ref: '#/components/responses/ServerError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        422: { $ref: '#/components/responses/ValidationError' }
        400: { $ref: '#/components/responses/BadRequestError' }
        200:
          description: The information notice was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoNoticeObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/info_notices/{infoNoticeId}:
    get:
      tags:
        - Information Notices
      summary: Get an information notice
      operationId: getInfoNotice
      security: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/InfoNoticeId'
      responses:
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: information notice object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoNoticeObj'
    put:
      tags:
        - Information Notices
      summary: Updates existing information notice
      operationId: updateInfoNotice
      parameters:
        - $ref: '#/components/parameters/InfoNoticeId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The information notice
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InfoNoticeObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The information notice was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoNoticeObj'
      security:
        - api_key: []
    delete:
      tags:
        - Information Notices
      summary: Deletes information notice permanently
      operationId: deleteInfoNotice
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/InfoNoticeId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Information notice deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/webhooks:
    get:
      tags:
        - Webhooks
      summary: List all webhooks
      operationId: getWebhooks
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of webhooks
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
      security:
        - api_key: []
    post:
      tags:
        - Webhooks
      summary: Adds a new webhook
      operationId: addWebhook
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The webhook
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookObj'
        required: true
      responses:
        500: { $ref: '#/components/responses/ServerError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        422: { $ref: '#/components/responses/ValidationError' }
        400: { $ref: '#/components/responses/BadRequestError' }
        200:
          description: The webhook was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/webhooks/{webhookId}:
    get:
      tags:
        - Webhooks
      summary: Get a webhook
      operationId: getWebhook
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/WebhookId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookObj'
      security:
        - api_key: []
    put:
      tags:
        - Webhooks
      summary: Update the webhook
      operationId: updateWebhook
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/WebhookId'
      requestBody:
        description: The webhook
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The webhook was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookObj'
      security:
        - api_key: []
    delete:
      tags:
        - Webhooks
      summary: Deletes the webhook
      operationId: deleteWebhook
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/WebhookId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        204:
          description: Webhook deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/access_groups:
    get:
      tags:
        - Access Groups
      summary: List all access groups
      operationId: getAccessGroups
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of access groups
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_groups:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccessGroup'
      security:
        - api_key: []
    post:
      tags:
        - Access Groups
      summary: Adds a new access group
      operationId: addAccessGroup
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The access group
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessGroupObj'
        required: true
      responses:
        500: { $ref: '#/components/responses/ServerError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        422: { $ref: '#/components/responses/ValidationError' }
        400: { $ref: '#/components/responses/BadRequestError' }
        200:
          description: The access group was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGroupObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/access_groups/{accessGroupId}:
    get:
      tags:
        - Access Groups
      summary: Get an access group
      operationId: getAccessGroup
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/AccessGroupId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The access group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGroupObj'
      security:
        - api_key: []
    put:
      tags:
        - Access Groups
      summary: Update the access group
      operationId: updateAccessGroup
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/AccessGroupId'
      requestBody:
        description: The access group
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessGroupObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The access group was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGroupObj'
      security:
        - api_key: []
    delete:
      tags:
        - Access Groups
      summary: Deletes the access group
      operationId: deleteAccessGroup
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/AccessGroupId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        204:
          description: Access group deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/members:
    get:
      tags:
        - Status Page Members
      summary: List all members
      operationId: getStatusPageMembers
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of subscriptions to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
        - name: email
          in: query
          description: Filter the members by email.
          schema:
            type: string
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of members
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      $ref: '#/components/schemas/StatusPageMember'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/members?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of members.
                        example: 100
      security:
        - api_key: []
    post:
      tags:
        - Status Page Members
      summary: Adds a new membership
      operationId: addStatusPageMembers
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The membership
        content:
          application/json:
            schema:
              type: object
              properties:
                member:
                  type: object
                  properties:
                    email:
                      type: string
                      description: The member's email address.
                      example: jane@doe.com
                    role:
                      type: string
                      description: |
                        The membership role.
                        Available roles:
                        * `c` - Editor
                        * `v` - Viewer
                        * `a` - Admin
                      example: v
                    enabled:
                      type: boolean
                      description: Toggles the membership's state.
                      example: true
                    lang:
                      type: string
                      description: Used to set the language of the invitation email. Available values depend on the languages supported by the status page. If omitted, the status page's default language is used.
                      example: en
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The membership was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusPageMemberObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/members/{memberId}:
    put:
      tags:
        - Status Page Members
      summary: Update the membership
      operationId: updateStatusPageMember
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/MemberId'
      requestBody:
        description: The membership
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatusPageMemberObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The membership was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusPageMemberObj'
      security:
        - api_key: []
    delete:
      tags:
        - Status Page Members
      summary: Deletes the membership
      operationId: deleteStatusPageMember
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/MemberId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        204:
          description: Member deleted successfully
          content: {}
      security:
        - api_key: []
  /orgs/{organizationId}/members:
    get:
      tags:
        - Organization Members
      summary: List all members
      operationId: getMembers
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of subscriptions to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
        - name: email
          in: query
          description: Filter the members by email.
          schema:
            type: string
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The list of members
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrganizationMember'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/orgs/{organizationId}/members?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of members.
                        example: 100
      security:
        - api_key: []
    post:
      tags:
        - Organization Members
      summary: Adds a new membership
      operationId: addMember
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        description: The membership
        content:
          application/json:
            schema:
              type: object
              properties:
                member:
                  type: object
                  properties:
                    email:
                      type: string
                      description: The member's email address.
                      example: jane@doe.com
                    role:
                      type: string
                      description: |
                        The membership role.
                        Available roles:
                        * `c` - Editor
                        * `v` - Viewer
                        * `a` - Admin
                        * `o` - Owner
                      example: v
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The membership was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMemberObj'
      security:
        - api_key: []
  /orgs/{organizationId}/members/{memberId}:
    put:
      tags:
        - Organization Members
      summary: Update the membership
      operationId: updateMember
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/MemberId'
      requestBody:
        description: The membership
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationMemberObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The membership was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMemberObj'
      security:
        - api_key: []
    delete:
      tags:
        - Organization Members
      summary: Deletes the membership
      operationId: deleteMember
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/MemberId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        204:
          description: Member deleted successfully
          content: {}
      security:
        - api_key: []
  /status_pages/{subdomain}/metrics:
    get:
      tags: [Metrics]
      summary: Get the metrics
      operationId: getStatusPageMetrics
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - name: before
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: after
          in: query
          description: Used as a cursor for pagination.
          schema:
            type: string
        - name: limit
          in: query
          description: |
            Set the number of metrics to return in the response.
            This defaults to 20 items, and can be a maximum of 100.
          schema:
            type: integer
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A status page's metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  metrics:
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        description: Link for the next page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/metrics?after=cUrSoR'
                      prev:
                        type: string
                        description: Link for the previous page.
                        example: '{STATUSPAL_HOST}/api/v2/status_pages/subdomain/metrics?before=cUrSoR'
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Shows the total amount of metrics.
                        example: 100
    post:
      tags:
        - Metrics
      summary: Adds a new metric
      operationId: addMetric
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The metric
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        201:
          description: The metric created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/metrics/{metricId}:
    get:
      operationId: getMetric
      summary: 'Get metric against given metric id'
      tags: [Metrics]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/MetricId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The metric
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricObj'
    delete:
      operationId: deleteMetric
      summary: 'Deletes metric permanently'
      tags: [Metrics]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/MetricId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Metric deleted successfully
          content: {}
    put:
      tags:
        - Metrics
      summary: Updates existing metric
      operationId: updateMetric
      parameters:
        - $ref: '#/components/parameters/MetricId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The metric
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The metric updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/metrics/{metricId}/entries:
    post:
      tags:
        - Metrics
      summary: Adds a metric data point to a custom metric
      operationId: addCustomMetricDataPoint
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/MetricId'
      requestBody:
        description: The metric entry
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricEntryObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The metric data point was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricEntryObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/incident_templates:
    get:
      tags:
        - Incident Templates
      summary: Get the incident templates
      operationId: getIncidentTemplates
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A status page's incident templates
          content:
            application/json:
              schema:
                type: object
                properties:
                  incident_templates:
                    type: array
                    items:
                      $ref: '#/components/schemas/IncidentTemplate'
    post:
      tags:
        - Incident Templates
      summary: Adds a new incident template
      operationId: addIncidentTemplate
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The incident template
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentTemplateObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        201:
          description: The incident template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentTemplateObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/incident_templates/{incidentTemplateId}:
    get:
      operationId: getIncidentTemplate
      summary: 'Get incident template against given incident template id'
      tags: [Incident Templates]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentTemplateId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The incident template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentTemplateObj'
    delete:
      operationId: deleteIncidentTemplate
      summary: 'Deletes incident template permanently'
      tags: [Incident Templates]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentTemplateId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Incident template deleted successfully
          content: {}
    put:
      tags:
        - Incident Templates
      summary: Updates existing incident template
      operationId: updateIncidentTemplate
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IncidentTemplateId'
      requestBody:
        description: The incident template
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncidentTemplateObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The incident template updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentTemplateObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/integrations:
    get:
      tags: [Integrations]
      summary: Get the integrations
      operationId: getStatusPageIntegrations
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: A status page's integrations
          content:
            application/json:
              schema:
                type: object
                properties:
                  integrations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Integration'
    post:
      tags:
        - Integrations
      summary: Adds a new integration
      operationId: addIntegration
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The integration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntegrationObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        201:
          description: The integration created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationObj'
      security:
        - api_key: []
  /status_pages/{subdomain}/integrations/{integrationId}:
    get:
      operationId: getIntegration
      summary: 'Get integration against given integration id'
      tags: [Integrations]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IntegrationId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The integration details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationObj'
    delete:
      operationId: deleteIntegration
      summary: 'Deletes integration permanently'
      tags: [Integrations]
      security:
        - api_key: []
      parameters:
        - $ref: '#/components/parameters/StatusPageSubdomain'
        - $ref: '#/components/parameters/IntegrationId'
      responses:
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: Integration deleted successfully
          content: {}
    put:
      tags:
        - Integrations
      summary: Updates existing integration
      operationId: updateIntegration
      parameters:
        - $ref: '#/components/parameters/IntegrationId'
        - $ref: '#/components/parameters/StatusPageSubdomain'
      requestBody:
        description: The integration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntegrationObj'
        required: true
      responses:
        400: { $ref: '#/components/responses/BadRequestError' }
        401: { $ref: '#/components/responses/UnauthorizedError' }
        403: { $ref: '#/components/responses/ForbiddenError' }
        404: { $ref: '#/components/responses/NotFoundError' }
        422: { $ref: '#/components/responses/ValidationError' }
        500: { $ref: '#/components/responses/ServerError' }
        200:
          description: The integration updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationObj'
      security:
        - api_key: []
components:
  responses:
    ValidationError:
      description: There was a validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    UnauthorizedError:
      description: Authorization information is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
    ServerError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServerError'
    BadRequestError:
      description: Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    NotFoundError:
      description: A resource with the provided ID was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    ForbiddenError:
      description: You lack the necessary permissions to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header
  schemas:
    OrganizationStatusPage:
      description: Represents the Status Page.
      type: object
      required:
        - name
        - url
        - time_zone
      properties:
        organization_id:
          type: integer
          readOnly: true
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        name:
          type: string
          example: Acme
          description: Company, project or service name.
        url:
          type: string
          example: acme.com
          description: The website to your company, project or service.
        time_zone:
          type: string
          example: Etc/UTC
          description: The primary timezone the status page uses to display incidents (e.g. "Europe/Berlin").
        subdomain:
          type: string
          example: 'acme-com'
          description: Subdomain on statuspal.
        support_email:
          type: string
          example: support@acme.com
          description: Your company's support email.
        twitter_public_screen_name:
          type: string
          nullable: true
          example: null
          description: Twitter handle name (e.g. yourcompany).
        about:
          type: string
          nullable: true
          example: null
          description: Customize the about information displayed in your status page.
        display_about:
          type: boolean
          example: true
          description: Display about information.
        domain_config:
          type: object
          description: |
            Custom domain configuration. Set `provider` and `domain` to enable a custom domain,
            then poll until `status` becomes `active`. See the [Status Pages tag description](#tag/Status-Pages)
            for a step-by-step setup guide.
          properties:
            provider:
              type: string
              enum:
                - cloudflare
                - bunny
              example: cloudflare
              description: |
                * `cloudflare`: provided by [Cloudflare](https://www.cloudflare.com)
                * `bunny`: provided by [Bunny.net](https://bunny.net)
            domain:
              type: string
              example: status.your-company.com
              description: The custom domain name.
            previous_domain:
              type: string
              example: previous.your-company.com
              description: The previous custom domain name.
              readOnly: true
            status:
              type: string
              example: active
              enum:
                - disabled
                - configuring
                - failed_to_configure
                - active
              readOnly: true
              description: |
                * `disabled`: The custom domain is disabled.
                * `configuring`: We are configuring the custom domain.
                * `failed_to_configure`: Failed to configure the custom domain.
                * `active`: The custom domain is active.
            validation_records:
              description: |
                To activate the custom hostname domain, please create a CNAME DNS record.
                * **Cloudflare**: As soon as the TXT listed, the SSL certificates will be issued and deployed. Please allow a few minutes after the TXT record has been added before attempting to connect via HTTPS.
                * **Bunny.net**: After the domain is activated, it will be automatically configured with SSL and linked to this Pull Zone.

                **Note (Bunny):** The `hostname_cname_value` field may be empty on the initial response while the pull zone is being created. Poll every 2–5 seconds until it is populated (typically a few seconds).
              type: object
              readOnly: true
              properties:
                hostname_cname_name:
                  type: string
                  example: status.your-company.com
                  description: The CNAME record name to add to your DNS provider in order to point your custom domain to StatusPal.
                hostname_cname_value:
                  type: string
                  example: domains.statuspal.io
                  description: The CNAME record value to add to your DNS provider in order to point your custom domain to StatusPal.
                certificate_txt_name:
                  type: string
                  example: _acme-challenge.status.your-company.com
                  description: The TXT record name to add to your DNS provider in order to validate the custom domain ownership. Only for Cloudflare provider.
                certificate_txt_value:
                  type: string
                  example: ds1B5ODRiFY2qta4wt26bmYahZyTz32Hbgg31EDv6Ao
                  description: The TXT record value to add to your DNS provider in order to validate the custom domain ownership. Only for Cloudflare provider.
                hostname_txt_name:
                  type: string
                  example: _cf-custom-hostname.status.your-company.com
                  description: The TXT record name to add to your DNS provider in order to verify custom hostname ownership. Only for Cloudflare provider.
                hostname_txt_value:
                  type: string
                  example: b2afffc5-d532-42d9-b396-e141d889646b
                  description: The TXT record value to add to your DNS provider in order to verify custom hostname ownership. Only for Cloudflare provider.
            external_id:
              type: string
              description: The custom hostname ID in the provider.
              example: fd3416ee-091b-4c0e-ad44-8ed5cda22599
              readOnly: true
            error:
              type: string
              description: If something goes wrong during the custom domain setup, we show the errors here.
              example: 'Certificate verification errors from Cloudflare: <b>Certificate is not active (TXT).</b>'
              readOnly: true
        restricted_ips:
          type: string
          nullable: true
          example: null
          description: Your status page will be accessible only from this IPs (e.g. "1.1.1.1, 2.2.2.2").
        member_restricted:
          description: Only signed in members will be allowed to access your status page.
          type: boolean
          example: false
        scheduled_maintenance_days:
          type: integer
          example: 7
          description: Display scheduled maintenance.
        custom_js:
          type: string
          nullable: true
          example: null
          description: We'll insert this content inside the `<script>` tag at the bottom of your status page `<body>` tag.
        head_code:
          type: string
          nullable: true
          example: null
          description: We'll insert this content inside the `<head>` tag.
        date_format:
          type: string
          nullable: true
          example: null
          description: Display timestamps of incidents and updates in this format.
        time_format:
          type: string
          nullable: true
          example: null
          description: Display timestamps of incidents and updates in this format.
        date_format_enforce_everywhere:
          type: boolean
          example: false
          description: The above date format will be used everywhere in the status page. Timezone conversion to client's will be disabled.
        display_calendar:
          type: boolean
          example: true
          description: Display uptime calendar at status page.
        hide_watermark:
          type: boolean
          example: false
          description: Hide "Powered by Statuspal.io".
        minor_notification_hours:
          type: integer
          example: 6
          description: Long-running incident notification (Minor incident).
        major_notification_hours:
          type: integer
          example: 3
          description: Long-running incident notification (Major incident).
        maintenance_notification_hours:
          type: integer
          example: 6
          description: Long-running incident notification (Maintenance).
        history_limit_days:
          type: integer
          nullable: true
          example: null
          description: Incident history limit (use null for No Limit).
        custom_incident_types_enabled:
          type: boolean
          example: false
          description: Enable custom incident types.
        info_notices_enabled:
          type: boolean
          example: true
          description: Enable information notices.
        locked_when_maintenance:
          type: boolean
          example: false
          description: Lock from adding incidents when under maintenance.
        noindex:
          type: boolean
          example: false
          description: Remove status page from being indexed by search engines (e.g. Google).
        enable_auto_translations:
          type: boolean
          example: false
          description: Enable auto translations when creating incidents, maintenances and info notices.
        captcha_enabled:
          type: boolean
          example: true
          description: Enable captchas. (This option is only available when the status page is member restricted).
        enable_embedding:
          type: boolean
          example: true
          description: Enable iframe embedding.
        strict_csp:
          type: boolean
          example: true
          description: Enable strict Content Security Policy headers.
        translations:
          type: object
          example:
            {
              'en':
                {
                  'public_company_name': 'Your company',
                  'header_logo_text': 'Your company status page'
                },
              'es':
                {
                  'public_company_name': 'Votre entreprise',
                  'header_logo_text': "Page d'état de votre entreprise"
                }
            }
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                public_company_name:
                  type: string
                header_logo_text:
                  type: string
          description: |
            A translations object. For example:
            ```json
            {
              "en": {
                "public_company_name": "Your company",
                "header_logo_text": "Your company status page"
              },
              "fr": {
                "public_company_name": "Votre entreprise",
                "header_logo_text": "Page d'état de votre entreprise"
              }
            }
            ```
        header_logo_text:
          type: string
          example: 'Status Page Name Status'
          description: Displayed at the header of the status page.
        public_company_name:
          type: string
          nullable: true
          example: null
          description: Displayed at the footer of the status page.
        logo:
          type: string
          nullable: true
          example: null
          description: Logo url of the status page.
          readOnly: true
        bg_image:
          type: string
          nullable: true
          example: null
          description: Background image url of the status page.
          readOnly: true
        favicon:
          type: string
          nullable: true
          example: null
          description: Favicon url of the status page.
          readOnly: true
        display_uptime_graph:
          type: boolean
          example: true
          description: Display the uptime graph in the status page.
        uptime_graph_days:
          type: integer
          example: 90
          description: Uptime graph period.
        current_incidents_position:
          type: string
          example: 'below_services'
          enum:
            - below_services
            - above_services
          description: The incident position displayed in the status page.
        theme_selected:
          type: string
          example: 'default'
          description: The selected theme for the status page.
        theme_configs:
          type: object
          nullable: true
          example: null
          description: Theme configuration for the status page.
        link_color:
          type: string
          example: '0c91c3'
          description: The links color in the status page.
        header_bg_color1:
          type: string
          example: '009688'
          description: The background color at left side of the status page header.
        header_bg_color2:
          type: string
          example: '0c91c3'
          description: The background color at right side of the status page header.
        header_fg_color:
          type: string
          example: 'ffffff'
          description: The text color in the status page.
        incident_header_color:
          type: string
          example: '009688'
          description: Incidents header color in the status page.
        incident_link_color:
          type: string
          nullable: true
          example: null
          description: Incidents link color in the status page.
        status_ok_color:
          type: string
          example: '48CBA5'
          description: The status page colors when there is no incident.
        status_minor_color:
          type: string
          example: 'FFA500'
          description: The status page colors when there is a minor incident.
        status_major_color:
          type: string
          example: 'e75a53'
          description: The status page colors when there is a major incident.
        status_maintenance_color:
          type: string
          example: '5378c1'
          description: The status page colors when there is a maintenance incident.
        custom_css:
          type: string
          nullable: true
          example: null
          description: We'll insert this content inside the `<style>` tag.
        custom_header:
          type: string
          nullable: true
          example: null
          description: A custom header for the status page (e.g. "`<header>...</header>`").
        custom_footer:
          type: string
          nullable: true
          example: null
          description: A custom footer for the status page (e.g. "`<footer>...</footer>`").
        notify_by_default:
          type: boolean
          example: false
          description: Check the Notify subscribers checkbox by default.
        tweet_by_default:
          type: boolean
          example: false
          description: Check the Tweet checkbox by default.
        slack_subscriptions_enabled:
          type: boolean
          nullable: true
          example: null
          description: Allow your customers to subscribe via Slack to updates on your status page's status.
        discord_notifications_enabled:
          type: boolean
          example: false
          description: Allow your customers to receive notifications on a Discord channel.
        teams_notifications_enabled:
          type: boolean
          example: false
          description: Allow your customers to receive notifications on Microsoft Teams.
        google_chat_notifications_enabled:
          type: boolean
          example: false
          description: Allow your customers to receive notifications on Google Chat.
        mattermost_notifications_enabled:
          type: boolean
          example: false
          description: Allow your customers to receive notifications on Mattermost.
        sms_notifications_enabled:
          type: boolean
          nullable: true
          example: null
          description: Allow your customers to receive SMS notifications on your status page's status (to enable this you need to have a Twilio or Esendex integration).
        feed_enabled:
          type: boolean
          example: true
          description: Allow your customers to receive updates as RSS and Atom feeds.
        calendar_enabled:
          type: boolean
          example: false
          description: Allow your customers to receive updates via iCalendar feed.
        google_calendar_enabled:
          type: boolean
          example: false
          description: Allow your customers to import Google Calendar with Status Pages maintenance (business only).
        subscribers_enabled:
          type: boolean
          example: true
          description: Allow email customers to receive email notifications.
        notification_email:
          type: string
          nullable: true
          example: null
          description: Allow your customers to subscribe via email to updates on your status page's status.
        reply_to_email:
          type: string
          nullable: true
          example: null
          description: The email address we'll use in the 'reply_to' field in emails to your subscribers. So they can reply to your notification emails.
        tweeting_enabled:
          type: boolean
          example: true
          description: Allows to send tweets when creating or updating an incident.
        email_layout_template:
          type: string
          nullable: true
          example: null
          description: 'Custom email layout template, see the documentation: [Custom email templates](https://docs.statuspal.io/platform/subscriptions-and-notifications/custom-email-templates).'
        email_confirmation_template:
          type: string
          nullable: true
          example: null
          description: 'Custom confirmation email template, see the documentation: [Custom email templates](https://docs.statuspal.io/platform/subscriptions-and-notifications/custom-email-templates).'
        email_notification_template:
          type: string
          nullable: true
          example: null
          description: 'Custom email notification template, see the documentation: [Custom email templates](https://docs.statuspal.io/platform/subscriptions-and-notifications/custom-email-templates).'
        email_templates_enabled:
          type: boolean
          nullable: true
          example: null
          description: The templates won't be used until this is enabled, but you can send test emails.
        allowed_email_domains:
          type: string
          example: 'acme.corp\nnapster.com'
          description: "Allowed email domains. Each domain should be separated by `\n`"
        zoom_notifications_enabled:
          type: boolean
          example: false
          description: 'Enables customers to receive notifications via Zoom for updates and alerts related to the services.'
    StatusPageStatus:
      description: Represents the status summary of a status page
      type: object
      properties:
        status_page:
          type: object
          properties:
            url:
              type: string
              description: The URL of the website the status page is about
              example: google.com
            time_zone:
              type: string
              description: The primary timezone the status page uses to display incidents
              example: Etc/UTC
            subdomain:
              type: string
              description: The `subdomain` that identified the status page
              example: google
            name:
              type: string
              description: The name of the company or service the status page is about
              example: Google
            current_incident_type:
              $ref: '#/components/schemas/IncidentType'
    StatusPageSummary:
      description: Represents the status summary of a status page
      allOf:
        - $ref: '#/components/schemas/StatusPageStatus'
        - type: object
          properties:
            services:
              type: array
              items:
                $ref: '#/components/schemas/StatusService'
            incidents:
              type: array
              description: Active incidents
              items:
                $ref: '#/components/schemas/Incident'
            maintenances:
              type: array
              description: Active maintenances
              items:
                $ref: '#/components/schemas/Maintenance'
            upcoming_maintenances:
              type: array
              description: Upcoming maintenances
              items:
                $ref: '#/components/schemas/Maintenance'
            info_notices:
              type: array
              description: Featured information notices
              items:
                $ref: '#/components/schemas/InfoNotice'
            current_status_type:
              type: string
              nullable: true
              enum: [null, 'major', 'scheduled', 'minor']
              description: The current status type of the status page
              example: major
    ServiceStatus:
      type: object
      properties:
        service:
          $ref: '#/components/schemas/StatusService'
    ServiceSummary:
      allOf:
        - $ref: '#/components/schemas/ServiceStatus'
        - type: object
          properties:
            incidents:
              type: array
              description: Active incidents
              items:
                $ref: '#/components/schemas/Incident'
            maintenances:
              type: array
              description: Active maintenances
              items:
                $ref: '#/components/schemas/Maintenance'
            upcoming_maintenances:
              type: array
              description: Upcoming maintenances
              items:
                $ref: '#/components/schemas/Maintenance'
            info_notices:
              type: array
              description: Featured information notices
              items:
                $ref: '#/components/schemas/InfoNotice'
            current_status_type:
              type: string
              nullable: true
              enum: [null, 'major', 'scheduled', 'minor']
              description: The current status type of the status page
              example: major
    Incident:
      type: object
      description: An incident, either major, minor or a scheduled maintenance
      required:
        - service_ids
        - type
        - updates
        - title
      properties:
        id:
          type: integer
          description: ID of the record
          readOnly: true
          example: 89
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        title:
          type: string
          description: The title of the incident
          example: We are having issues with the DB connection
        starts_at:
          type: string
          description: The time at which the incident/maintenance started/will start.
          format: date-time
          example: '2022-01-01T00:00:00'
        ends_at:
          type: string
          description: The time at which the incident/maintenance ended/will end.
          format: date-time
          example: '2022-01-01T00:00:00'
        type:
          $ref: '#/components/schemas/IncidentType'
        service_ids:
          type: array
          description: An array of service Ids, at least 1 must be included
          items:
            type: integer
            example: 1
        updates:
          type: array
          description:
            The incident's updates. On incident creation you must pass
            exactly one update object in the array, if the incident is of type minor/major
            the update type `issue` is recommended, if a scheduled maintenance then
            use `scheduled`.
          items:
            $ref: '#/components/schemas/IncidentActivity'
        url:
          readOnly: true
          type: string
          description: URL to the incident
          example: https://status.google.com/incidents/123
        translations:
          description: |
            A translations object. For example:
            ```json
            {
              "en": { "title": "English Title" },
              "es": { "title": "Spanish Title" }
            }
            ```
          type: object
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                title:
                  type: string
          example:
            {
              'en': { 'title': 'English Title' },
              'es': { 'title': 'Spanish Title' }
            }
        notify:
          type: boolean
          description: Notify subscribers when creating an incident with `type` `major` or `minor`.
          example: true
        maintenance_notify:
          type: boolean
          description: Notify subscribers when creating an incident (maintenance) with `type` `scheduled`.
          example: true
        maintenance_notify_settings:
          $ref: '#/components/schemas/MaintenanceNotifySettings'
        affects_uptime:
          readOnly: true
          description: It's a boolean if the incident affects uptime.
          type: boolean
          example: true
    IncidentObj:
      type: object
      properties:
        incident:
          $ref: '#/components/schemas/Incident'
    Maintenance:
      allOf:
        - $ref: '#/components/schemas/Incident'
        - type: object
          properties:
            type:
              $ref: '#/components/schemas/MaintenanceType'
    InfoNotice:
      type: object
      description: An information notice
      required:
        - updates
        - title
      properties:
        id:
          type: integer
          description: ID of the record
          readOnly: true
          example: 89
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        title:
          type: string
          description: The title of the information notice
          example: We are having issues with the DB connection
        featured_from:
          type: string
          description: The time at which the information notice will display on the status page.
          format: date-time
          example: '2022-01-01T00:00:00'
        featured_until:
          type: string
          description: The time at which the information notice will not display on the status page.
          format: date-time
          example: '2022-01-01T00:00:00'
        service_ids:
          type: array
          description: An array of service Ids, at least 1 must be included
          items:
            type: integer
            example: 1
        updates:
          type: array
          description:
            The information notice's updates. On information notice creation you must pass
            exactly one update object in the array.
          items:
            $ref: '#/components/schemas/IncidentActivity'
        url:
          readOnly: true
          type: string
          description: URL to the information notice
          example: https://status.google.com/info_notices/123
        translations:
          description: |
            A translations object. For example:
            ```json
            {
              "en": { "title": "English Title" },
              "es": { "title": "Spanish Title" }
            }
            ```
          type: object
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                title:
                  type: string
          example:
            {
              'en': { 'title': 'English Title' },
              'es': { 'title': 'Spanish Title' }
            }
    InfoNoticeObj:
      type: object
      properties:
        info_notice:
          $ref: '#/components/schemas/InfoNotice'
    Subscription:
      required:
        - filter
        - service_ids
        - type
      type: object
      properties:
        type:
          type: string
          description: The type of Subscription (`email`, `slack`, `sms`, `discord`).
          example: email
        filter:
          type: string
          description:
            Filter the notifications to subscribe to (`all`, `services`,
            `incident`).
          example: services
        service_ids:
          type: array
          description:
            An array of service IDs to subscribe to, required if filter
            is `services`.
          items:
            type: integer
            example: 1
        incident_types:
          type: array
          description: An array of incident type keys. If set, the subscriber will be notified only about this type of incidents/maintenance.
          items:
            type: string
            example: major
        incident_id:
          type: integer
          description: An incident ID to subscribe to, required if filter is `incident`.
          example: 123
        email:
          type: string
          description:
            The email to send the notifications to, required if type is
            `email`.
          example: jane@doe.com
        confirm:
          type: boolean
          description: Set to false to skip sending confirmation email for email subscriptions.
          example: true
        country_dial_code:
          type: string
          description:
            The country code of the phone number to send the notifications
            to, required if type is `sms`.
          example: '49'
        phone_number:
          type: string
          description:
            The phone number to send the notifications to, required if
            type is `sms`.
          example: '12345678900'
        webhook_url:
          type: string
          description: The Discord webhook URL, required if type is `discord`.
          example: https://discordapp.com/api/webhooks/channelId/token
        locale:
          type: string
          description: The subscriber's locale.
          example: en
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        metadata:
          type: object
          description: Additional metadata associated with the subscription.
          example: { 'data': 'some data' }
        subscription_group_ids:
          type: array
          items:
            type: integer
          description: >
            IDs of the subscription groups this subscription belongs to.
            On update, the provided list replaces the previous one (not additive).
            Send `[]` to remove from all groups.
          example: [1, 2]
    SubscriptionObj:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
    MetricEntry:
      required:
        - time
        - value
      type: object
      properties:
        time:
          type: integer
          description: Unix timestamp
          example: 1561318904
        value:
          type: number
          format: double
          example: 130.0
    MetricEntryObj:
      type: object
      properties:
        entry:
          $ref: '#/components/schemas/MetricEntry'
    Metric:
      description: Represents a metric object.
      type: object
      required:
        - title
        - type
        - unit
      properties:
        id:
          type: integer
          readOnly: true
          description: The ID of the metric.
        title:
          type: string
          example: Website Response Time
          description: The title or name of the metric, used to describe what the metric is measuring.
        unit:
          type: string
          description: The unit of measurement for the metric. For example, this could be "ms" for milliseconds or "requests/sec".
          example: ms
        type:
          $ref: '#/components/schemas/MetricType'
        enabled:
          type: boolean
          example: true
          description: Indicates whether the metric is currently enabled. When `true` system will actually pull data for this metric; when `false`, it does not.
        visible:
          type: boolean
          example: true
          description: Determines whether the metric is visible on the status page. If `true`, the metric's data is displayed; if `false`, it is hidden.
        remote_id:
          type: string
          example: 9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a
          description: The identifier of the metric on the remote site. This is used to map the metric in the system to its counterpart on an external service or integration.
        remote_name:
          type: string
          example: StatusPal
          description: The name of the metric on the remote site. This is used to display the metric name as it appears on the external service.
        status:
          type: string
          example: connect_timeout
          readOnly: true
          description: The current status of the metric, often represented as an HTTP status code or a descriptive string. This field indicates the latest state or response of the metric.
        latest_entry_time:
          type: integer
          example: 1679314774
          readOnly: true
          description: The Unix timestamp of the most recent entry recorded for this metric. This indicates the last time data was updated for the metric.
        threshold:
          type: integer
          example: 10
          description: The threshold value for the metric. This is used to set limits or bounds, such as a threshold for triggering alerts or visual indicators in graphs.
        featured_number:
          $ref: '#/components/schemas/FeaturedNumber'
        order:
          type: integer
          example: 1
          readOnly: true
          description: The order in which the metric appears on the status page or within a list. This helps determine the sorting and display sequence.
        integration_id:
          type: string
          description: The identifier of the integration associated with this metric. This ties the metric to a specific integration.

    StatusService:
      description: Represents the status of a service
      type: object
      properties:
        name:
          type: string
          example: Monitoring service
        id:
          type: integer
        current_incident_type:
          $ref: '#/components/schemas/IncidentType'
        children:
          type: array
          description: Nested ServiceSummary children
          items:
            $ref: '#/components/schemas/StatusService'
    MonitoringOptions:
      type: object
      description: Options for configuring monitoring behavior for services.
      properties:
        method:
          type: string
          description: |
            The HTTP method to be used when sending requests for monitoring.
            This should be set to a valid HTTP method (e.g. `GET` or `HEAD`)
            when monitoring type is `internal`.
            Ensure it aligns with the service's requirements for health checks.
          example: 'HEAD'

        headers:
          type: array
          description: |
            Custom headers to be included in the monitoring request.
            This should be set when the monitoring type is `internal`
            to specify any necessary header fields for the request.
          items:
            type: object
            properties:
              key:
                type: string
                description: The name of the header field.
                example: 'accept-language'
              value:
                type: string
                description: The value for the header field.
                example: 'en'

        keyword_down:
          type: string
          description: |
            A custom keyword that indicates a 'down' status when
            monitoring a third-party service. This keyword is used
            to parse and understand service responses.
          example: 'down'

        keyword_up:
          type: string
          description: |
            A custom keyword that indicates an 'up' status when
            monitoring a third-party service. This keyword is used
            to parse and understand service responses.
          example: 'up'

    Service:
      description: Represents the service.
      type: object
      required:
        - name
      properties:
        id:
          type: integer
          readOnly: true
          description: The ID of the service.
        name:
          type: string
          example: Monitoring service
          description: The name of the service.
        description:
          type: string
          example: Some description
          description: The description of the service.
        private_description:
          type: string
          example: Some private description
          description: The private description of the service.
        parent_id:
          type: integer
          description: The service parent ID.
        current_incident_type:
          description: The service's current incident type.
          $ref: '#/components/schemas/IncidentType'
          readOnly: true
        monitoring:
          $ref: '#/components/schemas/MonitoringType'
        webhook_monitoring_service:
          $ref: '#/components/schemas/WebhookMonitoringService'
        webhook_custom_jsonpath_settings:
          $ref: '#/components/schemas/WebhookCustomJsonpathSettings'
        inbound_email_address:
          type: string
          description: This is field is populated from `inbound_email_id`, if the `monitoring` is set to `3rd_party`.
          readOnly: true
        incoming_webhook_url:
          type: string
          description: This is field is populated from `inbound_email_id`, if the `monitoring` is set to `webhook` and the `webhook_monitoring_service` is set.
          readOnly: true
        ping_url:
          type: string
          description: We will send HTTP requests to this URL for monitoring every minute.
        incident_type:
          description: Sets the incident type to this value when an incident is created via monitoring.
          $ref: '#/components/schemas/MonitoringIncidentType'
        parent_incident_type:
          description: Sets the parent's service incident type to this value when an incident is created via monitoring.
          $ref: '#/components/schemas/MonitoringIncidentType'
        is_up:
          type: boolean
          readOnly: true
          description: Is the monitored service up?
        pause_monitoring_during_maintenances:
          type: boolean
          description: Pause the service monitoring during maintenances?
        inbound_email_id:
          type: string
          readOnly: true
          description: The inbound email ID.
        auto_incident:
          type: boolean
          description: Create an incident automatically when this service is down and close it if/when it comes back up.
        auto_notify:
          type: boolean
          description: Automatically notify all your subscribers about automatically created and closed incidents.
        children_ids:
          readOnly: true
          type: array
          description: IDs of the service's children.
          items:
            type: integer
        translations:
          description: |
            A translations object. For example:
            ```json
            {
              "en": {
                "name": "Your service",
                "description": "This is your service's description..."
              },
              "fr": {
                "name": "Votre service",
                "description": "Voici la description de votre service..."
              }
            }
            ```
          type: object
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
          example:
            {
              'en':
                {
                  'name': 'English Name',
                  'description': 'English description'
                },
              'es':
                { 'name': 'Spanish Name', 'description': 'Spanish description' }
            }
        private:
          type: boolean
          description: Private service?
        display_uptime_graph:
          type: boolean
          description: Display uptime graph?
        display_response_time_chart:
          type: boolean
          description: Display response time chart?
        order:
          type: integer
          description: Service's position in the service list.
        notification_recipients:
          description: |
            Array of notification recipients:
            - In request: Array of recipient IDs (write-only).
            - In response: Array of recipient objects with `id` and `email` (read-only).
          type: array
          items:
            oneOf:
              - type: integer
                description: Recipient ID (write-only for request).
                writeOnly: true
                example: 1
              - type: object
                description: Recipient object (read-only for response).
                readOnly: true
                properties:
                  id:
                    type: integer
                    description: The ID of the recipient.
                  email:
                    type: string
                    description: The email of the recipient.
                example:
                  id: 1
                  email: 'test@example.com'
        monitoring_options:
          description: |
            Configuration options for monitoring the service. The options vary depending on whether
            the monitoring type is `internal` or `3rd_party`.
          $ref: '#/components/schemas/MonitoringOptions'
    ServiceObj:
      type: object
      properties:
        service:
          $ref: '#/components/schemas/Service'
    MetricObj:
      type: object
      properties:
        metric:
          $ref: '#/components/schemas/Metric'
    Integration:
      description: Represents an integration service.
      type: object
      required:
        - name
        - settings
      properties:
        id:
          type: integer
          readOnly: true
          description: The ID of the integration.
        name:
          type: string
          description: The integration type identifier. Must be one of the supported integration types.
          example: newrelic
          enum:
            [
              pingdom,
              datadog,
              newrelic,
              twilio,
              mailgun,
              sendgrid,
              mandrill,
              smtp,
              zabbix
            ]
        user:
          type: string
          description: Username or Account ID for the integration. Required for New Relic integrations.
          example: '123456'
        phone_number:
          type: string
          description: Phone number for SMS notifications. Required for Twilio integration.
          example: '+1234567890'
        domain:
          type: string
          description: Domain name for the integration. Required for Mailgun and Zabbix integrations.
          example: example.com
        email_from_address:
          type: string
          description: Email address used as sender. Required for Mailgun, SendGrid, Mandrill, and SMTP integrations.
          example: notifications@example.com
        key:
          type: string
          description: API key or Service ID for the integration. Required for Pingdom, Twilio, Mailgun, Datadog, Zabbix, SendGrid, and Mandrill integrations.
          example: your-api-key
        password:
          type: string
          writeOnly: true
          description: Password or Auth Token for the integration. Required for Datadog, Twilio, and SMTP integrations.
          example: your-password
        relay:
          type: string
          description: SMTP relay server hostname or IP address. Required for SMTP integration.
          example: smtp.example.com
        username:
          type: string
          description: Username for SMTP authentication. Required for SMTP integration.
          example: smtp-user@smtp.example.com
        port:
          type: integer
          description: Port number for the integration connection. Required for SMTP integration.
          example: 25
        region:
          type: string
          description: |
            Region for the integration service:
            - New Relic & Mailgun: 'us' or 'eu'
            - Datadog: 'us' (East), 'us3' (West), 'us5' (Central), 'us-gov' (FedRamp), 'eu' (Europe)
          example: us
          enum: [us, eu, us3, us5, us-gov]
        settings:
          type: object
          description: Additional configuration settings specific to the integration type.
          properties:
            __type__:
              type: string
              writeOnly: true
              description: Configuration type identifier. Can be "common" for most integrations or "mailgun" for Mailgun-specific settings.
              example: common
            enabled:
              type: boolean
              description: Whether the integration is enabled and active. Required for all integrations.
              example: true
            api_key_type:
              type: string
              description: Type of API key for Mailgun integration. Determines the level of access and functionality.
              example: private
              enum: [private, sending]
    IntegrationObj:
      type: object
      properties:
        integration:
          $ref: '#/components/schemas/Integration'
    Webhook:
      required:
        - enabled
        - events
        - url
      type: object
      properties:
        url:
          type: string
          description:
            The endpoint URL of the webhook to send the POST request to
            when the specified events occur.
          example: url
        events:
          type: array
          description: |
            Available events:
            * `service.monitored_status.updated` - Triggered when a service configured with our internal monitoring goes up/down.
            * `incident.created`, `incident.updated`, `incident.deleted` - Triggered during the lifecycle of an incident, they all send the same payload.
          example:
            - incident.created
            - incident.updated
          items:
            type: string
        enabled:
          type: boolean
          description: Toggles the webhook's state.
          example: true
    WebhookObj:
      type: object
      properties:
        webhook:
          $ref: '#/components/schemas/Webhook'
    AccessGroup:
      required:
        - name
        - service_ids
      type: object
      properties:
        id:
          type: integer
          description: The access group's id.
          readOnly: true
          example: 3
        name:
          type: string
          description: The name of the access group.
          example: name
        service_ids:
          type: array
          items:
            type: integer
            example: 1
          description: An array of service Ids, at least 1 must be included
        users_status_pages:
          type: array
          items:
            type: integer
            example: 1
          description: An array of status page member Ids
    AccessGroupObj:
      type: object
      properties:
        access_group:
          $ref: '#/components/schemas/AccessGroup'
    StatusPageMember:
      type: object
      properties:
        id:
          type: integer
          description: The member's id.
          readOnly: true
          example: 5
        email:
          type: string
          description: The member's email address.
          readOnly: true
          example: jane@doe.com
        role:
          type: string
          description: |
            The membership role.
            Available roles:
            * `c` - Editor
            * `v` - Viewer
            * `a` - Admin
          example: v
        enabled:
          type: boolean
          description: Toggles the membership's state.
          example: true
        user:
          type: object
          properties:
            id:
              type: integer
              description: The user's id.
              readOnly: true
              example: 1
            last_sign_in_at:
              type: string
              description: The date and time the user signed in before their current session
              format: date-time
              example: '2022-01-01T00:00:00'
              readOnly: true
            current_sign_in_at:
              type: string
              description: The date and time the user signed in for their current session
              format: date-time
              example: '2022-01-01T00:00:00'
              readOnly: true
          description: The related User object (if there is one).
          readOnly: true
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
    StatusPageMemberObj:
      type: object
      properties:
        member:
          $ref: '#/components/schemas/StatusPageMember'
    OrganizationMember:
      type: object
      properties:
        id:
          type: integer
          description: The member's id.
          readOnly: true
          example: 8
        email:
          type: string
          description: The member's email address.
          readOnly: true
          example: jane@doe.com
        role:
          type: string
          description: |
            The membership role.
            Available roles:
            * `c` - Editor
            * `v` - Viewer
            * `a` - Admin
            * `o` - Owner
          example: v
        user:
          type: object
          properties:
            id:
              type: integer
              description: The user's id.
              readOnly: true
              example: 1
            last_sign_in_at:
              type: string
              description: The date and time the user signed in before their current session
              format: date-time
              example: '2022-01-01T00:00:00'
              readOnly: true
            current_sign_in_at:
              type: string
              description: The date and time the user signed in for their current session
              format: date-time
              example: '2022-01-01T00:00:00'
              readOnly: true
          description: The related User object (if there is one).
          readOnly: true
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
    OrganizationMemberObj:
      type: object
      properties:
        member:
          $ref: '#/components/schemas/OrganizationMember'
    MaintenanceType:
      type: string
      description: |
        The type of the incident:
         * `scheduled` - Should be used for maintenances.
      enum:
        - scheduled
    IncidentType:
      type: string
      description: >
        The type of the (current) incident:
         * `minor` - A minor incident is currently taking place.
         * `major` - A major incident is currently taking place.
         * `scheduled` - A scheduled maintenance is currently taking place.
      enum:
        - major
        - minor
        - scheduled
    IncidentTemplate:
      description: Represents the incident template.
      type: object
      required:
        - title
        - description
      properties:
        id:
          type: integer
          readOnly: true
          description: The ID of the incident template.
        name:
          type: string
          nullable: true
          example: Database outage
          description: The template's own name/label as shown in the dashboard. This is separate from `title`, which is the incident title the template produces when applied. Blank or whitespace-only values are stored as null.
        title:
          type: string
          example: Incident template title
          description: The title of the incident template.
        description:
          type: string
          example: Some description
          description: The description of the incident template.
        service_ids:
          type: array
          description: An array of service Ids.
          items:
            type: integer
            example: 1
        incident_types:
          type: array
          description: An array of incident type keys. If set, the incident template will only work with the given incident types.
          items:
            type: string
            example: major
        translations:
          description: |
            A translations object. For example:
            ```json
            {
              "en": { "title": "English title", "description": "English description" },
              "es": { "title": "Spanish title", "description": "Spanish description" }
            }
            ```
          type: object
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
          example:
            {
              'en':
                {
                  'title': 'English title',
                  'description': 'English description'
                },
              'es':
                {
                  'title': 'Spanish title',
                  'description': 'Spanish description'
                }
            }
    IncidentTemplateObj:
      type: object
      properties:
        incident_template:
          $ref: '#/components/schemas/IncidentTemplate'
    MetricType:
      type: string
      description: >
        The type of the metric. It can be one of the following:
         * `up` (Uptime): Represents the amount of time a service or system is operational and available.
         * `rt` (ResponseTime): Represents the time taken to respond to a request or query.
      enum:
        - up
        - rt
    FeaturedNumber:
      type: string
      description: >
        Specifies the type of number to be featured prominently in the metric's display.
        Options might include "average", "maximum", or "current/last".
      enum:
        - avg
        - max
        - last
    IncidentActivity:
      type: object
      description: Communicates an update of an incident, the special type `resolved` will close an incident.
      required:
        - type
        - description
      properties:
        id:
          type: integer
          description: ID of the record
          readOnly: true
          example: 89
        inserted_at:
          type: string
          description: Datetime at which the record was inserted
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        updated_at:
          type: string
          description: Datetime at which the record was last updated
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        posted_at:
          type: string
          description: Editable datetime at which the record was posted
          format: date-time
          example: '2022-01-01T00:00:00'
        type:
          type: string
          example: issue
          description: |
            The type of an incident update:
             * `investigating` - Investigating.
             * `issue` - Issue.
             * `monitoring` - Monitoring.
             * `resolved` - Resolved will close the associated incident by settings its `ends_at` to the current time.
             * `scheduled` - Scheduled Maintenance's first update shall have this type.
             * `essential` - Essential Maintenance's first update shall have this type.
             * `retroactive` - Retroactive.
             * `update` - Standard update on an incident.
             * `escalate` - Escalate will switch the incident type from `minor` to `major`.
             * `deescalate` - De-escalate will switch the incident type from `major` to `minor`.
             * `postmortem` - A Post-mortem update.
        description:
          type: string
          description: The provided update description (accepts Markdown format)
          example: We have detected an issue with our CDN
        description_html:
          type: string
          readOnly: true
          description: The provided update description rendered in HTML
          example: <p>We have detected an issue with our CDN</p>
        translations:
          description: |
            A translations object. For example:
            ```json
            {
              "en": { "description": "English description" },
              "es": { "description": "Spanish description" }
            }
            ```
          type: object
          additionalProperties: true
          properties:
            '[lang]':
              description: e.g. `en`.
              type: object
              properties:
                description:
                  type: string
          example:
            {
              'en': { 'description': 'English description' },
              'es': { 'description': 'Spanish description' }
            }
        notify:
          type: boolean
          description: Should your subscribers be notified about this update?
          example: true
          writeOnly: true
        subscribers_notified_at:
          type: string
          description: Datetime at which subscribers were notified for this update
          format: date-time
          example: '2022-01-01T00:00:00'
          readOnly: true
        tweet:
          type: boolean
          description: Tweet this update with your configured Twitter account?
    IncidentActivityObj:
      type: object
      properties:
        update:
          $ref: '#/components/schemas/IncidentActivity'
    MonitoringIncidentType:
      type: string
      description: >
        The type of the (current) incident:
         * `minor` - A minor incident is currently taking place.
         * `major` - A major incident is currently taking place.
      enum: [major, minor]
    MonitoringType:
      type: string
      nullable: true
      description: >
        Monitoring types:
         * `null` - No monitoring
         * `internal` - StatusPal monitoring
         * `3rd_party` - 3rd Party monitoring
         * `webhook` - Incoming webhook monitoring
      enum: [null, internal, 3rd_party, webhook]
    WebhookMonitoringService:
      type: string
      description: |
        > ### Configure this field only if the `monitoring` is set to `webhook`.

        Webhook monitoring services:
        * `status-cake` - StatusCake monitoring service
        * `uptime-robot` - UptimeRobot monitoring service
        * `zabbix` - Zabbix monitoring service
        * `custom-jsonpath` - Custom JSONPath
      enum: [status-cake, uptime-robot, zabbix, custom-jsonpath]
    WebhookCustomJsonpathSettings:
      type: object
      description: '> ### Configure this field only if the `webhook_monitoring_service` is set to `custom-jsonpath`.'
      properties:
        jsonpath:
          type: string
          example: $.status
          description: The path in the JSON, e.g. `$.status`.
        expected_result:
          type: string
          example: '"up"'
          description: The expected result in the JSON, e.g. `"up"`.
    MaintenanceNotifySettings:
      type: object
      description: |
        > ### Configure this field only if the `type` is set to `scheduled`. To take effect, the `maintenance_notify` must be set to `true`.
        Overrides the status page auto maintenance notification settings for this specific maintenance.
      properties:
        before_notice_minutes:
          type: integer
          example: 7200
          description: |
            The number of minutes to notify the subscribers before the maintenance start.
            * `-1` - Immediately
            * `0` - Never
            * Positive integer (`4320`, `5760`, `10080`, ...) - Before the maintenance start minutes
        second_before_notice_minutes:
          type: integer
          example: 0
          description: |
            The number of minutes to notify the subscribers the second time before the maintenance start. It needs to be after the first "before maintenance start" notice.
            * `0` - Never
            * Positive integer (`720`, `1440`, `2880`, ...) - Before the maintenance start minutes
        on_start:
          type: boolean
          example: true
          description: Notify subscribers when the maintenance starts.
        on_end:
          type: boolean
          example: true
          description: Notify subscribers when the maintenance ends.
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          description: A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors
          example: { 'field_name': ["can't be blank"] }
    UnauthorizedError:
      type: object
      properties:
        error:
          type: integer
          example: 401
          description: 'Unauthorized'
    ServerError:
      type: object
      properties:
        error:
          type: string
          example: 'Internal server error :('
          description: 'Internal server error :('
    BadRequestError:
      type: object
      properties:
        error:
          type: string
          example: 'Bad request!'
          description: 'Bad request!'
    NotFoundError:
      type: object
      properties:
        error:
          type: string
          example: 'Resource not found!'
          description: 'Resource not found!'
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: 'Forbidden'
          description: 'Forbidden'
  parameters:
    StatusPageSubdomain:
      name: subdomain
      in: path
      description: |
        The subdomain of your status page.

        You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).
      required: true
      schema:
        type: string
    ServiceId:
      name: serviceId
      in: path
      description: The ID of a service
      required: true
      schema:
        type: integer
    IncidentId:
      name: incidentId
      in: path
      description: The ID of an incident/maintenance
      required: true
      schema:
        type: integer
    IncidentTemplateId:
      name: incidentTemplateId
      in: path
      description: The ID of an incident template
      required: true
      schema:
        type: integer
    IncidentActivityId:
      name: updateId
      in: path
      required: true
      schema:
        type: integer
    InfoNoticeId:
      name: infoNoticeId
      in: path
      description: The ID of an information notice
      required: true
      schema:
        type: integer
    MetricId:
      name: metricId
      in: path
      description: The ID of a custom metric
      required: true
      schema:
        type: integer
    IntegrationId:
      name: integrationId
      in: path
      description: The ID of integration
      required: true
      schema:
        type: integer
    SubscriptionId:
      name: subscriptionId
      in: path
      description: The ID of a subscription
      required: true
      schema:
        type: string
    WebhookId:
      name: webhookId
      in: path
      description: The ID of a webhook
      required: true
      schema:
        type: integer
    AccessGroupId:
      name: accessGroupId
      in: path
      description: The ID of an access group
      required: true
      schema:
        type: integer
    MemberId:
      name: memberId
      in: path
      description: The ID of a membership
      required: true
      schema:
        type: integer
    OrganizationId:
      name: organizationId
      in: path
      description: The ID of the organization
      required: true
      schema:
        type: integer
