WebHooks API

最新の更新:2023-08-10

Webhook is a mechanism for EngageLab to asynchronously push the data of customers' attention to certain events to the customer's callback URL

You can use API to query, add, update and delete callback URL

Query

URL

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

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

HTTP Request Method

GET
          GET

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

Header

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

Query Parameter Description

parameter type required or not description
api_user string no Associated API_ USER
offset int no start position, [0-], defaults to 0
limit int no amount, [0-100],defaults to 100

Request Example:

curl -X GET -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 'https://email.api.engagelab.cc/v1/webhooks?api_user=abcd&offset=0&limit=1'
          curl -X GET -H 'Content-Type: application/json; charset=utf-8' 
     -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 
     'https://email.api.engagelab.cc/v1/webhooks?api_user=abcd&offset=0&limit=1' 

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

Returned Value Example:

{ "result": [ { "url": "http://qxxx.com", "event": [1,3], "api_user": "my_test", "id":168 } ], "count":1, "total":2 }
          {
    "result": [
              {
                "url": "http://qxxx.com",
                "event": [1,3],
                "api_user": "my_test",
                "id":168
            }
        ], 
        "count":1,
        "total":2
}

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

Add

URL

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

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

HTTP Request Method

POST
          POST

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

Header

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

Body Parameter Description

parameter type required or not description
url string yes Set this property to the URL where you want the Event Webhook to send event data.
api_user string no requiredAssociated API_ USER, defaults to all api_users
event array no Event types. eg:[1,3]. defaults to all events.

Parameter description of general events

parameter event Trigger condition
1 deliver Email sent successfully
3 report_spam User report email
4 invalid The message was not sent successfully
5 soft_bounce The recipient rejects the message
10 click User clicks link
11 open User open mail
12 unsubscribe User unsubscribe email
18 request Mail request succeeded

Request Example:

curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' --data '{"url": "123456","api_user":"qq.com", "event":[1,3]}' 'https://email.api.engagelab.cc/v1/webhooks'
          curl -X POST -H 'Content-Type: application/json; charset=utf-8' 
     -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 
     --data '{"url": "123456","api_user":"qq.com", "event":[1,3]}'
     'https://email.api.engagelab.cc/v1/webhooks' 

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

Returned Value Example:

{ "result": [ { "url": "http://qxxx.com", "event": [1,3], "api_user": "my_test", "id":167 } ] }
          {
    "result": [
              {
                "url": "http://qxxx.com",
                "event": [1,3],
                "api_user": "my_test",
                "id":167
            }
        ]
}

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

Modify

URL

https://email.api.engagelab.cc/v1/webhooks/{id}
          https://email.api.engagelab.cc/v1/webhooks/{id}

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

HTTP Request Method

PUT
          PUT

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

Header

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

Body Parameter Description

parameter type required or not description
url string no Callback URL,if no parameters are provided, ignore the modification.
api_user string no Associated API_ USER, if no parameters are provided, ignore the modification.
event array no Event types. eg:[1,3]. if no parameters are provided, ignore the modification.

Request Example:

curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' --data '{"url": "http://example2.com"}' 'https://email.api.engagelab.cc/v1/webhooks/1111111'
          curl -X POST -H 'Content-Type: application/json; charset=utf-8' 
     -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 
     --data '{"url": "http://example2.com"}'
     'https://email.api.engagelab.cc/v1/webhooks/1111111' 

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

Returned Value Example:

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

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

delete

URL

https://email.api.engagelab.cc/webhooks/{id}
          https://email.api.engagelab.cc/webhooks/{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 -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 'https://email.api.engagelab.cc/v1/webhooks/1111111'
          curl -X DELETE -H 'Content-Type: application/json; charset=utf-8' 
     -H 'Authorization: YXBpX3VzZXI6YXBpX2tleQ==' 
     'https://email.api.engagelab.cc/v1/webhooks/1111111' 

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

Returned Value Example

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

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