/workflows
Create a new agent (funnel + statuses) from scratch — entirely via API. This is the first step in the API-first agent lifecycle:
- Create the agent (this endpoint). It’s born paused.
- Set its prompt — what it says and how it behaves.
- Optionally add custom statuses/fields or custom tools it can call.
- Activate it by setting
is_paused: false.
name already exists on your account, this returns the existing one (status: "existed") instead of creating a duplicate — safe to retry.
Request Body
Available goals
Onboarding also offers Qualify, then book. That option is stored as
appointment with a qualification pipeline and rules; do not send qualify_then_book to this public endpoint.The custom goal
Use custom when the agent’s objective is not one of the preset goals — debt collection, client win-back, post-sale follow-up, or surveys. The agent pursues an objective written in the operator’s own words, configured in the Dashboard under Agent settings → Goal and stored as config.goal_statement. It accepts up to 600 characters and should describe the outcome, not the procedure. Two things to know:
- A
customagent does not schedule meetings — the calendar tools are not available to it. If the goal ends in a booked meeting, useappointment. - You must send
statusesas with every other goal. This endpoint does not infer the pipeline; a typical custom setup can usenew → contacted → engaged → converted → lostwith transition instructions adapted to the written outcome.
statuses[] shape
Responses
201 — Agent created
200 — Already existed (idempotent replay)
400 — Validation error
"goal_type must be one of: appointment, sale, qualification, information, payment_link, support, custom, quote, document_collection""statuses must be a non-empty array""each status needs a key and a name"