> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superlog.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a synthetic check

> Creates a check that requests a URL on a schedule and checks the response. After `failuresToAlert` failed runs in a row it posts to its Slack channel, and posts the recovery in the same thread. Defaults: GET, every 300 seconds, a 10 second timeout, 1 retry, alert after 1 failure, follow redirects, enabled.



## OpenAPI

````yaml /api-reference/openapi.json post /synthetic-checks
openapi: 3.1.0
info:
  description: >-
    Manage a Superlog workspace's automations, runs, tag mode, model access, and
    secrets, read its telemetry, build dashboards and alerts over it, run
    synthetic checks, and export them to Terraform. Every request acts as the
    member who created the API key.
  title: Superlog management API
  version: 1.0.0
servers:
  - url: https://superlog.sh/api/v1
security:
  - bearerAuth: []
tags:
  - description: Connected integrations and the IDs automations and tag mode use.
    name: Integrations
  - description: The workspace and its members.
    name: Workspace
  - description: Keys that authenticate the management API and MCP server.
    name: API keys
  - description: Create and change automations.
    name: Automations
  - description: Start, follow, and cancel automation runs.
    name: Runs
  - description: What Superlog can use and change when someone mentions it in Slack.
    name: Tag mode
  - description: Model API keys, subscriptions, and available models.
    name: Models
  - description: Credentials agents can use without seeing them.
    name: Secrets
  - description: Read the workspace's logs, traces, and metrics.
    name: Telemetry
  - description: >-
      Exceptions in the workspace's telemetry, grouped into issues by
      fingerprint.
    name: Errors
  - description: Create and change dashboards over the workspace's telemetry.
    name: Dashboards
  - description: Threshold alerts on the workspace's telemetry that post to Slack.
    name: Alerts
  - description: HTTP checks that request a URL on a schedule and post failures to Slack.
    name: Synthetics
  - description: Configuration for the superloglabs/superlog Terraform provider.
    name: Terraform
paths:
  /synthetic-checks:
    post:
      tags:
        - Synthetics
      summary: Create a synthetic check
      description: >-
        Creates a check that requests a URL on a schedule and checks the
        response. After `failuresToAlert` failed runs in a row it posts to its
        Slack channel, and posts the recovery in the same thread. Defaults: GET,
        every 300 seconds, a 10 second timeout, 1 retry, alert after 1 failure,
        follow redirects, enabled.
      operationId: create_synthetic_check
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                assertions:
                  maxItems: 20
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        description: >-
                          The header name for `header`, or the JSON path for
                          `json_path`, such as `$.status`.
                        type: string
                        maxLength: 500
                      kind:
                        type: string
                        enum:
                          - status_code
                          - response_time
                          - header
                          - body
                          - json_path
                          - certificate_expiry
                        description: >-
                          What the assertion reads: the status code, response
                          time in ms, a header, the body text, a JSON path, or
                          days until the TLS certificate expires.
                      op:
                        type: string
                        enum:
                          - eq
                          - neq
                          - lt
                          - gt
                          - contains
                          - not_contains
                          - exists
                          - not_exists
                        description: >-
                          `status_code` takes eq, neq, lt, gt; `response_time`
                          lt; `header` eq, neq, contains, not_contains, exists,
                          not_exists; `body` contains, not_contains; `json_path`
                          all; `certificate_expiry` gt.
                      severity:
                        description: >-
                          A failed `critical` assertion fails the run; a
                          `degraded` one marks it degraded. Defaults to
                          `critical`.
                        type: string
                        enum:
                          - critical
                          - degraded
                      value:
                        description: >-
                          Compared with the response. A status code may be a
                          class such as `2xx`.
                        type: string
                        maxLength: 1000
                    required:
                      - kind
                      - op
                  description: >-
                    Checks on the response. Without any, a run passes when the
                    request completes.
                body:
                  anyOf:
                    - type: string
                      maxLength: 65536
                    - type: 'null'
                  description: The request body. Not for GET or HEAD.
                enabled:
                  type: boolean
                  description: A disabled check does not run.
                failuresToAlert:
                  type: integer
                  minimum: 1
                  maximum: 10
                  description: Failed runs in a row before the check posts to Slack.
                followRedirects:
                  type: boolean
                headers:
                  maxItems: 30
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        maxLength: 200
                      secret:
                        description: >-
                          Stores the value encrypted and never returns it.
                          Defaults to false.
                        type: boolean
                      value:
                        anyOf:
                          - type: string
                            maxLength: 8192
                          - type: 'null'
                        description: >-
                          The header value. For a secret header, null keeps the
                          saved value while the URL keeps its host. MCP clients
                          can only send null for a secret.
                    required:
                      - name
                      - value
                  description: Request headers. The list replaces the saved headers.
                intervalSeconds:
                  type: integer
                  description: >-
                    How often the check runs: one of 60, 300, 900, 1800, 3600
                    seconds.
                method:
                  type: string
                  enum:
                    - GET
                    - HEAD
                    - POST
                    - PUT
                    - PATCH
                    - DELETE
                    - OPTIONS
                name:
                  type: string
                  maxLength: 200
                retries:
                  type: integer
                  minimum: 0
                  maximum: 2
                  description: Immediate retries before a run counts as failed.
                slack:
                  anyOf:
                    - type: object
                      properties:
                        channelId:
                          type: string
                          maxLength: 64
                          description: >-
                            The Slack channel ID: the `channelId` of a channel
                            alerts can post to.
                        integrationAccountId:
                          type: string
                          format: uuid
                          description: >-
                            The ID of the Slack integration the channel belongs
                            to.
                      required:
                        - channelId
                        - integrationAccountId
                    - type: 'null'
                  description: >-
                    Where failures and recoveries are posted. Without a channel
                    the check only records its runs.
                timeoutMs:
                  type: integer
                  minimum: 1000
                  maximum: 30000
                url:
                  type: string
                  maxLength: 2048
                  description: The full HTTP or HTTPS URL to request.
              required:
                - name
                - url
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  check:
                    type: object
                    properties:
                      assertions:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            kind:
                              type: string
                              enum:
                                - status_code
                                - response_time
                                - header
                                - body
                                - json_path
                                - certificate_expiry
                            op:
                              type: string
                              enum:
                                - eq
                                - neq
                                - lt
                                - gt
                                - contains
                                - not_contains
                                - exists
                                - not_exists
                            severity:
                              type: string
                              enum:
                                - critical
                                - degraded
                            value:
                              type: string
                          required:
                            - kind
                            - op
                            - severity
                            - value
                          additionalProperties: false
                      body:
                        anyOf:
                          - type: string
                          - type: 'null'
                      createdAt:
                        type: string
                      enabled:
                        type: boolean
                      failuresToAlert:
                        type: integer
                      followRedirects:
                        type: boolean
                      headers:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            secret:
                              type: boolean
                            value:
                              type: string
                          required:
                            - name
                            - secret
                            - value
                          additionalProperties: false
                        description: A secret header's value is always empty.
                      id:
                        type: string
                        format: uuid
                        description: Synthetic check ID.
                      intervalSeconds:
                        type: integer
                      lastRunAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      lastStatus:
                        anyOf:
                          - type: string
                            enum:
                              - passed
                              - degraded
                              - failed
                          - type: 'null'
                      method:
                        type: string
                        enum:
                          - GET
                          - HEAD
                          - POST
                          - PUT
                          - PATCH
                          - DELETE
                          - OPTIONS
                      name:
                        type: string
                      retries:
                        type: integer
                      slack:
                        anyOf:
                          - type: object
                            properties:
                              channelId:
                                type: string
                              integrationAccountId:
                                type: string
                            required:
                              - channelId
                              - integrationAccountId
                            additionalProperties: false
                          - type: 'null'
                      statusSince:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: When the check reached its last status.
                      timeoutMs:
                        type: integer
                      updatedAt:
                        type: string
                      url:
                        type: string
                      webUrl:
                        type: string
                        format: uri
                        description: The check in Superlog.
                    required:
                      - assertions
                      - body
                      - createdAt
                      - enabled
                      - failuresToAlert
                      - followRedirects
                      - headers
                      - id
                      - intervalSeconds
                      - lastRunAt
                      - lastStatus
                      - method
                      - name
                      - retries
                      - slack
                      - statusSince
                      - timeoutMs
                      - updatedAt
                      - url
                      - webUrl
                    additionalProperties: false
                required:
                  - check
                additionalProperties: false
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The request is invalid. `issues` lists each invalid field.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key is missing, revoked, or its creator left the workspace.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The request conflicts with the current state, such as a name already
            in use.
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          description: A stable machine-readable error code, when there is one.
          type: string
        error:
          type: string
          description: What went wrong.
        issues:
          description: Validation problems, one per invalid field.
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
            additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      description: A workspace API key, created in Superlog under Settings → API keys.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.