Skip to main content
POST
Creates a new agent in the workspace tied to your API key and returns the stored agent object. Agent names must be unique within the workspace. If another agent already has the same name, this route returns 400 Bad Request.

Headers

string
required
Bearer token containing your Fini workspace API key. Format: Bearer fini_... The key needs write scope.
string
required
application/json

Body parameters

string
required
Name for the new agent.

Response

Returns the created agent object.
string
Agent ID. Pass this value as botId on endpoints that scope behavior to one agent.
string
Agent name.
string
Workspace company ID that owns the agent.
datetime
ISO 8601 timestamp for when the agent was created.
datetime
ISO 8601 timestamp for when the agent was last updated.
string | null
Agent flow mode when present. Current values are default and fast_answer.

Errors

The body is malformed or another agent with the same name already exists in the workspace.
The API key is missing, malformed, revoked, or invalid.
The API key does not include the write scope required for this route.
Fini failed while creating the agent.