Overview
Registers a new custom skill for your tenant’s AI agents. Skills are executable tools that agents can invoke during investigations — for example, running a database query, fetching a runbook, or calling an internal API.
Skills use a non-standard base path: /api/v1/tenants/{tenantId}/skills — not /v1/. This is a dedicated module with its own routing prefix.
Required role: admin
JWT Bearer token. Format: Bearer <your-jwt>.
Path parameters
Your tenant identifier. Example: ten_EXAMPLE_ABC123.
Request body
Unique skill name within your tenant. Use snake_case. Example: fetch_runbook.
A clear description of what this skill does. The AI uses this description to decide when to invoke the skill. Maximum 500 characters.
Skill execution type. One of: http, integration, builtin. integration skills invoke a connected third-party tool via CauseFlow’s managed OAuth layer (typically configured from the dashboard, not via this API).
Configuration specific to the skill type. For http: { "url": "...", "method": "POST", "headers": {} }. For integration: { "action": "..." }.
JSON Schema defining the parameters the skill accepts. Used by the AI to construct valid inputs.
Whether the skill is active. Default: true.
Response
Returns 201 Created.
{
"skillId": "skl_01HX9VTPQR3KF8MZWBYD5N6JCE",
"tenantId": "ten_EXAMPLE_ABC123",
"name": "fetch_runbook",
"description": "Fetches the runbook for a given service from the internal wiki",
"type": "http",
"enabled": true,
"createdAt": "2024-04-01T10:00:00Z"
}
Error responses
| Status | Error code | Description |
|---|
400 | validation_error | Required fields missing or schema invalid |
401 | unauthorized | Missing or invalid JWT |
403 | forbidden | Caller lacks admin role |
409 | skill_name_conflict | A skill with this name already exists in your tenant |
Examples
curl https://api.causeflow.ai/api/v1/tenants/ten_EXAMPLE_ABC123/skills \
-X POST \
-H "Authorization: Bearer eyJhbGc..." \
-H "Content-Type: application/json" \
-d '{
"name": "fetch_runbook",
"description": "Fetches the runbook for a given service from the internal wiki",
"type": "http",
"config": {
"url": "https://wiki.example.com/api/runbooks/{service}",
"method": "GET",
"headers": { "Authorization": "Bearer {{WIKI_TOKEN}}" }
},
"inputSchema": {
"type": "object",
"properties": {
"service": { "type": "string", "description": "Service name" }
},
"required": ["service"]
}
}'
List skills
View all registered skills for your tenant
Update skill
Modify an existing skill configuration