Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create memory batch

POST/workspaces/{organizationId}/memory/batch
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
memoriesobject[]
Show properties
Array of object
entityTypestringrequired
min length 1
entityIdstringrequired
min length 1
kindstringrequired
min length 1
factstringrequired
min length 1
validUntilstring | null
sourceAgentSlugstring | null
sourceSessionIdstring | null
documentIdsstring[]
sourceAgentSlugstring
Responses
200

Memories written

idsstring[]required
countnumberrequired
extractedFromDocumentsnumberrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/memory/batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "memories": [
    {
      "entityType": "string",
      "entityId": "string",
      "kind": "string",
      "fact": "string",
      "validUntil": "string",
      "sourceAgentSlug": "string",
      "sourceSessionId": "string"
    }
  ],
  "documentIds": [
    "string"
  ],
  "sourceAgentSlug": "string"
}'
Response
{
  "ids": [
    "string"
  ],
  "count": 0,
  "extractedFromDocuments": 0
}

Was this page helpful?