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

# Create a new catalog ruleset version

> Persists a ruleset under the declared ``name@version``. Existing ``name@version`` combinations are rejected with 409 — rulesets are immutable once stored. Omitting ``version`` auto-assigns the next integer under that name (``1`` if no prior version exists).



## OpenAPI

````yaml /openapi.json post /v1/rulesets
openapi: 3.0.3
info:
  description: >-
    Geographic compliance API — evaluates polygons against authoritative
    environmental and regulatory datasets and returns deterministic, audit-ready
    verdicts.
  title: Attestly API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/rulesets:
    post:
      tags:
        - Rulesets
      summary: Create a new catalog ruleset version
      description: >-
        Persists a ruleset under the declared ``name@version``. Existing
        ``name@version`` combinations are rejected with 409 — rulesets are
        immutable once stored. Omitting ``version`` auto-assigns the next
        integer under that name (``1`` if no prior version exists).
      operationId: create_ruleset_v1_rulesets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRulesetRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Malformed request body.
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Authentication required.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Authorization failed.
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Resource not found.
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Ruleset name@version already exists.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Ruleset document failed validation.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Quota or rate limit exceeded.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unexpected server error.
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateRulesetRequest:
      additionalProperties: true
      properties:
        checks:
          items:
            additionalProperties: true
            type: object
          minItems: 1
          title: Checks
          type: array
        description:
          description: >-
            Tolgee translation key for the long-form catalog description, same
            shape and resolution as ``display_name``. Optional.
          nullable: true
          title: Description
          type: string
        display_name:
          description: >-
            Tolgee translation key for the catalog UI title (e.g.
            ``presets.br-funai-tis-intersects.display_name``). The frontend
            resolves the key against its i18n bundle at render time. Plain
            strings are accepted for non-localised callers. Optional.
          nullable: true
          title: Display Name
          type: string
        name:
          pattern: ^[A-Za-z0-9._-]{1,128}$
          title: Name
          type: string
        sets:
          additionalProperties: true
          minProperties: 1
          title: Sets
          type: object
        tags:
          description: >-
            Free-form tags for catalog filtering (e.g. ``preset``, ``br``,
            ``deforestation``). Curated official presets carry the ``preset``
            tag.
          items:
            type: string
          title: Tags
          type: array
        verdict_policy:
          additionalProperties: true
          nullable: true
          title: Verdict Policy
          type: object
        version:
          maximum: 2147483647
          minimum: 1
          nullable: true
          title: Version
          type: integer
        visibility:
          $ref: '#/components/schemas/RulesetVisibility'
          default: hidden
          description: >-
            Catalog visibility. ``hidden`` (default) keeps the ruleset out of
            the public ``GET /v1/rulesets`` listing — admins see hidden rulesets
            by passing ``include_hidden=true``. ``public`` exposes it to every
            authenticated caller.
      required:
        - name
        - sets
        - checks
      title: CreateRulesetRequest
      type: object
    ProblemDetail:
      properties:
        detail:
          type: string
        instance:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          format: uri
          type: string
      required:
        - type
        - title
        - status
      type: object
    RulesetVisibility:
      enum:
        - public
        - hidden
      title: RulesetVisibility
      type: string
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````