Serverless AI Context Database Delete

AI service that deletes a document or an entire collection from the context database.

Endpoint

Delete a document or an entire collection from the context database

DELETEhttps://api.xtartapp.com/data/memory

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
collectionstringYes-The name of the collection to delete or containing the document to delete.
documentstringNo-Unique identifier for the document to delete. If not provided, the entire collection will be deleted.

Response

NameTypeDescription
dataobjectThe data of the delete operation
data.deletedbooleanIndicates if the document or collection was successfully deleted
data.documentstringThe name of the document that was deleted (if applicable)
data.collectionstringThe name of the collection that was involved in the operation
metadataobjectMetadata about the delete process
metadata.costnumberThe cost of the delete request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400MEMORY_ERROREx: could not delete collection or document | collection not found
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.