MailgentMailgent
API Reference

Authentication

Authenticate with the Mailgent API

All API requests require a Bearer token in the Authorization header.

Base URL

https://api.mailgent.dev

Authentication

Include your API key in every request:

curl https://api.mailgent.dev/v0/messages \
  -H "Authorization: Bearer mgent-your-api-key"

API Key Format

mgent-{64 hex characters}

API keys are created when you create an Identity in the console. The full key is shown only once — store it securely.

Error Responses

Missing Authorization header

{
  "error": "unauthorized",
  "message": "Missing or invalid Authorization header",
  "status": 401
}

Invalid API key

{
  "error": "unauthorized",
  "message": "Invalid API key",
  "status": 401
}

Insufficient scope

{
  "error": "forbidden",
  "message": "Missing required scope: mail:send",
  "status": 403
}

Rate Limits

API requests are rate-limited per identity. Current limits:

TierRequests/minute
Default100

Rate limit headers are included in responses:

  • X-RateLimit-Remaining
  • X-RateLimit-Reset

On this page