Skip to content

Change a plan slot

POST
/plan/update-slot
curl -X POST https://api.xholic.ai/v1/plan/update-slot \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"slotId":"<slotId>","dryRun":true}'

Change one slot of this week’s plan: swap its sub-topic (an approved sub-topic id), mechanism, format or time (day and localTime in the account’s timezone), save its text (a post you wrote in the user’s voice for it, with sourcePostId: the proven post from search_inspiration whose shape it borrows), or skip it. Changing the idea clears text that no longer fits, resets where the idea came from, and takes the slot out of the week’s test when it no longer fits it. Text is checked against the user’s own rules; a draft that breaks one or has a detail Xholic can’t back is marked needs_look. It schedules nothing. Approved slots can’t change here (edit the queued post instead).

Media typeapplication/json
object
slotId
required

The slot’s id from get_week_plan (e.g. s-20261124-0930).

string
>= 1 characters <= 40 characters
subtopicId

An approved sub-topic id.

string
>= 1 characters <= 100 characters
mechanism

Why people would respond: confession_question, forced_choice, fresh_finding, sharp_distinction, honest_moment, before_after, open_question, practical_list, bold_claim or relatable_humor.

string
Allowed values: confession_question forced_choice fresh_finding sharp_distinction honest_moment before_after open_question practical_list bold_claim relatable_humor
format

The post’s shape, such as question, personal_story or list_playbook.

string
Allowed values: relatable_scene one_liner contrast_pair hot_take contrarian_reframe personal_story proof_numbers build_update list_playbook framework question observation trend_reaction ironic_humor advice motivation
day

New local date, YYYY-MM-DD.

string
/^\d{4}-\d{2}-\d{2}$/
localTime

New local time, HH:MM.

string
/^([01]\d|2[0-3]):[0-5]\d$/
text

The post’s text, in the user’s voice.

string
>= 1 characters <= 25000 characters
sourcePostId

The proven post (an X post id from search_inspiration) whose shape the text borrows. Its words are never copied.

string
/^\d{1,25}$/
skip

Skip this slot this week (false brings it back).

boolean
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

{
"slotId": "<slotId>",
"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"
}
}