Newer
Older
cortex-hub / ai-hub / docs / api_reference / skills.md

API Reference: Skills

GET /skills/

Summary: List Skills

Description: List all skills accessible to the user.

Parameters

Name In Required Type Description
feature query No anyOf Filter skills by feature (e.g., 'chat', 'voice')
x-user-id header No anyOf

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'GET' \
  'http://localhost:8000/api/v1/skills/?feature=<feature>' \
  -H 'accept: application/json' \
  -H 'X-User-ID: <your_user_id>'

POST /skills/

Summary: Create Skill

Description: Create a new skill.

Parameters

Name In Required Type Description
x-user-id header No anyOf

Request Body

Required: Yes

  • Media Type: application/json
  • Schema: SkillCreate (Define in Models)

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'POST' \
  'http://localhost:8000/api/v1/skills/' \
  -H 'accept: application/json' \
  -H 'X-User-ID: <your_user_id>' \
  -H 'Content-Type: application/json' \
  -d '{}'

PUT /skills/{skill_id}

Summary: Update Skill

Description: Update an existing skill. User must be admin or the owner.

Parameters

Name In Required Type Description
skill_id path Yes integer
x-user-id header No anyOf

Request Body

Required: Yes

  • Media Type: application/json
  • Schema: SkillUpdate (Define in Models)

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'PUT' \
  'http://localhost:8000/api/v1/skills/{skill_id}' \
  -H 'accept: application/json' \
  -H 'X-User-ID: <your_user_id>' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /skills/{skill_id}

Summary: Delete Skill

Description: Delete a skill.

Parameters

Name In Required Type Description
skill_id path Yes integer
x-user-id header No anyOf

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'DELETE' \
  'http://localhost:8000/api/v1/skills/{skill_id}' \
  -H 'accept: application/json' \
  -H 'X-User-ID: <your_user_id>'