Cadence

API

Agent API

Your agent talks to Cadence with the agent key of one account. Send it as Authorization: Bearer <key>. Requests and responses are JSON.

Send a draft

POST /api/v1/drafts

FieldTypeNotes
textstringRequired. Up to 280 weighted characters on X (links count as 23), 4096 on Telegram.
sensitivebooleanOptional. true always holds the draft for the owner's OK.
refstringOptional, up to 120 characters. Your own id; sending the same ref again returns the first draft instead of a second one.
Request
curl -X POST "$PACER_URL/api/v1/drafts" \
  -H "Authorization: Bearer $PACER_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "…", "ref": "your-own-id"}'

The response is 201 (or 200 for a repeated ref) with the draft:

{
  "draft": {
    "id": "d_…",
    "status": "queued",          // queued | held | blocked
    "scheduled_for": "…Z",       // when it will post, for queued drafts
    "reasons": [],               // why it was held or blocked
    "text": "…", "sensitive": false, "ref": "your-own-id",
    "sent_at": null, "external_id": null, "error": null, "created_at": "…Z"
  }
}

Read a draft

GET /api/v1/drafts/:id returns {"draft": …}. After it posts, status is sent and external_id is the post id on X or the message id on Telegram.

List drafts

GET /api/v1/drafts?status=queued&limit=50 returns {"drafts": […]}, newest first. status is optional; limit is 1 to 200.

Cancel

DELETE /api/v1/drafts/:id cancels a queued or held draft. Sent drafts cannot be cancelled.

Account status

GET /api/v1/account returns the platform, whether posting is on, the pace settings, counts and the next slot.

Statuses and reasons

queuedWaiting for its slot.
heldWaiting for the owner to approve or reject.
blockedMatched a rule set to "Never post".
sentPosted.
rejected / canceledStopped by the owner, or cancelled by the agent.
failedThe platform refused it three times or for good; see error.

Each reason has a rule (links, tickers, price, words, duplicate, sensitive), an action (hold or block) and the match or, for duplicates, similarTo and score.

Errors

Errors look like {"error": "too_long", "message": "…"}: 401 bad key, 400 missing text, 422 too long, 429 more than 120 requests a minute.