Memory: Delete v1

The delete memory API endpoint allows you to delete an existing memory on Langbase dynamically with the API. This endpoint requires an Org or User API key.


Generate an Org/User API key

You will need to generate an API key to authenticate your requests. For more information, visit the Org/User API key documentation.


DELETE/v1/memory/{memoryName}

Delete a memory

Delete a memory by sending a DELETE request to this endpoint.

Headers

  • Name
    Content-Type
    Type
    string
    Required
    Required
    Description

    Request content type. Needs to be application/json.

  • Name
    Authorization
    Type
    string
    Required
    Required
    Description

    Replace <YOUR_API_KEY> with your user/org API key.

Path Parameters

  • Name
    memoryName
    Type
    string
    Required
    Required
    Description

    The name of the memory to delete.

    Replace {memoryName} with the name of the memory.

Delete Memory

DELETE
/v1/memory/{memoryName}
import {Langbase} from 'langbase';

const langbase = new Langbase({
  apiKey: '<YOUR_API_KEY>', // Replace with your API key
});

const response = await langbase.memory.delete({
  name: 'knowledge-base'
});

Response

  • Name
    Response
    Type
    object
    Description

    The response object returned by the API endpoint.

    Response

    interface Response {
      success: boolean;
    }
    
    • Name
      success
      Type
      boolean
      Description

      Indicates whether the deletion was successful.

API Response

{
  "success": true
}