Send a transactional email, immediately or scheduled. scheduled_at takes a relative phrase like 'in 3 days' or an ISO timestamp. The From domain must already be verified. Every accepted send answers with the same fields: id, status, thread_id, scheduled_at, skipped, reason and approval_id. skipped: true (status 'rejected', with reason) means every recipient was suppressed or opted out and nothing was sent; a retry answers the same. status 'pending_approval' (with approval_id) means a person must release it; a retry does not release it. Otherwise skipped is false and reason and approval_id are null. idempotency_key makes a retry of the identical message safe; it matches only the identical message. Refusals, by type: 422 no_verified_identity (the From domain has no verified sending domain; a retry answers the same until it is added and verified); 422 invalid_request (a bad field, or more than 50 recipients across to, cc and bcc, which fit as separate messages or a campaign); 422 unknown_topic; 422 invalid_schedule; 403 recipient_not_allowed (this key's allowlist); 429 daily_limit (this key's daily cap; it resets tomorrow, and a retry today answers the same); four billing refusals, all 402 and none retryable — plan_limit_reached (the Free plan's 3,000 emails a month are spent; a person has to activate paid sending), payment_method_required (the workspace has never had a payment method verified, so no outbound email leaves it at all, including on Free; only a person can add one, in the dashboard), billing_past_due (the payment failed for good) and budget_exceeded (the workspace's own spend ceiling; by default it stops marketing and lets transactional through); 422 workspace_suspended and 422 no_postal_address (a person has to act). 502 ses_error is the provider, and a later retry with the same idempotency_key is safe. get_usage shows which of these applies before a send, and apart from ses_error none clears by repeating the call.
List messages newest first with their delivery status, including held, scheduled, skipped and failed ones and the mail campaigns and automations sent. Filter by status or recipient. Paged: at most 100 per call; while has_more is true, next_cursor passed back as cursor with the same filters returns the next page. An unknown status is refused with 422 invalid_request rather than answering an empty log.
Fetch one message with its full event timeline (send, delivery, bounce, complaint, open, click). The timeline shows why an email didn't arrive.
Cancel a scheduled email before it sends. Only works while status is 'scheduled': a message that has already started sending, or is in any other state, answers 409 invalid_state naming its status; a retry answers the same, and get_email shows where it stands. An unknown id answers 404 not_found.
List sending domains with their verification status and the DNS records each one needs. Each record shows what is currently published, so this diagnoses a stuck verification. mail_from says whether SES has adopted the bounce. subdomain as the Return-Path: pending while SES polls for its MX record, then active. SES polls for 72 hours from when the domain was added, not from when the MX appears, and then marks it failed; publishing the MX later and calling verify_sending_domain restarts it. A verified domain sends fine meanwhile; only SPF alignment waits.
Register a sending domain and get back the DNS records to publish. It takes the domain mail is sent from — mail.<domain> and news.<domain> are provisioned beneath it and the right one is chosen per message, so a marketing complaint spike can never affect password reset delivery. risk_class provisions one of the two on its own. Two records come back marked optional: an inbound MX so replies land in threads, and a link. CNAME that turns on click tracking on the customer's own name once its certificate is issued. Adding a domain that already exists returns it rather than a duplicate. A public suffix such as co.uk or github.io is not a domain anyone can send from and is refused with 422 invalid_request; the domain registered under it, e.g. example.co.uk, is accepted. Passing mail.example.co.uk or news.example.co.uk is read as example.co.uk. A plan with no room for another domain answers 402 plan_limit_reached; a retry answers the same until a person upgrades or removes a domain.
Re-check a domain's DNS records now instead of waiting for the background monitor. Also restarts bounce-path (mail_from) verification when SES gave up before the MX record existed.
List addresses we refuse to mail and why (hard_bounce, complaint, unsubscribe, manual, list_hygiene), newest first, each with its scope. When someone reports not receiving email, this shows whether the address is suppressed. email returns one address's suppressions directly; scanning pages instead is how the wrong suppression gets cleared. At most 100 per call; while has_more is true, next_cursor passed back as cursor returns the next page.
Stop sending to an address. Scope 'marketing' leaves transactional mail working; the default is 'all'. Reason 'unsubscribe' is a real opt-out: it also cancels the person's queued scheduled sends and ends their automation enrolments, which is what a person who asked to stop expects and 'manual' does not do. A hard bounce or complaint already on file is never replaced; the response is the stored suppression (id, email, reason, scope, detail, created_at), so its reason says which one stands.
Remove a suppression so the address can be mailed again. A hard bounce means the address was rejected by the receiving server, and re-sending raises the bounce rate that AWS enforces on. The scope must match the stored one: removed: false means nothing was suppressed in that scope (an address suppressed for 'marketing' is not lifted by 'all'); list_suppressions with email shows the scope that is stored.
Create a campaign as a draft. Nothing is sent: preview_broadcast reports its reach and send_broadcast sends it. identity_id must be a marketing sending domain (see list_sending_domains; risk_class 'marketing'). topic_key must name an existing topic (list_topics); an unknown one is refused with 422 unknown_topic, since it would count everyone as opted out. A segment_id must filter the same audience as audience_id. An A/B test takes 2 to 10 'variants' that differ in subject, from_name or send_at, and optionally 'ab_test'. A subject or from-name test sends sample_share of the audience (default 0.2) split evenly across the variants, waits decide_after_minutes (default 240) after the sample is out, picks the variant with the best unique open rate (or click rate with metric 'click'), and sends the rest to it. Each variant needs at least 100 recipients in the sample or the send is refused — preview_broadcast shows the number. Metric 'click' only works once the domain has click tracking; until then every variant shows zero clicks and the first variant wins by default. The response's web_version_url is a public page of the campaign (one URL, no recipient's unsubscribe link) to share on a site or social post; null until click tracking is active.
One campaign, with a 'progress' object while it is sending, paused or testing: how many addresses are still pending, sent, failed, or skipped because the person opted out after the campaign started. This is what tells a paused campaign that is still making progress from one that is waiting; pause_reason says on what, and resume_after when a warm-up pause renews. progress is null for a campaign not in flight. For an A/B test, progress.by_variant is a list of { key, pending, sent, failed, skipped } in variant order, ending with a row whose key is null: the addresses still waiting for the winner. An A/B test also carries 'ab_test' with live per-variant results — sent, unique opens, unique clicks and their rates — plus 'decide_at' and, once decided, 'winner' and 'decided_by'. Status 'testing' means the sample is out and the rest of the audience is waiting on the decision.
+43 more tools listed on main page