Every request goes to https://api.makesender.no/api/v1/ over HTTPS.
Before you start, you need:
A verified domain: You can only send from domains you have verified.
API credentials: Create an API key in your account settings. It gives you a username and a key.
Example · send an e-mail · curl
curl--request POST \
--user'user_id:api_key' \
--header'content-type: application/json' \
--data'{ "from": "sender@example.com", "to": "recipient@example.com", "subject": "Hello World", "text": "This is a test email" }' \
--url'https://api.makesender.no/api/v1/example.com/messages'
Authentication
Use HTTP Basic authentication, with your API username as the username and your API key as the password. Each key has its own username. Keep keys out of client-side code and public repositories.
Authenticated request · curl
curl--request GET \
--user'user_id:api_key' \
--header'content-type: application/json' \
--url'https://api.makesender.no/api/v1/lists'
JSON only
Request and response bodies are JSON, with snake_case keys and no root element. Send Content-Type: application/json with POST and PATCH requests.
Pagination
Collection endpoints accept page and per parameters and return pagination metadata.
page: Page number to fetch, starting at 1. Defaults to 1.
per: Items per page. Defaults to 100, which is also the maximum.
The API uses standard HTTP status codes. Error responses include a JSON body with details.
Status
Meaning
200
Success
201
Created
400
Bad request. Check your parameters.
401
Unauthorized. The credentials are invalid.
404
Not found
422
Unprocessable content. Validation failed.
500
Server error
Error response
{
"error": "Domain not found or not verified"
}
Key concepts
Verified domains: Add the domain, publish the DKIM, SPF and DMARC records it lists, then verify it. Only verified domains can be used in the from address or as the domain parameter.
Sendings and deliveries: A sending is the message as a whole, with its domain, tracking settings and number of deliveries. A delivery is one e-mail to one recipient, so a sending to a list has many deliveries.
Lists and list addresses: A list has an alias, a title and an address of the form alias@makesender.no. Mail sent to that address reaches every recipient with subscribed: true.
Recipient variables: Personalize e-mails with key-value pairs per recipient, used in templates as {{ variable_name }}. With recipient variables, each recipient gets their own e-mail with only their own address in To. They also work in the List-Unsubscribe header, so each recipient can get their own unsubscribe link, for example <https://example.com/unsubscribe?id={{ user_id }}>.
Tracking: Open tracking (pixel) and click tracking (redirect) can be turned on per domain or per message.
Your subscription sets how many e-mails the account can send per hour, per day and per month. Each recipient counts as one e-mail, and REST and SMTP share the same limits. Above a limit, the API returns 422 with an error such as "Hourly message limit exceeded. Please try again later.", and SMTP refuses the message with 501. Wait for the window to pass before retrying.
Beyond the REST API
SMTP: Send from any SMTP client on port 2525. See the SMTP page.
Webhooks: Have delivery, bounce, open and click events pushed to your own endpoints. See the Webhooks page.
Domains
/api/v1/domains
GET/api/v1/domains
List all sender domains
Parameters
name
query · string
Filter by domain name (partial match, case-insensitive)
verified
query · boolean
Filter by verification status
page
query · integer
Page number (default: 1)
per
query · integer
Items per page (default: 100, max: 100)
Responses
200paginated list of domains401unauthorized
Request · curl
curl--request GET \
--user'user_id:api_key' \
--header'content-type: application/json' \
--url'https://api.makesender.no/api/v1/domains'
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.
Parameters
idrequired
path · string
Domain ID (numeric) or domain name
Responses
200verification completed401unauthorized404domain not found
Request · curl
curl--request POST \
--user'user_id:api_key' \
--header'content-type: application/json' \
--url'https://api.makesender.no/api/v1/domains/{id}/verify'
Cc recipient address(es). Same format as to. Visible to all recipients. An address already in to is ignored here.
bcc
body · string
Bcc recipient address(es). Same format as to. Never shown in message headers. An address already in to/cc is ignored here.
subject
body · string
Message subject. Required unless using a template with a preset subject.
text
body · string
Plain text body
html
body · string
HTML body
template
body · string
Template name. Overridden by explicit html/text/subject params.
reply_to
body · string
Reply-to address. Supports "Name <email>" format.
o:tracking
body · string
Override domain default for both opens and clicks
o:tracking-opens
body · string
Override open tracking only. o:tracking wins if both set.
o:tracking-clicks
body · string
Override click tracking only. o:tracking wins if both set.
o:tag
body · string[]
Up to 3 tags for grouping stats, case-insensitive. In form data, repeat the field once per tag.
t:variables
body · string
JSON-encoded dict of template variables; takes precedence over individual v:* params
recipient-variables
body · string
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
attachment
body · file[]
File attachment(s), multipart/form-data only. Repeat the field to send multiple. Limits: 18 MB total (pre-encoding), 10 files per message.
inline
body · file[]
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
body · object
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 @.
h:X-My-Header
body · string
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.
Responses
201with a sender-supplied Message-ID401unauthorized422invalid custom header name rejected
Bulk import recipients from a file or raw body (max 5MB). Accepts:
multipart/form-data with a file field (CSV, XLS, XLSX, or JSON)
Raw text/csv body
Raw application/json body (array of recipient objects)
CSV must have a header row with at least an email column. An optional custom_fields column can contain JSON data for personalization. An optional subscribed column (true/false, yes/no, 1/0, on/off) sets the opt-out state per address; defaults to true.
Parameters
list_idrequired
path · string
List ID (numeric) or alias (dots permitted, e.g. my.list)
(file)required
form · file
CSV, XLS, XLSX, or JSON file
Responses
200import via JSON file upload400no file provided401unauthorized404list not found