Quickstart
From zero to your first email in five minutes. The test key never delivers anything, so you can practise safely.
1. Create a key
Create an account at sendtide.ch and add a test key under “Keys” in the dashboard. It starts with sk_test_ and accepts, renders and logs emails but never delivers them. The key is shown only once. Keep it in an environment variable:
export SENDTIDE_API_KEY=sk_test_…
All requests go to https://api.sendtide.ch/v1 and carry the key as a bearer token. More about keys and permissions in Authentication.
2. Send your first email
With a test key you may send from any address. Live keys need a verified domain for the sender.
curl https://api.sendtide.ch/v1/emails \
-H "Authorization: Bearer $SENDTIDE_API_KEY" \
-H "Idempotency-Key: welcome-4821" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@example.com>",
"to": "anna@example.org",
"subject": "Welcome to Acme",
"html": "<p>Hello Anna, great to have you.</p>"
}'
// npm install sendtide
import { Sendtide } from "sendtide";
const sendtide = new Sendtide({ apiKey: process.env.SENDTIDE_API_KEY });
const { id, status } = await sendtide.emails.send(
{
from: "Acme <hello@example.com>",
to: "anna@example.org",
subject: "Welcome to Acme",
html: "<p>Hello Anna, great to have you.</p>",
},
{ idempotencyKey: "welcome-4821" },
);
console.log(id, status);
# pip install sendtide
import os
from sendtide import Sendtide
client = Sendtide(os.environ["SENDTIDE_API_KEY"])
res = client.emails.send(
{
"from": "Acme <hello@example.com>",
"to": "anna@example.org",
"subject": "Welcome to Acme",
"html": "<p>Hello Anna, great to have you.</p>",
},
idempotency_key="welcome-4821",
)
print(res["id"], res["status"])
<?php
// composer require sendtide/sendtide-php
use Sendtide\Client;
$sendtide = new Client(getenv('SENDTIDE_API_KEY'));
$res = $sendtide->emails->send([
'from' => 'Acme <hello@example.com>',
'to' => 'anna@example.org',
'subject' => 'Welcome to Acme',
'html' => '<p>Hello Anna, great to have you.</p>',
], idempotencyKey: 'welcome-4821');
echo $res['id'], ' ', $res['status'];
The answer comes at once, before anything is delivered:
{ "id": "msg_8kq2m4bt", "status": "queued" }
Status 202 means Sendtide accepted and stored the email. Delivery happens in the background. The Idempotency-Key makes sure that repeating the request does not send a second email, see Sending email.
3. Check the status
Fetch the email with its history:
curl https://api.sendtide.ch/v1/emails/msg_8kq2m4bt \
-H "Authorization: Bearer $SENDTIDE_API_KEY"
The answer has the status, the recipients with their own status and the events (email.queued, email.sent, email.delivered and more). Search with GET /v1/emails?q=status:bounced. The dashboard shows the same data in the logs.
For live delivery updates, set up a webhook instead of polling.
4. Go live
- Add your domain and set the DNS records, see Set up domains.
- Confirm your email address as the owner. Until then the account is “in review”: live keys answer
403 account_in_review, test keys work. - Create a live key (
sk_live_…) and swap it into your configuration. The code stays the same. - Set up a webhook for
email.bouncedandemail.complainedso that you remove invalid addresses from your system at once.
What next?
- Authentication and keys: scopes and restrictions
- Sending email: batch, attachments, templates, scheduling
- Templates: edit copy without deploying
- Errors and limits: what to do when something fails
- API reference: all endpoints