Skip to content

Turn link tracking on or off

POST
/scheduler/set-link-tracking
curl -X POST https://api.xholic.ai/v1/scheduler/set-link-tracking \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"timezone":"America/New_York","linkTracking":false,"dryRun":true}'

Turn UTM tags on or off for links in posts Xholic publishes. When on (the default), links get utm_source=x, utm_medium=social, utm_campaign=xholic and the post’s short id, so the owner’s own site analytics show visits and signups from X. Nothing is redirected. Call it only when the user asked for this in the conversation; never on your own initiative.

Media typeapplication/json
object
timezone
required

IANA timezone such as America/New_York. Use the user’s timezone.

string
>= 1 characters <= 64 characters
linkTracking
required

True adds UTM tags to links; false posts links exactly as written.

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

{
"timezone": "America/New_York",
"linkTracking": false,
"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"
}
}