Comment Plugs
Set Comment Plug config
Sets the account-level default Comment Plug used by future scheduled posts that inherit it, for a LinkedIn profile, company page or X account. Not a per-post override: use schedule_post's commentPlug for that.
/api/public/comment-plugs/configcurl -X POST https://postiv.ai/api/public/comment-plugs/config \
-H "Authorization: Bearer pk_postiv_..." \
-H "Content-Type: application/json" \
-d '{
"integrationId": 123,
"enabled": true
}'{
"success": true,
"profile": {
"id": 1234,
"channel": "linkedin",
"profileType": "personal",
"name": "Jan",
"cmmConnected": true,
"plugReady": true
},
"config": {
"id": "cfg-1",
"orgId": "9e6397ad-...",
"integrationId": 1234,
"enabled": true,
"delayMinutes": 30,
"selectionMode": "random",
"variants": [],
"createdAt": "...",
"updatedAt": "..."
}
}Authorization
Requires an organization API key with the posts:schedule scope, sent as Authorization: Bearer or x-api-key.
Body parameters
integrationIdintrequiredAccount id (LinkedIn or X). Alias: integration_id.
enabledbooleanrequireddelayMinutesintAlias: delay_minutes. Minimum 2 (validated server-side).
selectionModestringAlias: selection_mode.
randomroutedvariantsarraydefault: Max 5. Each: { id?, text (max 1250), useWhen? (max 240, alias use_when/routeHint), imageSource? (max 2000, alias image_source/imageUrl) }. On X each variant must fit an X reply: 280 characters, a link counts 23.
Response
The saved profile + config.
profileobjectSame shape as a GET profiles[] entry.
configobjectThe saved config row, same shape as GET's profiles[].config plus id/orgId/createdAt/updatedAt.
Errors
| 400 | missing_integration_id / invalid_comment_plug_config: validation failure (e.g. enabled=true with no variants, delay < 2, or on X a variant that does not fit a 280-character reply) |
| 400 | linkedin_cmm_reconnect_required: enabled=true on a LinkedIn account whose comment-management permission isn't connected (not checked for X) |
| 404 | integration_not_found: account not in this workspace (or an X account that needs reconnecting) |
| 503 | comment_plug_tables_missing: migration not yet run in this environment |
Good to know
- To disable the default, set enabled=false (variants can be empty).
- An X plug posts as a self-reply to the first tweet and needs no extra permission, only an active X account.