Sender

Last updated:2022-12-28

Create

URL

https://email.api.engagelab.cc/v1/marketing/senders
          https://email.api.engagelab.cc/v1/marketing/senders

        
This code block in the floating window

HTTP request method

POST
          POST

        
This code block in the floating window

Content-Type

application/json; charset=utf-8
          application/json; charset=utf-8

        
This code block in the floating window

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
email 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:

  1. 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" }'
          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"
}'

        
This code block in the floating window

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" } }
          {
     "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"
    }
}

        
This code block in the floating window

Response-Error

HttpStatus: 401

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

        
This code block in the floating window

Delete

URL

https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
          https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}

        
This code block in the floating window

HTTP request method

DELETE
          DELETE

        
This code block in the floating window

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          application/x-www-form-urlencoded;charset=utf-8

        
This code block in the floating window

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
          curl -X DELETE -H 'Authorization:Basic  YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/857

        
This code block in the floating window

Response example

Response-Success

HttpStatus: 200

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

        
This code block in the floating window

Response-Error

HttpStatus: 401

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

        
This code block in the floating window

Update

URL

https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}
          https://email.api.engagelab.cc/v1//marketing/senders/{sender_id}

        
This code block in the floating window

HTTP request method

PUT
          PUT

        
This code block in the floating window

Content-Type

application/json; charset=utf-8
          application/json; charset=utf-8

        
This code block in the floating window

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
email 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:

  1. 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" }'
          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"
}'

        
This code block in the floating window

Response example

Response-Success

HttpStatus: 200

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

        
This code block in the floating window

Response-Error

HttpStatus: `401

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

        
This code block in the floating window

Sender detail

URL

https://email.api.engagelab.cc/v1/marketing/senders/{sender_id}
          https://email.api.engagelab.cc/v1/marketing/senders/{sender_id}

        
This code block in the floating window

HTTP request method

GET
          GET

        
This code block in the floating window

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          application/x-www-form-urlencoded;charset=utf-8

        
This code block in the floating window

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
          curl -X GET -H 'Authorization:Basic  YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders/1

        
This code block in the floating window

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" } }
          {
    "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"
    }
}

        
This code block in the floating window

Response-Error

HttpStatus: 401

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

        
This code block in the floating window

Sender list

URL

https://email.api.engagelab.cc/v1/marketing/senders
          https://email.api.engagelab.cc/v1/marketing/senders

        
This code block in the floating window

HTTP request method

GET
           GET

        
This code block in the floating window

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          application/x-www-form-urlencoded;charset=utf-8

        
This code block in the floating window

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
          curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/senders?offset=0&limit=10

        
This code block in the floating window

Response-Parameters

Parameters Type Description
list array[object] List of senders
sender_id integer Sender ID
name string Sender name
email 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 }
          {
    "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
}

        
This code block in the floating window

Response-Error

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

        
This code block in the floating window
在文档中心打开