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

# Delete a fact

> Delete one fact from your own memory or an app user's memory.

A key set to memory for each user of your app must send the user's id in
`x-atlaso-user`; without it the call gets 400 `memory_scope_per_user`. A key
whose **Memory for** is **Me** reaches your own memory and sends no
`x-atlaso-user`; with it, the call gets 403 `memory_scope_owner`.

The deletion cannot be undone. See [Memory API](https://docs.atlaso.ai/gateway/memory-api.md).


## OpenAPI

````yaml api-reference/openapi.json DELETE /memory/facts/{fact_id}
openapi: 3.1.0
info:
  title: Atlaso Gateway API
  version: 1.0.0
  description: An OpenAI-compatible API that calls your own provider keys and adds memory.
servers:
  - url: https://api.atlaso.ai/v1
security:
  - AtlasoKey: []
paths:
  /memory/facts/{fact_id}:
    delete:
      tags:
        - Memory
      summary: Delete a fact
      description: >-
        Deletes one fact for good. For a key set to memory for each user of your
        app, a fact that is not there answers 200 with `deleted: false`. For a
        Me key, the fact is forgotten everywhere your Atlaso tools use it, and
        an id the key cannot reach answers 404 `fact_not_found`. See [Memory
        API](/gateway/memory-api).
      operationId: deleteMemoryFact
      parameters:
        - $ref: '#/components/parameters/AppUser'
        - name: fact_id
          in: path
          required: true
          description: The fact's id.
          schema:
            type: string
            format: uuid
          example: 0b6f3c1e-2a4d-4e8f-9c1b-5d7e6f8a9b0c
      responses:
        '200':
          description: The deletion receipt.
          headers:
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
            x-request-id:
              $ref: '#/components/headers/RequestId'
            cache-control:
              $ref: '#/components/headers/NoStore'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactDeleted'
        '400':
          description: >-
            The request or the app user's id was refused. Codes:
            `memory_scope_per_user`, `missing_user_id`, `user_id_not_accepted`,
            `invalid_fact_id`.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: >-
                    This key keeps memory for each user of your app. Use
                    atlaso.for_user(id).memory.
                  type: invalid_request_error
                  param: x-atlaso-user
                  code: memory_scope_per_user
                  doc_url: https://docs.atlaso.ai/gateway/errors#memory_scope_per_user
        '401':
          description: >-
            The Atlaso key is missing, invalid or revoked. Codes:
            `invalid_api_key`.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
            x-should-retry:
              description: >-
                `false`. Sent with `invalid_api_key`, when retrying soon cannot
                help. The OpenAI SDKs read it.
              schema:
                type: string
                enum:
                  - 'false'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: >-
                    Your Atlaso API key is missing, invalid or revoked. Set
                    Authorization: Bearer to an active key from the API keys
                    page.
                  type: authentication_error
                  param: null
                  code: invalid_api_key
                  doc_url: https://docs.atlaso.ai/gateway/errors#invalid_api_key
        '403':
          description: >-
            The key or this request cannot use the Memory API. Codes:
            `memory_scope_owner` (a Me key sent `x-atlaso-user`), `memory_off`
            (a Me key whose memory is Off), `gateway_not_enabled`.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
            x-should-retry:
              description: >-
                `false`. Sent only with `gateway_not_enabled`, when retrying
                soon cannot help. The OpenAI SDKs read it.
              schema:
                type: string
                enum:
                  - 'false'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: >-
                    This key uses your own memory. Use atlaso.memory, without a
                    user id.
                  type: permission_error
                  param: x-atlaso-user
                  code: memory_scope_owner
                  doc_url: https://docs.atlaso.ai/gateway/errors#memory_scope_owner
        '404':
          description: >-
            A Me key named a fact it cannot reach: a fact of another project, a
            shared fact, or one that is not there. Codes: `fact_not_found`.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: The fact was not found.
                  type: not_found_error
                  param: fact_id
                  code: fact_not_found
                  doc_url: https://docs.atlaso.ai/gateway/errors#fact_not_found
        '429':
          description: 'Too many requests on this key. Codes: `rate_limited`.'
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
            retry-after:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: Too many requests. Try again shortly.
                  type: rate_limit_error
                  param: null
                  code: rate_limited
                  doc_url: https://docs.atlaso.ai/gateway/errors#rate_limited
        '503':
          description: >-
            Memory is not reachable right now, or a deletion has not finished.
            Safe to retry. Codes: `memory_unavailable`, `delete_pending`,
            `forget_pending`, `unavailable`, `not_configured`.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            x-atlaso-memory:
              $ref: '#/components/headers/MemoryReceipt'
            x-atlaso-paid-by:
              $ref: '#/components/headers/PaidBy'
            retry-after:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  message: >-
                    A deletion for this user has not finished yet. Retry the
                    same request in a few seconds; retrying is safe.
                  type: api_error
                  param: null
                  code: delete_pending
                  doc_url: https://docs.atlaso.ai/gateway/errors#delete_pending
components:
  parameters:
    AppUser:
      name: x-atlaso-user
      in: header
      required: false
      description: >-
        Your app user's id, set by your server. A key set to memory for each
        user of your app must send it on every call; without it the call gets
        400 `memory_scope_per_user`, and an empty value gets 400
        `missing_user_id`. A key whose Memory for is Me reaches your own memory
        and must not send it: with it, the call gets 403 `memory_scope_owner`
        and nothing is read or written. 1 to 256 printable characters, not only
        spaces, with no API key or token in it. Send it once. Used exactly as
        sent.
      schema:
        type: string
        minLength: 1
        maxLength: 256
      example: demo-user-42
  headers:
    MemoryReceipt:
      description: >-
        What memory did: `status=...; ids=...; ms=...; reason=...; added=...;
        action=...`. `status` is `used`, `none`, `skipped`, `off` or `bypass`.
        With `x-atlaso-memory: off` it reads `status=off` and
        `reason=request_off`; a key whose memory is off gives
        `reason=key_mode_off`. Routes that do not use memory say
        `status=bypass`.
      schema:
        type: string
      example: status=none; ids=; ms=38; reason=no_match; added=0; action=none
    PaidBy:
      description: 'Always `own_key`: the provider bills your own key.'
      schema:
        type: string
        enum:
          - own_key
      example: own_key
    RequestId:
      description: Atlaso's id for this request. Quote it to support.
      schema:
        type: string
      example: req_4f1c2e9a7b6d4c3e8a1f0b2d
    NoStore:
      description: Answers are never cached.
      schema:
        type: string
      example: no-store
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: string
      example: '2'
  schemas:
    FactDeleted:
      type: object
      required:
        - id
        - object
        - deleted
        - counts
        - remaining
        - deleted_at
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - memory.fact.deleted
        deleted:
          type: boolean
        counts:
          $ref: '#/components/schemas/DeleteCounts'
        remaining:
          type: integer
          enum:
            - 0
        deleted_at:
          type: string
          description: ISO 8601, UTC.
      example:
        id: 0b6f3c1e-2a4d-4e8f-9c1b-5d7e6f8a9b0c
        object: memory.fact.deleted
        deleted: true
        counts:
          facts: 1
          embeddings: 1
          search_rows: 1
          learned_source_links: 0
        remaining: 0
        deleted_at: '2026-11-17T10:00:00+00:00'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - param
            - code
            - doc_url
          properties:
            message:
              type: string
              description: What happened and what to do.
            type:
              type: string
              description: Error type, as OpenAI uses it.
              example: invalid_request_error
            param:
              type:
                - string
                - 'null'
              description: The field or header at fault, if any.
            code:
              type: string
              description: A stable code. A provider's own code may appear too.
            doc_url:
              type: string
              format: uri
              description: Where this code is explained on the Errors page.
    DeleteCounts:
      type: object
      description: What was removed.
      properties:
        facts:
          type: integer
        embeddings:
          type: integer
        search_rows:
          type: integer
        learned_source_links:
          type: integer
  securitySchemes:
    AtlasoKey:
      type: http
      scheme: bearer
      bearerFormat: sk-at-...
      description: >-
        Your Atlaso key in `Authorization: Bearer sk-at-...`. Send one
        Authorization header. A request that also sends `x-atlaso-key` is
        refused with 401.

````

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