Skip to Content
Assistant memory

Save one Assistant preference for the caller

Stores one concise preference (at most 200 characters) for all the caller’s projects (`projectId: null`) or for one project, optionally limited to some of its channels. `language` and `length` keep one entry per scope and channel set: a new one replaces the old. Statements that look like passwords, keys or tokens are refused. Fails with `memory_full` when the scope reached its limit, and `memory_off` while memory is off for the caller.

POST
/api/assistant/memories

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Request Body

  1. body
projectId*|null
topic*string
Value in"language""tone""length""format""audience""channels""scheduling""workflow""other"
statement*string
Length1 <= length <= 1000
channelIds?array<>|null
expiresAt?|null
replaces?array<>
Itemsitems <= 50

Response Body

Response for status 201

application/json
  1. response
memory*
replaced*array<>
Example Request
curl -X POST 'https://postdot.example/api/assistant/memories' \
  -H 'Content-Type: application/json' \
  -d '{
  "projectId": "string",
  "topic": "language",
  "statement": "string"
}'
Example Response
{
  "memory": {
    "id": "string",
    "projectId": "string",
    "projectName": "string",
    "topic": "language",
    "statement": "string",
    "channelIds": [
      "string"
    ],
    "channels": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "expiresAt": 0,
    "basisMessageId": "string",
    "basis": "string",
    "source": "assistant",
    "sourceRef": "string",
    "revision": 1,
    "createdAt": 0,
    "updatedAt": 0
  },
  "replaced": [
    {
      "id": "string",
      "projectId": "string",
      "projectName": "string",
      "topic": "language",
      "statement": "string",
      "channelIds": [
        "string"
      ],
      "channels": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "expiresAt": 0,
      "basisMessageId": "string",
      "basis": "string",
      "source": "assistant",
      "sourceRef": "string",
      "revision": 1,
      "createdAt": 0,
      "updatedAt": 0
    }
  ]
}

Was this page helpful?