Skip to main content
This guide walks you through the two most fundamental FormBharo API calls: listing existing agents and creating a new one. You need an API key (see API Keys). Both steps work in curl and Python — pick whichever you prefer.
1

Set your API key

Store your API key as an environment variable so you don’t hard-code it into every command.
2

List your agents

Fetch all agents visible to your account. A successful response confirms your key is correct.
The API returns an array of agent objects. For example:
3

Create an agent

Send a POST request with a title and at least one question. This creates a draft agent you can refine before publishing.
On success the API returns the new agent’s ID and workspace:
Save the id — you will need it in the next step.
4

Publish your agent

A newly created agent starts as a draft and cannot accept calls until it is published. To publish it, send a PUT request to /api/v1/agents/{agent_id} with the complete agent body and "status": "published".
curl
The PUT endpoint replaces the entire agent definition, so always send the full body — not just the fields you want to change. See Agent Configuration for every available field.
Next, read Build an Agent for a complete walkthrough including question types, scripts, branching, and validation.