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

# Create monitor

> Create a new DNS monitor. Rate limited to 250 requests per minutes.

Please note that the free plan limited to 50 total monitors.<br />If you plan to add many monitors, consider using the bulk endpoint `/monitors/bulk` instead.


## OpenAPI

````yaml https://api.dnsradar.dev/openapi.json post /monitors
openapi: 3.0.3
info:
  title: DNSRadar API
  description: DNSRadar API - Monitor your DNS records and get notified when they change.
  version: 1.0.0
  contact:
    name: DNSRadar Support
    email: support@dnsradar.dev
    url: https://dnsradar.dev
servers:
  - url: https://api.dnsradar.dev
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Team member management and invitations
  - name: Organization
    description: Organization settings, billing, and subscription management
  - name: Monitors
    description: DNS monitoring configuration and management
  - name: Events
    description: DNS change events and history
  - name: Groups
    description: Monitor grouping and organization
  - name: Webhooks
    description: Webhook configuration for event notifications
paths:
  /monitors:
    post:
      tags:
        - Monitors
      summary: Create monitor
      description: Create a new DNS monitor. Rate limited to 250 requests per minutes.
      operationId: createMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - record_type
                - expected_value
              properties:
                domain:
                  type: string
                  maxLength: 255
                  description: The domain name. Required if full_domain is not provided.
                  example: example.com
                subdomain:
                  type: string
                  maxLength: 255
                  description: >-
                    Subdomain (empty string for apex domain). Used with domain.
                    Ignored if full_domain is provided.
                  example: www
                full_domain:
                  type: string
                  maxLength: 512
                  description: >-
                    Full domain including subdomain (e.g., 'www.example.com').
                    When provided, domain and subdomain are extracted
                    automatically. Use this OR domain+subdomain, not both.
                  example: dkim20260101._domainkey.example.com
                record_type:
                  type: string
                  enum:
                    - A
                    - AAAA
                    - CNAME
                    - MX
                    - TXT
                    - NS
                    - PTR
                    - SPF
                    - CAA
                expected_value:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: >-
                    Expected DNS value(s). Can be a string or array (max 10
                    values, each max 1000 chars)
                  example:
                    - 192.168.1.1
                is_exact_match:
                  type: boolean
                  default: true
                  description: >-
                    If true, the DNS value must match exactly. If false,
                    additional values beyond expected_value are allowed (useful
                    for DNS records that may have multiple values).
                is_active:
                  type: boolean
                  default: true
                  description: >-
                    Whether the monitor is active and should be checked. Set to
                    false to pause monitoring.
                group:
                  type: string
                  description: >-
                    Group slug to assign the monitor to. If the group doesn't
                    exist, it will be created automatically. If not provided,
                    the monitor will be assigned to the default group.
                notify:
                  type: string
                  enum:
                    - immediately
                    - on_success
                    - after_success
                  default: immediately
                  description: >-
                    When to start sending webhook notifications. 'immediately'
                    triggers events from first check, 'on_success' starts after
                    monitor enters valid state, 'after_success' starts after
                    first transition from valid to another state.
      responses:
        '200':
          description: Monitor created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Monitor'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          description: Monitor limit reached (upgrade required)
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Monitor:
      type: object
      description: DNS monitoring configuration
      properties:
        id:
          type: string
          description: Monitor identifier with 'mon_' prefix
          example: mon_abc123...
        created:
          type: string
          format: date-time
          description: Monitor creation datetime in ISO 8601 format
        domain:
          type: string
          description: Domain name to monitor
          example: example.com
        subdomain:
          type: string
          description: Subdomain to monitor (empty string for apex)
          example: www
        record_type:
          type: string
          enum:
            - A
            - AAAA
            - CNAME
            - MX
            - TXT
            - NS
            - PTR
            - SPF
            - CAA
          description: DNS record type to monitor
        expected_value:
          type: array
          items:
            type: string
          description: Expected DNS record values (up to 10)
          example:
            - 192.168.1.1
        current_value:
          type: array
          items:
            type: string
          nullable: true
          description: Current DNS record values
          example:
            - 192.168.1.1
        is_exact_match:
          type: boolean
          description: >-
            If set to false, special rules applies depending on the record_type.
            See documentation for details.
        state:
          type: string
          nullable: true
          enum:
            - UNSET
            - VALID
            - INVALID
            - TIMEOUT
            - MISMATCH
            - NOT_FOUND
            - NO_DATA
            - BAD_SETUP
          description: Current monitoring state
        incidence_count:
          type: integer
          description: Number of incidents/changes detected
        last_checked:
          type: string
          format: date-time
          nullable: true
          description: Datetime of the last check in ISO 8601 format
        is_active:
          type: boolean
          description: Whether monitoring is active
        notify:
          type: string
          enum:
            - immediately
            - on_success
            - after_success
          description: >-
            Notification timing: 'immediately' notifies as soon as the value
            changes, 'on_success' notifies only when the value becomes valid,
            'after_success' notifies only when the value goes from valid to
            invalid
    Error:
      type: object
      description: Error response
      properties:
        code:
          type: integer
          description: HTTP status code
        error:
          oneOf:
            - type: string
              description: Error message
            - type: object
              description: Validation errors by field
              additionalProperties:
                type: string
        errors:
          type: object
          description: Field-specific validation errors
          additionalProperties:
            type: string
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 400
            errors:
              email: Invalid email format
    UnauthorizedError:
      description: Authentication is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 401
            error: Unauthorized
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API key used to authenticate yourself on DNSRadar. Obtain your API key
        from your DNSRadar dashboard.

````