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.

POST/api/public/comment-plugs/config
cURLPOST /api/public/comment-plugs/config
curl -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
  }'
200Response
{
  "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

integrationIdintrequired

Account id (LinkedIn or X). Alias: integration_id.

enabledbooleanrequired
delayMinutesint

Alias: delay_minutes. Minimum 2 (validated server-side).

selectionModestring

Alias: selection_mode.

One of:randomrouted
variantsarraydefault:

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.

profileobject

Same shape as a GET profiles[] entry.

configobject

The saved config row, same shape as GET's profiles[].config plus id/orgId/createdAt/updatedAt.

Errors

400missing_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)
400linkedin_cmm_reconnect_required: enabled=true on a LinkedIn account whose comment-management permission isn't connected (not checked for X)
404integration_not_found: account not in this workspace (or an X account that needs reconnecting)
503comment_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.