Skip to main content
POST
Draft replies with AI for many items
Needs comments:update. Your role in the workspace must also let you edit public comments and use the workspace’s AI; a Client’s doesn’t. See Permissions.
Asks PostSyncer AI for a draft on each item in ids, 1 to 50 of the workspace in workspace_id’s items, as Draft replies does in the app. An id sent twice counts once. Only an open item with no draft is drafted. The answer sorts the ids: The drafts are written in the background, one after another, each the way Draft a reply with AI writes one (draft.by ai), and each spends 1 of the workspace owner’s AI credits. It answers 402 when no credit is left, and the drafts stop when the credits run out. An item that gets a draft or an answer meanwhile keeps it, and isn’t charged. Nothing is sent. It answers 202 with Writing 2 drafts. (or Writing 1 draft.), or 200 with Nothing to draft. when nothing is left to draft, and then nothing is asked for. To see the drafts, list the inbox with ready=true after a minute. On the Free plan, reviews are skipped while other items are drafted. When every item it would draft is a review, it answers 403 (plan_limit_reached, limit: ai): AI review replies are part of the paid plans. Upgrade to use them.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
workspace_id
integer
required

The workspace. It must be one the key can reach.

ids
integer[]
required

1 to 50 items' ids, in the order to draft them. An id sent twice counts once.

Required array length: 1 - 50 elements

Response

Nothing to draft: every item was skipped or not found. Nothing was asked for or charged.

message
string
required

Writing 2 drafts., Writing 1 draft., or Nothing to draft.

data
object
required