REST API

Accounts

Manage SMTP and Google sending identities. List and get responses never include passwords or OAuth tokens.

GET /api/v1/accounts

List all accounts for the authenticated user, newest first.

Request
GET https://your-deployment.example/api/v1/accounts
Accept: application/json
Authorization: Bearer mf_live_…

200{ "data": [ … ] } public fields only.

POST /api/v1/accounts

SMTP requires smtp_host, smtp_port, smtp_username, smtp_password. Google requires google_access_token and google_refresh_token (and usually google_email).

Body — SMTP example
{
  "name": "Transactional",
  "provider_type": "smtp",
  "daily_mail_limit": 500,
  "smtp_host": "smtp.example.com",
  "smtp_port": 587,
  "smtp_username": "user",
  "smtp_password": "secret"
}

201{ "data": { … } }

GET /api/v1/accounts/{id}

Fetch one account. 404 if not found.

PATCH /api/v1/accounts/{id}

Partial update. Omit smtp_password to keep the current password.

Body example
{
  "name": "Renamed",
  "daily_mail_limit": 1000
}

DELETE /api/v1/accounts/{id}

200{ "ok": true }