API v1.0

SendPigeon Documentation

Everything you need to send transactional emails. SDKs for Node.js, Python, Go, PHP and REST API.

Contact Forms

Embed forms on your website. No backend required.

PlanForms
Free1 form
Starter5 forms
Growth10 forms
Pro25 forms

Create a Form

Create forms in the dashboard or via API. Each form has a unique endpoint.

cURLbash
curl -X POST https://api.sendpigeon.dev/v1/forms \
-H "Authorization: Bearer sp_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Contact Form",
"recipients": ["hello@yourdomain.com"],
"subject": "New contact form submission",
"replyToSubmitter": true,
"redirectUrl": "https://yourdomain.com/thank-you"
}'
Responsejson
{
"id": "frm_abc123",
"name": "Contact Form",
"endpoint": "https://api.sendpigeon.dev/public/form/frm_abc123",
"active": true
}

Embed the Form

Point your HTML form to the endpoint. No JavaScript required.

HTMLhtml
<form action="https://api.sendpigeon.dev/public/form/frm_abc123" method="POST">
<input type="text" name="name" placeholder="Your name" required />
<input type="email" name="email" placeholder="Your email" required />
<textarea name="message" placeholder="Your message" required></textarea>
 
<!-- Honeypot field for spam protection (keep hidden) -->
<input type="text" name="_gotcha" style="display:none" />
 
<button type="submit">Send</button>
</form>

Form Fields

All fields except reserved ones are included in the email.

FieldPurpose
emailSubmitter's email (used for reply-to if enabled)
_gotchaHoneypot field — if filled, submission is rejected
*All other fields are included in the email body

AJAX Submission

Submit via JavaScript for custom handling:

JavaScriptjavascript
const form = document.querySelector("form");
 
form.addEventListener("submit", async (e) => {
e.preventDefault();
 
const response = await fetch(form.action, {
method: "POST",
body: new FormData(form),
});
 
if (response.ok) {
alert("Message sent!");
form.reset();
} else {
const { message } = await response.json();
alert("Error: " + message);
}
});

CORS

Forms work from any origin by default. Optionally restrict to specific domains:

cURLbash
curl -X PUT https://api.sendpigeon.dev/v1/forms/frm_abc123 \
-H "Authorization: Bearer sp_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "allowedOrigins": ["https://yourdomain.com"] }'

Rate limit: 10 submissions per IP per minute. Spam protection: Honeypot field + rate limiting.