Quickstart
Send your first email through Senlo Cloud in about five minutes.
curl -X POST https://senlo.io/api/triggered \
-H "Authorization: Bearer $SENLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "id": 1, "to": "you@example.com", "data": { "name": "Ada" } }'By the end of this page that request delivers a real email. You need an account with Resend, Postmark or an SMTP server, with a verified sending domain.
Self-hosted?
Every step is the same on your own instance. Replace https://senlo.io with your APP_URL. Setting up the instance is covered in Self-hosting.
1. Create an account and a workspace
Sign up at senlo.io/register. Templates, triggers, automations, contacts and API keys live in a workspace. Open one from Workspaces, or create a new one. See Workspaces.
2. Connect your provider
- Open Providers in the sidebar and click Add Provider.
- Pick the type (Resend, Postmark or SMTP server) and paste the credentials.
- Open your workspace's Settings and select the provider as its email provider.
A workspace sends through exactly one provider. Until it has one, sends fail with No email provider configured for this project.
3. Create a template
Open Templates, click New Template and design it in the editor. Add a merge tag to the text, for example Hi {{name}},. Merge tags are replaced with the data you send. See Merge tags.
4. Create a trigger
A trigger connects a template to the API.
- Open Triggers and click New Trigger.
- Setup: name it, set the From name and From email. The From email must be on a domain verified with your provider.
- Content: select the template.
- Review: click Create Trigger.
The trigger page shows its API Integration card with the trigger id and a sample request.
5. Create an API key
Open API Keys in the workspace and click Create Key. It starts with snl_ and is shown once: copy it now. See Authentication.
6. Send the email
curl -X POST https://senlo.io/api/triggered \
-H "Authorization: Bearer $SENLO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "id": 1, "to": "you@example.com", "data": { "name": "Ada" } }'Replace 1 with your trigger's id. A successful call answers:
{ "success": true, "message": "Email queued successfully" }7. Check the delivery log
Open the trigger again. Its delivery log shows the send as SENT once the provider accepted it, or FAILED with the reason. With provider webhooks connected you also see DELIVERED, BOUNCE and SPAM_REPORT; opens and clicks show up as OPEN and CLICK.
If the call failed, the response body says why. See Errors.
Next
- Automations: send a sequence of emails from events with
POST /api/events. - Self-hosting: run the same thing on your own server.