API_USER

อัพเดทล่าสุด :2023-03-14

API_USER is the verification account used to send emails in EngageLab.

You can search or add API_USER with API.

Query (Batch)

Learn basic information of API_USER through this interface

URL

https://email.api.engagelab.cc/v1/api_users
          https://email.api.engagelab.cc/v1/api_users

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP Request Method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request Headers

Header Type Required Description
Authorization String true Basic base64(apiUser:apiKey)

Query Parameter Description

Parameter Type Required or not Description
email_type int no email type: 0 (tigger), 1 (batch)
api_user_type int no api_user type: 0 (test), 1 (general)
domain_name string no bound domain name

Request Example

curl "https://email.api.engagelab.cc/v1/api_users" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl "https://email.api.engagelab.cc/v1/api_users" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Returned Value Description

Field Description
api_user API_USER
api_user_type api_user type: 0 (test), 1 (general)
email_type API_USER email type
domain_name API_USER bound domain
click_tracking whether to enable click-tracking: false (disable), true (enable)
open_tracking whether to enable open-tracking: false (disable), true (enable)
unsubscribe_tracking whether to enable unsubscribe-tracking: false (disable), true (enable)

Returned Value Example

Response-success

HTTP Status: 200

{ "result": [ { "api_user": "xjmfcbatch", "api_user_type": 1, "email_type": 1, "domain_name": "sc.datavalidation.cn", "click_tracking": false, "open_tracking": false, "unsubscribe_tracking": false } ], "count": 85 }
          {
    "result": [
            {
                "api_user": "xjmfcbatch",
                "api_user_type": 1,
                "email_type": 1,
                "domain_name": "sc.datavalidation.cn",
                "click_tracking": false,
                "open_tracking": false,
                "unsubscribe_tracking": false
            }
         
        ],
        "count": 85
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Response-error

HTTP Status :401

{ "code": 30000, "message": "Unauthorized." }
          {
    "code": 30000,
    "message": "Unauthorized."
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Add

Add API_USER with the interface

URL

https://email.api.engagelab.cc/v1/api_users
          https://email.api.engagelab.cc/v1/api_users

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type:

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP Request Method

POST
          POST

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request Header

Header Type Required Description
Authorization String true Basic base64(api_user:api_key)

Body Parameter Description

Parameter Type Required or not Description
api_user string yes API_USER name
email_type int yes email type: 0 (tigger), 1 (batch)
domain_name string yes API_USER bound domain name
track_domain_name string no API_USER bound track name
open_tracking boolean no whether to enable open-tracking: false (disable), true (enable); disableby default
click_tracking boolean no whether to enable click-tracking: false (disable), true (enable); disableby default
unsubscribe_tracking boolean no whether to enable unsubscribe-tracking: false(disable), true (enable); enabled by default

Tips:

1. Unsubscribe tracking, the system will be forced to open for free users
          1. Unsubscribe tracking, the system will be forced to open for free users

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request Example

curl -X POST "https://email.api.engagelab.cc/v1/api_users" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" --header "Content-Type: application/json" --data '{ "api_user":"batch_edm", "email_type":1, "domain_name":"aizl.net" }'
          curl -X POST "https://email.api.engagelab.cc/v1/api_users" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>" 
--header "Content-Type: application/json" 
--data '{
  "api_user":"batch_edm",
  "email_type":1,
  "domain_name":"aizl.net"
}'

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Returned Value Description

Field Description
api_user API_USER name
api_user_type API_USER type
email_type API_USER email type
domain_name API_USER bound domain
click_tracking whether to enable click-tracking
open_tracking whether to enable open-tracking
unsubscribe_tracking whether to enable unsubscribe-tracking

Returned Value Example

Response-success

HTTP Status: 200

{ "result": [ { "api_user": "xjmfcbatch", "api_user_type": 1, "email_type": 1, "domain_name": "sc.datavalidation.cn", "click_tracking": false, "open_tracking": false, "unsubscribe_tracking": true } ], "count": 89 }
          {
    "result": [
        {
            "api_user": "xjmfcbatch",
            "api_user_type": 1,
            "email_type": 1,
            "domain_name": "sc.datavalidation.cn",
            "click_tracking": false,
            "open_tracking": false,
            "unsubscribe_tracking": true
        }
    ],
    "count": 89
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Response-error

HTTP Status :400

{ "code": 31110, "message": "api_user cannot be empty." }
          {
    "code": 31110,
    "message": "api_user cannot be  empty."
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย
在文档中心打开