發件人管理
最新更新:2022-12-05
創建發件人
URL
https://email.api.engagelab.cc/v1/marketing/senders
https://email.api.engagelab.cc/v1/marketing/senders
此代碼塊在浮窗中顯示
HTTP 請求方式
POST
POST
此代碼塊在浮窗中顯示
Content-Type
application/json; charset=utf-8
application/json; charset=utf-8
此代碼塊在浮窗中顯示
請求 Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body 參數
Parameter | Type | Required | Description |
---|---|---|---|
from_name | string | true | 發信人名稱 |
string | true | 發信人地址,必須為郵箱格式,域名後綴必須為 domain_name | |
domain_name | string | true | 域名(配置通過) |
api_user | string | true | ApiUser 名稱 |
說明:
domain_name和api_user需是對應關係
請求示例
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders --data '{
"from_name": "令狐大俠",
"email": "xjmfc@126.com",
"domain_name": "126.com",
"api_user": "test_abc"
}'
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders --data '{
"from_name": "令狐大俠",
"email": "xjmfc@126.com",
"domain_name": "126.com",
"api_user": "test_abc"
}'
此代碼塊在浮窗中顯示
響應示例
Response-Success
HttpStatus: 200
{
"result": {
"sender_id": 449,
"name": "乔峰2",
"email": "zhou@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin_new",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
}
{
"result": {
"sender_id": 449,
"name": "乔峰2",
"email": "zhou@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin_new",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
}
此代碼塊在浮窗中顯示
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
{
"code": 30000,
"message": "Authentication failed"
}
此代碼塊在浮窗中顯示
刪除發件人
URL
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
此代碼塊在浮窗中顯示
HTTP 請求方式
DELETE
DELETE
此代碼塊在浮窗中顯示
Content-Type
application/x-www-form-urlencoded;charset=utf-8
application/x-www-form-urlencoded;charset=utf-8
此代碼塊在浮窗中顯示
請求 Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
請求示例
curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/857
curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/857
此代碼塊在浮窗中顯示
響應示例
Response-Success
HttpStatus: 200
{
"count":1
}
{
"count":1
}
此代碼塊在浮窗中顯示
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
{
"code": 30000,
"message": "Authentication failed"
}
此代碼塊在浮窗中顯示
更新發件人
URL
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
此代碼塊在浮窗中顯示
HTTP 請求方式
PUT
PUT
此代碼塊在浮窗中顯示
Content-Type
application/json; charset=utf-8
application/json; charset=utf-8
此代碼塊在浮窗中顯示
請求 Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body 參數
Parameter | Type | Required | Description |
---|---|---|---|
from_name | string | false | 發信人名稱 |
string | false | 發信人地址,必須為郵箱格式,域名後綴必須為 domainName | |
domain_name | string | false | 域名(配置通過) |
api_user | string | false | API_USER 名稱 |
提示:
from_name、email、domain_name、api_user值不能為空字符串、null字符 。
請求示例
curl -X PUT -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/37 --data '{
"from_name": "令狐大侠",
"email": "xjmfc@126.com",
"domain_name": "test.com",
"api_user": "test_abc"
}'
curl -X PUT -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/37 --data '{
"from_name": "令狐大侠",
"email": "xjmfc@126.com",
"domain_name": "test.com",
"api_user": "test_abc"
}'
此代碼塊在浮窗中顯示
響應示例
Response-Success
HttpStatus: 200
{
"count":1
}
{
"count":1
}
此代碼塊在浮窗中顯示
Response-Error
HttpStatus: `401
{
"code": 30000,
"message": "Authentication failed"
}
{
"code": 30000,
"message": "Authentication failed"
}
此代碼塊在浮窗中顯示
發件人詳情
URL
https://email.api.engagelab.cc/v1/marketing/senders/{sender_id}
https://email.api.engagelab.cc/v1/marketing/senders/{sender_id}
此代碼塊在浮窗中顯示
HTTP 請求方式
GET
GET
此代碼塊在浮窗中顯示
Content-Type
application/x-www-form-urlencoded;charset=utf-8
application/x-www-form-urlencoded;charset=utf-8
此代碼塊在浮窗中顯示
請求 Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
請求示例
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/1
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/1
此代碼塊在浮窗中顯示
響應示例
Response-Success
HttpStatus: 200
{
"result": {
"sender_id": 449,
"name": "乔峰2",
"email": "zhou@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin_new",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
}
{
"result": {
"sender_id": 449,
"name": "乔峰2",
"email": "zhou@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin_new",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
}
此代碼塊在浮窗中顯示
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
{
"code": 30000,
"message": "Authentication failed"
}
此代碼塊在浮窗中顯示
發件人列表
URL
https://email.api.engagelab.cc/v1/marketing/senders
https://email.api.engagelab.cc/v1/marketing/senders
此代碼塊在浮窗中顯示
HTTP 請求方式
GET
GET
此代碼塊在浮窗中顯示
Content-Type
application/x-www-form-urlencoded;charset=utf-8
application/x-www-form-urlencoded;charset=utf-8
此代碼塊在浮窗中顯示
請求 Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Query 參數
Parameter | Type | Required | Description |
---|---|---|---|
limit | integer | false | 查詢個數, 取值區間 [1-100], 默認為 10 |
offset | integer | false | 查詢起始位置, 取值區間 [0-], 默認為 0 |
請求示例
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders?offset=0&limit=10
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders?offset=0&limit=10
此代碼塊在浮窗中顯示
響應說明
Parameters | Type | Description |
---|---|---|
list | array[object] | 寄件者列表 |
sender_id | integer | 寄件人 ID |
name | string | 寄件者名稱 |
string | 寄件者地址 | |
domain_id | integer | 域名 ID |
domain_name | string | 域名名稱 |
api_user | string | APIUSER 名稱 |
create_time | string | 建立時間 |
update_time | string | 更新時間 |
total | integer | 記錄總數 |
響應示例
Response-Success
HttpStatus: 200
{
"result": [
{
"sender_id": 388,
"name": "xjmfc",
"email": "xjmfc@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
],
"total": 3,
"count": 1
}
{
"result": [
{
"sender_id": 388,
"name": "xjmfc",
"email": "xjmfc@aizl.net",
"domain_id": 147886,
"domain_name": "aizl.net",
"api_user": "xiaojinmin",
"create_time": "2022-05-24T14:04:19+0800",
"update_time": "2022-05-24T15:35:09+0800"
}
],
"total": 3,
"count": 1
}
此代碼塊在浮窗中顯示
Response-Error
{
"code": 30000,
"message": "Authentication failed"
}
{
"code": 30000,
"message": "Authentication failed"
}
此代碼塊在浮窗中顯示