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

# Confirm a memory-space purge (step 2 of 2) [Cloud-only]

> **Permanent — there is no undo.** Step 2 of 2: confirms the `nonce` from `POST /purge` and queues the purge (202). The scope is the one the nonce was issued for.

From this moment every write to the memory space (add, flush, delete, update, feedback, tags, knowledge changes) is rejected with `409 purge_in_progress` until the purge ends; reads keep working and may return partial results. Poll `GET /purge/{job_id}` for progress.

Only one purge per memory space runs at a time: confirming while one is queued or running returns that job. An unknown, expired or already used nonce is `404 purge_nonce_invalid`.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/memory/purge/confirm
openapi: 3.1.0
info:
  title: EverOS Cloud Memory API
  version: 2.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  contact:
    name: EverMind AI
    email: service@evermind.ai
    url: https://github.com/EverMind-AI/everos-cloud-sdk-python
  description: >-
    Official Python client for the EverOS Cloud Memory API. Add, search,
    retrieve, and manage long-term memory for your AI applications over a typed
    interface (pydantic v2, with full type hints). Install and usage guides:
    https://github.com/EverMind-AI/everos-cloud-sdk-python
servers:
  - url: https://api.evermind.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v2/memory/purge/confirm:
    post:
      tags:
        - Memory
      summary: Confirm a memory-space purge (step 2 of 2) [Cloud-only]
      description: >-
        **Permanent — there is no undo.** Step 2 of 2: confirms the `nonce` from
        `POST /purge` and queues the purge (202). The scope is the one the nonce
        was issued for.


        From this moment every write to the memory space (add, flush, delete,
        update, feedback, tags, knowledge changes) is rejected with `409
        purge_in_progress` until the purge ends; reads keep working and may
        return partial results. Poll `GET /purge/{job_id}` for progress.


        Only one purge per memory space runs at a time: confirming while one is
        queued or running returns that job. An unknown, expired or already used
        nonce is `404 purge_nonce_invalid`.
      operationId: confirmPurge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurgeConfirmInput'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope_PurgeJobData_'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: >-
            Authenticated but not permitted — either rejected by the auth
            service, or the account's memory API version does not match the
            interface version implied by the path (a v1 account calling an
            /api/v2 route).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            Rate limit or quota exceeded. Besides the account-wide limits, each
            memory space may send /purge and /purge/confirm only a limited
            number of times per minute (10 each by default); wait for the
            `Retry-After` header. Requests the engine rejects do not count
            against this limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not reach the authentication service. Transient —
            retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    PurgeConfirmInput:
      properties:
        nonce:
          type: string
          maxLength: 64
          minLength: 16
          pattern: ^[A-Za-z0-9_-]+$
          title: Nonce
      additionalProperties: false
      type: object
      required:
        - nonce
      title: PurgeConfirmInput
      description: 'Step 2: confirm. The scope is the one bound to the nonce.'
    SuccessEnvelope_PurgeJobData_:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request trace id (peer to data)
        data:
          $ref: '#/components/schemas/PurgeJobData'
          description: Endpoint-defined business result
      type: object
      required:
        - request_id
        - data
      title: SuccessEnvelope[PurgeJobData]
    GatewayError:
      type: object
      additionalProperties: true
      description: >-
        Gateway error body. NOTE: shape is not yet uniform across auth/quota/
        rate-limit paths — treat fields as best-effort. Commonly includes a
        `code`/`message` (flat) or an `error` object/string with a `message`.
      title: GatewayError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: One entry per field that failed validation.
      type: object
      title: HTTPValidationError
    PurgeJobData:
      properties:
        job_id:
          type: string
          title: Job Id
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
          title: Status
        scope:
          type: string
          enum:
            - space
            - app
            - project
          title: Scope
        app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: App Id
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        heartbeat_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Heartbeat At
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
        steps:
          items:
            $ref: '#/components/schemas/PurgeStepData'
          type: array
          title: Steps
      type: object
      required:
        - job_id
        - status
        - scope
        - created_at
      title: PurgeJobData
      description: A purge job as the caller sees it.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Path to the offending field, from the body root.
        msg:
          type: string
          title: Message
          description: What is wrong with it.
        type:
          type: string
          title: Error Type
          description: Machine-readable validation-error kind.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PurgeStepData:
      properties:
        store:
          type: string
          title: Store
        state:
          type: string
          enum:
            - pending
            - done
            - failed
          title: State
        deleted:
          type: integer
          title: Deleted
          default: 0
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - store
        - state
      title: PurgeStepData
      description: >-
        One store of one purge step, e.g. ``mongo:v2_episodes`` or
        ``es:episode``.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by EverOS, sent as `Authorization: Bearer <api_key>`.'

````

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