Skip to content

Edit a queued post

POST
/queue/edit
curl -X POST https://api.xholic.ai/v1/queue/edit \
-H "Authorization: Bearer $XHOLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"postId":"<postId>","text":"Shipping the API today","dryRun":true,"idempotencyKey":"my-unique-key-1"}'

Change the text, thread, media or automations of a draft or scheduled post.

Media typeapplication/json
object
postId
required
string
>= 1 characters <= 120 characters
text
required
string
>= 1 characters <= 25000 characters
threadParts

For a thread: every part in order, starting with the same first post as text.

Array<string>
>= 2 items <= 25 items
media

Media from upload_media, by mediaId. Up to 4 images, or 1 GIF or video.

Array<object>
<= 4 items
object
mediaId
required
string
>= 1 characters <= 200 characters
key
additional properties
automation

Post automations (auto-repost, auto-plug reply, auto-delete, auto-DM). Shape as in the docs: docs.xholic.ai/api/automations.

object
key
additional properties
account

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

string
>= 1 characters <= 64 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

{
"postId": "<postId>",
"text": "Shipping the API today",
"dryRun": true,
"idempotencyKey": "my-unique-key-1"
}

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 UPSTREAM_UNAVAILABLE INTERNAL_ERROR
message
required
string
scope
required
string
Allowed values: account platform
retryAfterSeconds
integer
details

Example

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