Add a memory
curl --request POST \
--url https://api.hyperspell.com/memories/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "my-collection",
"metadata": {
"author": "John Doe",
"date": "2025-05-20T02:31:00Z",
"rating": 3
},
"text": "...",
"title": "My Document"
}
'import requests
url = "https://api.hyperspell.com/memories/add"
payload = {
"collection": "my-collection",
"metadata": {
"author": "John Doe",
"date": "2025-05-20T02:31:00Z",
"rating": 3
},
"text": "...",
"title": "My Document"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection: 'my-collection',
metadata: {author: 'John Doe', date: '2025-05-20T02:31:00Z', rating: 3},
text: '...',
title: 'My Document'
})
};
fetch('https://api.hyperspell.com/memories/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperspell.com/memories/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection' => 'my-collection',
'metadata' => [
'author' => 'John Doe',
'date' => '2025-05-20T02:31:00Z',
'rating' => 3
],
'text' => '...',
'title' => 'My Document'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperspell.com/memories/add"
payload := strings.NewReader("{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperspell.com/memories/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/memories/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}"
response = http.request(request)
puts response.read_body{
"source": "reddit",
"resource_id": "<string>",
"status": "pending",
"revision": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Memories
Add a memory
Adds an arbitrary document to the index. This can be any text, email, call transcript, etc. The document will be processed and made available for querying once the processing is complete.
POST
/
memories
/
add
Add a memory
curl --request POST \
--url https://api.hyperspell.com/memories/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "my-collection",
"metadata": {
"author": "John Doe",
"date": "2025-05-20T02:31:00Z",
"rating": 3
},
"text": "...",
"title": "My Document"
}
'import requests
url = "https://api.hyperspell.com/memories/add"
payload = {
"collection": "my-collection",
"metadata": {
"author": "John Doe",
"date": "2025-05-20T02:31:00Z",
"rating": 3
},
"text": "...",
"title": "My Document"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection: 'my-collection',
metadata: {author: 'John Doe', date: '2025-05-20T02:31:00Z', rating: 3},
text: '...',
title: 'My Document'
})
};
fetch('https://api.hyperspell.com/memories/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperspell.com/memories/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection' => 'my-collection',
'metadata' => [
'author' => 'John Doe',
'date' => '2025-05-20T02:31:00Z',
'rating' => 3
],
'text' => '...',
'title' => 'My Document'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperspell.com/memories/add"
payload := strings.NewReader("{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperspell.com/memories/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/memories/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection\": \"my-collection\",\n \"metadata\": {\n \"author\": \"John Doe\",\n \"date\": \"2025-05-20T02:31:00Z\",\n \"rating\": 3\n },\n \"text\": \"...\",\n \"title\": \"My Document\"\n}"
response = http.request(request)
puts response.read_body{
"source": "reddit",
"resource_id": "<string>",
"status": "pending",
"revision": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Headers
Body
application/json
Full text of the document.
Minimum string length:
1Who should see this memory, for a memory written on behalf of a user. personal (the default) keeps it visible to that user only. shared shares it with everyone in the app once it is processed, and is only accepted when the app allows direct sharing. A memory written without a user is always visible to everyone in the app, so it accepts shared and refuses personal.
Available options:
personal, shared Response
Successful Response
Available options:
reddit, notion, slack, google_calendar, google_mail, imap, google_meet, box, dropbox, github, gitlab, google_drive, vault, web_crawler, trace, microsoft_outlook, onedrive, microsoft_teams, granola, fathom, fireflies, figma, linear, hubspot, salesforce, coda, confluence, jira, metabase, gong, clickup, lightfield, pylon, fellow, odoo, attio, external_mcp, page Was this page helpful?