Skip to main content
PATCH
Update Goal Bot
Goal bots and task agents are the same object. The two engines merged; /api/goal-bots and /api/tasks are aliases over one collection and return identical bodies. Every response carries both goalBot and taskAgent (or goalBots and taskAgents) so integrations written against either name keep working.The older stage-based engine moved to /api/instructions and is being retired.
Send only the fields you want to change. Anything you leave out keeps its current value — there are no defaults applied on update. Array fields (includeTags, excludeTags, allowedToolIds, collectFields) replace the stored array, so send the complete set.

Authentication

Pass your workspace API key as a Bearer token, or use a Clerk session token.

Path parameter

string
required
The bot id. A malformed id returns 400 Invalid id.

Request body

Every field is optional. Unknown fields are ignored.
string
Display name for the bot. An empty or missing name returns 400 Name is required.
string
The instructions the model runs on — who it is, what it is trying to do, what it must not say. An empty or missing prompt returns 400 Prompt is required.
string[]
Tags that wake this bot. A lead carrying any of them is handled by this bot when it replies. Set tags with PATCH /api/leads/{id}. Defaults to [].
string[]
Tags that keep a lead away from this bot, even when includeTags matches. Defaults to [].
string
default:"autopilot"
How replies are delivered.
An unrecognised value is not rejected — it is silently stored as copilot. Read the mode back from the response to confirm what was saved.
string
default:"active"
active or paused. A new bot goes live the moment it exists and starts answering leads whose tags already match, so pass "paused" when you want to create, inspect, then flip it on with PATCH. Any value other than "paused" is stored as active.
string
default:"calendly"
Calendar used for booking: calendly or ghl_calendar. Any other value falls back to calendly.
string
default:"always"
When the bot searches your knowledge base. always searches on every inbound message; auto leaves the decision to the model. On create, anything other than "auto" is stored as always.
string
Free-text tone hint, e.g. "warm and brief".
boolean
default:"true"
Whether the bot may ask the lead follow-up questions. Only an explicit false turns it off.
boolean
default:"true"
Send a typing signal before replying. Only an explicit false turns it off.
number
default:"8"
How many times the bot may reply in one conversation. Clamped to 1–20; a non-numeric or non-positive value falls back to 8.
string
Tag applied to the lead when the bot reaches its goal.
boolean
default:"false"
Push onDoneTag to the connected CRM as well as to Tuco. Only an explicit true enables it.
string[]
Ids of the API tools this bot may call, from GET /api/campaign-tools. Omit to allow none.
string[]
Field names the bot should try to collect during the conversation, e.g. ["email", "company"].
kbRetrieval behaves as the mirror of create here: on PATCH, anything other than the exact string "always" is stored as "auto". Send "always" explicitly if that is what you want.

Example

Turning the built-in Auto Replies bot off:

Success (200 OK)


Errors