With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers. https://docs.novu.co/platform/integrations/overview
- list - List all integrations
- create - Create an integration
- update - Update an integration
- delete - Delete an integration
- integrationsControllerAutoConfigureIntegration - Auto-configure an integration for inbound webhooks
- setAsPrimary - Update integration as primary
- listActive - List active integrations
- generateChatOAuthUrl - Generate chat OAuth URL
List all the channels integrations created in the organization
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.list();
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsList } from "@novu/api/funcs/integrationsList.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsList(novu);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerListIntegrationsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Create an integration for the current environment the user is based on the API key provided. Each provider supports different credentials, check the provider documentation for more details.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.create({
providerId: "<id>",
channel: "email",
});
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsCreate } from "@novu/api/funcs/integrationsCreate.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsCreate(novu, {
providerId: "<id>",
channel: "email",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsCreate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
createIntegrationRequestDto |
components.CreateIntegrationRequestDto | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerCreateIntegrationResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update an integration by its unique key identifier integrationId. Each provider supports different credentials, check the provider documentation for more details.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.update({}, "<id>");
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsUpdate } from "@novu/api/funcs/integrationsUpdate.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsUpdate(novu, {}, "<id>");
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsUpdate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
integrationId |
string | ✔️ | N/A |
updateIntegrationRequestDto |
components.UpdateIntegrationRequestDto | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerUpdateIntegrationByIdResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Delete an integration by its unique key identifier integrationId. This action is irreversible.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.delete("<id>");
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsDelete } from "@novu/api/funcs/integrationsDelete.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsDelete(novu, "<id>");
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsDelete failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
integrationId |
string | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerRemoveIntegrationResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Auto-configure an integration by its unique key identifier integrationId for inbound webhook support. This will automatically generate required webhook signing keys and configure webhook endpoints.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.integrationsControllerAutoConfigureIntegration("<id>");
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsIntegrationsControllerAutoConfigureIntegration } from "@novu/api/funcs/integrationsIntegrationsControllerAutoConfigureIntegration.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsIntegrationsControllerAutoConfigureIntegration(novu, "<id>");
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsIntegrationsControllerAutoConfigureIntegration failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
integrationId |
string | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerAutoConfigureIntegrationResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update an integration as primary by its unique key identifier integrationId. This API will set the integration as primary for that channel in the current environment. Primary integration is used to deliver notification for sms and email channels in the workflow.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.setAsPrimary("<id>");
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsSetAsPrimary } from "@novu/api/funcs/integrationsSetAsPrimary.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsSetAsPrimary(novu, "<id>");
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsSetAsPrimary failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
integrationId |
string | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerSetIntegrationAsPrimaryResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List all the active integrations created in the organization
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.listActive();
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsListActive } from "@novu/api/funcs/integrationsListActive.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsListActive(novu);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsListActive failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerGetActiveIntegrationsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Generate an OAuth URL for chat integrations like Slack and MS Teams. This URL allows subscribers to authorize the integration, enabling the system to send messages through their chat workspace. The generated URL expires after 5 minutes.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.generateChatOAuthUrl({
subscriberId: "subscriber-123",
integrationIdentifier: "<value>",
connectionIdentifier: "slack-connection-abc123",
context: {
"key": "org-acme",
},
scope: [
"chat:write",
"chat:write.public",
"channels:read",
"groups:read",
"users:read",
"users:read.email",
"incoming-webhook",
],
});
console.log(result);
}
run();The standalone function version of this method:
import { NovuCore } from "@novu/api/core.js";
import { integrationsGenerateChatOAuthUrl } from "@novu/api/funcs/integrationsGenerateChatOAuthUrl.js";
// Use `NovuCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const novu = new NovuCore({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const res = await integrationsGenerateChatOAuthUrl(novu, {
subscriberId: "subscriber-123",
integrationIdentifier: "<value>",
connectionIdentifier: "slack-connection-abc123",
context: {
"key": "org-acme",
},
scope: [
"chat:write",
"chat:write.public",
"channels:read",
"groups:read",
"users:read",
"users:read.email",
"incoming-webhook",
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("integrationsGenerateChatOAuthUrl failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
generateChatOauthUrlRequestDto |
components.GenerateChatOauthUrlRequestDto | ✔️ | N/A |
idempotencyKey |
string | ➖ | A header for idempotency purposes |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.IntegrationsControllerGetChatOAuthUrlResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorDto | 414 | application/json |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | */* |