- API Overview
- API Rate Limiting
Events
Subscribers
Topics
Notification
Workflows
Workflow overrides
Workflow groups
Integrations
Layouts
Environments
Changes
Execution details
Feeds
Tenants
Organizations
Messages
API Reference
Set integration as primary
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.integrations.setIntegrationAsPrimary("integrationId")
{
"_id": "string",
"_environmentId": "string",
"_organizationId": "string",
"name": "string",
"identifier": "string",
"providerId": "string",
"channel": "in_app",
"credentials": {
"apiKey": "string",
"user": "string",
"secretKey": "string",
"domain": "string",
"password": "string",
"host": "string",
"port": "string",
"secure": true,
"region": "string",
"accountSid": "string",
"messageProfileId": "string",
"token": "string",
"from": "string",
"senderName": "string",
"projectName": "string",
"applicationId": "string",
"clientId": "string",
"requireTls": true,
"ignoreTls": true,
"tlsOptions": {},
"baseUrl": "string",
"webhookUrl": "string",
"redirectUrl": "string",
"hmac": true,
"serviceAccount": "string",
"ipPoolName": "string"
},
"active": true,
"deleted": true,
"deletedAt": "string",
"deletedBy": "string",
"primary": true
}
Enter your API key in the Authorization
field like the example shown below:
E.g ApiKey 18d2e625f05d80e
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.integrations.setIntegrationAsPrimary("integrationId")
{
"_id": "string",
"_environmentId": "string",
"_organizationId": "string",
"name": "string",
"identifier": "string",
"providerId": "string",
"channel": "in_app",
"credentials": {
"apiKey": "string",
"user": "string",
"secretKey": "string",
"domain": "string",
"password": "string",
"host": "string",
"port": "string",
"secure": true,
"region": "string",
"accountSid": "string",
"messageProfileId": "string",
"token": "string",
"from": "string",
"senderName": "string",
"projectName": "string",
"applicationId": "string",
"clientId": "string",
"requireTls": true,
"ignoreTls": true,
"tlsOptions": {},
"baseUrl": "string",
"webhookUrl": "string",
"redirectUrl": "string",
"hmac": true,
"serviceAccount": "string",
"ipPoolName": "string"
},
"active": true,
"deleted": true,
"deletedAt": "string",
"deletedBy": "string",
"primary": true
}
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Path Parameters
Response
The unique identifier of the integration record in the database. This is automatically generated.
The unique identifier for the environment associated with this integration. This links to the Environment collection.
The unique identifier for the organization that owns this integration. This links to the Organization collection.
The name of the integration, which is used to identify it in the user interface.
A unique string identifier for the integration, often used for API calls or internal references.
The identifier for the provider of the integration (e.g., "mailgun", "twilio").
The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
in_app
, email
, sms
, chat
, push
The credentials required for the integration to function, including API keys and other sensitive information.
Indicates whether the integration is currently active. An active integration will process events and messages.
Indicates whether the integration has been marked as deleted (soft delete).
The timestamp indicating when the integration was deleted. This is set when the integration is soft deleted.
The identifier of the user who performed the deletion of this integration. Useful for audit trails.
Indicates whether this integration is marked as primary. A primary integration is often the default choice for processing.
An array of conditions associated with the integration that may influence its behavior or processing logic.
BOOLEAN
, TEXT
, DATE
, NUMBER
, STATEMENT
, LIST
, MULTI_LIST
, GROUP
AND
, OR
LARGER
, SMALLER
, LARGER_EQUAL
, SMALLER_EQUAL
, EQUAL
, NOT_EQUAL
, ALL_IN
, ANY_IN
, NOT_IN
, BETWEEN
, NOT_BETWEEN
, LIKE
, NOT_LIKE
, IN
subscriber
, payload
Was this page helpful?
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_SECRET_KEY>');
await novu.integrations.setIntegrationAsPrimary("integrationId")
{
"_id": "string",
"_environmentId": "string",
"_organizationId": "string",
"name": "string",
"identifier": "string",
"providerId": "string",
"channel": "in_app",
"credentials": {
"apiKey": "string",
"user": "string",
"secretKey": "string",
"domain": "string",
"password": "string",
"host": "string",
"port": "string",
"secure": true,
"region": "string",
"accountSid": "string",
"messageProfileId": "string",
"token": "string",
"from": "string",
"senderName": "string",
"projectName": "string",
"applicationId": "string",
"clientId": "string",
"requireTls": true,
"ignoreTls": true,
"tlsOptions": {},
"baseUrl": "string",
"webhookUrl": "string",
"redirectUrl": "string",
"hmac": true,
"serviceAccount": "string",
"ipPoolName": "string"
},
"active": true,
"deleted": true,
"deletedAt": "string",
"deletedBy": "string",
"primary": true
}