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

# Publish the stored configuration as a new version

> Snapshots the whole configuration as stored (never a draft) and makes it the current published version. The backend numbers it: MAJOR.(MINOR+1), or (MAJOR+1).0 with major. Saving a configuration never publishes it. Any role but client and guest.



## OpenAPI

````yaml /api-reference/endpoint/records/openapi.json post /records/config-publish/{id}
openapi: 3.1.0
info:
  title: Records API
  version: 1.1.0
  description: >-
    Record configurations (schemas, views, versions) and the records that
    conform to them. Record IDs are server-generated, config IDs are
    client-supplied (`^[a-zA-Z0-9_-]+$`). Configs and records are updated with
    PUT: a config update applies only the fields sent, a record update merges
    `data`. Editing a config schema does not retroactively re-validate existing
    records. Publish a config version to snapshot the stored config; list and
    read versions to see its history.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Record Configs
    description: >-
      Manage record configuration schemas. Each configuration defines the
      structure (fields, types, validation rules) that records must conform to.
  - name: Records
    description: >-
      Manage individual data records. Each record belongs to exactly one
      configuration and its data is validated against that configuration's
      schema.
  - name: Record Config Collections
    description: Groups of record configs.
  - name: Record Config Versions
    description: Published snapshots of a record config.
  - name: Record History
    description: The change history of a record.
  - name: Record Assessment
  - name: Strategy and Simulation
  - name: Record Metrics
paths:
  /records/config-publish/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Record configuration ID
        schema:
          type: string
    post:
      tags:
        - Record Config Versions
      summary: Publish the stored configuration as a new version
      description: >-
        Snapshots the whole configuration as stored (never a draft) and makes it
        the current published version. The backend numbers it: MAJOR.(MINOR+1),
        or (MAJOR+1).0 with major. Saving a configuration never publishes it.
        Any role but client and guest.
      operationId: publishRecordConfigVersion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordConfigPublishRequest'
      responses:
        '200':
          description: The version published (or replayed for a repeated idempotency_key)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response'
                  - properties:
                      body:
                        $ref: '#/components/schemas/RecordConfigPublishResponse'
        '400':
          description: Missing or overlong title or summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: A client or guest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Record configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            config_version_moved: another version was published since
            expected_current_version_id; config_changed: the configuration was
            saved since expected_config_revision; config_is_reference: a
            catalogue reference is versioned by its publisher
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RecordConfigPublishRequest:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          maxLength: 200
        summary:
          type: string
          maxLength: 4000
        major:
          type: boolean
          description: Start a new major version
        expected_current_version_id:
          type: string
          description: The current version the caller saw; empty for none
        expected_config_revision:
          type: integer
          description: >-
            The configuration revision the caller saw (revision on a
            configuration read)
        idempotency_key:
          type: string
          maxLength: 128
          description: >-
            Makes a retry after a lost reply safe, but only when the retry also
            sends expected_current_version_id
        restored_from_version_id:
          type: string
    Response:
      type: object
      properties:
        status_code:
          type: integer
          description: HTTP status code echoed in the response body.
        body:
          type: object
          description: Response payload.
    RecordConfigPublishResponse:
      type: object
      properties:
        version:
          $ref: '#/components/schemas/RecordConfigVersionMeta'
        current:
          $ref: '#/components/schemas/RecordConfigVersionMeta'
        replayed:
          type: boolean
    ErrorResponse:
      type: object
      properties:
        status_code:
          type: integer
        body:
          type: object
          properties:
            error:
              type: string
              description: Human-readable error message.
      example:
        status_code: 400
        body:
          error: field 'rating' is required
    RecordConfigVersionMeta:
      type: object
      properties:
        id:
          type: string
          description: Stable version ID
        config_id:
          type: string
        version:
          type: string
          description: MAJOR.MINOR
          example: '2.1'
        major:
          type: integer
        minor:
          type: integer
        title:
          type: string
        summary:
          type: string
        author_id:
          type: string
        published_at:
          type: string
          format: date-time
        restored_from_version_id:
          type: string
          description: Set only when the snapshot equals that version's exactly
      required:
        - id
        - config_id
        - version
        - major
        - minor
        - title
        - author_id
        - published_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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