Engagement / REST API
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.
PATCH /api/comment-drafts/{draftId}Backend AI, consent requiredParameters
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.
curl -X PATCH "https://app.pipeline.help/api/comment-drafts/00000000-0000-4000-8000-000000000000" \
-H "Authorization: Bearer $PIPELINE_API_KEY" \
-H "X-Pipeline-Execution-Policy: hosted-enabled" \
-H "Content-Type: application/json" \
-d '{"action":"approve","allowHostedAi":true}'Full 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"
]
}