API Reference
Base URL: https://api.mailgrid.space. Every endpoint speaks JSON.
Base URL & auth
All requests use HTTPS. All authenticated endpoints require an Authorization: Bearer mb_live_... header.
The full OpenAPI 3 spec is at api.mailgrid.space/openapi.json.
Response shape
Successful responses:
{
"success": true,
"data": { ... },
"requestId": "fd067654-aff2-4e57-9320-..."
}Error responses:
{
"success": false,
"code": "BAD_REQUEST",
"message": "Field 'from' is required",
"requestId": "..."
}Endpoint groups
| Group | What |
|---|---|
| Single + batch + scheduled sends | |
| Templates | Handlebars storage + AI generation |
| Streams | Transactional / marketing / notifications profiles |
| Files | File Cache attachment storage |
| Users | Team registry + invites |
| Dedicated IPs | IP-pool mapping & warmup |
| Domains | SES identity verification |
| Suppressions | Per-tenant suppression list |
| Analytics & Events | Daily rollups + event stream |
| AI | Summarize, ask, personalize |
| Webhooks | SES SNS subscription |
| SMTP relay | HTTP-based MIME relay |
| Errors | Codes + HTTP status mapping |
Conventions
- All times ISO-8601 UTC.
- All IDs are UUID v4 unless otherwise noted.
- Cursor-paginated list endpoints take
?cursor=…&limit=…. - Idempotent POSTs reuse cached results for 24 hours.
- Rate limits per tenant (default 600 req/min) — see Rate limiting.