API Docs

One endpoint does the work. Authenticate with your API key, post to a verified domain, and the message lands in your inbox.

POST /api/v1/submit

curl -X POST https://www.purplecontact.emails.bd/api/v1/submit \
  -H "X-API-Key: pc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane","email":"jane@example.com","message":"Hello!"}'
<form action="https://www.purplecontact.emails.bd/api/v1/submit" method="post">
  <input type="hidden" name="api_key" value="pc_live_YOUR_KEY">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <input type="text" name="website" style="display:none"> <!-- honeypot: leave empty -->
  <button type="submit">Send message</button>
</form>
fetch("https://www.purplecontact.emails.bd/api/v1/submit", {
  method: "POST",
  headers: { "Content-Type": "application/json", "X-API-Key": "pc_live_YOUR_KEY" },
  body: JSON.stringify({ name: "Jane", email: "jane@example.com", message: "Hello!" })
}).then(r => r.json()).then(console.log);
$ch = curl_init("https://www.purplecontact.emails.bd/api/v1/submit");
curl_setopt_array($ch, [CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => ["X-API-Key: pc_live_YOUR_KEY", "Content-Type: application/json"],
  CURLOPT_POSTFIELDS => json_encode(["name"=>"Jane","email"=>"jane@example.com","message"=>"Hello!"]),
  CURLOPT_RETURNTRANSFER => true]);
echo curl_exec($ch);

Responses & errors

StatusMeaning
200Success — {"success":true,"id":123,"message":"Thanks! …"}
401Invalid or revoked API key.
403Domain is not verified yet.
422Validation failed (missing name/email/message, or honeypot filled).
429Rate limit: 10 submissions per minute per key.

GET /api/v1/submissions

List your submissions as JSON. Send your key as X-API-Key header or ?api_key=. Optional filters: ?status=new&form_id=1&limit=50.

In-browser API tester

Paste a real API key from your dashboard and send a test submission — the JSON response appears below. Nothing is sent until you press the button.

Response will appear here…

Try the live demo

No form to fill in on the demo page — open the Live Demo page and log in with the demo account shown there (demo@contact.emails.bd / demo2000). You will land in the real dashboard with its inbox, forms and API keys. The admin demo is on the same page.

Worked example: portal.sendergun.com/contact

1. In Purple Contact, add domain sendergun.com and verify it with the DNS TXT record (_purplecontact → pc-verify=YOUR_TOKEN).
2. Create a form “SenderGun Contact Form” with notify email support@sendergun.com.
3. Create an API key for that domain + form.
4. On https://portal.sendergun.com/contact paste the HTML snippet above with your real key. Submissions arrive in Dashboard → Inbox, the owner gets an email, and the visitor gets the auto-reply.

No website? Use a hosted form link

Every form you create gets a shareable link — for example example.com/f/sendergun-contact. Send that link to your clients: they open it, fill in the form, and the message lands in your inbox, with the owner email and visitor auto-reply, exactly like an embedded form. Find the link in Dashboard → Forms → Edit / embed code → “Hosted form link”. On your own install, point a subdomain at this app (for example forms.example.com) and the same link works as forms.example.com/f/your-form. No website, no code and no database needed on the client side.

Placeholders

Email templates support {name} {email} {message} {form} — edit them in Dashboard → Email Templates.