更新签名配置
更新已存在的签名配置,支持修改签名名称。更新后签名状态会变回"待审核"。
调用地址
PUT https://smsapi.engagelab.com/v1/sign-configs/:signId
调用验证
请参考 调用验证 了解如何进行 API 鉴权。
请求示例
请求头
PUT /v1/sign-configs/987654321 HTTP/1.1
Content-Type: application/json
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
PUT /v1/sign-configs/987654321 HTTP/1.1
Content-Type: application/json
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
此代码块在浮窗中显示
请求体
{
"sign_name": "公司名称"
}
{
"sign_name": "公司名称"
}
此代码块在浮窗中显示
请求参数
路径参数
| 参数 | 类型 | 选项 | 说明 |
|---|---|---|---|
| signId | String | 必填 | 签名 ID |
请求体参数
| 参数 | 类型 | 选项 | 说明 |
|---|---|---|---|
| sign_name | String | 必填 | 签名名称,长度 2-60 个字符,不能包含:【、】、[、] |
返回参数
成功返回
http 状态码为 200,响应体包含字段如下:
| 字段 | 类型 | 描述 |
|---|---|---|
| code | Integer | 状态码,0 表示成功 |
| message | String | 状态描述 |
成功示例
{
"code": 0,
"message": "success"
}
{
"code": 0,
"message": "success"
}
此代码块在浮窗中显示
失败返回
http 状态码为 4xx/5xx,响应体包含字段如下:
| 字段 | 类型 | 描述 |
|---|---|---|
| code | Integer | 错误码 |
| message | String | 错误详情 |
异常示例
{
"code": 400,
"message": "can not update pending status sign"
}
{
"code": 400,
"message": "can not update pending status sign"
}
此代码块在浮窗中显示
错误码
| 错误码 | http code | 说明 |
|---|---|---|
| 400 | 400 | 参数错误或业务逻辑错误 |
| 500 | 500 | 服务器内部错误 |
常见错误信息:
invalid signId:签名 ID 格式错误sign config not exist:签名配置不存在sign_name already exist:签名名称已存在can not update pending status sign:待审核状态的签名不能更新there are pending or running plans using current sign, can not update:存在使用该签名的待发送或运行中的计划,不能更新
注意事项
- 待审核状态的签名不能更新
- 如果存在待发送或运行中的消息计划使用该签名,则不能更新
- 更新后签名状态会变回"待审核"(status=1)
- 签名名称不能包含禁用字符:
【、】、[、] - 签名的 ID 是字符串类型的数字
附录
签名配置状态 (status)
| 值 | 说明 |
|---|---|
| 1 | 待审核 |
| 2 | 审核通过 |
| 3 | 审核拒绝 |










