---
title: "Delete a memory"
method: DELETE
path: "/memories"
tags: ["Memories"]
---

# Delete a memory

`DELETE /memories`

Delete one active memory by key and scope. Function-authenticated requests use their own Function id and cannot override it. Deletes are idempotent without `if_version`; a stale `if_version` returns `memory_conflict`.

## Query parameters

- `key` string, required
- `scope_type` 'org' | 'function'
- `scope_id` string, uuid
- `if_version` string — Bigint counter serialized as a base-10 string.

## Headers

- `x-primitive-function-id` string, uuid

## Response `200`

Delete result.

- object
  - `success` true, required
  - `data` object, required
    - `deleted` boolean, required
    - `key` string, required
    - `scope` object, required — Resolved memory scope returned by the API.
      - `type` 'org' | 'function', required
      - `id` string, uuid, required — Org id for org scope, function id for function scope.

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid or missing API key
- `402` — Usage credits are exhausted or payment is required.
- `403` — Authenticated caller lacks permission for the operation
- `404` — Resource not found
- `409` — The request conflicts with the current state of the resource
- `429` — Rate limit exceeded

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) · [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primitive/primitive-api/revisions/c2299d28022c/schema)
