Route

最新の更新:2025-03-27

You can use the API to query, add, modify, and delete receiving routes. The route you configured needs to be recorded through MX configuration first. We can forward reply message to the mailbox you specify or push the message to the specified URL.

Query( batch)

URL

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

        
このコードブロックは、フローティングウィンドウに表示されます

HTTP Request Method

GET
          GET

        
このコードブロックは、フローティングウィンドウに表示されます

Header

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

Parameter Description

parameter type required or not description
offset int no offset position, [0-], defaults to 0
limit int no amount, [0-100],defaults to 100

Request Example

curl "https://email.api.engagelab.cc/v1/routes?offset=0&limit=200" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl "https://email.api.engagelab.cc/v1/routes?offset=0&limit=200" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
このコードブロックは、フローティングウィンドウに表示されます

Returned Value Description

parameter description
route_id route ID
expression receiving route
action URL/Email
api_user_route When the action is set to "Email" this parameter is required.

Returned Value Example:

Response-success HTTP Status: 200

{ "result": [ { "route_id": 1, "expression":"xjmfc", "action":"test@engagelab.com" "create_time": "2022-11-14T14:27:48+0800", "update_time": "2022-11-14T14:27:48+0800", "api_user_route":"test" } ], "total": 1, "count": 1 }
          {
       "result": [
            {    
                "route_id": 1,
                "expression":"xjmfc",
                "action":"test@engagelab.com"
                "create_time": "2022-11-14T14:27:48+0800",
                "update_time": "2022-11-14T14:27:48+0800""api_user_route":"test"
            }
        ],
        "total": 1,
        "count": 1
 }

        
このコードブロックは、フローティングウィンドウに表示されます

Query

URL

https://email.api.engagelab.cc/v1/routes/{route_id}
          https://email.api.engagelab.cc/v1/routes/{route_id}

        
このコードブロックは、フローティングウィンドウに表示されます

HTTP Request Method

GET
          GET

        
このコードブロックは、フローティングウィンドウに表示されます

Header

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

Request Example

curl -X GET "https://email.api.engagelab.cc/v1/routes/112" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" --header "Content-Type: application/json"
          curl -X GET "https://email.api.engagelab.cc/v1/routes/112" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>" 
--header "Content-Type: application/json" 

        
このコードブロックは、フローティングウィンドウに表示されます

Returned Value Description

parameter description
route_id route ID
expression receiving route
action URL/Email
api_user_route When the action is set to "Email" this parameter is required.

Returned Value Example:

Response-success

HTTP Status: 200

{ "result": { "route_id": 1, "expression":"xjmfc", "action":"test@engagelab.com", "api_user_route": "sctest", "create_time": "2022-11-14T14:27:48+0800", "update_time": "2022-11-14T14:27:48+0800" } }
          {
       "result": {    
                "route_id": 1,
                "expression":"xjmfc",
                "action":"test@engagelab.com",
                "api_user_route": "sctest",
                "create_time": "2022-11-14T14:27:48+0800",
                "update_time": "2022-11-14T14:27:48+0800"
          }
 }

        
このコードブロックは、フローティングウィンドウに表示されます

Add

A user can add up to 1000 receiving routes.

URL

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

        
このコードブロックは、フローティングウィンドウに表示されます

HTTP Request Method

POST
          POST

        
このコードブロックは、フローティングウィンドウに表示されます

Header

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

Parameter Description

parameter type required or not description
expression string yes receiving route. Format is 'regular expression@domain'; it can also be a specific email address. The domain/email domain must be a verified or usable sending domain.
action string yes URL/Email
api_user_route string * When the action is set to "Email" this parameter is required. When forwarding to an email, this API-USER will be used for forwarding and sending.

Request Example

curl -X POST "https://email.api.engagelab.cc/v1/routes" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" --header "Content-Type: application/json" --data '{ "expression":"hongkong@aizl.net", "action":"test@engagelab.com" }'
          curl -X POST "https://email.api.engagelab.cc/v1/routes" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>" 
--header "Content-Type: application/json" 
--data '{
  "expression":"hongkong@aizl.net",
  "action":"test@engagelab.com"
}'

        
このコードブロックは、フローティングウィンドウに表示されます

Returned Value Description

parameter description
route_id route ID
expression receiving route
action URL /Email
api_user_route When the action is set to "Email" this parameter is required.

Returned Value Example:

{ "result": { "route_id": 598802, "expression":".*@123.com", "action":"test@engagelab.com" "api_user_route":"test233" "create_time": "2022-11-14T14:27:34+0800", "update_time": "2022-11-14T14:27:34+0800" } }
          {
   "result": {
            "route_id": 598802,
            "expression":".*@123.com",
            "action":"test@engagelab.com"
            "api_user_route":"test233"
            "create_time": "2022-11-14T14:27:34+0800",
            "update_time": "2022-11-14T14:27:34+0800"
    }
}

        
このコードブロックは、フローティングウィンドウに表示されます

Modify

URL

https://email.api.engagelab.cc/v1/routes/{route_id}
          https://email.api.engagelab.cc/v1/routes/{route_id}

        
このコードブロックは、フローティングウィンドウに表示されます

HTTP Request Method

PUT
          PUT

        
このコードブロックは、フローティングウィンドウに表示されます

Header

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

Parameter Description

parameter type required or not description
expression string * receiving route
action string * URL/ Email
api_user_route string * When the action is set to "Email" this parameter is required.

Request Example

curl -X PUT "https://email.api.engagelab.cc/v1/routes/12333" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" --header "Content-Type: application/json" --data '{ "expression":"travel", "action":"test@engagelab.com" }'
          curl -X PUT "https://email.api.engagelab.cc/v1/routes/12333" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>" 
--header "Content-Type: application/json" 
--data '{
  "expression":"travel",
  "action":"test@engagelab.com"
}'

        
このコードブロックは、フローティングウィンドウに表示されます

Returned Value Description

parameter description
count count of modified receiving route

Returned Value Example:

Response-success

HTTP Status: 200

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

        
このコードブロックは、フローティングウィンドウに表示されます

Response-error

HTTP Status :401

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

        
このコードブロックは、フローティングウィンドウに表示されます

Delete

URL

https://email.api.engagelab.cc/v1/routes/{route_id}
          https://email.api.engagelab.cc/v1/routes/{route_id}

        
このコードブロックは、フローティングウィンドウに表示されます

HTTP Request Method

DELETE
          DELETE

        
このコードブロックは、フローティングウィンドウに表示されます

Header

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

Request Example

curl -X DELETE "https://email.api.engagelab.cc/v1/routes/21122" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl -X DELETE "https://email.api.engagelab.cc/v1/routes/21122" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
このコードブロックは、フローティングウィンドウに表示されます

Returned Value Description

parameter description
count count of deleted receiving route

Returned Value Example:

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

        
このコードブロックは、フローティングウィンドウに表示されます
在文档中心打开
icon
営業に連絡する