{"openapi":"3.0.1","info":{"title":"Make Sender API","version":"v1","description":"API for managing sender domains, mailing lists, recipients, suppressions, and message sending.\n\nAll endpoints use HTTP Basic Auth.\n\nIn addition to this REST API, Make Sender provides an SMTP interface on port 2525 —\nsee the SMTP documentation for details.\n\nExplore the SMTP and HTTP API text documentation [Make Sender Docs](https://app.makesender.no/docs)\n"},"servers":[{"url":"https://api.makesender.no"}],"components":{"securitySchemes":{"basic_auth":{"type":"http","scheme":"basic","description":"HTTP Basic Auth using API key username and secret"}},"schemas":{"DnsRecord":{"type":"object","required":["name","type","host","expected_value","verified","required"],"properties":{"name":{"type":"string","enum":["dkim","spf","dmarc","mx"],"example":"dkim"},"type":{"type":"string","enum":["TXT","MX"],"example":"TXT"},"host":{"type":"string","description":"DNS name where the record must be published","example":"make1._domainkey.example.com"},"expected_value":{"type":"string","description":"Value the record must contain","example":"v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."},"current_value":{"type":"string","nullable":true,"description":"Value currently found in DNS, or null if no record was found","example":"v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."},"verified":{"type":"boolean","description":"Whether the current DNS record satisfies the requirement","example":true},"required":{"type":"boolean","description":"Whether this record is required for the domain to be verified. MX is optional and only needed to receive remote bounces.","example":true}}},"Domain":{"type":"object","required":["id","domain","verified","open_tracking","click_tracking","rewrite_from_header","created_at","updated_at"],"properties":{"id":{"type":"integer","example":42},"domain":{"type":"string","example":"mail.example.com"},"verified":{"type":"boolean","description":"True when DKIM, SPF and DMARC are all verified. Sending requires a verified domain.","example":false},"open_tracking":{"type":"boolean","example":true},"click_tracking":{"type":"boolean","example":true},"rewrite_from_header":{"type":"boolean","description":"Rewrite the From address from subdomain to parent domain","example":false},"dkim_created_at":{"type":"string","nullable":true,"description":"RFC 2822 timestamp of the current DKIM key","example":"Wed, 21 May 2026 10:00:00 +0000"},"created_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"},"updated_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"}}},"DomainWithDns":{"type":"object","required":["id","domain","verified","open_tracking","click_tracking","rewrite_from_header","created_at","updated_at","dns_records"],"properties":{"id":{"type":"integer","example":42},"domain":{"type":"string","example":"mail.example.com"},"verified":{"type":"boolean","description":"True when DKIM, SPF and DMARC are all verified. Sending requires a verified domain.","example":false},"open_tracking":{"type":"boolean","example":true},"click_tracking":{"type":"boolean","example":true},"rewrite_from_header":{"type":"boolean","description":"Rewrite the From address from subdomain to parent domain","example":false},"dkim_created_at":{"type":"string","nullable":true,"description":"RFC 2822 timestamp of the current DKIM key","example":"Wed, 21 May 2026 10:00:00 +0000"},"created_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"},"updated_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"},"dns_records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}}}},"DomainInput":{"type":"object","required":["domain"],"properties":{"domain":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Sender domain, e.g. a dedicated subdomain","example":"mail.example.com"},"open_tracking":{"type":"boolean","example":true},"click_tracking":{"type":"boolean","example":true},"rewrite_from_header":{"type":"boolean","example":false}}}}},"DomainPatchInput":{"type":"object","required":["domain"],"properties":{"domain":{"type":"object","properties":{"open_tracking":{"type":"boolean","example":true},"click_tracking":{"type":"boolean","example":false},"rewrite_from_header":{"type":"boolean","example":false}}}}},"DomainResponse":{"type":"object","required":["domain"],"properties":{"domain":{"$ref":"#/components/schemas/Domain"}}},"DomainWithDnsResponse":{"type":"object","required":["domain"],"properties":{"domain":{"$ref":"#/components/schemas/DomainWithDns"}}},"PaginatedDomains":{"type":"object","required":["total_count","current_page","per_page","total_pages","items"],"properties":{"total_count":{"type":"integer","example":250},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":100},"total_pages":{"type":"integer","example":3},"items":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}},"Error":{"type":"object","required":["message"],"properties":{"message":{"type":"string","example":"Resource not found"}}},"ImportResult":{"type":"object","required":["message","imported","failed"],"properties":{"message":{"type":"string","example":"Import successful"},"imported":{"type":"integer","example":1000},"failed":{"type":"integer","example":2},"errors":{"type":"array","items":{"type":"string"},"nullable":true,"example":["Row 5: invalid email format"]}}},"List":{"type":"object","required":["id","address","alias","title","recipients_count","created_at","updated_at"],"properties":{"id":{"type":"integer","example":42},"address":{"type":"string","format":"email","example":"newsletter@makesender.no"},"alias":{"type":"string","example":"newsletter"},"title":{"type":"string","example":"Monthly Newsletter"},"recipients_count":{"type":"integer","example":1234},"last_sending_at":{"type":"string","nullable":true,"description":"RFC 2822 timestamp of the last sending, or null if never sent","example":"Wed, 21 May 2026 10:00:00 +0000"},"created_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"},"updated_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"}}},"ListInput":{"type":"object","required":["list"],"properties":{"list":{"type":"object","required":["alias","title"],"properties":{"alias":{"type":"string","description":"Unique identifier, used to build the list email address","example":"newsletter"},"title":{"type":"string","description":"Display name for the list","example":"Monthly Newsletter"}}}}},"ListPatchInput":{"type":"object","properties":{"list":{"type":"object","properties":{"alias":{"type":"string","example":"newsletter"},"title":{"type":"string","example":"Monthly Newsletter"}}}}},"ListResponse":{"type":"object","required":["list"],"properties":{"list":{"$ref":"#/components/schemas/List"}}},"PaginatedLists":{"type":"object","required":["total_count","current_page","per_page","total_pages","items"],"properties":{"total_count":{"type":"integer","example":42},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":100},"total_pages":{"type":"integer","example":1},"items":{"type":"array","items":{"$ref":"#/components/schemas/List"}}}},"Message":{"type":"object","required":["id","message"],"properties":{"id":{"type":"integer"},"message":{"type":"string"}}},"MessageInput":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","description":"Sender address. Supports \"Name <email>\" format.","example":"Sender <sender@example.com>"},"to":{"type":"string","description":"Recipient address(es). Supports \"Name <email>\" format. Comma-separate multiple recipients. Duplicates are ignored.","example":"recipient@example.com"},"cc":{"type":"string","description":"Cc recipient address(es). Same format as `to`. Visible to all recipients. An address already in `to` is ignored here.","example":"cc@example.com"},"bcc":{"type":"string","description":"Bcc recipient address(es). Same format as `to`. Never shown in message headers. An address already in `to`/`cc` is ignored here.","example":"bcc@example.com"},"subject":{"type":"string","description":"Message subject. Required unless using a template with a preset subject.","example":"Welcome to Make Sender"},"text":{"type":"string","description":"Plain text body","example":"Hello and welcome!"},"html":{"type":"string","description":"HTML body","example":"<p>Hello and welcome!</p>"},"template":{"type":"string","description":"Template name. Overridden by explicit html/text/subject params.","example":"welcome"},"reply_to":{"type":"string","description":"Reply-to address. Supports \"Name <email>\" format.","example":"Support <support@example.com>"},"o:tracking":{"type":"string","enum":["true","false","yes","no","1","0"],"description":"Override domain default for both opens and clicks"},"o:tracking-opens":{"type":"string","enum":["true","false","yes","no","1","0"],"description":"Override open tracking only. `o:tracking` wins if both set."},"o:tracking-clicks":{"type":"string","enum":["true","false","yes","no","1","0"],"description":"Override click tracking only. `o:tracking` wins if both set."},"o:tag":{"type":"array","items":{"type":"string","maxLength":128},"maxItems":3,"description":"Up to 3 tags for grouping stats, case-insensitive. In form data, repeat the field once per tag.","example":["newsletter","autumn-2026"]},"t:variables":{"type":"string","description":"JSON-encoded dict of template variables; takes precedence over individual `v:*` params","example":"{\"name\":\"Alice\",\"plan\":\"pro\"}"},"recipient-variables":{"type":"string","description":"JSON-encoded per-recipient variable dict for batch sends; keys are recipient emails. Each recipient gets their own message with only their address in To","example":"{\"alice@example.com\":{\"name\":\"Alice\"}}"},"attachment":{"type":"array","items":{"type":"string","format":"binary"},"description":"File attachment(s), multipart/form-data only. Repeat the field to send multiple. Limits: 18 MB total (pre-encoding), 10 files per message."},"inline":{"type":"array","items":{"type":"string","format":"binary"},"description":"Inline file(s) for embedding in the HTML body, multipart/form-data only. Reference each by its filename, e.g. `<img src=\"cid:logo.png\">`. Subject to the same size and count limits as `attachment`."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom email headers as a JSON object of name/value pairs (`application/json`). Each name must start with `X-` and contain only letters, digits and hyphens, except `Message-ID`, `In-Reply-To`, `References`, `List-*`, `Precedence` and `Auto-Submitted`, which are passed through. In `multipart/form-data`, use the `h:X-Header-Name` fields instead (the `h:` form wins on conflict). Limits: 20 headers, 998 chars per value, 8 KB total. Reserved headers (`X-Make-*`, `Content-Type`, `From`, `To`, `Subject`, etc.) and MTA control headers (`X-Job`, `X-Virtual-MTA`, `X-DKIM-Key`, `X-DKIM-Options`, `X-Schedule`, `X-Envid`, etc.) are rejected with `422`. `List-Unsubscribe` can use the same variables as the subject and body, filled in per recipient, e.g. `<https://example.com/unsubscribe?id={{ user_id }}>`. Add the `url_encode` filter (`{{ user_id | url_encode }}`) to values that can contain characters like `+` or `@`.","example":{"X-Campaign-ID":"summer-sale-2024","X-Priority":"1"}},"h:X-My-Header":{"type":"string","description":"Custom email header, `multipart/form-data` only. Send each header as its own field using the `h:` prefix, e.g. `h:X-Campaign-ID=summer-sale-2024`. The header name after `h:` follows the same rules and limits as `headers`. Equivalent to the `headers` object; the `h:` form wins on conflict.","example":"summer-sale-2024"}}},"MessageError":{"type":"object","properties":{"error":{"type":"string","nullable":true,"example":"Domain not found or not verified"},"errors":{"type":"array","items":{"type":"string"},"nullable":true,"example":["Subject can't be blank"]}}},"Recipient":{"type":"object","required":["email","subscribed","list_id","user_id","created_at","updated_at"],"properties":{"email":{"type":"string","format":"email","example":"jane@example.com"},"subscribed":{"type":"boolean","example":true,"description":"Only subscribed recipients receive sends to the list alias. Defaults to true."},"custom_fields":{"type":"object","additionalProperties":true,"description":"Free-form personalization data. Defaults to {}.","example":{"name":"Jane","city":"Oslo"}},"list_id":{"type":"integer","example":42},"user_id":{"type":"integer","example":7},"created_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"},"updated_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"}}},"RecipientInput":{"type":"object","required":["recipient"],"properties":{"recipient":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","example":"new@example.com"},"subscribed":{"type":"boolean","example":true,"description":"Set to false to add the address as opted out. Defaults to true."},"custom_fields":{"description":"Free-form JSON object for personalization. Max 250 entries, 64-char keys, 3 levels deep, 16KB total. Can also be a JSON-encoded string.","oneOf":[{"type":"object","additionalProperties":true},{"type":"string"}],"example":{"name":"Jane"}}}}}},"RecipientPatchInput":{"type":"object","properties":{"recipient":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"updated@example.com"},"subscribed":{"type":"boolean","example":false,"description":"Set to false to opt the recipient out of sends to this list"},"custom_fields":{"type":"object","additionalProperties":true,"description":"Replaces all existing custom fields","example":{"name":"Updated"}}}}}},"RecipientResponse":{"type":"object","required":["recipient","message"],"properties":{"recipient":{"$ref":"#/components/schemas/Recipient"},"message":{"type":"string","example":"Recipient added to list"}}},"PaginatedRecipients":{"type":"object","required":["total_count","current_page","per_page","total_pages","items"],"properties":{"total_count":{"type":"integer","example":1234},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":100},"total_pages":{"type":"integer","example":13},"items":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}}}},"Suppression":{"type":"object","required":["email","statuscode","user_id","created_at"],"properties":{"email":{"type":"string","format":"email","example":"bounce@example.com"},"statuscode":{"type":"string","enum":["bounce","complaint","unsubscribe"],"example":"bounce"},"reason":{"type":"string","nullable":true,"example":"Hard bounce"},"user_id":{"type":"integer","example":7},"created_at":{"type":"string","description":"RFC 2822 timestamp","example":"Wed, 21 May 2026 10:00:00 +0000"}}},"SuppressionInput":{"type":"object","required":["suppression"],"properties":{"suppression":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","example":"bounce@example.com"},"statuscode":{"type":"string","enum":["bounce","complaint","unsubscribe"],"description":"Defaults to `bounce` when omitted on create. Duplicate detection is composite — the same email may be suppressed under multiple statuscodes.","example":"bounce"},"reason":{"type":"string","example":"Hard bounce"}}}}},"SuppressionResponse":{"type":"object","required":["suppression","message"],"properties":{"suppression":{"$ref":"#/components/schemas/Suppression"},"message":{"type":"string","example":"Email address added to suppression list"}}},"PaginatedSuppressions":{"type":"object","required":["total_count","current_page","per_page","total_pages","items"],"properties":{"total_count":{"type":"integer","example":42},"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":100},"total_pages":{"type":"integer","example":1},"items":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}}}}}},"paths":{"/api/v1/domains":{"get":{"summary":"List all sender domains","tags":["Domains"],"operationId":"ListDomains","security":[{"basic_auth":[]}],"parameters":[{"name":"name","in":"query","schema":{"type":"string"},"required":false,"description":"Filter by domain name (partial match, case-insensitive)"},{"name":"verified","in":"query","schema":{"type":"boolean"},"required":false,"description":"Filter by verification status"},{"name":"page","in":"query","schema":{"type":"integer"},"required":false,"description":"Page number (default: 1)"},{"name":"per","in":"query","schema":{"type":"integer"},"required":false,"description":"Items per page (default: 100, max: 100)"}],"responses":{"200":{"description":"paginated list of domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDomains"}}}},"401":{"description":"unauthorized"}}},"post":{"summary":"Create a sender domain","tags":["Domains"],"operationId":"CreateDomain","description":"Creates the domain and generates a DKIM key pair. The response includes the DNS records that must be published before the domain can be verified.","security":[{"basic_auth":[]}],"parameters":[],"responses":{"201":{"description":"domain created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWithDnsResponse"}}}},"400":{"description":"bad request - invalid or duplicate domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainInput"}}}}}},"/api/v1/domains/{id}":{"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"description":"Domain ID (numeric) or domain name (e.g., mail.example.com)","required":true}],"get":{"summary":"Get a sender domain","tags":["Domains"],"operationId":"GetDomain","description":"Returns the domain including the DNS records to configure and their current status.","security":[{"basic_auth":[]}],"responses":{"200":{"description":"domain found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWithDnsResponse"}}}},"401":{"description":"unauthorized"},"404":{"description":"domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a sender domain","tags":["Domains"],"operationId":"UpdateDomain","description":"Updates tracking and From header settings. The domain name itself cannot be changed.","security":[{"basic_auth":[]}],"parameters":[],"responses":{"200":{"description":"domain updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"404":{"description":"domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPatchInput"}}}}},"delete":{"summary":"Delete a sender domain","tags":["Domains"],"operationId":"DeleteDomain","description":"Deletes the domain. Refused with 409 if any messages have been sent from the domain.","security":[{"basic_auth":[]}],"responses":{"200":{"description":"domain deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"unauthorized"},"404":{"description":"domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"domain has sendings and cannot be deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/domains/{id}/verify":{"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"description":"Domain ID (numeric) or domain name","required":true}],"post":{"summary":"Verify DNS setup for a sender domain","tags":["Domains"],"operationId":"VerifyDomain","description":"Looks up the DKIM, SPF, DMARC and MX records in DNS and updates the verified flag. The domain is verified when DKIM, SPF and DMARC are correct; MX is optional.","security":[{"basic_auth":[]}],"responses":{"200":{"description":"verification completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWithDnsResponse"}}}},"401":{"description":"unauthorized"},"404":{"description":"domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/domains/{id}/renew_dkim":{"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"description":"Domain ID (numeric) or domain name","required":true}],"post":{"summary":"Generate a new DKIM key for a sender domain","tags":["Domains"],"operationId":"RenewDomainDkim","description":"Generates a new DKIM key pair and resets the verified flag. Publish the new DKIM record and call verify again.","security":[{"basic_auth":[]}],"responses":{"200":{"description":"DKIM key renewed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWithDnsResponse"}}}},"401":{"description":"unauthorized"},"404":{"description":"domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/lists":{"get":{"summary":"List all mailing lists","tags":["Lists"],"operationId":"ListLists","security":[{"basic_auth":[]}],"parameters":[{"name":"name","in":"query","schema":{"type":"string"},"required":false,"description":"Filter by title (partial match, case-insensitive)"},{"name":"page","in":"query","schema":{"type":"integer"},"required":false,"description":"Page number (default: 1)"},{"name":"per","in":"query","schema":{"type":"integer"},"required":false,"description":"Items per page (default: 100, max: 100)"}],"responses":{"200":{"description":"paginated list of mailing lists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLists"}}}},"401":{"description":"unauthorized"}}},"post":{"summary":"Create a mailing list","tags":["Lists"],"operationId":"CreateList","security":[{"basic_auth":[]}],"parameters":[],"responses":{"201":{"description":"list created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"}}}},"400":{"description":"bad request - missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInput"}}}}}},"/api/v1/lists/{id}":{"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"description":"List ID (numeric), alias, or full address (alias@makesender.no)","required":true}],"get":{"summary":"Get a mailing list","tags":["Lists"],"operationId":"GetList","security":[{"basic_auth":[]}],"responses":{"200":{"description":"list found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a mailing list","tags":["Lists"],"operationId":"UpdateList","security":[{"basic_auth":[]}],"parameters":[],"responses":{"200":{"description":"list updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"}}}},"400":{"description":"bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPatchInput"}}}}},"delete":{"summary":"Delete a mailing list","tags":["Lists"],"operationId":"DeleteList","security":[{"basic_auth":[]}],"responses":{"200":{"description":"list deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/{domain}/messages":{"parameters":[{"name":"domain","in":"path","schema":{"type":"string"},"description":"Verified domain name used to send the message (e.g. example.com)","required":true}],"post":{"summary":"Send an email","tags":["Messages"],"operationId":"CreateMessage","security":[{"basic_auth":[]}],"description":"Submit an email for delivery. The domain must be verified in your account.\n\nSend as `application/json` for text-only messages, or as `multipart/form-data`\nwhen including file attachments.\n\n**Tracking parameters** (override domain-level defaults):\n- `o:tracking` — enable/disable both opens and clicks (`true`/`false`/`yes`/`no`)\n- `o:tracking-opens` — enable/disable open tracking only\n- `o:tracking-clicks` — enable/disable click tracking only\n\n**Tags** (for grouping stats):\n- `o:tag` — up to 3 tags, 128 characters each, case-insensitive. Repeat the field for\n  several tags, or send an array in JSON.\n\n**Variable parameters** (for template personalization):\n- `t:variables` — JSON-encoded dictionary of template variables (takes precedence over `v:*`)\n- `v:<name>` — individual variable (e.g. `v:user-id=123`); overridden by `t:variables`\n- `recipient-variables` — JSON-encoded per-recipient variable dictionary for batch sending\n\n**Attachments** (`multipart/form-data` only):\n- `attachment` — one or more files to attach. Repeat the field for multiple files.\n- `inline` — one or more files to embed in the HTML body, referenced via `cid:<filename>`\n  (e.g. `<img src=\"cid:logo.png\">`).\n- Limits: 18 MB total (measured before base64 encoding), 10 files per message.\n  Exceeding any limit returns `422`.\n","parameters":[],"responses":{"201":{"description":"with a sender-supplied Message-ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"unauthorized"},"422":{"description":"invalid custom header name rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInput"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MessageInput"}}}}}},"/api/v1/lists/{list_id}/recipients":{"parameters":[{"name":"list_id","in":"path","schema":{"type":"string","examples":["42","my.list"]},"description":"List ID (numeric) or alias (dots permitted, e.g. my.list)","required":true}],"get":{"summary":"List all recipients in a list","tags":["Recipients"],"operationId":"ListRecipients","security":[{"basic_auth":[]}],"parameters":[{"name":"email","in":"query","schema":{"type":"string"},"required":false,"description":"Filter by email address (partial match, case-insensitive)"},{"name":"subscribed","in":"query","schema":{"type":"boolean"},"required":false,"description":"Filter by subscription state (true = subscribed, false = opted out)"},{"name":"page","in":"query","schema":{"type":"integer"},"required":false,"description":"Page number (default: 1)"},{"name":"per","in":"query","schema":{"type":"integer"},"required":false,"description":"Items per page (default: 100, max: 100)"}],"responses":{"200":{"description":"per_page capped at 100 even when per=200 requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRecipients"}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"unrecognised subscribed filter value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a recipient to a list","tags":["Recipients"],"operationId":"CreateRecipient","security":[{"basic_auth":[]}],"description":"Add a recipient to the list. Accepts three body forms:\n- JSON object `{\"recipient\": {...}}` → 201 Created (single record)\n- JSON array `[{...}, ...]` → 200 OK (bulk import)\n- Raw `text/csv` body → 200 OK (bulk import). CSV columns: email (required), custom_fields (optional JSON),\n  subscribed (optional boolean, defaults to true).\n","parameters":[],"responses":{"201":{"description":"recipient added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientResponse"}}}},"400":{"description":"missing recipient wrapper key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientInput"}}}}}},"/api/v1/lists/{list_id}/recipients/import":{"parameters":[{"name":"list_id","in":"path","schema":{"type":"string","examples":["42","my.list"]},"description":"List ID (numeric) or alias (dots permitted, e.g. my.list)","required":true}],"post":{"summary":"Bulk import recipients","tags":["Recipients"],"operationId":"ImportRecipients","security":[{"basic_auth":[]}],"description":"Bulk import recipients from a file or raw body (max 5MB). Accepts:\n- `multipart/form-data` with a `file` field (CSV, XLS, XLSX, or JSON)\n- Raw `text/csv` body\n- Raw `application/json` body (array of recipient objects)\n\nCSV must have a header row with at least an `email` column.\nAn optional `custom_fields` column can contain JSON data for personalization.\nAn optional `subscribed` column (true/false, yes/no, 1/0, on/off) sets the opt-out state per address; defaults to true.\n","parameters":[],"responses":{"200":{"description":"import via JSON file upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"400":{"description":"no file provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"404":{"description":"list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"string","format":"binary"}}},"required":true,"description":"CSV, XLS, XLSX, or JSON file"}}},"/api/v1/lists/{list_id}/recipients/{id}":{"parameters":[{"name":"list_id","in":"path","schema":{"type":"string","examples":["42","my.list"]},"description":"List ID (numeric) or alias (dots permitted, e.g. my.list)","required":true},{"name":"id","in":"path","schema":{"type":"string","examples":["99","jane@example.com","test.example@example.com"]},"description":"Recipient numeric ID or email address (dots and subdomains permitted)","required":true}],"get":{"summary":"Get a recipient","tags":["Recipients"],"operationId":"GetRecipient","security":[{"basic_auth":[]}],"responses":{"200":{"description":"dotted list alias and dotted recipient email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recipient"}}}},"401":{"description":"unauthorized"},"404":{"description":"recipient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a recipient","tags":["Recipients"],"operationId":"UpdateRecipient","security":[{"basic_auth":[]}],"parameters":[],"responses":{"200":{"description":"dotted list alias and dotted recipient email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientResponse"}}}},"400":{"description":"bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"404":{"description":"recipient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientPatchInput"}}}}},"delete":{"summary":"Delete a recipient","tags":["Recipients"],"operationId":"DeleteRecipient","security":[{"basic_auth":[]}],"responses":{"200":{"description":"dotted list alias and dotted recipient email","content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"object","properties":{"email":{"type":"string"},"list_id":{"type":"integer"}}},"message":{"type":"string"}}}}}},"401":{"description":"unauthorized"},"404":{"description":"recipient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/suppressions":{"get":{"summary":"List all suppressions","tags":["Suppressions"],"operationId":"ListSuppressions","security":[{"basic_auth":[]}],"description":"Returns all suppressed email addresses for the authenticated user with pagination support.","parameters":[{"name":"email","in":"query","schema":{"type":"string"},"required":false,"description":"Filter by email address (partial match, case-insensitive)"},{"name":"page","in":"query","schema":{"type":"integer"},"required":false,"description":"Page number (default: 1)"},{"name":"per","in":"query","schema":{"type":"integer"},"required":false,"description":"Items per page (default: 100, max: 100)"}],"responses":{"200":{"description":"per_page capped at 100 even when per=200 requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSuppressions"}}}},"401":{"description":"unauthorized"}}},"post":{"summary":"Create a suppression","tags":["Suppressions"],"operationId":"CreateSuppression","security":[{"basic_auth":[]}],"description":"Add an email address to the suppression list. Accepts three body forms:\n- JSON object `{\"suppression\": {...}}` → 201 Created (single record)\n- JSON array `[{...}, ...]` → 200 OK (bulk import)\n- Raw `text/csv` body → 200 OK (bulk import). CSV columns: email (required), statuscode, reason.\n\nFor bulk forms, defaults for omitted statuscode/reason can be supplied via query parameters.\n\nDuplicates are detected by email and statuscode together, so the same address can be suppressed\nas bounce, complaint and unsubscribe at the same time.\n","parameters":[],"responses":{"201":{"description":"same email allowed under a different statuscode (composite duplicate detection)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionResponse"}}}},"400":{"description":"invalid statuscode value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionInput"}}}}}},"/api/v1/suppressions/import":{"post":{"summary":"Bulk import suppressions","tags":["Suppressions"],"operationId":"ImportSuppressions","security":[{"basic_auth":[]}],"description":"Bulk import suppressions from a file or raw body. Accepts:\n- `multipart/form-data` with a `file` field (CSV, XLS, XLSX, or JSON, max 5MB)\n- Raw `text/csv` body\n- Raw `application/json` body (array of suppression objects)\n\nCSV columns: email (required), statuscode (optional), reason (optional).\n","parameters":[{"name":"statuscode","in":"query","schema":{"type":"string","enum":["bounce","complaint","unsubscribe"]},"required":false,"description":"Default statuscode for rows that omit it"},{"name":"reason","in":"query","schema":{"type":"string"},"required":false,"description":"Default reason for rows that omit it"}],"responses":{"200":{"description":"statuscode query param applied to imported rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"400":{"description":"no file provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized"},"422":{"description":"unsupported file format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"string","format":"binary"}}},"required":true,"description":"CSV, XLS, XLSX, or JSON file"}}},"/api/v1/suppressions/{email}":{"parameters":[{"name":"email","in":"path","schema":{"type":"string","examples":["bounce@example.com","first.last.name@example.co.uk"]},"description":"The suppressed email address. Dots and subdomains permitted; case-insensitive lookup. URL encoding not required.","required":true}],"get":{"summary":"Get a suppression","tags":["Suppressions"],"operationId":"GetSuppression","security":[{"basic_auth":[]}],"responses":{"200":{"description":"dotted address, case-insensitive lookup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"401":{"description":"unauthorized"},"404":{"description":"suppression not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a suppression","tags":["Suppressions"],"operationId":"DeleteSuppression","security":[{"basic_auth":[]}],"responses":{"200":{"description":"dotted address, case-insensitive lookup","content":{"application/json":{"schema":{"type":"object","properties":{"suppression":{"type":"object","properties":{"email":{"type":"string"}}},"message":{"type":"string"}}}}}},"401":{"description":"unauthorized"},"404":{"description":"suppression not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}