API Reference
HTTP API for Mailprex form-to-email.
Base URL: https://api.mailprex.excelso.xyz
Public — send form email
POST /email/send
Sends a contact form email to emailDestiny.
Authentication: formToken in JSON body (no cookie).
CORS: * (intended for browser forms from any origin).
Request body
{
"formToken": "mk_live_abc123…",
"webName": "My Portfolio",
"emailDestiny": "owner@example.com",
"fullname": "Jane Doe",
"email": "jane@example.com",
"message": "Hi, I'd like to get in touch.",
"phone": "+1 555 0100",
"service": "Consulting"
}Success 200
{
"message": "Form sent successfully"
}Common errors
| Status | Meaning |
|---|---|
400 | Validation failed |
401 | Invalid formToken |
429 | Rate or monthly quota exceeded |
500 | SMTP / server error |
Auth (dashboard)
Cookie session (mailprex_token, httpOnly). Used by the web app.
| Method | Path | Description |
|---|---|---|
| POST | /auth/register | Create account |
| POST | /auth/login | Login |
| POST | /auth/logout | Logout + revoke JWT |
| GET | /auth/me | Current user |
| GET | /auth/verify?token= | Email verification |
| GET | /auth/config | Public deployment config |
Form tokens
Requires auth cookie.
| Method | Path | Description |
|---|---|---|
| POST | /token/generateToken | Create token — returns full formToken once |
| GET | /token/getFormToken | { hasToken, prefix, legacy? } |
| DELETE | /token/deleteToken | Revoke token |
Billing (Gumroad)
Requires auth cookie. See Gumroad billing.
| Method | Path | Description |
|---|---|---|
| POST | /billing/checkout | { plan: "standard" | "business" } → { url } |
| GET | /billing/portal | Gumroad library URL |
| POST | /billing/gumroad/ping | Gumroad Ping webhook (server-side) |
Field reference
See User fields guide.
Client SDK
Prefer the npm package — SDK v2:
import { sendMailprex } from "mailprex";Last updated on