ZapSMTP / Docs / WebhooksResponse
Retrieve an event
GET/v1/webhooks/{id}/events/{event}
One event with its payload and every delivery attempt, oldest first.
Requires a full-access key.
Path parameters
idstringrequired- Webhook id.
eventstringrequired- Event id (
Zap-Event-Id).
Errors
not_foundHTTP 404- Unknown webhook, or the event is not among the last 100 attempts.
curl 'https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10' \
-H "Authorization: Bearer $ZAP_API_KEY"const res = await fetch('https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.ZAP_API_KEY}`,
},
});
// 204 No Content (e.g. a delete) has no body
const data = res.status === 204 ? null : await res.json();
if (!res.ok) throw new Error(`${data.name}: ${data.message}`);
console.log(data);import os
import requests
res = requests.get(
"https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10",
headers={"Authorization": f"Bearer {os.environ['ZAP_API_KEY']}"},
timeout=30,
)
res.raise_for_status()
print(res.json() if res.status_code != 204 else "deleted")<?php
$ch = curl_init('https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ZAP_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($status >= 400) {
throw new RuntimeException($data['message']);
}
print_r($data);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest(
"GET",
"https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10",
nil,
)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ZAP_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}require 'net/http'
require 'json'
uri = URI('https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV.fetch('ZAP_API_KEY')}"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, (JSON.parse(res.body) unless res.body.to_s.empty?)import java.net.URI;
import java.net.http.*;
public class ZapRequest {
public static void main(String[] args) throws Exception {
var request = HttpRequest.newBuilder(URI.create("https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10"))
.header("Authorization", "Bearer " + System.getenv("ZAP_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var http = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://zapsmtp.xyz/v1/webhooks/019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10/events/evt_5f0c2a9b7d1e4c3a8b6f2e10");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ZAP_API_KEY"));
var response = await http.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");Set
ZAP_API_KEY in your environment.Response 200 OK
{
"object": "webhook_event",
"id": "evt_5f0c2a9b7d1e4c3a8b6f2e10",
"type": "email.delivered",
"status": "delivered",
"attempts": 2,
"last_status_code": 200,
"first_attempt_at": "2026-10-22T10:00:00Z",
"last_attempt_at": "2026-10-22T10:05:01Z",
"payload": {
"id": "evt_5f0c2a9b7d1e4c3a8b6f2e10",
"type": "email.delivered",
"created_at": "2026-10-22T09:59:59Z",
"data": {
"email_id": "019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23",
"to": "jane@example.org"
}
},
"attempt_list": [
{
"attempt": 1,
"status_code": 503,
"error": "HTTP 503",
"duration_ms": 120,
"at": "2026-10-22T10:00:00Z"
},
{
"attempt": 2,
"status_code": 200,
"duration_ms": 85,
"at": "2026-10-22T10:05:01Z"
}
]
}