WebHooks API
Última actualización: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
Este bloque de código se muestra en una ventana flotante
HTTP Request Method
GET
GET
Este bloque de código se muestra en una ventana flotante
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:Basic 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:Basic YXBpX3VzZXI6YXBpX2tleQ=='
'https://email.api.engagelab.cc/v1/webhooks?api_user=abcd&offset=0&limit=1'
Este bloque de código se muestra en una ventana flotante
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
}
Este bloque de código se muestra en una ventana flotante
Add
URL
https://email.api.engagelab.cc/v1/webhooks
https://email.api.engagelab.cc/v1/webhooks
Este bloque de código se muestra en una ventana flotante
HTTP Request Method
POST
POST
Este bloque de código se muestra en una ventana flotante
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 | The email delivery succeeded |
3 | report_spam | User report email |
4 | invalid_email | 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 | The email request succeeded, including sent and sending emails. |
32 | sent | The email was sent successfully |
Request Example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic 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:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"url": "123456","api_user":"qq.com", "event":[1,3]}'
'https://email.api.engagelab.cc/v1/webhooks'
Este bloque de código se muestra en una ventana flotante
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
}
]
}
Este bloque de código se muestra en una ventana flotante
Modify
URL
https://email.api.engagelab.cc/v1/webhooks/{id}
https://email.api.engagelab.cc/v1/webhooks/{id}
Este bloque de código se muestra en una ventana flotante
HTTP Request Method
PUT
PUT
Este bloque de código se muestra en una ventana flotante
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:Basic 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:Basic YXBpX3VzZXI6YXBpX2tleQ=='
--data '{"url": "http://example2.com"}'
'https://email.api.engagelab.cc/v1/webhooks/1111111'
Este bloque de código se muestra en una ventana flotante
Returned Value Example:
{
"count":1
}
{
"count":1
}
Este bloque de código se muestra en una ventana flotante
delete
URL
https://email.api.engagelab.cc/webhooks/{id}
https://email.api.engagelab.cc/webhooks/{id}
Este bloque de código se muestra en una ventana flotante
HTTP Request Method
DELETE
DELETE
Este bloque de código se muestra en una ventana flotante
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:Basic YXBpX3VzZXI6YXBpX2tleQ=='
'https://email.api.engagelab.cc/v1/webhooks/1111111'
curl -X DELETE -H 'Content-Type: application/json; charset=utf-8'
-H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ=='
'https://email.api.engagelab.cc/v1/webhooks/1111111'
Este bloque de código se muestra en una ventana flotante
Returned Value Example
{
"count":1
}
{
"count":1
}
Este bloque de código se muestra en una ventana flotante