Update a memory
curl --request POST \
--url https://api.hyperspell.com/memories/update/{source}/{resource_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": "<string>",
"text": {},
"collection": {},
"title": {},
"date": {},
"metadata": {},
"share": {}
}
'import requests
url = "https://api.hyperspell.com/memories/update/{source}/{resource_id}"
payload = {
"expected_revision": "<string>",
"text": {},
"collection": {},
"title": {},
"date": {},
"metadata": {},
"share": {}
}
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({
expected_revision: '<string>',
text: {},
collection: {},
title: {},
date: {},
metadata: {},
share: {}
})
};
fetch('https://api.hyperspell.com/memories/update/{source}/{resource_id}', 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/update/{source}/{resource_id}",
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([
'expected_revision' => '<string>',
'text' => [
],
'collection' => [
],
'title' => [
],
'date' => [
],
'metadata' => [
],
'share' => [
]
]),
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/update/{source}/{resource_id}"
payload := strings.NewReader("{\n \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\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/update/{source}/{resource_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/memories/update/{source}/{resource_id}")
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 \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\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
Update a memory
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.
POST
/
memories
/
update
/
{source}
/
{resource_id}
Update a memory
curl --request POST \
--url https://api.hyperspell.com/memories/update/{source}/{resource_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": "<string>",
"text": {},
"collection": {},
"title": {},
"date": {},
"metadata": {},
"share": {}
}
'import requests
url = "https://api.hyperspell.com/memories/update/{source}/{resource_id}"
payload = {
"expected_revision": "<string>",
"text": {},
"collection": {},
"title": {},
"date": {},
"metadata": {},
"share": {}
}
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({
expected_revision: '<string>',
text: {},
collection: {},
title: {},
date: {},
metadata: {},
share: {}
})
};
fetch('https://api.hyperspell.com/memories/update/{source}/{resource_id}', 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/update/{source}/{resource_id}",
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([
'expected_revision' => '<string>',
'text' => [
],
'collection' => [
],
'title' => [
],
'date' => [
],
'metadata' => [
],
'share' => [
]
]),
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/update/{source}/{resource_id}"
payload := strings.NewReader("{\n \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\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/update/{source}/{resource_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperspell.com/memories/update/{source}/{resource_id}")
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 \"expected_revision\": \"<string>\",\n \"text\": {},\n \"collection\": {},\n \"title\": {},\n \"date\": {},\n \"metadata\": {},\n \"share\": {}\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
Path Parameters
Available options:
reddit, notion, slack, google_calendar, google_mail, imap, google_meet, box, dropbox, github, gitlab, google_drive, vault, web_crawler, trace, microsoft_outlook, microsoft_teams, granola, fathom, fireflies, figma, linear, hubspot, salesforce, coda, confluence, jira, metabase, gong, clickup, lightfield, pylon, fellow, odoo, external_mcp, page Body
application/json
Full text of the document. If provided, the document will be re-indexed.
Change who can see this memory. Omit to leave sharing unchanged. personal makes it visible only to its user, removing it from everyone in the app if it was shared. shared shares it with everyone in the app, and is only accepted when the app allows direct sharing.
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, microsoft_teams, granola, fathom, fireflies, figma, linear, hubspot, salesforce, coda, confluence, jira, metabase, gong, clickup, lightfield, pylon, fellow, odoo, external_mcp, page Was this page helpful?