Hivemind

Memories

REST

Storing and managing memories over HTTP.

Store

Terminal
curl -X POST https://app.gethivemind.xyz/v3/documents \
  -H "Authorization: Bearer $HIVEMIND_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "content": "We cap production deploys at 3 per month",
    "metadata": { "team": "platform" },
    "customId": "deploy-policy"
  }'
json
{
  "id": "…",
  "threadId": "…",
  "updated": false,
  "duplicate": false,
  "supersededIds": [],
  "supersededReason": null
}

Re-sending the same customId with unchanged content is a no-op and is not billed. With changed content it replaces in place.

List

Terminal
curl "https://app.gethivemind.xyz/v3/documents/list?limit=50" \
  -H "Authorization: Bearer $HIVEMIND_API_KEY"

Takes limit and offset.

Correct

Terminal
curl -X PATCH https://app.gethivemind.xyz/v3/memories/{id} \
  -H "Authorization: Bearer $HIVEMIND_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "content": "We cap production deploys at 5 per month" }'

Creates a new version and retires the old one. The previous value stays readable, often it is the interesting half of the record:

Terminal
curl https://app.gethivemind.xyz/v3/memories/{id}/history \
  -H "Authorization: Bearer $HIVEMIND_API_KEY"

Every version, oldest first, from whichever id you hold.

Delete

Terminal
curl -X DELETE https://app.gethivemind.xyz/v3/documents/{id} \
  -H "Authorization: Bearer $HIVEMIND_API_KEY"

A memory you edited keeps its earlier wording as history. A plain delete is an undo: it removes that one version, and the version before it becomes current again. To forget the memory and every earlier version of it, add ?history=forget. The dashboard's Forget does this.

Terminal
curl -X DELETE "https://app.gethivemind.xyz/v3/documents/{id}?history=forget" \
  -H "Authorization: Bearer $HIVEMIND_API_KEY"

Forget matching

Terminal
curl -X POST https://app.gethivemind.xyz/v3/memories/forget-matching \
  -H "Authorization: Bearer $HIVEMIND_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "query": "everything about the old vendor" }'
Heads up

This is a dry run by default. It returns what it would remove and changes nothing. Deleting by description can match far more than intended, so the safe outcome is the one you get by forgetting to ask for it. Pass "dryRun": false only after reading the list.