ZapSMTP / Docs / Click actionsResponse
List actions
GET/v1/actions
List every action of the account: the ones you declared, the ones links named in the last 30 days, and the ones templates and webhook filters use. Sorted by name.
Requires a full-access key.
declared is false for an action that links use but nobody described; created_at and updated_at are then null.
clicks_7d, clicks_30d and unique_clickers_30d (distinct email and recipient pairs) count the last 7 and 30 days; last_click_at is null without a click in 30 days. templates counts the templates whose draft or published HTML names the action; webhooks lists the ids of the endpoints filtered on it.
Errors
restricted_api_keyHTTP 403
curl 'https://zapsmtp.xyz/v1/actions' \
-H "Authorization: Bearer $ZAP_API_KEY"const res = await fetch('https://zapsmtp.xyz/v1/actions', {
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/actions",
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/actions');
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/actions",
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/actions')
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/actions"))
.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/actions");
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": "list",
"has_more": false,
"data": [
{
"object": "action",
"name": "confirm_order",
"description": "Customer confirms the order from the receipt",
"declared": true,
"created_at": "2026-10-24T09:12:00Z",
"updated_at": "2026-10-24T09:12:00Z",
"clicks_7d": 42,
"clicks_30d": 180,
"unique_clickers_30d": 171,
"last_click_at": "2026-10-27T08:41:05Z",
"templates": 1,
"webhooks": [
"019a1c55-0d6e-7f21-8b3a-5e9d4c7b2a10"
]
},
{
"object": "action",
"name": "track_parcel",
"description": "",
"declared": false,
"created_at": null,
"updated_at": null,
"clicks_7d": 12,
"clicks_30d": 64,
"unique_clickers_30d": 60,
"last_click_at": "2026-10-26T19:02:44Z",
"templates": 2,
"webhooks": []
}
]
}