短信签名

最新更新:2023-04-10

通过以下接口可以对短信签名进行查询, 添加修改操作。

查询单个签名

返回短信签名的基本信息

URL

https://sms.api.engagelab.cc/v1/signs/{sign_id}
          https://sms.api.engagelab.cc/v1/signs/{sign_id}

        
此代码块在浮窗中显示

HTTP请求方式

GET
          GET

        
此代码块在浮窗中显示

Request-Headers

Header 类型 必须 说明
Authorization string true Basic base64(sms_user:sms_key)

请求示例

curl -X GET "https://sms.api.engagelab.cc/v1/signs/10" --header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"
          curl -X GET "https://sms.api.engagelab.cc/v1/signs/10" 
--header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"

        
此代码块在浮窗中显示

响应说明

字段 说明
sign_id 签名ID
sign_name 签名名称
create_time 创建时间
update_time 更新时间

响应示例

Response-success

HTTP Status: 200

{ "result": { "sign_id": 10, "sign_name": "shanshan", "create_time": "2021-04-10T10:44:37+0800", "update_time": "2022-06-14T19:20:35+0800" } }
          {
    "result": {
            "sign_id": 10,
            "sign_name": "shanshan",
            "create_time": "2021-04-10T10:44:37+0800",
            "update_time": "2022-06-14T19:20:35+0800"
        
    }
}

        
此代码块在浮窗中显示

Response-error

HTTP Status :400

{ "code": 34010, "message": "sign not exists" }
          {
    "code": 34010,
    "message": "sign not exists"
}

        
此代码块在浮窗中显示

查询多个签名

返回短信模板的基本信息

URL

https://sms.api.engagelab.cc/v1/signs
          https://sms.api.engagelab.cc/v1/signs

        
此代码块在浮窗中显示

HTTP请求方式

GET
          GET

        
此代码块在浮窗中显示

Request-Headers

Header 类型 必须 说明
Authorization string true Basic base64(sms_user:sms_key)

参数说明

参数 类型 必须 说明
sign_name string 签名名称,支持模糊查询

请求示例

curl -X GET "https://sms.api.engagelab.cc/v1/signs" --header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"
          curl -X GET "https://sms.api.engagelab.cc/v1/signs" 
--header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"

        
此代码块在浮窗中显示

响应说明

字段 说明
sign_id 签名ID
sign_name 签名名称
create_time 创建时间
update_time 更新时间

响应示例

Response-success

HTTP Status: 200

{ "result": [{ "sign_id": 1427, "sign_name": "shanshan", "create_time": "2015-04-10T10:44:37+0800", "update_time": "2016-06-14T19:20:35+0800" } ], "count":1, "total":1 }
          {
    "result":  [{
                "sign_id": 1427,
                "sign_name": "shanshan",
                "create_time": "2015-04-10T10:44:37+0800",
                "update_time": "2016-06-14T19:20:35+0800"
            }
        ],
    "count":1,
    "total":1
    
}

        
此代码块在浮窗中显示

Response-error

HTTP Status: 401

{ "code": 30000, "message": "Authentication failed" }
          {
  "code": 30000,
  "message": "Authentication failed"
}

        
此代码块在浮窗中显示

添加签名

返回添加成功后的短信签名基本信息

URL

https://sms.api.engagelab.cc/v1/signs
          https://sms.api.engagelab.cc/v1/signs

        
此代码块在浮窗中显示

HTTP请求方式

POST
          POST

        
此代码块在浮窗中显示

Content-type

application/json
          application/json

        
此代码块在浮窗中显示

Request-Headers

Header 类型 必须 说明
Authorization String true Basic base64(sms_user:sms_key)

参数说明

参数 类型 必须 说明
sign_name string 签名名称,签名长度是2-60个字符,不能包含符号[]、【】

说明:
1.签名创建上线限100个

请求示例

curl -X POST "https://sms.api.engagelab.cc/v1/signs" --header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>" --header "Content-Type: application/json" --data '{ "sign_name": "ccc" }'
          curl -X POST "https://sms.api.engagelab.cc/v1/signs"
--header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>" 
--header "Content-Type: application/json" 
--data '{
    "sign_name": "ccc"
}'  

        
此代码块在浮窗中显示

响应说明

字段 说明
sign_id 签名ID
sign_name 签名名称
create_time 创建时间
update_time 更新时间

响应示例

Response-success

HTTP Status: 200

{ "result": { "sign_id": 1529, "sign_name": "ccc", "create_time": "2015-04-10T10:44:37+0800", "update_time": "2016-06-14T19:20:35+0800" } }
          {
    "result": {
                "sign_id": 1529,
                "sign_name": "ccc",
                "create_time": "2015-04-10T10:44:37+0800",
                "update_time": "2016-06-14T19:20:35+0800"
    }
}

        
此代码块在浮窗中显示

Response-error

HTTP Status: 400

{ "code": 34005, "message": "Invalid sign_name" }
          {
    "code": 34005,
    "message": "Invalid sign_name"
}

        
此代码块在浮窗中显示

更新签名

返回更新成功之后的短信签名的基本信息

URL

https://sms.api.engagelab.cc/v1/signs/{sign_id}
          https://sms.api.engagelab.cc/v1/signs/{sign_id}

        
此代码块在浮窗中显示

HTTP请求方式

PUT
          PUT

        
此代码块在浮窗中显示

Content-type

application/json
          application/json

        
此代码块在浮窗中显示

Request-Headers

Header 类型 必须 说明
Authorization String Basic base64(sms_user:sms_key)

参数说明

参数 类型 必须 说明
sign_name string true 签名名称,签名长度是2-60个字符,不能包含符号[]、【】

请求示例

curl -X PUT "https://api.sendcloud.net/v1/signs/11617" --header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>" --header "Content-Type: application/json" --data '{ "sign_name": "ccc" }'
          curl -X PUT "https://api.sendcloud.net/v1/signs/11617"
--header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>" 
--header "Content-Type: application/json" 
--data '{
    "sign_name": "ccc"
}'  

        
此代码块在浮窗中显示

响应示例

Response-success

HTTP Status: 200

{ "count": 1 }
          {
    "count": 1
}

        
此代码块在浮窗中显示

Response-error

HTTP Status: 400

{ "code": 34005, "message": "Invalid sign_name" }
          {
    "code": 34005,
    "message": "Invalid sign_name"
}

        
此代码块在浮窗中显示

删除签名

返回是否删除成功的基本信息

URL

https://sms.api.engagelab.cc/v1/signs/{sign_id}
          https://sms.api.engagelab.cc/v1/signs/{sign_id} 

        
此代码块在浮窗中显示

HTTP请求方式

DELETE
          DELETE 

        
此代码块在浮窗中显示

Request-Headers

Header 类型 必须 说明
Authorization string Basic base64(sms_user:sms_key)

请求示例

curl -X DELETE "https://api.sendcloud.net/v1/signs/11617" --header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"
          curl -X DELETE "https://api.sendcloud.net/v1/signs/11617" 
--header "Authorization: Basic <<YOUR_SMS_KEY_HERE>>"

        
此代码块在浮窗中显示

响应示例

Response-success

HTTP Status: 200

{ "count": 1 }
          {
    "count": 1
}

        
此代码块在浮窗中显示
在文档中心打开
icon
联系销售