SDKs
Senlo has a REST API; there is no official SDK yet.
// The whole client: two endpoints, one header.
export async function senlo(path: "/api/events" | "/api/triggered", body: unknown) {
const res = await fetch(`${process.env.SENLO_URL ?? "https://senlo.io"}${path}`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENLO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
const json = await res.json();
if (!res.ok) throw new Error(`Senlo ${res.status}: ${json.error}`);
return json;
}There is no official SDK, for Node or any other language: Senlo is REST only. The API is two POST endpoints with a bearer token, so a few lines of fetch (above) or any HTTP client cover it.
POST /api/triggeredsends one email.POST /api/eventsfeeds contact events into automations.openapi.yamldescribes both; OpenAPI generators can build a typed client from it.
Community SDKs
Wrote a client for your language? Open an issue on GitHub and it will be listed here. Requests for an official SDK go there too.
One-click unsubscribe POST
The address the `List-Unsubscribe` header of every email points at. Mail providers such as Gmail and Yahoo post to it when the recipient clicks their built-in unsubscribe button (RFC 8058). You do not call it yourself. Responses are plain text, not JSON.
Resend
Connect Resend to Senlo, and its webhook for delivery events.