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

# Create checks

> Create one or more checks. Supports three check types based on the fields provided:
- **Rule-based** (default): include a `rule` field with fact conditions. Soundcheck evaluates these automatically.
- **Manual**: set `type: "manual"`. Results are entered by humans via the Soundcheck UI.
- **External**: omit both `rule` and `type`. An external system pushes results via POST /results.




## OpenAPI

````yaml /plugins/soundcheck/openapi.yaml post /checks
openapi: 3.0.0
info:
  title: soundcheck
  version: 0.1.0
  description: API for interacting with Soundcheck.
servers:
  - url: https://backstage.example.com/api/soundcheck
security: []
tags:
  - name: Campaigns
  - name: Certification
  - name: CheckResults
  - name: Checks
  - name: FactCollectors
  - name: Facts
  - name: Tracks
paths:
  /checks:
    post:
      tags:
        - Checks
      summary: Create checks
      description: >
        Create one or more checks. Supports three check types based on the
        fields provided:

        - **Rule-based** (default): include a `rule` field with fact conditions.
        Soundcheck evaluates these automatically.

        - **Manual**: set `type: "manual"`. Results are entered by humans via
        the Soundcheck UI.

        - **External**: omit both `rule` and `type`. An external system pushes
        results via POST /results.
      operationId: createChecks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChecksRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecksResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateChecksRequest:
      type: object
      properties:
        checks:
          type: array
          items:
            $ref: '#/components/schemas/CreateCheckInput'
      required:
        - checks
      additionalProperties: false
    ChecksResponse:
      type: object
      properties:
        checks:
          type: array
          items:
            $ref: '#/components/schemas/Check'
      required:
        - checks
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
            message:
              type: string
          required:
            - name
            - message
          additionalProperties: true
        request:
          type: object
          properties:
            method:
              type: string
            url:
              type: string
          required:
            - method
            - url
          additionalProperties: false
        response:
          type: object
          properties:
            statusCode:
              type: integer
          required:
            - statusCode
          additionalProperties: false
      required:
        - error
        - response
      additionalProperties: false
    CreateCheckInput:
      description: >
        A check definition. Supports three types based on fields provided:
        rule-based (include rule field), manual (set type to manual), or
        external (omit both rule and type).
      type: object
      properties:
        id:
          type: string
        ownerEntityRef:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
        filter:
          $ref: '#/components/schemas/EntityFilter'
        exclude:
          $ref: '#/components/schemas/EntityFilter'
        rule:
          description: >-
            Fact checker rule (required for rule-based checks, omit for
            manual/external)
          type: object
        applicable:
          description: Applicability condition
          type: object
        type:
          description: >-
            Check type. Set to 'manual' for manual checks, 'default' or omit for
            rule-based checks.
          type: string
          enum:
            - default
            - manual
        warning:
          type: boolean
        passedMessage:
          type: string
          minLength: 1
        failedMessage:
          type: string
          minLength: 1
        notApplicableMessage:
          type: string
          minLength: 1
        pathResolver:
          type: string
        skillEntityRef:
          type: string
      required:
        - id
    Check:
      type: object
      properties:
        id:
          type: string
        ownerEntityRef:
          type: string
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
        filter:
          $ref: '#/components/schemas/EntityFilter'
        exclude:
          $ref: '#/components/schemas/EntityFilter'
        skillEntityRef:
          type: string
      required:
        - id
      additionalProperties: false
    EntityFilter:
      oneOf:
        - type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
        - type: array
          items:
            type: object
            additionalProperties:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string

````