Authentication Authenticate requests to the MXTerm API.
The MXTerm API lets you manage domains and mailboxes and send mail programmatically.
Requests are authenticated with an API key.
Get an API key
Create a key from the dashboard under Settings → API keys . Treat it like a
password — it can manage your mail.
Authenticate a request
Send the key in the Authorization header as a bearer token:
<pre class="astro-code github-dark" style="background-color:#24292e;color:#e1e4e8; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;" tabindex="0" data-language="bash"><code><span class="line"><span style="color:#B392F0">curl</span><span style="color:#9ECBFF"> https://api.mxterm.com/v1/domains</span><span style="color:#79B8FF"> \</span></span>
<span class="line"><span style="color:#79B8FF"> -H</span><span style="color:#9ECBFF"> "Authorization: Bearer </span><span style="color:#E1E4E8">$MXTERM_API_KEY</span><span style="color:#9ECBFF">"</span></span></code></pre>
Important
Never commit API keys to a repository or ship them in client-side code. Store them in
environment variables or a secrets manager, and rotate a key immediately if it leaks.