Sender
Create
URL
https://email.api.engagelab.cc/v1/marketing/senders
HTTP request method
POST
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
from_name | string | true | Sender's name |
string | true | Sender's email address. Must be in email format and have a domain name with the suffix domain_name. | |
domain_name | string | true | Domain name (By configured) |
api_user | string | true | ApiUser name |
Note:
- The domain_name and api_user must correspond to each other.
Request-Example
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": "Linghu",
"email": "xjmfc@126.com",
"domain_name": "126.com",
"api_user": "test_abc"
}'
Response example
Response-Success
HttpStatus: 200
{
"result": {
"sender_id": 449,
"name": "Qiaofeng2",
"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"
}
Delete
URL
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
HTTP request method
DELETE
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Request-Example
curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/857
Response example
Response-Success
HttpStatus: 200
{
"count":1
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Update
URL
https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
HTTP request method
PUT
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
from_name | string | false | Sender's name |
string | false | Sender's address, must be in email format with domainName as the domain suffix | |
domain_name | string | false | Domain (By configured) |
api_user | string | false | API_USER name |
Note:
- The values of from_name, email, domain_name, and api_user cannot be empty strings or null characters.
Request-Example
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": "Linghu",
"email": "xjmfc@126.com",
"domain_name": "test.com",
"api_user": "test_abc"
}'
Response example
Response-Success
HttpStatus: 200
{
"count":1
}
Response-Error
HttpStatus: `401
{
"code": 30000,
"message": "Authentication failed"
}
Sender detail
URL
https://email.api.engagelab.cc/v1/marketing/senders/{sender_id}
HTTP request method
GET
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Request-Example
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/1
Response example
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"
}
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Sender list
URL
https://email.api.engagelab.cc/v1/marketing/senders
HTTP request method
GET
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Query-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
limit | integer | false | Number of records to retrieve, range: [1-100], default: 10 |
offset | integer | false | Starting position for querying, range: [0-], default: 0 |
Request-Example
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders?offset=0&limit=10
Response-Parameters
Parameters | Type | Description |
---|---|---|
list | array[object] | List of senders |
sender_id | integer | Sender ID |
name | string | Sender name |
string | Sender email address | |
domain_id | integer | Domain ID |
domain_name | string | Domain name |
api_user | string | APIUSER name |
create_time | string | Creation time |
update_time | string | Update time |
total | integer | Total number of records |
Response example
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
}
Response-Error
{
"code": 30000,
"message": "Authentication failed"
}