Try our new Claude Code Skill to automatically integrate Hyperspell into your project
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const memory = await client.memories.delete('resource_id', { source: 'collections' });
console.log(memory.resource_id);{
"success": true,
"resource_id": "<string>",
"source": "collections",
"chunks_deleted": 123,
"message": "<string>"
}Delete a memory and its associated chunks from the index.
This removes the memory completely from the vector index and database. The operation deletes:
Args: source: The document provider (e.g., gmail, notion, vault) resource_id: The unique identifier of the resource to delete api_token: Authentication token
Returns: MemoryDeletionResponse with deletion details
Raises: DocumentNotFound: If the resource doesn’t exist or user doesn’t have access
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const memory = await client.memories.delete('resource_id', { source: 'collections' });
console.log(memory.resource_id);{
"success": true,
"resource_id": "<string>",
"source": "collections",
"chunks_deleted": 123,
"message": "<string>"
}API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
collections, vault, web_crawler, notion, slack, google_calendar, reddit, box, google_drive, airtable, algolia, amplitude, asana, ashby, bamboohr, basecamp, bubbles, calendly, confluence, clickup, datadog, deel, discord, dropbox, exa, facebook, front, github, gitlab, google_docs, google_mail, google_sheet, hubspot, jira, linear, microsoft_teams, mixpanel, monday, outlook, perplexity, rippling, salesforce, segment, todoist, twitter, zoom Successful Response
collections, vault, web_crawler, notion, slack, google_calendar, reddit, box, google_drive, airtable, algolia, amplitude, asana, ashby, bamboohr, basecamp, bubbles, calendly, confluence, clickup, datadog, deel, discord, dropbox, exa, facebook, front, github, gitlab, google_docs, google_mail, google_sheet, hubspot, jira, linear, microsoft_teams, mixpanel, monday, outlook, perplexity, rippling, salesforce, segment, todoist, twitter, zoom Was this page helpful?