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

# Get a rule



## OpenAPI

````yaml /openapi.json get /rules/{id}
openapi: 3.1.0
info:
  title: Filecheck API
  version: 1.0.0
  description: >-
    The Filecheck REST API. Submit files as jobs, fetch results, and read your
    workflows, rules, connectors, profiles, and optimize presets. All requests
    are authenticated server-side with your secret key (`sk_live_…`).
servers:
  - url: https://api.filecheck.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Jobs
    description: >-
      Submit files for preflight, fixing, optimization, validation, and
      previews.
  - name: Uploads
    description: Mint presigned credentials to upload large files directly.
  - name: Orders
    description: Attach jobs to commerce orders.
  - name: Workflows
  - name: Connectors
  - name: Rules
  - name: Profiles
  - name: OptimizePresets
paths:
  /rules/{id}:
    get:
      tags:
        - Rules
      summary: Get a rule
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  rule:
                    $ref: '#/components/schemas/Rule'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Rule:
      allOf:
        - $ref: '#/components/schemas/Resource'
    Error:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
    Resource:
      type: object
      description: >-
        Library resources share a common envelope. Each carries an id, a human
        label, an enabled flag, and a `source` of `domain` or `store`.
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        source:
          type: string
          enum:
            - domain
            - store
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a bearer token, e.g. `Authorization: Bearer
        sk_live_…`. Secret keys are server-side only.

````