Subscribe Page

Use SentinMail's hosted subscribe page to let visitors join your mailing list

Overview

Every SentinMail company gets a hosted subscribe page where visitors can sign up for your mailing list. No setup required — just share the link or embed it on your site.

Your Subscribe Page URL

Your subscribe page is available at:

Code
txt
1https://sentinmail.app/subscribe/YOUR_COMPANY_ID

For example:

Code
txt
1https://sentinmail.app/subscribe/d6f53710-6dd2-4515-99a6-7d3ad95d2a30

Share this link anywhere — on your website, social media, email signatures, or landing pages.

What It Looks Like

The hosted page includes:

  • Your company name displayed in the header
  • An email field (required)
  • First name and Last name fields (optional)
  • A Subscribe button
  • Light/dark mode support
  • SentinMail branding

When a visitor subscribes, they see a confirmation message: "You've been subscribed to {Company Name}."

Embedding on Your Website

The simplest approach — link directly to the hosted page:

Code
html
1<a href="https://sentinmail.app/subscribe/YOUR_COMPANY_ID">
2 Subscribe to our newsletter
3</a>

Custom Form (API Direct)

If you want full control over the styling, you can build your own form that calls the subscribe API directly:

Code
txt
1POST https://api.sentinmail.app/api/emails/public/subscribe/YOUR_COMPANY_ID/

No authentication required — this is a public endpoint.

HTML example:

Code
html
1<form id="subscribe-form">
2 <input type="email" id="sm-email" placeholder="you@example.com" required />
3 <input type="text" id="sm-fname" placeholder="First name" />
4 <input type="text" id="sm-lname" placeholder="Last name" />
5 <button type="submit">Subscribe</button>
6 <p id="sm-status"></p>
7</form>
8 
9 

React example:

Code
tsx
1import { useState } from 'react';
2 
3const COMPANY_ID = 'YOUR_COMPANY_ID';
4 
5export function SubscribeForm() {
6 const [email, setEmail] = useState('');
7 const [status, setStatus] = useState<'idle' | 'loading' | 'success' | 'error'>('idle');
8 
9 const handleSubmit = async (e: React.FormEvent) => {
10 e.preventDefault();
11 setStatus('loading');
12 
13 try {
14 const res = await fetch(
15 `https://api.sentinmail.app/api/emails/public/subscribe/${COMPANY_ID}/`,
16 {
17 method: 'POST',
18 headers: { 'Content-Type': 'application/json' },
19 body: JSON.stringify({ email }),
20 }
21 );
22 setStatus(res.ok ? 'success' : 'error');
23 } catch {
24 setStatus('error');
25 }
26 };
27 
28 if (status === 'success') return <p>Thanks for subscribing!</p>;
29 
30 return (
31 <form onSubmit={handleSubmit}>
32 <input
33 type="email"
34 value={email}
35 onChange={(e) => setEmail(e.target.value)}
36 placeholder="you@example.com"
37 required
38 />
39 <button type="submit" disabled={status === 'loading'}>
40 {status === 'loading' ? 'Subscribing...' : 'Subscribe'}
41 </button>
42 {status === 'error' && <p>Something went wrong. Try again.</p>}
43 </form>
44 );
45}

Subscribe API Reference

Get Company Info

Code
bash
1curl https://api.sentinmail.app/api/emails/public/subscribe/YOUR_COMPANY_ID/

Response:

Code
json
1{
2 "company_name": "Acme Corp"
3}

Subscribe a Visitor

Code
bash
1curl -X POST "https://api.sentinmail.app/api/emails/public/subscribe/YOUR_COMPANY_ID/" \
2 -H "Content-Type: application/json" \
3 -d '{"email": "visitor@example.com", "first_name": "Jane", "last_name": "Doe"}'
FieldTypeRequiredDescription
emailstringYesVisitor's email address
first_namestringNoVisitor's first name
last_namestringNoVisitor's last name

Success (200):

Code
json
1{
2 "success": true
3}

Behavior

  • New visitor: Creates a subscriber record
  • Existing subscriber: Updates name fields only if they were blank
  • Previously unsubscribed: Automatically removes suppression (re-subscribes)
  • Subscriber limit reached: Returns 403

Unsubscribe

Every email sent through SentinMail includes an automatic unsubscribe link. When a recipient clicks it, they're taken to:

Code
txt
1https://sentinmail.app/unsubscribe/<sent-email-id>

This creates a suppression record — the subscriber won't receive future emails. If they later re-subscribe via your subscribe page, the suppression is automatically removed.

Rate Limiting

The public subscribe endpoint is rate-limited to 3 requests per minute per IP to prevent abuse. If you need higher throughput (e.g., batch-importing signups from another system), use the authenticated subscriber API with your API key instead.

Error Responses

StatusCauseResponse
400Missing email field{"detail": "Email is required."}
403Subscriber limit reached{"detail": "Subscriber limit reached for your plan."}
404Invalid company IDPage shows "This subscribe page is not available."
429Rate limitedToo many requests — wait and retry
subscribeembedpublicsignupwidget