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

# Create a synthetic check

> Create a synthetic check that probes a target on an interval and alerts on failure. check_type is one of http, tcp, dns. `target` is an http(s):// URL for http, and a hostname for tcp and dns. `config` is per-type: tcp requires {"port": 443}; dns requires {"record_type": "a"} (a, aaaa, cname, mx, txt, ns) and accepts {"nameserver": "1.1.1.1"}; http accepts method, body, headers, follow_redirects and tls_verify. `assertions` decide pass/fail beyond reachability: http takes expected_status, body_match and max_latency_ms; dns takes min_records and expected_values. Set `service` only to compose the check with that service's deployments (it then gates deploys and runs as post-deploy verification); leave it unset for an independent monitor.



## OpenAPI

````yaml /api-reference/openapi.json post /synthetic_checks
openapi: 3.1.0
info:
  description: >-
    A resource-shaped endpoint onto the same tool surface the MCP server
    (/api/mcp) reaches. Every gate, refusal and audit row a caller sees here is
    the exact one the MCP endpoint answers for the same tool. Authenticated with
    an API key holding the api:admin scope, or the read-only api:config_read
    scope for GET alone.
  title: SRE Agent configuration API
  version: 1.0.0
servers:
  - url: https://sreagent.app/api/v1/config
security:
  - apiKey: []
tags:
  - name: ai_providers
  - name: ai_settings
  - name: alert_mutes
  - name: alert_routes
  - name: aws_external_id
  - name: certificate_monitors
  - name: change_notifications
  - name: compliance_periods
  - name: connectors
  - name: data_sources
  - name: deploy_policies
  - name: export
  - name: github_settings
  - name: image_targets
  - name: notification_settings
  - name: organization_settings
  - name: outbound_configs
  - name: outbound_rules
  - name: overseer_settings
  - name: prompt_templates
  - name: repo_settings
  - name: service_bindings
  - name: slack
  - name: slis
  - name: slos
  - name: status_page_components
  - name: status_page_incidents
  - name: status_page_settings
  - name: synthetic_checks
  - name: team_members
  - name: teams
  - name: ticket_import_rules
  - name: ticket_integrations
paths:
  /synthetic_checks:
    post:
      tags:
        - synthetic_checks
      summary: Create a synthetic check
      description: >-
        Create a synthetic check that probes a target on an interval and alerts
        on failure. check_type is one of http, tcp, dns. `target` is an
        http(s):// URL for http, and a hostname for tcp and dns. `config` is
        per-type: tcp requires {"port": 443}; dns requires {"record_type": "a"}
        (a, aaaa, cname, mx, txt, ns) and accepts {"nameserver": "1.1.1.1"};
        http accepts method, body, headers, follow_redirects and tls_verify.
        `assertions` decide pass/fail beyond reachability: http takes
        expected_status, body_match and max_latency_ms; dns takes min_records
        and expected_values. Set `service` only to compose the check with that
        service's deployments (it then gates deploys and runs as post-deploy
        verification); leave it unset for an independent monitor.
      operationId: create_synthetic_check
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                alert_on_failure:
                  type: boolean
                alert_severity:
                  description: critical | high | medium | low | info (default high)
                  type: string
                assertions:
                  type: object
                check_type:
                  description: http, tcp, dns
                  type: string
                config:
                  type: object
                down_quorum:
                  description: >-
                    Reporting locations that must fail before the verdict is
                    down. Omit for unanimous; cannot exceed the number of
                    locations.
                  type: integer
                enabled:
                  type: boolean
                failure_threshold:
                  description: Consecutive failures before alerting (default 3).
                  type: integer
                interval_seconds:
                  description: How often to probe. Minimum 60.
                  type: integer
                locations:
                  description: Vantage points to probe from; defaults to ["central"].
                  items:
                    type: string
                  type: array
                name:
                  type: string
                service:
                  type: string
                target:
                  type: string
                timeout_ms:
                  description: >-
                    Per-probe timeout, max 30000. Defaults per type when
                    omitted.
                  type: integer
              required:
                - name
                - check_type
                - target
              type: object
        required: true
      responses:
        '201':
          description: Created.
        '409':
          description: A row already matches this resource's natural key.
        '422':
          description: The tool refused the request's shape or content.
        default:
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      description: The body of every failed request.
      properties:
        error:
          type: string
          description: >-
            A short machine-readable code such as forbidden, conflict or
            read_only_key.
        message:
          type: string
          description: A sentence that says what to change.
      required:
        - error
        - message
      additionalProperties: true
  securitySchemes:
    apiKey:
      description: >-
        An sre_ak_* API key holding the api:admin scope (or api:config_read,
        which every write refuses with read_only_key).
      scheme: bearer
      type: http

````

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