短信簽名
最新更新: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 | true | 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 | true | 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
}
此代碼塊在浮窗中顯示