Skip to content

Log material

POST
/memory/material
curl -X POST https://api.xholic.ai/v1/memory/material \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Shipping the API today","dryRun":true}'

Save something real the user did or learned, for posts and replies later: what they shipped today, a number, a result, a lesson, a story. Coding agents can log what they built with the user. Only true things the user did or said; never guesses. Xholic uses it as true personal detail in drafts.

Media typeapplication/json
object
text
required

What happened, in plain words, with any real numbers.

string
>= 5 characters <= 2000 characters
kind

Material (default): something that happened; fact: a lasting fact about the user or their product.

string
Allowed values: material fact
posts

Related X post URLs or ids.

Array<string>
<= 10 items
account

X account to act on, as @handle. Leave it out to use the connection’s default account.

string
>= 1 characters <= 64 characters
note

Optional, on any tool: one or two sentences for Xholic’s shared memory about what the user just decided, asked for or said about themselves or their plans (e.g. “Dropping threads for now; focusing on replies to founders”). Every AI the user connects reads it, so they never repeat themselves. In your words, never other people’s posts. Leave it out when nothing new was said.

string
<= 20000 characters
dryRun

Return exactly what would happen without doing it.

boolean
idempotencyKey

A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice.

string
>= 8 characters <= 200 characters

Example

{
"text": "Shipping the API today",
"dryRun": true
}

Success

Media typeapplication/json
object
ok
required
boolean
summary
required

One or two readable sentences about the result.

string
data
required

The result. Its shape depends on the action.

ids
object
key
additional properties
any
next
Array<string>
creditsCharged
number
dryRun
boolean

Example

{
"ok": true
}

Error

Media typeapplication/json
object
ok
required
boolean
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED INVALID_CREDENTIAL SCOPE_MISSING ROLE_NOT_PERMITTED ACCOUNT_NOT_FOUND SUBSCRIPTION_REQUIRED FEATURE_NOT_INCLUDED APP_ONLY INVALID_INPUT NOT_FOUND CONFLICT CREDITS_CONFIRMATION_REQUIRED INSUFFICIENT_CREDITS RATE_LIMITED IDEMPOTENCY_KEY_REUSED IDEMPOTENCY_IN_PROGRESS X_DATA_LIMIT_REACHED ACCOUNT_ON_HOLD UPSTREAM_UNAVAILABLE MAINTENANCE INCIDENT INTERNAL_ERROR
message
required
string
scope
required
string
Allowed values: account platform
retryAfterSeconds
integer
details

Example

{
"ok": false,
"error": {
"code": "UNAUTHENTICATED",
"scope": "account"
}
}