{"openapi":"3.1.0","info":{"title":"MailLogic Public API","version":"1.0.0"},"servers":[{"url":"https://api.maillogic.io"}],"paths":{"/v1/send":{"post":{"tags":["send-api"],"summary":"Send Email With Api Key","description":"Public email sending endpoint for domain API keys.","operationId":"send_email_with_api_key_v1_send_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_email_with_api_key_v1_send_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"DomainKeyBearer":[]},{"DomainKeyHeader":[]}]}},"/v1/batch-send/preview":{"post":{"tags":["batch-send-api"],"summary":"Preview Batch Send With Api Key","operationId":"preview_batch_send_with_api_key_v1_batch_send_preview_post","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSendAPIDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSendPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"DomainKeyBearer":[]},{"DomainKeyHeader":[]}]}},"/v1/batch-send":{"post":{"tags":["batch-send-api"],"summary":"Create Batch Send With Api Key","operationId":"create_batch_send_with_api_key_v1_batch_send_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSendAPIDraftRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSendCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"DomainKeyBearer":[]},{"DomainKeyHeader":[]}]}},"/v1/batch-send/{batch_id}":{"get":{"tags":["batch-send-api"],"summary":"Read Batch Send With Api Key","operationId":"read_batch_send_with_api_key_v1_batch_send__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSendJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"DomainKeyBearer":[]},{"DomainKeyHeader":[]}]}},"/v1/domains":{"get":{"tags":["domains"],"summary":"List Domains","operationId":"listDomains","security":[{"AccountPAT":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cursor"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":253},{"type":"null"}],"description":"Exact domain name, case-insensitive; a final dot is ignored.","title":"Name"},"description":"Exact domain name, case-insensitive; a final dot is ignored."},{"name":"ownership_status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","verified","revoked"],"type":"string"},{"type":"null"}],"title":"Ownership Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPageV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"}},"x-required-scopes":["domains:read"]}},"/v1/domains/{id}":{"get":{"tags":["domains"],"summary":"Read Domain","operationId":"getDomain","security":[{"AccountPAT":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"}},"x-required-scopes":["domains:read"]}},"/v1/email-accounts":{"get":{"tags":["email-accounts"],"summary":"List Email Accounts","operationId":"listEmailAccounts","security":[{"AccountPAT":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cursor"}},{"name":"domain_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Domain Id"}},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAccountPageV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"}},"x-required-scopes":["email-accounts:read"]}},"/v1/email-accounts/{id}":{"get":{"tags":["email-accounts"],"summary":"Read Email Account","operationId":"getEmailAccount","security":[{"AccountPAT":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAccountV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"}},"x-required-scopes":["email-accounts:read"]}},"/v1/usage":{"get":{"tags":["usage"],"summary":"Read Usage","operationId":"getUsage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageV1"}}}},"401":{"description":"Unauthorized","headers":{"WWW-Authenticate":{"description":"Bearer authentication challenge.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}},"429":{"description":"Too Many Requests","headers":{"Retry-After":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}}},"security":[{"AccountPAT":[]}],"x-required-scopes":["usage:read"]}},"/v1/logs":{"get":{"tags":["logs"],"summary":"List Logs","operationId":"listLogs","security":[{"AccountPAT":[]}],"parameters":[{"name":"domain_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Cursor"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Inclusive RFC3339 UTC/offset time. Maximum window 30 days.","title":"Since"},"description":"Inclusive RFC3339 UTC/offset time. Maximum window 30 days."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Exclusive RFC3339 UTC/offset time. Defaults to first-page request time; since defaults to 30 days before until.","title":"Until"},"description":"Exclusive RFC3339 UTC/offset time. Defaults to first-page request time; since defaults to 30 days before until."},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":320,"description":"Case-insensitive literal address/identity substring, trimmed; no message-content search.","default":"","title":"Search"},"description":"Case-insensitive literal address/identity substring, trimmed; no message-content search."},{"name":"activity_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["forwarding","outbound"],"type":"string"},{"type":"null"}],"title":"Activity Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["submitted","accepted","deferred","bounced","failed","suppressed","unknown","forwarded","blocked"],"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPageV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"},"409":{"description":"Current domain ownership must be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}}},"x-required-scopes":["logs:read"]}},"/v1/domains/{id}/check-dns":{"post":{"tags":["domains"],"summary":"Check Dns","description":"Refresh ownership and DNS state and synchronize mail configuration. No Idempotency-Key required. 404 hides foreign/restricted domains; 429 indicates throttling or a concurrent check; 503 indicates indeterminate DNS, storage or downstream failure. Error params.state_persisted indicates an earlier commit; retry the same action. No request payload is required.","operationId":"checkDomainDNS","security":[{"AccountPAT":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DNSCheckV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"},"409":{"description":"Another account holds verified ownership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}}},"x-required-scopes":["domains:check-dns"]}},"/v1/forwarding-tests":{"post":{"tags":["forwarding-tests"],"summary":"Create Forwarding Test V1","description":"Send a server-controlled forwarding diagnostic. Exactly one Idempotency-Key is required; 1-128 printable ASCII characters excluding whitespace, case-sensitive. Replay is account-scoped and returns the same test before cooldown, without enqueue or send, for at least 30 days. 202 means durable acceptance, including during temporary queue outages. Confirmed means observed destination SMTP acceptance, not inbox placement. Monitoring and dispatch timings are operational policy. Expiry or uncertainty does not prove nondelivery.","operationId":"createForwardingTest","security":[{"AccountPAT":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardingTestCreateV1"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardingTestV1"}}},"headers":{"Location":{"schema":{"type":"string"},"description":"Test resource URL."},"Idempotency-Replayed":{"schema":{"type":"string"},"description":"true on replay."}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"},"409":{"description":"Ineligible email account or idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}}}},"x-required-scopes":["forwarding-tests:create"]}},"/v1/forwarding-tests/{id}":{"get":{"tags":["forwarding-tests"],"summary":"Get Forwarding Test V1","description":"Read and reconcile stored diagnostic evidence. Never sends or enqueues. Restricted tokens cannot read historical tests whose domain has been deleted. Confirmed means destination SMTP acceptance, not inbox placement; terminal outcomes remain stable.","operationId":"getForwardingTest","security":[{"AccountPAT":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardingTestV1"}}}},"401":{"headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer authentication challenge."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Unprocessable Entity"},"429":{"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the rate-limit window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Too Many Requests"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementError"}}},"description":"Service Unavailable"}},"x-required-scopes":["forwarding-tests:read"]}}},"components":{"schemas":{"BatchSendAPIDraftRequest":{"properties":{"from_email":{"type":"string","maxLength":320,"title":"From Email"},"subject_template":{"type":"string","title":"Subject Template","default":""},"text_template":{"type":"string","title":"Text Template","default":""},"html_template":{"type":"string","title":"Html Template","default":""},"recipients":{"items":{"$ref":"#/components/schemas/BatchSendAPIRecipient"},"type":"array","title":"Recipients"}},"type":"object","required":["from_email"],"title":"BatchSendAPIDraftRequest"},"BatchSendAPIRecipient":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"variables":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Variables"}},"type":"object","required":["email"],"title":"BatchSendAPIRecipient"},"BatchSendCreateResponse":{"properties":{"batch":{"$ref":"#/components/schemas/BatchSendJobRead"},"duplicate":{"type":"boolean","title":"Duplicate","default":false},"quota":{"$ref":"#/components/schemas/BatchSendQuotaRead"}},"type":"object","required":["batch","quota"],"title":"BatchSendCreateResponse"},"BatchSendJobRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"domain_id":{"type":"string","format":"uuid","title":"Domain Id"},"from_email":{"type":"string","title":"From Email"},"status":{"type":"string","title":"Status"},"recipient_count":{"type":"integer","title":"Recipient Count"},"sent_count":{"type":"integer","title":"Sent Count"},"failed_count":{"type":"integer","title":"Failed Count"},"unknown_count":{"type":"integer","title":"Unknown Count"},"suppressed_count":{"type":"integer","title":"Suppressed Count"},"pending_count":{"type":"integer","title":"Pending Count"},"accepted_count":{"type":"integer","title":"Accepted Count"},"deferred_count":{"type":"integer","title":"Deferred Count"},"bounced_count":{"type":"integer","title":"Bounced Count"},"delivery_failed_count":{"type":"integer","title":"Delivery Failed Count"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"pacing_state":{"type":"string","title":"Pacing State"},"pacing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pacing Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"payload_purged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Payload Purged At"}},"type":"object","required":["id","domain_id","from_email","status","recipient_count","sent_count","failed_count","unknown_count","suppressed_count","pending_count","accepted_count","deferred_count","bounced_count","delivery_failed_count","error_code","pacing_state","pacing_reason","created_at","started_at","completed_at","payload_purged_at"],"title":"BatchSendJobRead"},"BatchSendPreviewResponse":{"properties":{"recipient_count":{"type":"integer","title":"Recipient Count"},"sendable_recipient_count":{"type":"integer","title":"Sendable Recipient Count","default":0},"suppressed_recipient_count":{"type":"integer","title":"Suppressed Recipient Count","default":0},"headers":{"items":{"type":"string"},"type":"array","title":"Headers"},"referenced_variables":{"items":{"type":"string"},"type":"array","title":"Referenced Variables"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"previews":{"items":{"$ref":"#/components/schemas/BatchSendRenderedPreview"},"type":"array","title":"Previews"},"quota":{"$ref":"#/components/schemas/BatchSendQuotaRead"}},"type":"object","required":["recipient_count","headers","referenced_variables","warnings","previews","quota"],"title":"BatchSendPreviewResponse"},"BatchSendQuotaRead":{"properties":{"used":{"type":"integer","title":"Used"},"reserved":{"type":"integer","title":"Reserved"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["used","reserved","limit","remaining"],"title":"BatchSendQuotaRead"},"BatchSendRenderedPreview":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"to_email":{"type":"string","title":"To Email"},"subject":{"type":"string","title":"Subject"},"text_content":{"type":"string","title":"Text Content"},"html_content":{"type":"string","title":"Html Content"}},"type":"object","required":["row_number","to_email","subject","text_content","html_content"],"title":"BatchSendRenderedPreview"},"Body_send_email_with_api_key_v1_send_post":{"properties":{"from_email":{"type":"string","title":"From Email"},"to_email":{"items":{"type":"string"},"type":"array","title":"To Email"},"subject":{"type":"string","title":"Subject"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"html_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Content"},"text_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Content"},"attachments":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["from_email","to_email","subject"],"title":"Body_send_email_with_api_key_v1_send_post"},"CachedDNSV1":{"properties":{"mx_10":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mx 10"},"mx_20":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mx 20"},"spf":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spf"},"dkim":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim"},"dkim_smtp1":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim Smtp1"},"dkim_smtp2":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim Smtp2"},"dmarc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dmarc"}},"type":"object","required":["mx_10","mx_20","spf","dkim","dkim_smtp1","dkim_smtp2","dmarc"],"title":"CachedDNSV1","description":"Cached DNS observations. Null when unchecked, or for outbound fields without SMTP entitlement."},"DNSCheckV1":{"properties":{"checks":{"$ref":"#/components/schemas/DNSObservationV1"},"ownership":{"$ref":"#/components/schemas/OwnershipObservationV1"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"domain":{"$ref":"#/components/schemas/DomainV1"}},"type":"object","required":["checks","ownership","checked_at","domain"],"title":"DNSCheckV1"},"DNSObservationV1":{"properties":{"mx_10":{"type":"boolean","title":"Mx 10"},"mx_20":{"type":"boolean","title":"Mx 20"},"mx":{"type":"boolean","title":"Mx"},"unexpected_mx":{"type":"boolean","title":"Unexpected Mx"},"spf":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spf"},"dkim":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim"},"dkim_smtp1":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim Smtp1"},"dkim_smtp2":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim Smtp2"},"dmarc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dmarc"}},"type":"object","required":["mx_10","mx_20","mx","unexpected_mx","spf","dkim","dkim_smtp1","dkim_smtp2","dmarc"],"title":"DNSObservationV1","description":"Live DNS observations. Outbound fields are null without SMTP entitlement."},"DomainPageV1":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DomainV1"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","next_cursor"],"title":"DomainPageV1"},"DomainV1":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"ownership_status":{"type":"string","enum":["pending","verified","revoked"],"title":"Ownership Status"},"forwarding_ready":{"type":"boolean","title":"Forwarding Ready","description":"Cached ownership and MX readiness; not a live delivery guarantee."},"smtp_ready":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smtp Ready","description":"Cached domain-level sending readiness and suspension state. Null when the account has no SMTP entitlement; false when entitled but not ready. Individual sender checks still apply."},"dns":{"$ref":"#/components/schemas/CachedDNSV1"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","ownership_status","forwarding_ready","smtp_ready","dns","last_checked_at","created_at","updated_at"],"title":"DomainV1"},"EmailAccountPageV1":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EmailAccountV1"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","next_cursor"],"title":"EmailAccountPageV1"},"EmailAccountUsageV1":{"properties":{"used":{"type":"integer","title":"Used","description":"All email accounts, including inactive accounts, matching the dashboard quota."},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["used","limit"],"title":"EmailAccountUsageV1"},"EmailAccountV1":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"domain_id":{"type":"string","format":"uuid","title":"Domain Id"},"address":{"type":"string","title":"Address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"forward_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forward To","description":"Sensitive forwarding destination; authorized by email-accounts:read."},"active":{"type":"boolean","title":"Active"},"smtp_enabled":{"type":"boolean","title":"Smtp Enabled","description":"Configuration state only; not a guarantee that sending is currently possible."},"forwarding_test_eligibility":{"$ref":"#/components/schemas/ForwardingTestEligibilityV1"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","domain_id","address","display_name","forward_to","active","smtp_enabled","forwarding_test_eligibility","created_at","updated_at"],"title":"EmailAccountV1"},"ForwardingTestCreateV1":{"properties":{"email_account_id":{"type":"string","format":"uuid","title":"Email Account Id"},"locale":{"type":"string","enum":["en","ja"],"title":"Locale","default":"en"}},"additionalProperties":false,"type":"object","required":["email_account_id"],"title":"ForwardingTestCreateV1"},"ForwardingTestEligibilityV1":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"reason":{"anyOf":[{"type":"string","enum":["ownership_mismatch","username_inactive","forwarding_destination_missing","domain_ownership_unverified","inbound_mx_unverified"]},{"type":"null"}],"title":"Reason"}},"type":"object","required":["eligible","reason"],"title":"ForwardingTestEligibilityV1"},"ForwardingTestV1":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email_account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Email Account Id"},"domain_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Domain Id"},"alias":{"type":"string","title":"Alias"},"destination":{"type":"string","title":"Destination"},"locale":{"type":"string","enum":["en","ja"],"title":"Locale"},"status":{"type":"string","enum":["queued","submitting","checking","confirmed","failed"],"title":"Status"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Failed At"},"monitoring_deadline_at":{"type":"string","format":"date-time","title":"Monitoring Deadline At"},"replay_expires_at":{"type":"string","format":"date-time","title":"Replay Expires At"},"poll_after_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poll After Ms"}},"type":"object","required":["id","email_account_id","domain_id","alias","destination","locale","status","failure_code","created_at","submitted_at","confirmed_at","failed_at","monitoring_deadline_at","replay_expires_at","poll_after_ms"],"title":"ForwardingTestV1"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LogPageV1":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LogV1"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","next_cursor"],"title":"LogPageV1"},"LogReasonV1":{"properties":{"smtp_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Smtp Code"},"enhanced_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enhanced Status"}},"type":"object","required":["smtp_code","enhanced_status"],"title":"LogReasonV1"},"LogV1":{"properties":{"id":{"type":"string","title":"Id","description":"Stable source-qualified activity identity."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"Forwarding occurrence or outbound recipient submission time, in UTC; not latest delivery time."},"activity_type":{"type":"string","enum":["forwarding","outbound"],"title":"Activity Type"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"recipient_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recipient Count"},"status":{"type":"string","enum":["submitted","accepted","deferred","bounced","failed","suppressed","unknown","forwarded","blocked"],"title":"Status","description":"Accepted means trusted recipient SMTP acceptance, not inbox placement. Forwarded means forwarding handoff. Submitted is local submission only."},"reason":{"anyOf":[{"$ref":"#/components/schemas/LogReasonV1"},{"type":"null"}]}},"type":"object","required":["id","occurred_at","activity_type","sender","recipient","recipient_count","status","reason"],"title":"LogV1"},"ManagementError":{"properties":{"detail":{"$ref":"#/components/schemas/ManagementErrorDetail"}},"type":"object","required":["detail"],"title":"ManagementError"},"ManagementErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["code","message","request_id"],"title":"ManagementErrorDetail"},"OwnershipObservationV1":{"properties":{"verified":{"type":"boolean","title":"Verified"},"state":{"type":"string","enum":["pending","verified","revoked"],"title":"State"}},"type":"object","required":["verified","state"],"title":"OwnershipObservationV1"},"SMTPUsageV1":{"properties":{"unit":{"type":"string","const":"recipients","title":"Unit","default":"recipients"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"},"rolling_period":{"type":"boolean","title":"Rolling Period"},"included_limit":{"type":"integer","title":"Included Limit"},"used":{"type":"integer","title":"Used"},"included_used":{"type":"integer","title":"Included Used"},"included_available":{"type":"integer","title":"Included Available"},"purchased_available":{"type":"integer","title":"Purchased Available"},"reserved":{"type":"integer","title":"Reserved"},"usable_available":{"type":"integer","title":"Usable Available","description":"Included plus purchased recipient capacity, after active reservations."}},"type":"object","required":["period_start","period_end","rolling_period","included_limit","used","included_used","included_available","purchased_available","reserved","usable_available"],"title":"SMTPUsageV1"},"UsageV1":{"properties":{"measured_at":{"type":"string","format":"date-time","title":"Measured At"},"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"email_accounts":{"$ref":"#/components/schemas/EmailAccountUsageV1"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/SMTPUsageV1"},{"type":"null"}],"description":"Null when the plan does not include SMTP; never substituted for a failed usage dependency."},"smtp_sending_state":{"type":"string","enum":["not_entitled","suspended","billing_operation_in_progress","credits_exhausted","available"],"title":"Smtp Sending State","description":"Account-level policy and credit availability only. Sender/domain eligibility and admission limits still apply; this is not a delivery guarantee."}},"type":"object","required":["measured_at","plan","plan_name","email_accounts","smtp","smtp_sending_state"],"title":"UsageV1"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"SendResponse":{"properties":{"status":{"enum":["success","partial_success","suppressed"],"title":"Status","type":"string"},"message":{"title":"Message","type":"string"},"message_id":{"title":"Message Id","type":"string"},"from_email":{"title":"From Email","type":"string"},"to_email":{"items":{"type":"string"},"title":"To Email","type":"array"},"accepted_recipients":{"items":{"type":"string"},"title":"Accepted Recipients","type":"array"},"rejected_recipients":{"items":{"type":"string"},"title":"Rejected Recipients","type":"array"},"suppressed_recipients":{"items":{"type":"string"},"title":"Suppressed Recipients","type":"array"},"recipient_count":{"title":"Recipient Count","type":"integer"},"accepted_recipient_count":{"title":"Accepted Recipient Count","type":"integer"},"rejected_recipient_count":{"title":"Rejected Recipient Count","type":"integer"},"suppressed_recipient_count":{"title":"Suppressed Recipient Count","type":"integer"}},"required":["status","message","message_id","from_email","to_email","accepted_recipients","rejected_recipients","suppressed_recipients","recipient_count","accepted_recipient_count","rejected_recipient_count","suppressed_recipient_count"],"title":"SendResponse","type":"object"}},"securitySchemes":{"AccountPAT":{"type":"http","description":"Account automation token (mlpat_). Does not authorize sending.","scheme":"bearer"},"DomainKeyBearer":{"type":"http","scheme":"bearer","description":"Existing mlk_ domain sending key. Account PATs are not accepted."},"DomainKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative to domain-key bearer authorization."}}}}