Skip to content

Propose an experiment

POST
/mentor/propose-experiment
curl -X POST https://api.xholic.ai/v1/mentor/propose-experiment \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"<title>","hypothesis":"<hypothesis>","dryRun":true}'

Set up a small test the user agreed to, such as ‘three proof posts with a screenshot this week beat my text posts on replies’. Xholic records the account’s baseline now and judges the result from the posts linked to it. It posts nothing. Ask the user first; set start only when they said go. For a user who wants to design the test themself, add design: the metric (including bookmarks, profile clicks or estimated follows), one group or A vs B, what to compare against (their median, group B, a format or a date range), win and lose bars, posts per group, how long posts settle and an end date. Leave design out for the usual guided test.

Media typeapplication/json
object
title
required
string
>= 5 characters <= 160 characters
hypothesis
required

What should happen and why, in one or two sentences.

string
>= 10 characters <= 500 characters
format

The post format, such as question, one_liner, proof_numbers 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 networking promotion other
posts

How many posts the test needs (default 3).

integer
>= 2 <= 10
metric
string
Allowed values: replies engagement impressions follows
start

Start now (the user agreed) instead of leaving it proposed.

boolean
design

Optional: the user’s own design. When set, its metric and groupA format are used and posts/metric/format above are ignored.

object
metric
required

What decides the test.

string
Allowed values: impressions replies bookmarks engagement profile_clicks follows
groupA
required

The posts being tested.

object
label
required

What makes this group different, e.g. ‘with a screenshot’ or ‘posted 8–9 pm’.

string
>= 2 characters <= 80 characters
format

The post format this group uses, if the test is about format.

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 networking promotion other
groupB

For an A vs B test: the other group. Then compareTo is group_b.

object
label
required

What makes this group different, e.g. ‘with a screenshot’ or ‘posted 8–9 pm’.

string
>= 2 characters <= 80 characters
format

The post format this group uses, if the test is about format.

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 networking promotion other
compareTo
One of:
object
kind
required
string
Allowed values: own_median
days
integer
default: 30 >= 7 <= 90
minPosts

Posts per group before it’s judged.

integer
default: 3 >= 2 <= 20
winAt

Worked when group A’s median is at least this many times the comparison.

number
default: 1.2 >= 1.05 <= 10
loseAt

Didn’t work at or below this multiple.

number
default: 0.8 >= 0.1 <= 0.95
settleHours
Any of:
number
Allowed values: 24
endsAt

Judge on this date with whatever has settled, even if fewer posts than minPosts.

string
/^\d{4}-\d{2}-\d{2}$/
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

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