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

# Archive a grouping rule

> Rules use the same workspace group permissions and reconciliation process as the application. Preview before creating or changing matching criteria. Creation requires the preview fingerprint; edits and archive require the current version. Conflicts require rereading or previewing, not blindly retrying with a new key. Active rules may reconcile existing memberships asynchronously. Preview does not mutate records. MCP reads require groups:read; other operations require groups:write and current workspace admin permission. Historical group-rule backfill is unavailable in the current test release. Existing prompt memberships are not reconciled automatically; use explicit membership updates.



## OpenAPI

````yaml POST /api/v2/groups/rules/{ruleId}/archive
openapi: 3.1.1
info:
  title: chatobserver public API
  version: '2026-09-09'
  description: >-
    Track AI visibility, manage prompts, inspect collected answers and
    citations, and integrate workspace data with your own tools. Visibility
    endpoints use workspace API keys. Data endpoints use scoped service-account
    keys; spreadsheet client endpoints use authorised client sessions. See the
    authentication guide for each credential type.
  contact:
    name: chatobserver support
    url: https://chatobserver.com/contact
    email: support@chatobserver.com
servers:
  - url: https://app.chatobserver.com
    description: Production API
security:
  - WorkspaceKey: []
  - BearerKey: []
tags:
  - name: Workspace
    description: Validate access and list the workspace project and available platforms.
  - name: Prompts
    description: Create, schedule, organise, activate and retrieve tracked prompts.
  - name: Answers
    description: Retrieve collected AI answers, their analysis and visibility trends.
  - name: Brands
    description: Manage brands and compare their visibility in AI answers.
  - name: Sources and citations
    description: Analyse cited domains, pages and ownership across answers.
  - name: Visitor analytics
    description: Read website visitor and crawler analytics for the workspace.
  - name: Content opportunities
    description: Retrieve content-gap findings and recommendations for tracked prompts.
  - name: Usage
    description: Read workspace consumption and allowance summaries.
  - name: Data connections
    description: Discover authorised connections, source accounts and connector catalogues.
  - name: Data queries
    description: >-
      Create versioned queries, publish definitions and inspect integration
      contracts.
  - name: Data operations
    description: >-
      Execute, validate, cancel and inspect operations and page through result
      rows.
  - name: Data delivery
    description: Manage schedules, transfers, destinations and import workflows.
  - name: Data definitions
    description: Manage reusable definitions and their immutable versions.
  - name: Data webhooks
    description: >-
      Configure event delivery, inspect deliveries, replay events and rotate
      secrets.
  - name: Client authorisation
    description: Authorise spreadsheet clients using a user-approved challenge exchange.
  - name: Spreadsheet clients
    description: >-
      Access document-bound client sessions, queries, schedules, bindings and
      write claims.
  - name: AI visibility audits
    description: Create website visibility audits and retrieve their report links.
  - name: Version 1
    description: Integrate with the version 1 visibility and analytics endpoints.
paths:
  /api/v2/groups/rules/{ruleId}/archive:
    post:
      tags:
        - Prompts
      summary: Archive a grouping rule
      description: >-
        Rules use the same workspace group permissions and reconciliation
        process as the application. Preview before creating or changing matching
        criteria. Creation requires the preview fingerprint; edits and archive
        require the current version. Conflicts require rereading or previewing,
        not blindly retrying with a new key. Active rules may reconcile existing
        memberships asynchronously. Preview does not mutate records. MCP reads
        require groups:read; other operations require groups:write and current
        workspace admin permission. Historical group-rule backfill is
        unavailable in the current test release. Existing prompt memberships are
        not reconciled automatically; use explicit membership updates.
      operationId: postV2GroupsRulesRuleIdArchive
      parameters:
        - name: ruleId
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 255
          description: >-
            MCP requires this header. Reuse unchanged for retries; writes and
            receipts commit atomically.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expectedVersion:
                  type: integer
                  exclusiveMinimum: 0
              required:
                - expectedVersion
              additionalProperties: false
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                    required:
                      - success
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Invalid rule.
        '403':
          description: Permission denied.
        '404':
          description: Group or rule not found.
        '409':
          description: Rule version, preview or retry conflict.
components:
  securitySchemes:
    WorkspaceKey:
      type: apiKey
      in: header
      name: x-chatobserver-key
      description: >-
        A workspace API key. Data endpoints require a service-account key with
        the specified scopes.
    BearerKey:
      type: http
      scheme: bearer
      description: The workspace or service-account API key as a bearer token.

````