MailLogic API Docs
MailLogic API reference: authentication, scopes, domains, email accounts, usage, email logs, forwarding tests, Send and Batch Send.
Overview
The public API has 27 operations and two separate authentication models.
- Personal Access Tokens (PATs / automation tokens) authorize management operations: domains, email accounts, usage, email logs, DNS checks and forwarding tests. Each token has explicit scopes and optional domain restrictions.
- Domain API keys authorize Send and Batch Send for a sending domain. PATs cannot be used for Send/Batch Send; domain API keys cannot be used for management operations.
Base URL and authentication
PAT-based management API access is available on Basic, standalone SMTP, Starter and Founder, subject to scopes, domain restrictions, ownership and each action’s entitlement. Standalone SMTP, Starter and Founder include SMTP sending and full Domain Connect sending DNS setup. Send API and Batch Send API require Starter or Founder; standalone SMTP does not include either sending API.
Base URL: https://api.maillogic.io. Use HTTPS and keep secrets on your server, outside browser code and source control.
For management requests, use Authorization: Bearer $MAILLOGIC_TOKEN with an mlpat_ token. In the dashboard, open Automation tokens, choose permissions and all owned domains or selected domains, then create a token. Copy the secret immediately: it is shown only once. Dashboard tokens expire after 90 days. Expired or revoked tokens return 401; revocation immediately disables subsequent authentication.
Scopes are independent: DNS checks and test creation do not grant read permissions. Domain-restricted tokens see only permitted owned domains; inaccessible resources return 404. usage:read requires an unrestricted token because usage is account-wide.
Sending uses an mlk_ domain API key: Authorization: Bearer $MAILLOGIC_DOMAIN_KEY, or alternatively X-API-Key: $MAILLOGIC_DOMAIN_KEY. These credentials are not interchangeable with PATs.
Operation reference
| Operation | Authentication / required scope |
|---|---|
PATCH /v1/domains/{id}/catch-all | PAT · domains:write |
POST /v1/domains/{id}/domain-connect/authorize | PAT · domains:write |
POST /v1/domains | PAT · domains:write |
GET /v1/domains | PAT · domains:read |
GET /v1/domains/{id} | PAT · domains:read |
POST /v1/domains/{id}/check-dns | PAT · domains:check-dns |
GET /v1/email-accounts | PAT · email-accounts:read |
GET /v1/email-accounts/{id} | PAT · email-accounts:read |
POST /v1/email-accounts | PAT · email-accounts:write |
PATCH /v1/email-accounts/{id} | PAT · email-accounts:write |
DELETE /v1/email-accounts/{id} | PAT · email-accounts:remove (PAT: email-accounts:write also accepted) |
POST /v1/email-accounts/{id}/password-reset-link | PAT · credentials:write |
POST /v1/email-accounts/{id}/enable-smtp | PAT · credentials:write |
GET /v1/usage | PAT · usage:read |
GET /v1/logs | PAT · logs:read |
POST /v1/forwarding-tests | PAT · forwarding-tests:create |
GET /v1/forwarding-tests/{id} | PAT · forwarding-tests:read |
POST /v1/send | Domain API key |
POST /v1/batch-send/preview | Domain API key |
POST /v1/batch-send | Domain API key |
GET /v1/batch-send/{batch_id} | Domain API key |
GET /v1/domains/{domain_id}/forwarding-blocks | PAT · domains:read |
POST /v1/domains/{domain_id}/forwarding-blocks | PAT · domains:write |
DELETE /v1/domains/{domain_id}/forwarding-blocks/{block_id} | PAT · domains:write |
GET /v1/reply-conversations | PAT: replies:read |
GET /v1/reply-conversations/{conversation_id} | PAT: replies:read |
POST /v1/reply-conversations/{conversation_id}/messages | PAT: replies:read + replies:send |
Quick start
These examples use a POSIX shell and curl. Create an unrestricted PAT with domains:read, email-accounts:read and usage:read. Replace the placeholder token and IDs with your own values.
export MAILLOGIC_TOKEN='YOUR_AUTOMATION_TOKEN' export BASE_URL='https://api.maillogic.io' curl "$BASE_URL/v1/domains" \ --header "Authorization: Bearer $MAILLOGIC_TOKEN" export DOMAIN_ID='UUID_FROM_DOMAINS_DATA' curl "$BASE_URL/v1/domains/$DOMAIN_ID" \ --header "Authorization: Bearer $MAILLOGIC_TOKEN" curl --get "$BASE_URL/v1/email-accounts" \ --header "Authorization: Bearer $MAILLOGIC_TOKEN" \ --data-urlencode "domain_id=$DOMAIN_ID" curl "$BASE_URL/v1/usage" \ --header "Authorization: Bearer $MAILLOGIC_TOKEN"
Domain and email-account lists return {"data": [...], "next_cursor": null}; detail requests return the object directly. IDs are UUIDs. Lists accept limit (1–200, default 50) and cursor. Pass next_cursor unchanged as the next cursor using the same token and filters; null ends pagination. Encode query values with curl --data-urlencode. Logs use the same page envelope.
Domains
Create a domain and retrieve setup
POST /v1/domains accepts only {"name":"mail.customer.example"}. It requires an unrestricted PAT with domains:write; extra fields are rejected. A 201 response contains the complete domain detail and a Location header. It creates no forwarding address and sends no email. No Idempotency-Key is required: retrying the same normalized name returns 409 domains.already_exists with detail.params.domain_id and Location. Domain-restricted tokens cannot create domains.
Creation, GET /v1/domains/{id}, and the domain inside check-dns return setup. The list stays compact. Setup contains dns_mode, discovered dns_zone, required_records, unexpected_mx, mx_ready, ownership_last_checked_at, smtp_dns_checked_at, dns_provider and automatic_dns. Requirements follow current SMTP entitlement: Basic gets ownership and forwarding MX; paid SMTP adds SPF, two DKIM selectors and DMARC.
Each record has a semantic requirement (including forwarding_mx_1 and forwarding_mx_2), absolute name, optional zone-relative host, type, suggested_value, priority, configuration, required_include and nullable verified. Both current MX priorities are 10. Missing zone discovery leaves dns_zone and host null; use absolute names.
configuration: exact applies to ownership, MX and DKIM. For SPF, merge means add required_include to the single existing policy; never create a second SPF policy. For DMARC, preserve_or_create means preserve a valid existing policy and use the suggestion only if absent. Invalid or conflicting policies need manual correction. Verification reflects MailLogic's current checker, not exact template equality or complete DMARC policy validation.
verified: null means unchecked/unknown. smtp_dns_checked_at distinguishes an actual outbound check from a Basic check; after upgrading, outbound setup stays unknown until checked. Historical SMTP readiness is conservative until refreshed. mx_ready requires both expected MX records and no unexpected MX; historical rows remain null until checked again. Readiness does not imply that a forwarding address exists. Provider discovery is a two-second best-effort SOA/NS lookup; RDAP never blocks creation, and GET performs no DNS lookups. Automatic-DNS metadata is advisory for the existing browser workflow: reasons are provider_unknown, unsupported_provider or not_configured. User authorization is required. The authorization endpoint performs fresh validation rather than trusting these hints.
GET /v1/domains supports name (exact, case-insensitive, optional final dot) and ownership_status (pending, verified, revoked). GET /v1/domains/{id} returns one domain.
Fields: id, name, ownership_status, forwarding_ready, smtp_ready, dns, last_checked_at, created_at, updated_at. Reads return cached observations, not live checks or delivery guarantees.
forwarding_readyrequires a prior check, verified ownership, both expected MX records and no unexpected MX records. Historical MX observations remain unknown until refreshed. It does not depend on outbound SPF/DKIM/DMARC readiness.- For Basic/non-SMTP-entitled accounts,
"smtp_ready": nullmeans not applicable. Outbounddns.spf,dns.dkim,dns.dkim_smtp1,dns.dkim_smtp2anddns.dmarcare alsonull. - SMTP-entitled accounts receive boolean
smtp_ready:falsemeans sending readiness is not satisfied;truemeans cached domain readiness and account sending policy permit it. Individual sender checks still apply. After a DNS check, outbound observations are booleans; cached DNS fields can benullbefore any check. dns.mx_10anddns.mx_20apply to forwarding on all plans. A checked DNS value offalsemeans the check applies but is not satisfied;truemeans it is satisfied.
Refresh DNS and ownership
POST /v1/domains/{id}/check-dns requires domains:check-dns; no body or Idempotency-Key is required. This action may update stored DNS/ownership state and trigger mail-configuration reconciliation.
curl --request POST "$BASE_URL/v1/domains/$DOMAIN_ID/check-dns" \ --header "Authorization: Bearer $MAILLOGIC_TOKEN"
The response has checks, ownership (verified, state), checked_at and the refreshed domain. Live checks contains mx_10, mx_20, mx, unexpected_mx, spf, dkim, dkim_smtp1, dkim_smtp2, dmarc. Outbound checks remain null without SMTP entitlement.
404 hides inaccessible domains; 409 can mean another account holds verified ownership; 429 means throttling or a concurrent check (honor Retry-After); 503 means DNS, storage or downstream state could not be resolved. A 503 may follow a saved update: inspect detail.params.state_persisted when present and retry the same action.
Authorize automatic DNS setup
launch_url is a short https://maillogic.io/domain-connect/start/<token> link, valid for 15 minutes, that re-checks the domain and redirects to a freshly signed Cloudflare URL. Prefer it whenever a link may be copied or re-rendered, for example by an AI assistant: chat clients can rewrite the percent-encoding of authorize_url, which invalidates Cloudflare's signature check. Query strings added to launch_url are ignored.
POST /v1/domains/{id}/domain-connect/authorize requires domains:write and returns HTTP 200 with a Cloudflare consent URL. Unrestricted tokens and restricted tokens whose allowlist already contains the domain may use it, including pending ownership. Creating a domain still requires an unrestricted token. No allowlist or existing token scopes are expanded.
Send a strict JSON object. Optional forwarding, sending, and dmarc accept booleans only; unknown fields and explicit nulls return 422. Forwarding defaults to true, sending to current SMTP entitlement, and DMARC to resolved sending. Basic {} selects verification + MX. SMTP-entitled {} selects verification + MX + DKIM + SPF, plus DMARC if absent. {"sending":false} selects forwarding only; {"forwarding":false} selects sending for SMTP-entitled accounts. All false selects verification only. DKIM/SPF stay together. Basic sending returns 403 domain_connect.sending_not_available; DMARC without sending returns 422 domain_connect.invalid_selection.
The response contains provider: cloudflare, authorize_url, launch_url and launch_expires_at, fresh dns_zone, relative host (empty at a zone apex), effective selected_groups, dmarc_action (not_selected/create/preserved), and requires_user_authorization: true. Open the URL for the user to review at Cloudflare. Domain Connect approval does not equal MailLogic DNS verification. Afterwards call POST /v1/domains/{id}/check-dns.
Fresh SOA and nameserver discovery requires every NS to be Cloudflare; stale setup hints never authorize the action. Delegated subdomains use their own zone, without falling back to a parent after failure. DMARC preflight checks only the exact mail-domain owner, not inherited organizational policy. A currently accepted existing policy is preserved by omitting the DMARC group. Invalid/multiple policies return 409 domain_connect.dmarc_conflict; an unavailable lookup returns 503 domain_connect.dmarc_lookup_failed. Preflight cannot guarantee preservation if DNS changes before approval.
URL generation writes no ownership, DNS readiness or provider metadata and needs no Idempotency-Key. Identical inputs may produce the same signed URL. URLs have no expiry or one-time-use contract; revoking a PAT does not revoke a previously issued URL, and approving twice may reapply records. Treat URLs as sensitive and do not log them. Responses use Cache-Control: no-store.
Both dashboard and API share limits of 5 attempts per account/domain and 20 per account per minute. A 429 domain_connect.rate_limited includes Retry-After. Foreign/excluded domains return 404. Unknown/unsupported providers or unavailable zones return 424; mixed Cloudflare authority returns 409; temporary DNS or unsafe signing configuration returns 503. Correct selection/provider conflicts before retrying; retry temporary failures with backoff.
# Basic: ownership + MX; SMTP-entitled: complete setup
curl --request POST "$BASE_URL/v1/domains/$DOMAIN_ID/domain-connect/authorize" \
--header "Authorization: Bearer $MAILLOGIC_TOKEN" \
--header "Content-Type: application/json" --data '{}'
# Forwarding only, including on an SMTP-entitled plan
curl --request POST "$BASE_URL/v1/domains/$DOMAIN_ID/domain-connect/authorize" \
--header "Authorization: Bearer $MAILLOGIC_TOKEN" \
--header "Content-Type: application/json" --data '{"forwarding":true,"sending":false,"dmarc":false}'
# After the user approves at Cloudflare
curl --request POST "$BASE_URL/v1/domains/$DOMAIN_ID/check-dns" \
--header "Authorization: Bearer $MAILLOGIC_TOKEN"Block Email
Use management PAT or delegated OAuth credentials with /v1/domains/{domain_id}/forwarding-blocks. GET requires domains:read; POST and DELETE require domains:write. The domain must be owned, token-visible and ownership-verified. Block Email entitlement (Starter or Founder) is required. Domain sending keys are not accepted.
GET accepts optional type=email|domain, limit (default 50, maximum 200) and cursor, returning {"data": [...], "next_cursor": null} in descending creation time and ID order. Continue with the same credential, domain and filters.
POST accepts only {"type":"email","value":"[email protected]"} or {"type":"domain","value":"spam.example"}. Values are trimmed and lowercased. Existing domain normalization removes HTTP(S), paths, ports and surrounding dots. Normalized email values are limited to 320 characters. Domain rules include subdomains; email rules match the normalized envelope sender with existing SRS0 decoding, not the visible From header. No DNS checks or new wildcard, IDNA or provider-specific normalization behavior is introduced.
POST returns 201 with id, domain_id, domain, type, value and UTC created_at. Duplicate domain/type/value returns 409 block_email.already_exists. DELETE /v1/domains/{domain_id}/forwarding-blocks/{block_id} returns 200 with {"id":"...","domain_id":"...","deleted":true}. Missing, inaccessible and repeated deletions return 404. Invalid values return 422, missing permission or entitlement 403, and unverified ownership 409.
Success confirms database persistence only, not MX1/MX2 acknowledgement. Both forwarding nodes read the database during delivery; no push occurs. No Idempotency-Key replay contract: inspect the list before retrying an uncertain mutation. Standard management request IDs, structured errors, no-store headers and rate limits apply.
Catch-all
PATCH /v1/domains/{id}/catch-all requires domains:write. Catch-all forwards unmatched local parts on the domain; named email accounts keep their own mappings. It creates no email account and sends no email. Available on Basic, standalone SMTP, Starter and Founder without using an address slot.
Use a strict JSON object: enabled is a required Boolean; forward_to is an optional string or null. Unknown fields and coercions are rejected. Addresses are trimmed and lowercased, with a normalized limit of 320 characters and the existing simple email syntax. An exact same-domain destination is rejected; subdomains remain allowed. Destination ownership, deliverability and indirect loops are not checked.
Omitted, null or blank forward_to preserves the saved destination; there is no clear operation. Disable preserves it, and re-enable can reuse it. Verified owners may change it while disabled. Enabling requires verified ownership and an effective destination, but not MX readiness. Pending/revoked claims may disable locally; their supplied destination is ignored and no synchronization or recovery task runs.
GET /v1/domains/{id} exposes catch_all, including the saved destination while disabled; domain lists do not. Creation and DNS-check detail responses include it too. This is an additive disclosure to existing domains:read PATs; named-account destinations are not included. The PATCH response may return its own destination under write authority without read scope.
Restricted PATs may update existing allowlisted domains only; no allowlist expansion. domains:write also authorizes Domain Connect and, with an unrestricted PAT, domain creation. It does not imply read, DNS-check, credentials, email-account creation, Send or Batch scopes.
Success is HTTP 200. The response contains domain_id, catch_all, updated_at, changed, synchronization, reconciliation and recovery_actions. Same normalized state returns changed=false, null outcomes and no timestamp change, snapshot or task. It is not a force-sync operation.
synchronization is synchronized for complete forwarding acknowledgment, incomplete for failure/missing configuration, skipped for unavailable ownership, or null for no-op. This does not prove DNS readiness or message delivery. reconciliation is queued, unavailable, or null for no-op/local disable. Recovery is best effort, not guaranteed after a process crash.
Incomplete + queued suggests wait_for_reconciliation; incomplete + unavailable suggests contact_support; ownership skip suggests check_domain_dns without granting that scope. Repeating unchanged PATCH does not retry synchronization. A concurrent update may appear in the response: changed describes your committed change, while returned state is the current configuration observed for synchronization.
No Idempotency-Key storage or replay contract. After a lost response, GET current detail before retrying if you have read scope. A repeated desired state is a no-op only if no intervening writer changed it; a stale retry otherwise overwrites as a new mutation. Errors: 401 invalid PAT, 403 missing scope, 404 inaccessible domain, 409 unverified enable, 422 invalid input/destination, 429 domains.catch_all_busy with Retry-After 2. A post-commit 503 domains.catch_all_post_commit_unavailable includes state_persisted=true, domain_id and Location; uncertain commit uses domains.database_unavailable with state_unknown=true. Read current state before retrying.
{"enabled":true,"forward_to":"[email protected]"}
{"domain_id":"00000000-0000-4000-8000-000000000001","catch_all":{"enabled":true,"forward_to":"[email protected]"},"updated_at":"2026-09-23T00:00:00Z","changed":true,"synchronization":"synchronized","reconciliation":"queued","recovery_actions":[]}Email accounts
POST /v1/email-accounts creates an address on an owned, ownership-verified domain. MX and SMTP DNS readiness are not required to prepare the account. Unrestricted PATs and PATs already allowing that domain UUID may use email-accounts:write; domains:write is not required. Domain allowlists never expand automatically.
Common required fields are domain_id, username, forward_to and setup_mode. Optional display_name is trimmed and Unicode-normalized, with a maximum of 255 characters and no control/line-separator characters. Unknown fields and primitive coercion are rejected. Username is trimmed/lowercased, starts with a letter or digit, allows letters, digits, dots, hyphens and underscores, and is at most 127 characters. The single forwarding address is trimmed/lowercased and syntax-checked, not ownership-verified; self/same-domain forwarding is not prohibited.
| Mode | Basic (5 addresses) | SMTP (5), Starter (15), Founder (50) |
|---|---|---|
direct | Omit password; forwarding only, no email | Caller password required; SMTP enabled, no setup email |
team | Unavailable | No password field; smtp_enabled defaults true; optional locale is en or ja |
Direct mode does not accept smtp_enabled or locale. SMTP is derived from entitlement. Password is write-only and never returned; surrounding whitespace is trimmed, then at least eight characters, one uppercase letter, one number and one non-alphanumeric character are required. Do not log the request body. Team with SMTP enabled generates a private credential and a three-day setup link sent to forward_to. Team with smtp_enabled=false creates forwarding only and sends no invitation. PAT management and SMTP do not grant Send/Batch API entitlement: those sending APIs remain Starter/Founder only.
{"domain_id":"11111111-1111-4111-8111-111111111111","username":"hello","forward_to":"[email protected]","setup_mode":"direct","display_name":"Hello"}{"domain_id":"11111111-1111-4111-8111-111111111111","username":"team","forward_to":"[email protected]","setup_mode":"team","smtp_enabled":true,"locale":"en"}Creation returns 201, Location, the normal resource, and a creation-only outcome, for example {"setup_mode":"team","setup_email":"submitted","synchronization":"synchronized","reconciliation":"queued","recovery_actions":[]}. setup_email is not_requested, submitted (administrative service HTTP submission, not inbox delivery), or not_confirmed (including ambiguous timeout). Never automatically resend an ambiguous invitation.
synchronization is synchronized, incomplete or skipped; it reports the immediate forwarding/SMTP configuration attempt, not delivery or DNS readiness. reconciliation is queued only when scheduling succeeded, otherwise unavailable. Persisted creation can return 201 with incomplete side effects. Follow returned recovery_actions: wait_for_reconciliation, check_domain_dns (requires its own scope), resend_setup_from_dashboard (or deliberately use the credentials action below; cooldown and duplicate delivery risk apply), or contact_support. These attempt outcomes are not persisted on later GETs.
Idempotency-Key is unsupported for lifecycle creation. Repeating a normalized domain/local part returns 409 email_accounts.already_exists, detail.params.email_account_id and Location. It never overwrites fields, rotates credentials or resends email. Unexpected post-commit 503 includes state_persisted=true, resource/domain IDs and Location: GET the saved resource before retrying.
PATCH /v1/email-accounts/{id} accepts exactly {"display_name":"Support"}. Null/blank clears; the same normalized value is a no-op and no mail synchronization occurs. It requires email-accounts:write and verified domain ownership. Empty objects and every other property are rejected. There is no forwarding-destination editing API. Credential actions are described below. SMTP disable is not available.
DELETE /v1/email-accounts/{id} requires email-accounts:remove (personal access tokens with email-accounts:write remain authorized; OAuth connections need email-accounts:remove) and ownership of both the address and its allowlisted domain. It hard-deletes the address and all password-reset tokens. Existing cascades also delete completed batch jobs, items, and associated outbound/recipient history. Audit snapshots remain. Catch-all is unchanged, so mail to the deleted local part may still be received through catch-all.
Active/unresolved batches, pending submissions, or unsettled associated credits return 409 email_accounts.in_use. Unattributed reservations (including authenticated SMTP holds) conservatively block deletion of any address on that account. DELETE does not cancel, release, or refund work. Repeated/missing/excluded/foreign IDs return 404 email_accounts.not_found.
A 200 receipt contains id, domain_id, deleted: true, synchronization (synchronized, incomplete, or skipped) and reconciliation (queued or unavailable). Deletion is persisted even when mail-server updates fail. Synchronization describes acknowledgements, not delivery readiness; skipped means ownership is not verified. An immediate full-domain update is attempted and reconciliation is requested. Unavailable means recovery scheduling was not confirmed; contact support if synchronization is incomplete and reconciliation unavailable. No email is sent.
reset_pending means a currently valid unused/non-nulled password setup or reset link exists. It is not invitation acceptance or setup-completion state: expiry also makes it false. Setup mode is not stored in GET resources. After creation, the existing forwarding-test API is an optional separately scoped verification step.
GET /v1/email-accounts accepts optional domain_id and active filters. GET /v1/email-accounts/{id} returns one account. Both require email-accounts:read, which exposes the forwarding destination.
Fields: id, domain_id, address, nullable display_name and forward_to, active, smtp_enabled, reset_pending, forwarding_test_eligibility, created_at, updated_at. smtp_enabled is configuration, not a guarantee that sending is possible.
domain_id identifies the parent domain. Pass the email account’s id as email_account_id when creating a forwarding test; it uses the configured alias and destination. Eligibility includes eligible and nullable reason: ownership_mismatch, username_inactive, forwarding_destination_missing, domain_ownership_unverified or inbound_mx_unverified. Creation rechecks eligibility.
Credentials and SMTP enablement
Both actions require only credentials:write. No additional email-account or domain read/write scope is required. A domain-restricted PAT can act on existing accounts in its allowlist; missing, foreign, inconsistent-owner and excluded accounts return 404 email_accounts.not_found. General GETs separately require email-accounts:read. Credential permission does not grant creation, display-name editing, forwarding edits, domain creation, deletion, Send or Batch Send.
Both actions require verified domain ownership, current SMTP entitlement (SMTP, Starter or Founder), a stored forwarding destination and no billing operation in progress. Basic cannot issue new links even for retained SMTP-enabled rows. DNS readiness and sending suspension do not block credential preparation; an inactive address remains inactive.
Password reset link
POST /v1/email-accounts/{id}/password-reset-link accepts exactly {} or {"locale":"en"} (ja also allowed; default en). Null, extra fields, destination, password and token inputs are rejected. SMTP must already be enabled. MailLogic submits one email to the stored forwarding destination with a three-day link. Completion is controlled by the bearer-link recipient outside the public API; a PAT never receives or consumes the token.
{"email_account_id":"11111111-1111-4111-8111-111111111111","reset_pending":true,"setup_email":"submitted","expires_at":"2026-09-26T00:00:00Z","retry_after_seconds":300,"recovery_actions":[]}
200 reports submitted or not_confirmed, never inbox delivery. The cooldown bound does not guarantee account budget availability. There is no credential synchronization solely for link issuance. Each deliberate later request replaces prior usable links. Admission is shared with dashboard/setup: five minutes per address and 60 emails per account per fixed UTC hour; 429 includes Retry-After. Rejection leaves the old link intact.
Enable SMTP
POST /v1/email-accounts/{id}/enable-smtp requires an explicit strict mode:
{"setup_mode":"direct","password":"<caller-supplied secret>"}
{"setup_mode":"email","locale":"en"}
Direct requires a non-null password and forbids locale. It saves the SMTP-compatible password, invalidates usable links and sends no setup email. Email forbids any password key (including null); locale defaults to en and permits en/ja only. MailLogic generates an unknown temporary credential internally, enables SMTP before recipient completion, and submits one setup email; reset_pending=true. No mode accepts destination, SMTP flag or extra fields. Passwords are write-only; trim surrounding whitespace, then require eight characters, uppercase, digit and non-alphanumeric. Null bytes and more than 4096 UTF-8 bytes are rejected.
{"email_account_id":"11111111-1111-4111-8111-111111111111","active":true,"smtp_enabled":true,"reset_pending":false,"updated_at":"2026-09-23T00:00:00Z","enablement":{"setup_mode":"direct","changed":true,"setup_email":"not_requested","synchronization":"synchronized","reconciliation":"queued","recovery_actions":[]}}
Response fields are limited to this projection; no forwarding destination, password, hash, token or link is returned. Synchronization is synchronized, incomplete or skipped; reconciliation is queued or unavailable. Already-enabled requests return 200 with changed=false, setup_email=not_requested, null synchronization/reconciliation and no rehash, token invalidation, email, audit mutation or recovery task. This does not confirm that a supplied password matches.
Follow applicable recovery actions: wait_for_reconciliation, check_domain_dns (separate scope), check_recipient_inbox, request_new_link_after_cooldown, contact_support. A known saved state with an unexpected follow-up failure returns safe 503 with state_persisted=true, account/domain IDs and Location. Read permission is still needed for a subsequent GET. An uncertain database commit makes no persisted/rollback guarantee.
Retries, security and limits
Idempotency-Key has no replay contract. A lost direct/email Enable response may be retried: already enabled is a no-op and never rotates or resends. For recovery email, deliberately invoke reset-link separately. Never automatically retry reset-link issuance or uncertain email submission: immediate retry normally gets cooldown; a later request creates a different link. Pending state proves neither which call succeeded nor delivery.
New recipient links carry the bearer in a URL fragment, submitted only in request bodies. The page removes URL state, uses no-referrer/no-store, and does not carry tokens through language links. Legacy query links display a request-new-link message. Existing bearer values expire or are replaced normally; old URLs may already exist in upstream logs. Never log bodies or credential links.
smtp_enabled=true and a snapshot acknowledgment do not mean SMTP is ready. Plan entitlement, DNS, suspension, access policy and credits may separately block sending. Password completion does not revoke all sessions. Standalone SMTP gains no Send/Batch API. No SMTP disable, public DELETE, forwarding-destination editing or catch-all action is provided.
Errors: 401 invalid/expired/revoked PAT; 403 scope or SMTP plan; 404 hidden account; 409 ownership/billing transition; 422 payload/password/missing destination or SMTP disabled; 429 admission or bounded lock contention; 503 storage/post-commit failure. Secret-bearing validation input is never echoed.
Usage
GET /v1/usage requires usage:read and unrestricted domain access. It returns measured_at, plan, plan_name, email_accounts, smtp and smtp_sending_state.
email_accounts.used counts all accounts, including inactive ones; email_accounts.limit is the plan limit. smtp is null without SMTP entitlement. Otherwise it contains unit (recipients), period_start, nullable period_end, rolling_period, included_limit, used, included_used, included_available, purchased_available, reserved and usable_available. Usable capacity includes included and purchased credits after active reservations.
smtp_sending_state: not_entitled, suspended, billing_operation_in_progress, credits_exhausted or available. This describes account policy and capacity; sender/domain eligibility and admission limits still apply. A failed usage dependency returns an error, not fabricated zero usage.
Email logs
GET /v1/logs requires logs:read and a plan that includes logs. Omit domain_id for account-wide logs, respecting token domain restrictions; accounts with no eligible domains receive an empty page. Supply domain_id to filter to an owned domain with current verified ownership. Missing plan access returns 403; an explicitly selected unverified domain can return 409. Only activity attributable to current verified ownership is exposed. Pagination uses one global ordering across domains; domain or ownership changes can invalidate a continuation cursor.
Alongside pagination, filters are since (inclusive), until (exclusive), search, activity_type (forwarding or outbound) and status. Times must be RFC3339 with UTC/offset. The query window is at most 30 days; by default it ends at the first-page request time and starts 30 days earlier. This is a query-window limit, not a retention guarantee. Search is a case-insensitive literal address/identity substring, not message-content search.
Each item has id, occurred_at, activity_type, nullable sender, recipient, recipient_count, status, and nullable reason with smtp_code and enhanced_status. occurred_at is forwarding occurrence or outbound recipient submission time, not the latest delivery time. No message bodies are returned.
Statuses: submitted, accepted, deferred, bounced, failed, suppressed, unknown, forwarded, blocked. submitted means local submission; forwarded means forwarding handoff; accepted means trusted recipient SMTP acceptance, not inbox placement.
Forwarding tests
POST /v1/forwarding-tests requires forwarding-tests:create, exactly one Idempotency-Key header and a JSON email_account_id UUID. Optional locale is en (default) or ja. Keys are case-sensitive, 1–128 printable ASCII characters without whitespace. The diagnostic sends a server-controlled email through the selected alias to its configured forwarding destination.
export EMAIL_ACCOUNT_ID='UUID_FROM_EMAIL_ACCOUNTS_DATA'
export IDEMPOTENCY_KEY='forwarding-check-001'
curl --include --request POST "$BASE_URL/v1/forwarding-tests" \
--header "Authorization: Bearer $MAILLOGIC_TOKEN" \
--header "Idempotency-Key: $IDEMPOTENCY_KEY" \
--header 'Content-Type: application/json' \
--data "{\"email_account_id\":\"$EMAIL_ACCOUNT_ID\",\"locale\":\"en\"}"
export TEST_ID='UUID_FROM_TEST_RESPONSE'
curl "$BASE_URL/v1/forwarding-tests/$TEST_ID" \
--header "Authorization: Bearer $MAILLOGIC_TOKEN"Durable acceptance returns 202, even during a temporary queue outage. Location points to /v1/forwarding-tests/{id}. Repeating the same key and request in the same account returns the same test without another send, with Idempotency-Replayed: true. Replay is supported for at least 30 days; see replay_expires_at. A changed request with the same key returns 409. A different test for the same alias can hit the five-minute cooldown (429 with Retry-After).
GET /v1/forwarding-tests/{id} requires forwarding-tests:read. It reads and reconciles results; it never sends another email. Poll active results according to poll_after_ms. Active statuses are queued, submitting, checking; terminal statuses are confirmed and failed. confirmed means MailLogic observed destination SMTP acceptance, not inbox placement. A timeout or uncertain result does not prove non-delivery.
Both operations return id, nullable email_account_id and domain_id, alias, destination, locale, status, nullable failure_code, created_at, nullable submitted_at, confirmed_at and failed_at, monitoring_deadline_at, replay_expires_at and nullable poll_after_ms. Domain-restricted tokens cannot read historical tests after their domain is deleted.
Send and Batch Send
Use domain API keys, not PATs. Generate a key in the selected domain’s API section. Sending requires an eligible plan, an active sender on the key’s domain with SMTP enabled and a password set, and verified ownership/sending DNS.
POST /v1/send: form data withfrom_email, repeatedto_email,subject, optionaltext_content,html_content,display_nameandattachments. OptionalIdempotency-Key. A 200 response includesstatus,message,message_id,from_email,to_email, recipient arrays (accepted_recipients,rejected_recipients,suppressed_recipients) and their counts.POST /v1/batch-send/preview: validate a JSON draft and return previews, recipient counts, headers, referenced variables, warnings and quota; does not send.POST /v1/batch-send: submit the JSON draft with requiredIdempotency-Key. Returns 202 withbatch,duplicate,quotaand aLocationheader.GET /v1/batch-send/{batch_id}: return the batch object and progress/outcome counts.
Batch drafts contain from_email, subject_template, text_template/html_template and recipients with email and variables. See the Send API and Batch Send guide for full examples, limits, idempotency and response details. Submission success does not guarantee final delivery.
Reply conversations
Use management PATs or the existing MCP OAuth delegation flow; domain Send keys are not accepted. Explicit replies:read permits message bodies and participant addresses. Sending also requires replies:send, sends as you, and consumes SMTP credits. Existing grants gain no new permissions.
List filters: domain_id, batch_id, inclusive updated_after, latest_message_direction=inbound|outbound, limit (50, maximum 100), and cursor. Only current-ownership conversations with a visible human reply are returned. Cursors bind unchanged filters and a message-activity snapshot. Use overlapping polling and ID deduplication; this is not an exactly-once change feed.
Detail returns the most recent 100 visible messages (maximum 500), ordered chronologically within the window, plus has_more_before, older_cursor, and reply_version. Pass older_cursor as cursor with the same limit. A changed conversation requires refreshing recent context. Reads never mark dashboard messages read or clean up content.
Plain text only. content_state is active, expired, or purged; unavailable subject/body/preview are null even before cleanup. No HTML, attachment downloads, token addresses, or thread-header controls. Deleted conversations return 404 until a new human reply revives them; old purged content stays hidden. Ambiguous historical ownership is inaccessible.
Send requires Idempotency-Key (1–128 letters, digits, dot, underscore, colon or hyphen), and exactly the JSON fields below. MailLogic chooses sender, recipient, subject, and threading. Participant mismatch and divergent Reply-To warnings remain visible.
GET /v1/reply-conversations?latest_message_direction=inbound
GET /v1/reply-conversations/{conversation_id}
POST /v1/reply-conversations/{conversation_id}/messages
Authorization: Bearer <management-token>
Idempotency-Key: reply-001
Content-Type: application/json
{"text_content":"Thanks for your reply.","reply_version":"<from-detail>"}A stale version returns 409 replies.context_changed, including a new message from the same sender. Same key and request replays the result; changed text/version returns 409 replies.idempotency_key_conflict. For in-progress or ambiguous SMTP outcomes, retry only the identical request/key—never automatically send with a new key. Successful status: submitted means SMTP submission acceptance, not inbox placement or final delivery. Replay results contain no body. Scope failures are 403, inaccessible IDs 404, insufficient credits 402, body size 413, invalid requests 422, rate limits 429, and temporary infrastructure failures 503.
Errors and rate limits
Management errors use this envelope. detail.request_id matches the X-Request-ID response header; include it when reporting an issue. Successful management responses also carry that header. Sending endpoints retain their separate error contract; see the sending guide.
{
"detail": {
"code": "auth.insufficient_scope",
"message": "The token does not grant this operation.",
"params": {"required_scope": "domains:read"},
"request_id": "00000000-0000-4000-8000-000000000001"
}
}- 401: missing, invalid, expired or revoked PAT (
WWW-Authenticate: Bearer). - 403: missing scope, restricted token used for account-wide usage, or missing plan/access entitlement.
- 404: missing resource, another account’s resource or a domain outside the token’s restriction.
- 409: ownership/eligibility conflict or an Idempotency-Key reused with changed input.
- 422: invalid parameters, UUID, cursor, date range, body or idempotency header.
- 429: rate limit, concurrent action or forwarding-test cooldown. Wait the
Retry-Afterseconds before retrying. - 503: temporarily unavailable dependency or operation. Honor
Retry-Afterwhen provided. For uncertain forwarding-test creation, retry with the same key and request.
Management authentication currently limits peer requests to 120/minute, token credential requests to 60/minute, and authenticated account requests to 300/minute. Action-specific limits also apply. Honor returned retry guidance rather than polling aggressively. Ordinary Send API traffic has a separate account-wide limit of one new SMTP submission per second and returns 429 with Retry-After when exceeded.
OpenAPI
The public OpenAPI schema is the machine-readable contract for these 27 operations, including request/response schemas and authentication requirements. It is publicly readable without a token.