Create a folder
create an agent folder.
POST
https://api.centerfy.ai/webhooks/inbound/agent-folders Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Content-Type | Yes | application/json | The request body is JSON. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | The folder name. Required, non-empty after trimming. |
color | string | No | — | Optional hex color, e.g. #3b82f6 (must match /^#[0-9a-fA-F]{3,8}$/). If omitted, defaults to #3b82f6. |
Request body
{
"name": "Support Agents",
"color": "#3b82f6"
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/agent-folders" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Agents",
"color": "#3b82f6"
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.agentFolders.create({
"name": "Support Agents",
"color": "#3b82f6"
});
console.log(result); centerfy agentFolders create '{"name":"Support Agents","color":"#3b82f6"}' MCP tool: centerfy_agent_folders_create (see MCP server)
Response
{
"status": "success",
"folder": {
"id": "b2c3d4e5-0000-4000-8000-000000000003",
"name": "Support Agents",
"color": "#3b82f6",
"created_at": "2026-06-12T10:40:00.000Z"
}
}Notes
Creates the folder only; agents are added to it separately. Errors: 400 (folder name required / invalid color hex), 401 (unauthenticated), 500 (server error). Success is 201.