Documentation
API reference
A REST API over HTTPS that speaks JSON. Every SDK is a thin wrapper over these same endpoints, and every page has a live "Try it" console.
Base URL
Base URL
https://api.mailcraft.host/v1Authentication
Send your API key as a bearer token on every request. Keys are scoped — create one per use case (for example, a send-only key for a server process) under Settings → API keys.
terminal
curl https://api.mailcraft.host/v1/emails \
-H "Authorization: Bearer $MAILCRAFT_API_KEY"Errors
Non-2xx responses return JSON. Validation failures are 422 with a per-field errors map; other errors carry a message, and billing limits add a machine-readable error.type.
422 Unprocessable Content
{
"message": "The subject field is required.",
"errors": {
"subject": ["The subject field is required."]
}
}Rate limits
Limits apply per workspace: 20 requests an hour on the Free plan, 120 a minute on paid plans. Responses include X-RateLimit-Limit and X-RateLimit-Remaining; going over returns 429 Too Many Requests.
Resources
Emails Send transactional email and look up delivery status for previously sent messages.5 endpointsContacts Upsert and manage contacts, including custom properties and list membership.8 endpointsLists Static lists (managed by explicit membership) and dynamic lists (membership computed from a segment).7 endpointsProperties Custom contact fields. Each property is a schema definition — values live in the JSON `properties` object on the contact itself.3 endpointsDomains Sending domains, verified through SPF, DKIM, and DMARC DNS records.5 endpointsSenders From-addresses on a verified domain. A sender must be verified before it can send.4 endpointsTemplates Reusable, versioned email bodies rendered with Mustache syntax (`{{ name }}`). Organize them into folders. Campaigns and emails pin a specific version, so editing a template never changes past sends.8 endpointsCampaigns One-time broadcast sends to a list or segment, rendered from a template.5 endpointsAutomations Multi-step sequences — send an email, wait, update the contact — started by a trigger or by enrolling contacts directly.11 endpointsSegments Dynamic contact filters, expressed as a condition tree over contact fields and properties.4 endpointsSuppression list Addresses that are blocked from receiving mail — populated automatically on hard bounce or spam complaint, or added manually.3 endpointsWebhooks Subscribe an HTTPS endpoint to email and contact lifecycle events. Payloads are signed with HMAC-SHA256.3 endpointsMetrics & reputation Time-series send metrics and a rolling sending-reputation score based on bounce and complaint rate.2 endpoints Webhook events Every event type, its payload, and how to verify signatures.