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 memoryStatus = await client.memories.update('resource_id', { source: 'collections' });
console.log(memoryStatus.resource_id);{
"source": "collections",
"resource_id": "<string>",
"status": "pending"
}Updates an existing document in the index. You can update the text, collection, title, and metadata. The document must already exist or a 404 will be returned. This works for documents from any source (vault, slack, gmail, etc.).
To remove a collection, set it to null explicitly.
import Hyperspell from 'hyperspell';
const client = new Hyperspell({
apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
});
const memoryStatus = await client.memories.update('resource_id', { source: 'collections' });
console.log(memoryStatus.resource_id);{
"source": "collections",
"resource_id": "<string>",
"status": "pending"
}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 Full text of the document. If provided, the document will be re-indexed.
The collection to move the document to. Set to null to remove the collection.
Title of the document.
Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars. Values must be string, number, or boolean. Will be merged with existing metadata.
Show child attributes
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 pending, processing, completed, failed Was this page helpful?