API Overview
In this page you can learn about how to work with Novu’s API
It’s important to note that our API and backend SDK are intended for use exclusively in server-side applications. Attempting to use them in a client-side application will result in Cross-Origin Resource Sharing (CORS) errors. This restriction ensures the security and integrity of our services.
Authentication
Authentication for the Novu API involves the use of an API Key, which is a secure credential that is tied to your Novu account. This key should be included in the header of the request in the Authorization field as a string prefixed with ‘ApiKey ‘.
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>'
For example, when using Novu in a Node.js application, the Novu package should be imported and initialized with the API key, as shown in this snippet:
import { Novu } from "@novu/node";
const novu = new Novu("<NOVU_SECRET_KEY>");
Replace <NOVU_SECRET_KEY>
with your actual API Key, available in the API Key section of the Novu Dashboard.
It is advised not to hardcode your credentials in a file in production environments. Use environment variables instead.
API Endpoints
Novu provides a multitude of API endpoints that enable a variety of functionalities.
the base URL for the Novu API is https://api.novu.co/v1
.
We offer two API options: the US API and the EU API. By default, our API documentation refers to the US API, which can be accessed at: https://api.novu.co/v1.
If you require the EU version, you can access it here: https://eu.api.novu.co/v1.
For instance, to get tenant information, the endpoint to use would include the tenant’s identifier and look like this https://api.novu.co/v1/tenants/{identifier}
.
Was this page helpful?