Skip to main content
POST
/
api
/
v1
/
tenants
/
{tenantId}
/
skills
Create skill
curl --request POST \
  --url https://api.example.com/api/v1/tenants/{tenantId}/skills \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "type": "<string>",
  "config": {},
  "inputSchema": {},
  "enabled": true
}
'

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

Request headers

Authorization
string
required
JWT Bearer token. Format: Bearer <your-jwt>.

Path parameters

tenantId
string
required
Your tenant identifier. Example: ten_EXAMPLE_ABC123.

Request body

name
string
required
Unique skill name within your tenant. Use snake_case. Example: fetch_runbook.
description
string
required
A clear description of what this skill does. The AI uses this description to decide when to invoke the skill. Maximum 500 characters.
type
string
required
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).
config
object
required
Configuration specific to the skill type. For http: { "url": "...", "method": "POST", "headers": {} }. For integration: { "action": "..." }.
inputSchema
object
JSON Schema defining the parameters the skill accepts. Used by the AI to construct valid inputs.
enabled
boolean
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

StatusError codeDescription
400validation_errorRequired fields missing or schema invalid
401unauthorizedMissing or invalid JWT
403forbiddenCaller lacks admin role
409skill_name_conflictA 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