发件人管理

最新更新: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 发信人名称
email string true 发信人地址,必须为邮箱格式,域名后缀必须为 domain_name
domain_name string true 域名(配置通过)
api_user string true ApiUser 名称

说明:

  1. 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 发信人名称
email string false 发信人地址,必须为邮箱格式,域名后缀必须为 domainName
domain_name string false 域名(配置通过)
api_user string false API_USER 名称

提示:

  1. 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 发送者名称
email 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"
}

        
此代码块在浮窗中显示
在文档中心打开
icon
Contact Sales