Quickstart
Submit a test email before DNS verification. Test emails are never delivered; live sending is limited during the public preview.
Create a free account, then follow the same four steps as the public Quickstart. The first send uses a test key. Test emails are never delivered. Live sending requires a verified domain and a live key, and remains limited during the public preview.
Add a domain
Add your sending domain. DNS can stay pending. A test key can send from that domain before it is verified. Publish the returned DNS records and verify the domain when you want live delivery.
Create a test key
Create a sending key with mode test and set SENDTIER_API_KEY to that key (st_test_…) on your server. Never expose it in browser code or commit it to source control. A test key accepts emails and does not deliver them.
Send a test email
Replace the sender with an address on the domain you added and the recipient with your own address. to is an array. Reuse the same Idempotency-Key and request body when retrying. A 202 means the email was accepted. It is not delivered.
curl https://api.sendtier.com/emails \
-H "Authorization: Bearer $SENDTIER_API_KEY" \
-H 'API-Version: 2026-10-01' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: first-email' \
-d '{"from":"Example <hello@mail.example.com>","to":["user@example.com"],"subject":"Your first email","text":"Hello from Sendtier."}'A successful request returns 202 with an email ID and queued status. Queued means accepted. The test email is not delivered. See the Send an email reference for curl, JavaScript, Python, Go and PHP samples. This curl example uses https://api.sendtier.com, the same host as the public Quickstart. Generated reference samples keep the OpenAPI placeholder https://api.sendtier.example. Replace that host before you run them.
Live sending requirements
Live sending requires a verified domain and an st_live_… key, and remains limited during the public preview. A live key returns 422 domain_not_verified until the domain is verified. Retrieve the email using its ID to read events. A bounce event includes a receiving-server diagnostic only when Amazon SES reports one. List emails when you need a page instead of one ID. Register a webhook for signed event payloads, and check suppressions before retrying a failed address.
SDKs
The Node.js, Go and PHP samples below show the client shape. Those packages are not published in this release. Do not install them yet. Python has no SDK in this release. Use the HTTP sample above, or the public Quickstart samples.
Node.js
import { Sendtier } from "@sendtier/sdk";
const sendtier = new Sendtier({ apiKey: process.env.SENDTIER_API_KEY });
const email = await sendtier.emails.send({
from: "Example <hello@mail.example.com>",
to: ["user@example.com"],
subject: "Your first email",
text: "Hello from Sendtier.",
});Go
package main
import (
"context"
"fmt"
"os"
"github.com/phpdarbai1991-cloud/sendtier/sdk/go"
"github.com/phpdarbai1991-cloud/sendtier/sdk/go/openapi"
)
func main() {
client, err := sendtier.New(os.Getenv("SENDTIER_API_KEY"))
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
text := "Hello from Sendtier."
email, err := client.Emails.Send(context.Background(), openapi.SendEmailRequest{
From: "Example <hello@mail.example.com>",
To: []string{"user@example.com"},
Subject: "Your first email",
Text: &text,
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(email.Id, email.Status)
}PHP
<?php
require 'vendor/autoload.php';
use Sendtier\Generated\Model\SendEmailRequest;
use Sendtier\Sendtier;
$sendtier = new Sendtier(getenv('SENDTIER_API_KEY'));
$email = $sendtier->emails->send(
(new SendEmailRequest())
->setFrom('Example <hello@mail.example.com>')
->setTo(['user@example.com'])
->setSubject('Your first email')
->setText('Hello from Sendtier.')
);Sources: public Quickstart (site/src/components/quickstart.tsx), send and retrieve handlers (internal/api/emails.go), OpenAPI (openapi/openapi.yaml), Node SDK (sdk/typescript/README.md), Go SDK (sdk/go/README.md), PHP SDK (sdk/php/README.md).