logo
Development
Search
Create Skill

Create Skill

Supports creating an organization-level Skill under a specified organization or a private Skill for a specified Agent.

You can use this endpoint to create an organization-level Skill under a specified organization, or create a private Skill for a specified Agent.

Request Method

POST

Request URL

https://api.${endpoint}/v1/org/skill/create

Request Authentication

Uses account-level DevKey / DevSecret Basic authentication, and requires the calling account to have organization Skill creation permission.

Request

Request Example

curl -X POST 'https://api.${endpoint}/v1/org/skill/create' \ -H 'Authorization: Basic ${BASIC_TOKEN}' \ -H 'Content-Type: application/json' \ -d '{ "org_id": "p-xxxx", "name": "refund-policy", "display_name": "退款政策", "description": { "en_US": "Handling customer refund requests", "zh_CN": "处理客户退款请求" }, "owner_agent_id": "bot-xxxx" }'
                      
                      curl -X POST 'https://api.${endpoint}/v1/org/skill/create' \
  -H 'Authorization: Basic ${BASIC_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "org_id": "p-xxxx",
    "name": "refund-policy",
    "display_name": "退款政策",
    "description": {
      "en_US": "Handling customer refund requests",
      "zh_CN": "处理客户退款请求"
    },
    "owner_agent_id": "bot-xxxx"
  }'

                    
This code block in the floating window

Request Headers

Field Type Description
Authorization Basic ${BASIC_TOKEN} The Basic Token obtained by Base64-encoding DevKey:DevSecret.
Content-Type application/json Request body format.

Request Parameters (Body Parameters)

Parameter Type Description required
org_id String Organization ID. true
name String Skill name, up to 50 characters. true
display_name String Skill display name, up to 50 characters. false
description Object Skill multilingual description, must include en_US. true
owner_agent_id String The Agent ID that owns the private Skill. When not provided, an organization-level Skill is created. false

Response

Response Example

{ "code": 0, "message": "OK", "data": { "skill_id": "skill-xxxx", "name": "refund-policy", "owner_type": "ORGANIZATION" } }
                      
                      {
  "code": 0,
  "message": "OK",
  "data": {
    "skill_id": "skill-xxxx",
    "name": "refund-policy",
    "owner_type": "ORGANIZATION"
  }
}

                    
This code block in the floating window

Success Response

Field Type Description
skill_id String The newly created Skill ID.
name String Skill name.
owner_type String Skill ownership type.

Failure Response

Field Type Description
code Integer Error code.
message String Error details.

Status Codes

Status Code Description
200 Success
400 Parameter error
401 Unauthorized
403 Insufficient permissions
429 Too many requests
500 Server error