List webhooks
/api/v1/webhooksRequest
/api/v1/webhookscurl -X GET 'https://app.mailyte.com/api/v1/webhooks' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/webhooks', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/webhooks",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/webhooks');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/webhooks")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataarray<object>objectstringwebhookidstringUnique identifier for the webhook.
namestringYour name for the webhook.
urlstringWhere we send events. It must be a public HTTPS address.
statusstringactive | inactiveAn
inactivewebhook is skipped by the dispatcher. It is not deleted and keeps its delivery history and its secret.eventsarray<string>The events this webhook receives. A name not on this list is refused with a 422.
quota.warningis an older name forstorage.quota.warningand still works, but do not use it for new webhooks.contact.checked,checks.running_lowandchecks.ran_outare about your account, not one email, so filters never hold them back; they are sent only while Bounce protection is on.targetingobjectWhich events reach this webhook. A field that is null does not narrow anything.
domainstringOnly events for this domain, exact match (
acme.comdoes not matchnotacme.com). Null means every domain. Always set on anemail.inboundwebhook in an account with more than one domain.sender_includesarray<string>Any-of substring match on the sender. null = not narrowed.
subject_containsarray<string>Any-of substring match on the subject. null = not narrowed.
body_containsarray<string>Any-of substring match on the body. null = not narrowed.
deliveriesobjectThe delivery history, grouped so the numbers cannot disagree.
succeededintegerLifetime tally of accepted deliveries.
failedintegerLifetime tally of failed deliveries.
consecutive_failuresintegerResets to zero on any success. This is what drives auto-disable, so it answers a different question from
failed.success_ratenumberThe percentage of deliveries that succeeded, 0 to 100. Null when no delivery has been tried yet; show it as "no deliveries yet", not as 0.
last_delivered_atstringWhen a delivery to this webhook last succeeded, in ISO 8601 UTC. Null when none has succeeded yet; check
deliveriesto see whether any were tried.created_atstringISO 8601 UTC.
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.