The Email webhook.
Request Method
- GET/POST
Webhook payload object common properties
Key | Type | Description |
---|---|---|
emailId | String | unique identifier for this email |
recipient | String | recipients |
stat | String | invalid subclass |
result | String | result of email (deliver or failed) |
eventTime | String | time of the email status, format is yyyy-MM-dd'T'HH:mm:ss |
Get Test Examples
curl --request GET \
--url 'https://YOUR-WEBHOOK-URL?emailId=202411051127422805702393216-inbound0$demo@yoni-tech.com&[email protected]&stat=0&result=deliver&eventTime=2024-11-05T11:28:43' \
--header 'accept: application/json'
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://YOUR-WEBHOOK-URL?emailId=202411051127422805702393216-inbound0$demo@yoni-tech.com&[email protected]&stat=0&result=deliver&eventTime=2024-11-05T11:28:43")
.get()
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
Post Test Examples
curl --location 'https://YOUR-WEBHOOK-URL' \
--header 'Content-Type: application/json' \
--data '{
"emailId": "[email protected]",
"recipient": "[email protected]",
"stat": "0",
"result": "deliver",
"eventTime": "2024-11-05T11:28:43"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n" +
" \"emailId\": \"[email protected]\",\n" +
" \"recipient\": \"[email protected]\",\n" +
" \"stat\": \"0\",\n" +
" \"result\": \"deliver\",\n" +
" \"eventTime\": \"2024-11-05T11:28:43\"\n" +
"}");
Request request = new Request.Builder()
.url("https://YOUR-WEBHOOK-URL")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();