
# 单个创建技能队列（createSkill）
#### 场景描述
单个创建技能队列
#### 接口方法
POST
#### 接口URI
https://域名/apiaccess/rest/cc-management/v1/skill/createSkill，例如域名是service.besclouds.com
#### 请求说明
表1请求头参数 
| 序号 | 名称            | 参数类型   | 是否必选  | 说明                                                         |
|:---|:---|:---|:---|:---|
| 1  | X-APP-KEY     | string | False | appKey字段，用户标识，请联系运营人员获取appKey                              |
| 2  | Authorization | string | True  | 鉴权信息，值为Bearer + tokenByAKSK接口的返回值中的AccessToken（Bearer后有空格） |
   
表2请求体参数 
| 序号      | 名称                 | 参数类型   | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|:---|:---|
| 1.1     | mediaTypeId        | number | True  | 媒体类型。5：音视频；53：多媒体；2：语音点击通话；18：视频点击通话                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 1.2     | description        | string | True  | 技能简称或描述，不超过50个字符（允许的字符包括中文、字母、数字）                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 1.3     | name               | string | True  | 技能队列的名称，不超过100个字节。 不允许的特殊字符： ``` [ `~!#$%^&*()+=|{}':;'，<>/?~！#￥%……&*（）+|{}【】‘；：”“’。，、？]|\n|\r|\t ```                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.4     | maxWaitTime        | number | True  | 最大排队等待时间，单位秒，最大值60000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.5     | maxWaitNum         | number | True  | 最大排队等待人数，最大值10000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 1.6     | maxAgentWrapupTime | number | True  | 整理态时长，单位秒，最大值3600                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 1.7     | skillParam         | object | True  | 技能队列参数信息，媒体类型为53或2或18时，只有noAgents、busy和timeOut三项配置，媒体类型为53时deviceType的值只能为1；媒体类型为5或19时noAgents、busy、timeOut、answerFunction和waitVoice配置必填                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 1.7.1   | noAgents           | object | True  | 无人上班配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 1.7.1.1 | deviceType         | string | False | 设备类型。 3：IVR 1：技能队列                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 1.7.1.2 | transferType       | string | True  | 处理策略。 Release：释放，此时同级其他参数不填 Transfer：转接，此时同级其他参数必填                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 1.7.1.3 | value              | number | False | 技能队列时取skillId，IVR时取IVR流程编号id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.7.2   | busy               | object | True  | 排队遇忙、溢出配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 1.7.2.1 | deviceType         | string | False | 设备类型。 3：IVR 1：技能队列                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 1.7.2.2 | transferType       | string | True  | 处理策略。 Release：释放，此时同级其他参数不填 Transfer：转接，此时同级其他参数必填                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.7.2.3 | value              | number | False | 技能队列时取skillId，IVR时取IVR流程编号id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.7.3   | answerFunction     | string | False | 业务代表应答方式配置，0报工号2不报语音                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 1.7.4   | timeOut            | object | True  | 排队超时配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 1.7.4.1 | deviceType         | string | False | 设备类型。 3：IVR 1：技能队列                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 1.7.4.2 | transferType       | string | True  | 处理策略。 Release：释放，此时同级其他参数不填 Transfer：转接，此时同级其他参数必填                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 1.7.4.3 | value              | number | False | 技能队列时取skillId，IVR时取IVR流程编号id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 1.7.5   | waitVoice          | object | False | 排队等待配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 1.7.5.1 | parameterType      | string | True  | 参数类型。 取值范围： - Voice：表示默认等待音，此时同级其他参数不填  - IVR：IVR，此时同级其他参数必填   |
| 1.7.5.2 | id                 | string | False | IVR时取IVR流程编号id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   
#### 响应说明
- 响应状态码: 200
  表3响应体参数 
  | 序号  | 名称          | 参数类型   | 是否必选  | 说明              |
  |:---|:---|:---|:---|:---|
  | 1.1 | returnCode  | string | True  | 操作结果。0：成功，非0为失败 |
  | 1.2 | description | string | False | 提示信息            |
  | 1.3 | skillId     | string | False | 技能ID            |
     
  
- 响应状态码: 401 鉴权失败
  
- 响应状态码: 404 请求资源不存在
  
- 响应状态码: 500 服务器内部异常
  
 
#### 错误码
无。
#### 报文样例
请求头:
```
Content-Type:application/json
X-APP-KEY:XXXXXXXXXXXXXXXXXXXXXXX
Authorization:Bearer XXXXXXXXXXXXXXXXXXXXXXX
```
请求参数:
```
{
    "mediaTypeId": 5,
    "description": "ccfdc",
    "name": "dddpodfst",
    "maxWaitTime": 30,
    "maxWaitNum": 100,
    "maxAgentWrapupTime": 5,
    "skillParam": {
                "noAgents": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 2
                },
                "busy": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 1
                },
                "answerFunction": "0",
                "timeOut": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 1
                },
                "waitVoice": {
                    "parameterType": "Voice"
                }
            }
}
```
响应参数:
```
{
    "returnCode": "0",
    "skillId": "5",
    "description": "Create Skill successfully"
}
```
