Create an integration
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. Only integration metadata is returned, credentials field is returned as an empty object.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.create({});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.Integrations.CreateAsync(createIntegrationRequestDto: new CreateIntegrationRequestDto() {});
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$createIntegrationRequestDto = new Components\CreateIntegrationRequestDto();
$response = $sdk->integrations->create(
createIntegrationRequestDto: $createIntegrationRequestDto
);
if ($response->integrationResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.integrations.create(create_integration_request_dto={})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/components"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Integrations.Create(ctx, components.CreateIntegrationRequestDto{}, nil)
if err != nil {
log.Fatal(err)
}
if res.IntegrationResponseDto != nil {
// handle response
}
}curl --request POST \
--url https://api.novu.co/v1/integrations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"identifier": "<string>",
"_environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerId": "<string>",
"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>",
"apiKeyRequestHeader": "<string>",
"secretKeyRequestHeader": "<string>",
"idPath": "<string>",
"datePath": "<string>",
"apiToken": "<string>",
"authenticateByToken": true,
"authenticationTokenKey": "<string>",
"instanceId": "<string>",
"alertUid": "<string>",
"title": "<string>",
"imageUrl": "<string>",
"state": "<string>",
"externalLink": "<string>",
"channelId": "<string>",
"phoneNumberIdentification": "<string>",
"accessKey": "<string>",
"appSid": "<string>",
"senderId": "<string>",
"tenantId": "<string>",
"AppIOBaseUrl": "<string>",
"signingSecret": "<string>",
"outboundIntegrationId": "<string>",
"outboundConnectedAt": "<string>",
"whatsNextCompletedAt": "<string>",
"useFromAddressOverride": true,
"fromAddressOverride": "<string>",
"emailSlugPrefix": "<string>",
"externalEnvironmentId": "<string>",
"externalVaultId": "<string>",
"externalWorkspaceId": "<string>"
},
"active": true,
"check": true,
"conditions": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
],
"configurations": {}
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
identifier: '<string>',
_environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
providerId: '<string>',
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>',
apiKeyRequestHeader: '<string>',
secretKeyRequestHeader: '<string>',
idPath: '<string>',
datePath: '<string>',
apiToken: '<string>',
authenticateByToken: true,
authenticationTokenKey: '<string>',
instanceId: '<string>',
alertUid: '<string>',
title: '<string>',
imageUrl: '<string>',
state: '<string>',
externalLink: '<string>',
channelId: '<string>',
phoneNumberIdentification: '<string>',
accessKey: '<string>',
appSid: '<string>',
senderId: '<string>',
tenantId: '<string>',
AppIOBaseUrl: '<string>',
signingSecret: '<string>',
outboundIntegrationId: '<string>',
outboundConnectedAt: '<string>',
whatsNextCompletedAt: '<string>',
useFromAddressOverride: true,
fromAddressOverride: '<string>',
emailSlugPrefix: '<string>',
externalEnvironmentId: '<string>',
externalVaultId: '<string>',
externalWorkspaceId: '<string>'
},
active: true,
check: true,
conditions: [{isNegated: true, children: [{field: '<string>', value: '<string>'}]}],
configurations: {}
})
};
fetch('https://api.novu.co/v1/integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.novu.co/v1/integrations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"_environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"providerId\": \"<string>\",\n \"credentials\": {\n \"apiKey\": \"<string>\",\n \"user\": \"<string>\",\n \"secretKey\": \"<string>\",\n \"domain\": \"<string>\",\n \"password\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"secure\": true,\n \"region\": \"<string>\",\n \"accountSid\": \"<string>\",\n \"messageProfileId\": \"<string>\",\n \"token\": \"<string>\",\n \"from\": \"<string>\",\n \"senderName\": \"<string>\",\n \"projectName\": \"<string>\",\n \"applicationId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"requireTls\": true,\n \"ignoreTls\": true,\n \"tlsOptions\": {},\n \"baseUrl\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"hmac\": true,\n \"serviceAccount\": \"<string>\",\n \"ipPoolName\": \"<string>\",\n \"apiKeyRequestHeader\": \"<string>\",\n \"secretKeyRequestHeader\": \"<string>\",\n \"idPath\": \"<string>\",\n \"datePath\": \"<string>\",\n \"apiToken\": \"<string>\",\n \"authenticateByToken\": true,\n \"authenticationTokenKey\": \"<string>\",\n \"instanceId\": \"<string>\",\n \"alertUid\": \"<string>\",\n \"title\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"state\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"channelId\": \"<string>\",\n \"phoneNumberIdentification\": \"<string>\",\n \"accessKey\": \"<string>\",\n \"appSid\": \"<string>\",\n \"senderId\": \"<string>\",\n \"tenantId\": \"<string>\",\n \"AppIOBaseUrl\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"outboundIntegrationId\": \"<string>\",\n \"outboundConnectedAt\": \"<string>\",\n \"whatsNextCompletedAt\": \"<string>\",\n \"useFromAddressOverride\": true,\n \"fromAddressOverride\": \"<string>\",\n \"emailSlugPrefix\": \"<string>\",\n \"externalEnvironmentId\": \"<string>\",\n \"externalVaultId\": \"<string>\",\n \"externalWorkspaceId\": \"<string>\"\n },\n \"active\": true,\n \"check\": true,\n \"conditions\": [\n {\n \"isNegated\": true,\n \"children\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"configurations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"_environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"providerId\": \"<string>\",\n \"credentials\": {\n \"apiKey\": \"<string>\",\n \"user\": \"<string>\",\n \"secretKey\": \"<string>\",\n \"domain\": \"<string>\",\n \"password\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"secure\": true,\n \"region\": \"<string>\",\n \"accountSid\": \"<string>\",\n \"messageProfileId\": \"<string>\",\n \"token\": \"<string>\",\n \"from\": \"<string>\",\n \"senderName\": \"<string>\",\n \"projectName\": \"<string>\",\n \"applicationId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"requireTls\": true,\n \"ignoreTls\": true,\n \"tlsOptions\": {},\n \"baseUrl\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"hmac\": true,\n \"serviceAccount\": \"<string>\",\n \"ipPoolName\": \"<string>\",\n \"apiKeyRequestHeader\": \"<string>\",\n \"secretKeyRequestHeader\": \"<string>\",\n \"idPath\": \"<string>\",\n \"datePath\": \"<string>\",\n \"apiToken\": \"<string>\",\n \"authenticateByToken\": true,\n \"authenticationTokenKey\": \"<string>\",\n \"instanceId\": \"<string>\",\n \"alertUid\": \"<string>\",\n \"title\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"state\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"channelId\": \"<string>\",\n \"phoneNumberIdentification\": \"<string>\",\n \"accessKey\": \"<string>\",\n \"appSid\": \"<string>\",\n \"senderId\": \"<string>\",\n \"tenantId\": \"<string>\",\n \"AppIOBaseUrl\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"outboundIntegrationId\": \"<string>\",\n \"outboundConnectedAt\": \"<string>\",\n \"whatsNextCompletedAt\": \"<string>\",\n \"useFromAddressOverride\": true,\n \"fromAddressOverride\": \"<string>\",\n \"emailSlugPrefix\": \"<string>\",\n \"externalEnvironmentId\": \"<string>\",\n \"externalVaultId\": \"<string>\",\n \"externalWorkspaceId\": \"<string>\"\n },\n \"active\": true,\n \"check\": true,\n \"conditions\": [\n {\n \"isNegated\": true,\n \"children\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"configurations\": {}\n}"
response = http.request(request)
puts response.read_body{
"_environmentId": "<string>",
"_organizationId": "<string>",
"name": "<string>",
"identifier": "<string>",
"providerId": "<string>",
"active": true,
"deleted": true,
"primary": true,
"_id": "<string>",
"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>",
"apiKeyRequestHeader": "<string>",
"secretKeyRequestHeader": "<string>",
"idPath": "<string>",
"datePath": "<string>",
"apiToken": "<string>",
"authenticateByToken": true,
"authenticationTokenKey": "<string>",
"instanceId": "<string>",
"alertUid": "<string>",
"title": "<string>",
"imageUrl": "<string>",
"state": "<string>",
"externalLink": "<string>",
"channelId": "<string>",
"phoneNumberIdentification": "<string>",
"accessKey": "<string>",
"appSid": "<string>",
"senderId": "<string>",
"tenantId": "<string>",
"AppIOBaseUrl": "<string>",
"signingSecret": "<string>",
"outboundIntegrationId": "<string>",
"outboundConnectedAt": "<string>",
"whatsNextCompletedAt": "<string>",
"useFromAddressOverride": true,
"fromAddressOverride": "<string>",
"emailSlugPrefix": "<string>",
"externalEnvironmentId": "<string>",
"externalVaultId": "<string>",
"externalWorkspaceId": "<string>"
},
"configurations": {
"inboundWebhookEnabled": true,
"inboundWebhookSigningKey": "<string>"
},
"deletedAt": "<string>",
"deletedBy": "<string>",
"conditions": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
Headers
A header for idempotency purposes
Body
The name of the integration
The unique identifier for the integration
The ID of the associated environment
The provider ID for the integration
The channel type for the integration. Not required for agent-kind integrations.
in_app, email, sms, chat, push Distinguishes delivery integrations from agent-runtime integrations. Defaults to "delivery". Agent integrations do not require a channel.
delivery, agent The credentials for the integration
Show child attributes
Show child attributes
If the integration is active, the validation on the credentials field will run
Flag to check the integration status
Conditions for the integration
Show child attributes
Show child attributes
Configurations for the integration
Response
Created
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").
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).
Indicates whether this integration is marked as primary. A primary integration is often the default choice for processing.
The unique identifier of the integration record in the database. This is automatically generated.
The channel type for the integration, which defines how it communicates (e.g., email, SMS). Not set for agent-kind integrations.
in_app, email, sms, chat, push Distinguishes delivery integrations from agent-runtime integrations. Defaults to "delivery". Agent integrations do not have a channel.
delivery, agent The decrypted credentials required for the integration to function (e.g. provider API keys, signing secrets). Only returned to dashboard/session-token callers; API-key authenticated callers receive the integration metadata without this field to avoid amplifying API-key leaks into provider-credential leaks.
Show child attributes
Show child attributes
The configurations required for enabling the additional configurations of the integration.
Show child attributes
Show child attributes
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.
An array of conditions associated with the integration that may influence its behavior or processing logic.
Show child attributes
Show child attributes
Was this page helpful?
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.integrations.create({});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.Integrations.CreateAsync(createIntegrationRequestDto: new CreateIntegrationRequestDto() {});
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$createIntegrationRequestDto = new Components\CreateIntegrationRequestDto();
$response = $sdk->integrations->create(
createIntegrationRequestDto: $createIntegrationRequestDto
);
if ($response->integrationResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.integrations.create(create_integration_request_dto={})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/components"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Integrations.Create(ctx, components.CreateIntegrationRequestDto{}, nil)
if err != nil {
log.Fatal(err)
}
if res.IntegrationResponseDto != nil {
// handle response
}
}curl --request POST \
--url https://api.novu.co/v1/integrations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"identifier": "<string>",
"_environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"providerId": "<string>",
"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>",
"apiKeyRequestHeader": "<string>",
"secretKeyRequestHeader": "<string>",
"idPath": "<string>",
"datePath": "<string>",
"apiToken": "<string>",
"authenticateByToken": true,
"authenticationTokenKey": "<string>",
"instanceId": "<string>",
"alertUid": "<string>",
"title": "<string>",
"imageUrl": "<string>",
"state": "<string>",
"externalLink": "<string>",
"channelId": "<string>",
"phoneNumberIdentification": "<string>",
"accessKey": "<string>",
"appSid": "<string>",
"senderId": "<string>",
"tenantId": "<string>",
"AppIOBaseUrl": "<string>",
"signingSecret": "<string>",
"outboundIntegrationId": "<string>",
"outboundConnectedAt": "<string>",
"whatsNextCompletedAt": "<string>",
"useFromAddressOverride": true,
"fromAddressOverride": "<string>",
"emailSlugPrefix": "<string>",
"externalEnvironmentId": "<string>",
"externalVaultId": "<string>",
"externalWorkspaceId": "<string>"
},
"active": true,
"check": true,
"conditions": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
],
"configurations": {}
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
identifier: '<string>',
_environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
providerId: '<string>',
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>',
apiKeyRequestHeader: '<string>',
secretKeyRequestHeader: '<string>',
idPath: '<string>',
datePath: '<string>',
apiToken: '<string>',
authenticateByToken: true,
authenticationTokenKey: '<string>',
instanceId: '<string>',
alertUid: '<string>',
title: '<string>',
imageUrl: '<string>',
state: '<string>',
externalLink: '<string>',
channelId: '<string>',
phoneNumberIdentification: '<string>',
accessKey: '<string>',
appSid: '<string>',
senderId: '<string>',
tenantId: '<string>',
AppIOBaseUrl: '<string>',
signingSecret: '<string>',
outboundIntegrationId: '<string>',
outboundConnectedAt: '<string>',
whatsNextCompletedAt: '<string>',
useFromAddressOverride: true,
fromAddressOverride: '<string>',
emailSlugPrefix: '<string>',
externalEnvironmentId: '<string>',
externalVaultId: '<string>',
externalWorkspaceId: '<string>'
},
active: true,
check: true,
conditions: [{isNegated: true, children: [{field: '<string>', value: '<string>'}]}],
configurations: {}
})
};
fetch('https://api.novu.co/v1/integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.novu.co/v1/integrations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"_environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"providerId\": \"<string>\",\n \"credentials\": {\n \"apiKey\": \"<string>\",\n \"user\": \"<string>\",\n \"secretKey\": \"<string>\",\n \"domain\": \"<string>\",\n \"password\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"secure\": true,\n \"region\": \"<string>\",\n \"accountSid\": \"<string>\",\n \"messageProfileId\": \"<string>\",\n \"token\": \"<string>\",\n \"from\": \"<string>\",\n \"senderName\": \"<string>\",\n \"projectName\": \"<string>\",\n \"applicationId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"requireTls\": true,\n \"ignoreTls\": true,\n \"tlsOptions\": {},\n \"baseUrl\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"hmac\": true,\n \"serviceAccount\": \"<string>\",\n \"ipPoolName\": \"<string>\",\n \"apiKeyRequestHeader\": \"<string>\",\n \"secretKeyRequestHeader\": \"<string>\",\n \"idPath\": \"<string>\",\n \"datePath\": \"<string>\",\n \"apiToken\": \"<string>\",\n \"authenticateByToken\": true,\n \"authenticationTokenKey\": \"<string>\",\n \"instanceId\": \"<string>\",\n \"alertUid\": \"<string>\",\n \"title\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"state\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"channelId\": \"<string>\",\n \"phoneNumberIdentification\": \"<string>\",\n \"accessKey\": \"<string>\",\n \"appSid\": \"<string>\",\n \"senderId\": \"<string>\",\n \"tenantId\": \"<string>\",\n \"AppIOBaseUrl\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"outboundIntegrationId\": \"<string>\",\n \"outboundConnectedAt\": \"<string>\",\n \"whatsNextCompletedAt\": \"<string>\",\n \"useFromAddressOverride\": true,\n \"fromAddressOverride\": \"<string>\",\n \"emailSlugPrefix\": \"<string>\",\n \"externalEnvironmentId\": \"<string>\",\n \"externalVaultId\": \"<string>\",\n \"externalWorkspaceId\": \"<string>\"\n },\n \"active\": true,\n \"check\": true,\n \"conditions\": [\n {\n \"isNegated\": true,\n \"children\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"configurations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"_environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"providerId\": \"<string>\",\n \"credentials\": {\n \"apiKey\": \"<string>\",\n \"user\": \"<string>\",\n \"secretKey\": \"<string>\",\n \"domain\": \"<string>\",\n \"password\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"secure\": true,\n \"region\": \"<string>\",\n \"accountSid\": \"<string>\",\n \"messageProfileId\": \"<string>\",\n \"token\": \"<string>\",\n \"from\": \"<string>\",\n \"senderName\": \"<string>\",\n \"projectName\": \"<string>\",\n \"applicationId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"requireTls\": true,\n \"ignoreTls\": true,\n \"tlsOptions\": {},\n \"baseUrl\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"hmac\": true,\n \"serviceAccount\": \"<string>\",\n \"ipPoolName\": \"<string>\",\n \"apiKeyRequestHeader\": \"<string>\",\n \"secretKeyRequestHeader\": \"<string>\",\n \"idPath\": \"<string>\",\n \"datePath\": \"<string>\",\n \"apiToken\": \"<string>\",\n \"authenticateByToken\": true,\n \"authenticationTokenKey\": \"<string>\",\n \"instanceId\": \"<string>\",\n \"alertUid\": \"<string>\",\n \"title\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"state\": \"<string>\",\n \"externalLink\": \"<string>\",\n \"channelId\": \"<string>\",\n \"phoneNumberIdentification\": \"<string>\",\n \"accessKey\": \"<string>\",\n \"appSid\": \"<string>\",\n \"senderId\": \"<string>\",\n \"tenantId\": \"<string>\",\n \"AppIOBaseUrl\": \"<string>\",\n \"signingSecret\": \"<string>\",\n \"outboundIntegrationId\": \"<string>\",\n \"outboundConnectedAt\": \"<string>\",\n \"whatsNextCompletedAt\": \"<string>\",\n \"useFromAddressOverride\": true,\n \"fromAddressOverride\": \"<string>\",\n \"emailSlugPrefix\": \"<string>\",\n \"externalEnvironmentId\": \"<string>\",\n \"externalVaultId\": \"<string>\",\n \"externalWorkspaceId\": \"<string>\"\n },\n \"active\": true,\n \"check\": true,\n \"conditions\": [\n {\n \"isNegated\": true,\n \"children\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ],\n \"configurations\": {}\n}"
response = http.request(request)
puts response.read_body{
"_environmentId": "<string>",
"_organizationId": "<string>",
"name": "<string>",
"identifier": "<string>",
"providerId": "<string>",
"active": true,
"deleted": true,
"primary": true,
"_id": "<string>",
"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>",
"apiKeyRequestHeader": "<string>",
"secretKeyRequestHeader": "<string>",
"idPath": "<string>",
"datePath": "<string>",
"apiToken": "<string>",
"authenticateByToken": true,
"authenticationTokenKey": "<string>",
"instanceId": "<string>",
"alertUid": "<string>",
"title": "<string>",
"imageUrl": "<string>",
"state": "<string>",
"externalLink": "<string>",
"channelId": "<string>",
"phoneNumberIdentification": "<string>",
"accessKey": "<string>",
"appSid": "<string>",
"senderId": "<string>",
"tenantId": "<string>",
"AppIOBaseUrl": "<string>",
"signingSecret": "<string>",
"outboundIntegrationId": "<string>",
"outboundConnectedAt": "<string>",
"whatsNextCompletedAt": "<string>",
"useFromAddressOverride": true,
"fromAddressOverride": "<string>",
"emailSlugPrefix": "<string>",
"externalEnvironmentId": "<string>",
"externalVaultId": "<string>",
"externalWorkspaceId": "<string>"
},
"configurations": {
"inboundWebhookEnabled": true,
"inboundWebhookSigningKey": "<string>"
},
"deletedAt": "<string>",
"deletedBy": "<string>",
"conditions": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."