API Reference
The Fleece AI REST API lets you manage agents, trigger flows, and retrieve execution results programmatically. API access requires a **Pro plan or higher**.
https://fleeceai.app/api/v1Bearer token via API key
Pro, Business, or Enterprise
Authentication
All API requests require a valid API key in the Authorization header.
Getting your API key
- Log in to your Fleece AI dashboard
- Go to Settings > API Keys
- Click Create New API Key and give it a name
- Copy the key immediately — it is shown only once
Using the key
Include your API key as a Bearer token in the Authorization header of every request:
Keep your key secure
Never expose your API key in client-side code, public repositories, or browser requests. Use environment variables and server-side calls only.
Key limits per plan
Rate Limits
API requests are rate-limited per plan to ensure fair usage.
| Plan | Requests / day | Burst / minute |
|---|---|---|
| Pro | 5,000 | 60 |
| Business | 50,000 | 300 |
| Enterprise | Custom | Custom |
When rate-limited, the API returns 429 Too Many Requests with the following headers:
Errors
All errors return a JSON body with an error field.
| Status | Meaning | Example |
|---|---|---|
400 | Bad Request — invalid or missing parameters | {"error":"name is required"} |
401 | Unauthorized — missing or invalid API key | {"error":"Unauthorized"} |
403 | Forbidden — plan limit or feature restriction | {"error":"API access requires Pro plan or higher","upgrade":true} |
404 | Not Found — resource does not exist or you don't own it | {"error":"Not found"} |
409 | Conflict — e.g. flow is already running | {"error":"Flow is already running"} |
429 | Too Many Requests — rate limit exceeded | {"error":"Rate limit exceeded"} |
500 | Internal Server Error — unexpected failure | {"error":"Internal server error"} |
Agents
Create, list, and execute AI agents
/agentsList agents
Returns all agents belonging to the authenticated user.
Response 200
datatotal/agents/{agentId}Get agent details
Returns full details for a single agent, including capabilities, model configuration, and metrics.
Path Parameters
agentIdUUID of the agent
Response 200
idnameExample: "Email Triager"descriptionExample: "Categorizes and summarizes incoming emails"typeiconEmoji or icon identifier
Example: "📧"modelExample: "gpt-5.2"providerExample: "openai"capabilitiesList of skill identifiers assigned to this agent
Example: ["email-assistant","summarizer"]isActivetotalTasksCompletedExample: 142totalTasksFailedExample: 3averageExecutionTimeAverage execution time in seconds
Example: 12lastActiveAtcreatedAtupdatedAt/agents/{agentId}/executeExecute an agent
Send a message to an agent and receive its response. The agent will use its configured tools and integrations to complete the task. Consumes credits based on the model used (1 credit for GPT-5.2, 10 for Claude Opus 4.6).
Path Parameters
agentIdUUID of the agent to execute
Request Body
taskrequiredThe instruction or task to send to the agent
Example: "Summarize my last 5 emails and flag anything urgent"timezoneIANA timezone for time-aware tasks
Example: "Europe/Paris"{
"task": "Summarize my last 5 emails and flag anything urgent"
}Response 200
idExecution ID
agentIdstatusresultThe agent's response text
toolCallsTools invoked during execution
tokensUsedExample: 1523durationMsExecution duration in milliseconds
Example: 4200errorError message if status is `failed`
Flows
Manage automated workflows and their execution history
/flowsList flows
Returns all flows belonging to the authenticated user.
Response 200
datatotal/flows/{flowId}Get flow details
Returns full details for a single flow, including schedule, integrations, and run statistics.
Path Parameters
flowIdUUID of the flow
Response 200
idtitleExample: "Weekly Gmail Summary to Slack"descriptionExample: "Every Monday at 9 AM, summarize unread emails and post to #general"iconExample: "📊"cronExpressionExample: "0 9 * * 1"scheduleDescriptionExample: "Every Monday at 9:00 AM"timezoneExample: "Europe/Paris"mode`auto` runs without intervention, `always_ask` requires approval before each execution
statusmodelExample: "gpt-5.2"integrationsConnected services used by this flow
isRunningWhether the flow is currently executing
estimatedHumanMinutesEstimated time a human would take (minutes) — used for Time Saved metrics
Example: 15lastRunAtnextRunAttotalRunsExample: 87totalFailuresExample: 2createdAtupdatedAt/flows/{flowId}/triggerTrigger a flow
Manually trigger a flow execution outside its cron schedule. Creates a new flow run and starts execution immediately. The flow must be in `active` status.
Path Parameters
flowIdUUID of the flow to trigger
Response 200
idflowIdstatusstartedAtcompletedAtdurationMsExecution time in milliseconds
Example: 8340resultSummaryHuman-readable summary of the run outcome
resultDataStructured result data (varies by flow)
toolCallstokensUsederrorMessageError details if status is `failed`
createdAt/flows/{flowId}/runsList flow runs
Returns the execution history for a specific flow, ordered by most recent first.
Path Parameters
flowIdUUID of the flow
Query Parameters
limitNumber of runs to return (default 50, max 100)
Default: 50
Response 200
datatotalflowId/flows/{flowId}/runs/{runId}Get flow run details
Returns full details for a single flow run, including tool calls, result data, and error messages.
Path Parameters
flowIdrunIdUUID of the flow run
Response 200
idflowIdstatusstartedAtcompletedAtdurationMsExecution time in milliseconds
Example: 8340resultSummaryHuman-readable summary of the run outcome
resultDataStructured result data (varies by flow)
toolCallstokensUsederrorMessageError details if status is `failed`
createdAtAPI Keys
Create and manage API keys for authentication
/keysList API keys
Returns all API keys for the authenticated user. Only the key prefix is returned — full keys are never retrievable after creation.
Response 200
idnameExample: "My Production Key"keyPrefixFirst 12 characters of the key
Example: "flc_a1b2c3d4"isActivelastUsedAtexpiresAtcreatedAt/keysCreate an API key
Generates a new API key. The full plaintext key is returned **only in this response** — store it securely. Subsequent requests only show the prefix.
Request Body
namerequiredA label to identify this key (e.g. "Production", "CI/CD")
Example: "My Production Key"Response 200
idnamekeyFull plaintext API key — shown **only once**. Store it securely.
Example: "flc_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4"keyPrefixExample: "flc_a1b2c3d4"createdAt/keys/{keyId}Delete an API key
Permanently revokes an API key. Any application using this key will immediately lose access.
Path Parameters
keyIdUUID of the API key to delete
Response 200
successExample: trueQuick Start
Get started in minutes with these code examples.
cURL — list your agents
curl -s \ -H "Authorization: Bearer flc_your_key_here" \ https://fleeceai.app/api/v1/agents | jq .
JavaScript / TypeScript
const FLEECE_API_KEY = process.env.FLEECE_API_KEY;
const BASE_URL = "https://fleeceai.app/api/v1";
// List all agents
const agents = await fetch(`${BASE_URL}/agents`, {
headers: { Authorization: `Bearer ${FLEECE_API_KEY}` },
}).then(r => r.json());
console.log(`Found ${agents.length} agents`);
// Execute an agent
const result = await fetch(`${BASE_URL}/agents/${agents[0].id}/execute`, {
method: "POST",
headers: {
Authorization: `Bearer ${FLEECE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "Summarize my latest emails",
}),
}).then(r => r.json());
console.log(result);Python
import os
import requests
API_KEY = os.environ["FLEECE_API_KEY"]
BASE = "https://fleeceai.app/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# List flows
flows = requests.get(f"{BASE}/flows", headers=headers).json()
print(f"Found {len(flows)} flows")
# Trigger a flow
run = requests.post(
f"{BASE}/flows/{flows[0]['id']}/trigger",
headers=headers,
).json()
print(f"Run created: {run['id']} — status: {run['status']}")OpenAPI Specification
Download the full OpenAPI 3.1 spec to generate client libraries, import into Postman, or use with any OpenAPI-compatible tool.
Ready to build?
Create your API key in Settings and start integrating Fleece AI into your applications.