Skip to main content
POST
/
api
/
agent
/
publish
Publish, schedule, cancel, or direct-publish (as-is) social content
curl --request POST \
  --url https://www.citedy.com/api/agent/publish \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "adaptationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "action": "now",
  "platform": "facebook",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "scheduledAt": "2023-11-07T05:31:56Z"
}
'
{
  "success": true,
  "action": "now",
  "adaptationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "postId": "<string>",
  "platformPostId": "<string>",
  "scheduledAt": "2023-11-07T05:31:56Z",
  "messageId": "<string>",
  "deduplicated": true,
  "warning": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer citedy_agent_* key

Body

application/json
adaptationId
string<uuid>
required
action
enum<string>
required
Available options:
now,
schedule,
cancel
platform
enum<string>
required
Available options:
facebook,
linkedin,
x_article,
x_thread,
reddit,
threads,
instagram,
instagram_reels,
youtube_shorts
accountId
string<uuid>
required
scheduledAt
string<date-time>

Required if action=schedule. Must be a future date.

Response

Publish action completed

success
boolean
required
action
enum<string>
required
Available options:
now,
schedule,
cancel,
publish_raw
adaptationId
string<uuid>
required
postId
string | null

Present when action=now

platformPostId
string | null

Present when action=publish_raw

scheduledAt
string<date-time> | null

Present when action=schedule

messageId
string | null

QStash message ID for scheduled publish

deduplicated
boolean

True if publish was skipped because already published

warning
string

Present when publish_raw encounters a non-fatal issue