curl --request GET \
--url https://api.senderkit.com/v1/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senderkit.com/v1/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senderkit.com/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.senderkit.com/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.senderkit.com/v1/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.senderkit.com/v1/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senderkit.com/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publicId": "msg_0a1b2c3d4e5f6g7h",
"templateSlug": "<string>",
"channel": "email",
"status": "scheduled",
"livemode": true,
"recipient": "<string>",
"vars": {},
"metadata": {},
"fromOverride": "<string>",
"fromNameOverride": "<string>",
"interpolate": true,
"pinnedVersion": 123,
"provider": "<string>",
"providerConnectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerMessageId": "<string>",
"latencyMs": 123,
"openedAt": "2023-11-07T05:31:56Z",
"clickedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"timeline": [
{
"t": "2023-11-07T05:31:56Z",
"e": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"scheduledAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}List messages
Returns messages for the authenticated workspace and environment, newest first, with cursor pagination.
Setting tail=1 switches the endpoint to a Server-Sent Events stream
(text/event-stream) that backfills the most recent 50 messages and
then pushes new ones live. Streams are closed by the server after 30
minutes; EventSource clients reconnect automatically and receive a
fresh backfill. The schemas below describe the non-streaming JSON
response.
curl --request GET \
--url https://api.senderkit.com/v1/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.senderkit.com/v1/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.senderkit.com/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.senderkit.com/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.senderkit.com/v1/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.senderkit.com/v1/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.senderkit.com/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publicId": "msg_0a1b2c3d4e5f6g7h",
"templateSlug": "<string>",
"channel": "email",
"status": "scheduled",
"livemode": true,
"recipient": "<string>",
"vars": {},
"metadata": {},
"fromOverride": "<string>",
"fromNameOverride": "<string>",
"interpolate": true,
"pinnedVersion": 123,
"provider": "<string>",
"providerConnectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerMessageId": "<string>",
"latencyMs": 123,
"openedAt": "2023-11-07T05:31:56Z",
"clickedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"timeline": [
{
"t": "2023-11-07T05:31:56Z",
"e": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"scheduledAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"issues": [
{}
],
"limit": 123
}
}Authorizations
API key with an sk_live_ or sk_test_ prefix.
Query Parameters
Page size (1–200).
1 <= x <= 200Opaque pagination cursor from a previous response's nextCursor.
Lifecycle status of a message. scheduled is the initial status for a
send with a future scheduledAt; queued is the initial status for an
immediate send. canceled is terminal and reached when a scheduled or
queued message is canceled before dispatch.
suppressed means the provider accepted the request but never attempted
delivery — the recipient address failed validation, or was already
suppressed for this sender. It is distinct from failed, which is a
bounce reported by the receiving mail server.
scheduled, queued, rendered, dispatched, sent, delivered, failed, opted_out, suppressed, blocked, canceled email, sms, push, web-push Filter by template slug.
Filter by metadata containment, Stripe-style. E.g.
?metadata[userId]=usr_123. Multiple keys are AND-ed. A value
matches whether it was stored as a string or as a number/boolean,
so ?metadata[orderId]=123 matches both "123" and 123.
Case-insensitive substring match over the message's public id,
recipient, template slug, and metadata keys/values. Composes with
the other filters and with cursor pagination — use
metadata[key]=value instead when you need an exact match. %,
_, and \ are matched literally.
512Set to 1 to receive a Server-Sent Events stream instead of JSON.
1