REST API quickstart
Send your first guardrailed email in 5 minutes using the Sluice REST API.
Prefer SMTP? See the SMTP quickstart for zero-code-change integration.
1. Sign up
Go to app.sluice.email and enter your email address. You'll receive a magic link — click it to create your account. Your organization is automatically set up and you're assigned the admin role.
No credit card required to get started.
2. Create an API key
Go to Settings > API Keys and click Create Key. Give it a descriptive name (e.g., "production-agent" or "dev-testing").
Your key will be displayed once — copy it and store it securely. It cannot be retrieved later.
API keys use the sl_live_ prefix:
Store it in an environment variable:
See API keys reference for more on key management and security.
3. Send your first email
Expected response:
The id is a unique identifier for this email in Sluice. You can use it to check status in the dashboard.
Node.js example:
Python example:
4. What happens next
Once Sluice receives your email via the API:
- Guardrails analyze the email — PII detection, tone analysis, content policy, prompt injection defense, and more
- If all guardrails pass, the email is forwarded to the recipient automatically via your configured outbound provider
- If any guardrail flags a concern, the email is held in the Review Queue for human review
Tuning mode is on by default — all emails are held for review regardless of guardrail results. This lets you see how the guardrails perform on your real traffic before enabling auto-forwarding.
5. Configure your outbound provider
In Settings > Outbound, configure where Sluice delivers approved emails. Sluice supports API-based providers (Resend, SendGrid, Postmark) and SMTP providers (Gmail, Outlook, any custom SMTP server).
See the Outbound providers guide for step-by-step setup.
What's next?
- Learn about all 10 guardrails and how to configure them
- Read the API keys reference for key management
- Review error codes for handling API errors
- See AI agent examples for framework-specific integration guides