API authentication

The Sidemail API uses API keys to authenticate requests. You can view and manage your API keys in the Sidemail Dashboard.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Using library

If you're using the Node.js library, configure it with your API key, and then then it will automatically send this key in each request.

const configureSidemail = require("sidemail");
const sidemail = configureSidemail({ apiKey: "replace-with-your-api-key" });

Making API request on your own

Authentication to the API is performed via Authorization header in the HTTP request.

Include these HTTP headers when making API request:

  • Content-Type: application/json to tell Sidemail you're sending JSON data
  • Authorization: Bearer replace-with-your-api-key to authenticate the API request with your API key