Engagement / TypeScript SDK

Review comment draft

Review a comment draft: approve, reject, edit-then-approve, or send it live to LinkedIn without hosted AI. Only regenerate invokes Pipeline hosted AI and requires explicit consent.

pipeline.reviewCommentDraftBackend AI, consent required

Parameters

workspaceIdOptional · string
Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client.
draftIdRequired · string
The comment draft UUID.
actionRequired · string
See the input schema for this field.approve · reject · edit · send · regenerate
edited_commentOptional · string
Required for action=edit. Also usable to override the sent text for action=send.
rejection_reasonOptional · string
Optional context for action=reject.
instructionsOptional · string
Regeneration guidance for action=regenerate.
allowHostedAiOptional · boolean
Must be true when this operation uses Pipeline hosted inference.
Request example
await pipeline.reviewCommentDraft({
  "draftId": "00000000-0000-4000-8000-000000000000",
  "action": "approve",
  "allowHostedAi": true
})
Full input schema
Input schema
{
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "description": "Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client."
    },
    "draftId": {
      "type": "string",
      "description": "The comment draft UUID."
    },
    "action": {
      "type": "string",
      "enum": [
        "approve",
        "reject",
        "edit",
        "send",
        "regenerate"
      ]
    },
    "edited_comment": {
      "type": "string",
      "description": "Required for action=edit. Also usable to override the sent text for action=send."
    },
    "rejection_reason": {
      "type": "string",
      "description": "Optional context for action=reject."
    },
    "instructions": {
      "type": "string",
      "description": "Regeneration guidance for action=regenerate."
    },
    "allowHostedAi": {
      "type": "boolean",
      "description": "Must be true when this operation uses Pipeline hosted inference."
    }
  },
  "required": [
    "draftId",
    "action"
  ]
}
See this operation inCLI MCP REST API
TypeScript SDK | Pipeline v2 preview