Sendery
Sendery

Getting started

Send your first email

Publish a template, create an API key, and send your first email.

1. Prepare your project

Create a project with a plan that includes sending. Use sandbox mode to test without delivering email. For live delivery, complete Sending setup and enable live sending.

2. Publish a template

Create a template with the key welcome. Add {{ name }} to its text and {{ action_url }} as a button URL, then publish it. The examples below supply both variables. If you use another template, copy its key and required variables from the editor.

3. Create an API key

Create an API key in your project’s API keys page. Save it as SENDERY_API_KEY in your server environment. Keep the key out of browser code and source control.

Shell
export SENDERY_API_KEY="your_project_api_key"

4. Send an email

Run the cURL example, or install your language’s SDK and use its example. Replace the recipient with your email address to test live delivery. Reuse welcome-123 only when retrying this same email; choose a new key for another send.

cURL
curl https://sendery.co/api/v1/emails \
  -H "Authorization: Bearer $SENDERY_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Idempotency-Key: welcome-123' \
  -d '{
    "to": "[email protected]",
    "template": "welcome",
    "data": {"name": "Alex", "action_url": "https://example.com/start"}
  }'

5. Check the result

A 202 response confirms acceptance. Save the returned id to check delivery status. In sandbox mode, the status becomes simulated and no email is delivered.

202 · application/json
{
  "id": "35a6b227-1748-412e-8651-430492201670",
  "status": "queued"
}

6. Retrieve the email

Replace the example ID below with the ID returned by your send request.

Shell
curl https://sendery.co/api/v1/emails/35a6b227-1748-412e-8651-430492201670 \
  -H "Authorization: Bearer $SENDERY_API_KEY" \
  -H 'Accept: application/json'