> ## Documentation Index
> Fetch the complete documentation index at: https://oma-codex-339-workspace-permissions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a memory

> Delete a memory through the OMA API.

<Info>Every request requires `?beta=true`.</Info>


## OpenAPI

````yaml /openapi/oma.en.json delete /v1/memory_stores/{memory_store_id}/memories/{memory_id}
openapi: 3.1.0
info:
  title: OMA API Reference
  version: 1.0.0
  description: Open Managed Agents application API reference.
servers:
  - url: http://localhost:38080
    description: Local OMA server
security:
  - omaApiKey: []
  - omaBearer: []
paths:
  /v1/memory_stores/{memory_store_id}/memories/{memory_id}:
    delete:
      summary: Delete a memory
      operationId: BetaDeleteMemory
      parameters:
        - name: beta
          in: query
          required: true
          description: Selects the beta API contract for this endpoint. Must be `true`.
          schema:
            type: boolean
            enum:
              - true
        - name: anthropic-version
          in: header
          required: false
          schema:
            type: string
        - name: anthropic-beta
          in: header
          required: false
          schema:
            type: string
            items:
              type: string
            x-stainless-override-schema:
              x-stainless-param: betas
              x-stainless-extend-default: true
              type: array
              description: Optional header to specify the beta version(s) you want to use.
              items:
                $ref: '#/components/schemas/AnthropicBeta'
            x-default: agent-memory-2026-07-22
        - name: memory_store_id
          in: path
          required: true
          schema:
            type: string
          description: Path parameter memory_store_id
        - name: memory_id
          in: path
          required: true
          schema:
            type: string
          description: Path parameter memory_id
        - name: expected_content_sha256
          in: query
          required: false
          schema:
            type: string
          description: Query parameter for expected_content_sha256
      responses:
        '200':
          description: Successful response (OK)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsDeletedMemory'
        '400':
          description: Invalid argument - The client specified an invalid argument
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '401':
          description: >-
            Unauthenticated - The request does not have valid authentication
            credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '403':
          description: >-
            Permission denied - The caller does not have permission to execute
            the specified operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '404':
          description: Not found - Some requested entity was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '408':
          description: >-
            Deadline exceeded - The deadline expired before the operation could
            complete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '409':
          description: Custom error status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '412':
          description: >-
            Failed precondition - Operation was rejected because the system is
            not in required state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '413':
          description: Out of range - Operation was attempted past the valid range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '429':
          description: >-
            Resource exhausted - Some resource has been exhausted (rate
            limiting)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '431':
          description: Request header fields too large - Request metadata was too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '499':
          description: Cancelled - The operation was cancelled by the client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '500':
          description: Internal - Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '501':
          description: Unimplemented - The operation is not implemented or supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '503':
          description: Unavailable - The service is currently unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
        '504':
          description: Deadline exceeded - Upstream service did not respond in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsErrorResponse'
components:
  schemas:
    BetaManagedAgentsDeletedMemory:
      description: >-
        Tombstone returned by Delete a memory. The memory's version history
        persists and remains listable via List memory versions until the store
        itself is deleted.
      type: object
      additionalProperties: false
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - memory_deleted
        id:
          description: ID of the deleted memory (a `mem_...` value).
          type: string
    BetaManagedAgentsErrorResponse:
      type: object
      required:
        - type
        - error
      properties:
        type:
          type: string
          enum:
            - error
          description: Always "error" for error responses
        error:
          $ref: '#/components/schemas/BetaManagedAgentsError'
    BetaManagedAgentsError:
      discriminator:
        propertyName: type
        mapping:
          invalid_request_error:
            $ref: '#/components/schemas/BetaInvalidRequestError'
          authentication_error:
            $ref: '#/components/schemas/BetaAuthenticationError'
          billing_error:
            $ref: '#/components/schemas/BetaBillingError'
          permission_error:
            $ref: '#/components/schemas/BetaPermissionError'
          not_found_error:
            $ref: '#/components/schemas/BetaNotFoundError'
          rate_limit_error:
            $ref: '#/components/schemas/BetaRateLimitError'
          timeout_error:
            $ref: '#/components/schemas/BetaGatewayTimeoutError'
          api_error:
            $ref: '#/components/schemas/BetaAPIError'
          overloaded_error:
            $ref: '#/components/schemas/BetaOverloadedError'
          memory_precondition_failed_error:
            $ref: >-
              #/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError
          memory_path_conflict_error:
            $ref: '#/components/schemas/BetaManagedAgentsMemoryPathConflictError'
          conflict_error:
            $ref: '#/components/schemas/BetaManagedAgentsConflictError'
      oneOf:
        - $ref: '#/components/schemas/BetaInvalidRequestError'
        - $ref: '#/components/schemas/BetaAuthenticationError'
        - $ref: '#/components/schemas/BetaBillingError'
        - $ref: '#/components/schemas/BetaPermissionError'
        - $ref: '#/components/schemas/BetaNotFoundError'
        - $ref: '#/components/schemas/BetaRateLimitError'
        - $ref: '#/components/schemas/BetaGatewayTimeoutError'
        - $ref: '#/components/schemas/BetaAPIError'
        - $ref: '#/components/schemas/BetaOverloadedError'
        - $ref: '#/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError'
        - $ref: '#/components/schemas/BetaManagedAgentsMemoryPathConflictError'
        - $ref: '#/components/schemas/BetaManagedAgentsConflictError'
    BetaInvalidRequestError:
      properties:
        message:
          default: Invalid request
          title: Message
          type: string
        type:
          const: invalid_request_error
          default: invalid_request_error
          title: Type
          type: string
      required:
        - message
        - type
      title: InvalidRequestError
      type: object
    BetaAuthenticationError:
      properties:
        message:
          default: Authentication error
          title: Message
          type: string
        type:
          const: authentication_error
          default: authentication_error
          title: Type
          type: string
      required:
        - message
        - type
      title: AuthenticationError
      type: object
    BetaBillingError:
      properties:
        message:
          default: Billing error
          title: Message
          type: string
        type:
          const: billing_error
          default: billing_error
          title: Type
          type: string
      required:
        - message
        - type
      title: BillingError
      type: object
    BetaPermissionError:
      properties:
        message:
          default: Permission denied
          title: Message
          type: string
        type:
          const: permission_error
          default: permission_error
          title: Type
          type: string
      required:
        - message
        - type
      title: PermissionError
      type: object
    BetaNotFoundError:
      properties:
        message:
          default: Not found
          title: Message
          type: string
        type:
          const: not_found_error
          default: not_found_error
          title: Type
          type: string
      required:
        - message
        - type
      title: NotFoundError
      type: object
    BetaRateLimitError:
      properties:
        message:
          default: Rate limited
          title: Message
          type: string
        type:
          const: rate_limit_error
          default: rate_limit_error
          title: Type
          type: string
      required:
        - message
        - type
      title: RateLimitError
      type: object
    BetaGatewayTimeoutError:
      properties:
        message:
          default: Request timeout
          title: Message
          type: string
        type:
          const: timeout_error
          default: timeout_error
          title: Type
          type: string
      required:
        - message
        - type
      title: GatewayTimeoutError
      type: object
    BetaAPIError:
      properties:
        message:
          default: Internal server error
          title: Message
          type: string
        type:
          const: api_error
          default: api_error
          title: Type
          type: string
      required:
        - message
        - type
      title: APIError
      type: object
    BetaOverloadedError:
      properties:
        message:
          default: Overloaded
          title: Message
          type: string
        type:
          const: overloaded_error
          default: overloaded_error
          title: Type
          type: string
      required:
        - message
        - type
      title: OverloadedError
      type: object
    BetaManagedAgentsMemoryPreconditionFailedError:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - memory_precondition_failed_error
        message:
          type: string
    BetaManagedAgentsMemoryPathConflictError:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - memory_path_conflict_error
        message:
          type: string
        conflicting_path:
          type: string
        conflicting_memory_id:
          type: string
    BetaManagedAgentsConflictError:
      type: object
      additionalProperties: false
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - conflict_error
        message:
          type: string
  securitySchemes:
    omaApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: OMA workspace API key.
      x-default: sk-ant-local-default
    omaBearer:
      type: http
      scheme: bearer
      description: OMA workspace API key sent as a bearer token.

````