(integrations)
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/channels-and-providers/integration-store
- create - Create integration
- listActive - Get active integrations
- list - Get integrations
- delete - Delete integration
- setAsPrimary - Set integration as primary
- update - Update integration
Create an integration for the current environment the user is based on the API key provided
declare(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(
providerId: '<id>',
channel: Components\CreateIntegrationRequestDtoChannel::Sms,
);
$response = $sdk->integrations->create(
createIntegrationRequestDto: $createIntegrationRequestDto,
idempotencyKey: '<value>'
);
if ($response->integrationResponseDto !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
createIntegrationRequestDto |
Components\CreateIntegrationRequestDto | ✔️ | N/A |
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |
Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change
declare(strict_types=1);
require 'vendor/autoload.php';
use novu;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$response = $sdk->integrations->listActive(
idempotencyKey: '<value>'
);
if ($response->integrationResponseDtos !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |
Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change
declare(strict_types=1);
require 'vendor/autoload.php';
use novu;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$response = $sdk->integrations->list(
idempotencyKey: '<value>'
);
if ($response->integrationResponseDtos !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |
Delete integration
declare(strict_types=1);
require 'vendor/autoload.php';
use novu;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$response = $sdk->integrations->delete(
integrationId: '<id>',
idempotencyKey: '<value>'
);
if ($response->integrationResponseDtos !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
integrationId |
string | ✔️ | N/A |
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |
Set integration as primary
declare(strict_types=1);
require 'vendor/autoload.php';
use novu;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$response = $sdk->integrations->setAsPrimary(
integrationId: '<id>',
idempotencyKey: '<value>'
);
if ($response->integrationResponseDto !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
integrationId |
string | ✔️ | N/A |
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |
Update integration
declare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$updateIntegrationRequestDto = new Components\UpdateIntegrationRequestDto();
$response = $sdk->integrations->update(
integrationId: '<id>',
updateIntegrationRequestDto: $updateIntegrationRequestDto,
idempotencyKey: '<value>'
);
if ($response->integrationResponseDto !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
integrationId |
string | ✔️ | N/A |
updateIntegrationRequestDto |
Components\UpdateIntegrationRequestDto | ✔️ | N/A |
idempotencyKey |
?string | ➖ | A header for idempotency purposes |
?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\APIException | 4XX, 5XX | */* |