Skip to main content
POST
/
memories
/
add
JavaScript
import Hyperspell from 'hyperspell';

const client = new Hyperspell({
  apiKey: 'My API Key',
});

const memoryStatus = await client.memories.add({ text: 'text' });

console.log(memoryStatus.resource_id);
{
  "source": "collections",
  "resource_id": "<string>",
  "status": "pending"
}

Authorizations

Authorization
string
header
required

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.

Body

application/json
text
string
required

Full text of the document.

resource_id
string

The resource ID to add the document to. If not provided, a new resource ID will be generated. If provided, the document will be updated if it already exists.

collection
string | null

The collection to add the document to for easier retrieval.

title
string | null

Title of the document.

date
string<date-time>

Date of the document. Depending on the document, this could be the creation date or date the document was last updated (eg. for a chat transcript, this would be the date of the last message). This helps the ranking algorithm and allows you to filter by date range.

Response

Successful Response

source
enum<string>
required
Available options:
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
resource_id
string
required
status
enum<string>
required
Available options:
pending,
processing,
completed,
failed
I