sdkDeterministic

Update reply drafting settings

pipeline.updateReplyDraftingSettings

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

TypeScripttypescript
await pipeline.updateReplyDraftingSettings({
"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
}

Exceptions

PipelineError
Thrown for validation, authentication, JSON-RPC, HTTP, and network failures. Inspect code and data when present.
Pipeline TypeScript SDK documentation | Pipeline