Building a webhook integration? Read the webhook guide for signatures, retries, event schemas, and troubleshooting.
apiDeterministic

Update reply drafting settings

PATCH /api/agents/reply-drafting

Choose who drafts campaign replies: pipeline_hosted uses workspace AI credentials, external_agent queues work for a running coding agent. Requires the workspace owner session or owner personal token with write scope. Service API keys cannot change this setting. Approval and sending permissions are unchanged. External-only clients cannot select pipeline_hosted. CLI and SDK callers must explicitly pass allowHostedAi=true when selecting pipeline_hosted.

Parameters

workspaceId
string
No description.
moderequired
string
No description.
pipeline_hosted | external_agent
allowHostedAi
boolean
Explicitly permit enabling future Pipeline-hosted drafting. Required for CLI/SDK clients selecting pipeline_hosted; omitted for external_agent. This flag is transport consent, not a saved setting.

Example

REST requestbash
curl -X PATCH "https://app.pipeline.help/api/agents/reply-drafting" \
-H "Authorization: Bearer $PIPELINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"pipeline_hosted"}'

Response

Success response schemajson schema
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"pipeline_hosted",
"external_agent"
]
},
"status": {
"type": "string",
"enum": [
"pipeline_hosted",
"paused",
"waiting",
"drafting",
"setup_required"
]
},
"pendingCount": {
"type": "integer",
"minimum": 0
},
"runningCount": {
"type": "integer",
"minimum": 0
},
"legacyScoped": {
"type": "boolean"
}
},
"required": [
"mode",
"status",
"pendingCount",
"runningCount",
"legacyScoped"
],
"additionalProperties": false
}

HTTP errors

401
Missing or invalid API key.
403
Authenticated but not permitted for the workspace or resource.
404
The requested resource was not found.
Pipeline REST API reference | Pipeline