- List - List all channel connections
- Create - Create a channel connection
- Retrieve - Retrieve a channel connection
- Update - Update a channel connection
- Delete - Delete a channel connection
List all channel connections for a resource.
using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
using System.Collections.Generic;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
ChannelConnectionsControllerListChannelConnectionsRequest req = new ChannelConnectionsControllerListChannelConnectionsRequest() {
Limit = 10D,
SubscriberId = "subscriber-123",
Channel = Novu.Models.Requests.Channel.Chat,
ProviderId = ProvidersIdEnum.Slack,
IntegrationIdentifier = "slack-prod",
ContextKeys = new List<string>() {
"tenant:org-123",
"region:us-east-1",
},
};
var res = await sdk.ChannelConnections.ListAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ChannelConnectionsControllerListChannelConnectionsRequest | ✔️ | The request object to use for the request. |
ChannelConnectionsControllerListChannelConnectionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Create a new channel connection for a resource for given integration. Only one channel connection is allowed per resource and integration.
using Novu;
using Novu.Models.Components;
using System.Collections.Generic;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelConnections.CreateAsync(createChannelConnectionRequestDto: new CreateChannelConnectionRequestDto() {
Identifier = "slack-prod-user123-abc4",
SubscriberId = "subscriber-123",
Context = new Dictionary<string, CreateChannelConnectionRequestDtoContext>() {
{ "key", CreateChannelConnectionRequestDtoContext.CreateStr(
"org-acme"
) },
},
IntegrationIdentifier = "slack-prod",
Workspace = new WorkspaceDto() {
Id = "T123456",
Name = "Acme HQ",
},
Auth = new AuthDto() {
AccessToken = "Workspace access token",
},
});
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
CreateChannelConnectionRequestDto |
CreateChannelConnectionRequestDto | ✔️ | N/A |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelConnectionsControllerCreateChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Retrieve a specific channel connection by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelConnections.RetrieveAsync(identifier: "<value>");
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel connection |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelConnectionsControllerGetChannelConnectionByIdentifierResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Update an existing channel connection by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelConnections.UpdateAsync(
identifier: "<value>",
updateChannelConnectionRequestDto: new UpdateChannelConnectionRequestDto() {
Workspace = new WorkspaceDto() {
Id = "T123456",
Name = "Acme HQ",
},
Auth = new AuthDto() {
AccessToken = "Workspace access token",
},
}
);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel connection |
UpdateChannelConnectionRequestDto |
UpdateChannelConnectionRequestDto | ✔️ | N/A |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelConnectionsControllerUpdateChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Delete a specific channel connection by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelConnections.DeleteAsync(identifier: "<value>");
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel connection |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelConnectionsControllerDeleteChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |