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

# Delete subscription

> Logically delete a Subscription for good, with subscription.deleted per Corpus. It is also disabled, with every disable guarantee - no new evaluation commit and no new Delivery Attempt admission (reason subscription_deleted); an in-flight attempt may complete. As for a disabled Subscription, a match.withdrawn notice for one of its Matches is still committed with its pending Delivery, which is never attempted. The Subscription, its Versions, Matches and Deliveries stay readable with deleted true. Enable or edit is then 409 subscription_deleted. Repeat is idempotent and commits no event.



## OpenAPI

````yaml /openapi.yaml post /v0/subscriptions/{subscription_id}/delete
openapi: 3.1.0
info:
  title: Quivr V2 public text foundation contract
  version: 0.0.0-draft
  description: >-
    THE-543 and THE-547 evaluation contracts; endpoint implementations are
    separate work. Matching criterion is plugin-owned and deferred. One
    configured webhook destination, immutable Matches, independent at-least-once
    Delivery and reference-only notifications. OpenAPI is authoritative for
    transport shapes. THE-640 adds text search and asynchronous Corpus
    projection rebuild initiation.
servers: []
security:
  - ApiKey: []
paths:
  /v0/subscriptions/{subscription_id}/delete:
    post:
      tags:
        - Subscriptions
      summary: Delete subscription
      description: >-
        Logically delete a Subscription for good, with subscription.deleted per
        Corpus. It is also disabled, with every disable guarantee - no new
        evaluation commit and no new Delivery Attempt admission (reason
        subscription_deleted); an in-flight attempt may complete. As for a
        disabled Subscription, a match.withdrawn notice for one of its Matches
        is still committed with its pending Delivery, which is never attempted.
        The Subscription, its Versions, Matches and Deliveries stay readable
        with deleted true. Enable or edit is then 409 subscription_deleted.
        Repeat is idempotent and commits no event.
      operationId: deleteSubscription
      parameters:
        - name: subscription_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        default:
          description: >-
            Structured error. Existing /v0 authentication, scope, pagination and
            idempotency semantics apply.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ActionRequest:
      type: object
      additionalProperties: false
      properties:
        idempotency_key:
          type: string
          minLength: 1
      required:
        - idempotency_key
    Subscription:
      type: object
      additionalProperties: false
      properties:
        subscription_id:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        enabled:
          type: boolean
        deleted:
          type: boolean
          description: >-
            Logically deleted for good; a deleted Subscription is also disabled
            and stays readable with its Versions, Matches and Deliveries.
        current_version:
          $ref: '#/components/schemas/SubscriptionVersion'
        owner:
          $ref: '#/components/schemas/SubscriptionOwner'
      required:
        - subscription_id
        - name
        - enabled
        - deleted
        - current_version
      description: Absent owner means a global, organization-wide Subscription.
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        retryable:
          type: boolean
        field:
          type: string
          minLength: 1
          description: >-
            JSON Pointer (RFC 6901) to the request member that caused a 422,
            when known (for example /config/url or /credential/secret/token on
            connector commands).
        resync_url:
          type: string
          format: uri-reference
      required:
        - code
        - message
        - retryable
    SubscriptionVersion:
      type: object
      additionalProperties: false
      properties:
        subscription_id:
          type: string
          minLength: 1
        version_id:
          type: string
          minLength: 1
        saved_query_id:
          type: string
          minLength: 1
        saved_query_version_id:
          type: string
          minLength: 1
        evaluator:
          $ref: '#/components/schemas/EvaluatorConfig'
        destination_id:
          type: string
          minLength: 1
        owner:
          $ref: '#/components/schemas/SubscriptionOwner'
      required:
        - subscription_id
        - version_id
        - saved_query_id
        - saved_query_version_id
        - evaluator
        - destination_id
      description: >-
        Immutable Subscription configuration. Every Version keeps the
        Subscription's owner, absent for a global Subscription.
    SubscriptionOwner:
      type: string
      minLength: 1
      maxLength: 128
      description: >-
        Subscription Owner, an opaque end-user reference defined by the client
        application (for example user-123). Quivr stores, filters and echoes it
        without interpreting it. At most 128 characters without control
        characters; none is reserved for the listing filter (422 invalid_owner).
    EvaluatorConfig:
      type: object
      additionalProperties: false
      properties:
        plugin_id:
          type: string
          minLength: 1
        version:
          type: string
          minLength: 1
        configuration:
          type: object
          additionalProperties: true
      required:
        - plugin_id
        - version
        - configuration
      description: >-
        Pins an installed evaluator by plugin id and version, and its
        configuration. Evaluators are the subscription Contributions of the
        plugins pinned at startup (Plugin Protocol v0); test deployments may
        also install the deterministic fixture quivr.fixture@1. The
        configuration must satisfy the evaluator's declared configuration
        schema.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        API key, not necessarily a JWT. Server derives Organization, permitted
        actions and Corpus scope; every resource access is authorized.

````