- List - List all channel endpoints
- Create - Create a channel endpoint
- Retrieve - Retrieve a channel endpoint
- Update - Update a channel endpoint
- Delete - Delete a channel endpoint
List all channel endpoints for a resource based on query filters.
using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
using System.Collections.Generic;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
ChannelEndpointsControllerListChannelEndpointsRequest req = new ChannelEndpointsControllerListChannelEndpointsRequest() {
Limit = 10D,
SubscriberId = "subscriber-123",
ContextKeys = new List<string>() {
"tenant:org-123",
"region:us-east-1",
},
ProviderId = ProvidersIdEnum.Slack,
IntegrationIdentifier = "slack-prod",
ConnectionIdentifier = "slack-connection-abc123",
};
var res = await sdk.ChannelEndpoints.ListAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ChannelEndpointsControllerListChannelEndpointsRequest | ✔️ | The request object to use for the request. |
ChannelEndpointsControllerListChannelEndpointsResponse
| 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 endpoint for a resource.
using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelEndpoints.CreateAsync(requestBody: ChannelEndpointsControllerCreateChannelEndpointRequestBody.CreateSlackChannel(
new CreateSlackChannelEndpointDto() {
SubscriberId = "subscriber-123",
IntegrationIdentifier = "slack-prod",
Type = CreateSlackChannelEndpointDtoType.SlackChannel,
Endpoint = new SlackChannelEndpointDto() {
ChannelId = "C123456789",
},
}
));
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
RequestBody |
ChannelEndpointsControllerCreateChannelEndpointRequestBody | ✔️ | Channel endpoint creation request. The structure varies based on the type field. |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelEndpointsControllerCreateChannelEndpointResponse
| 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 endpoint by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelEndpoints.RetrieveAsync(identifier: "<value>");
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel endpoint |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelEndpointsControllerGetChannelEndpointResponse
| 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 endpoint by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelEndpoints.UpdateAsync(
identifier: "<value>",
updateChannelEndpointRequestDto: new UpdateChannelEndpointRequestDto() {
Endpoint = UpdateChannelEndpointRequestDtoEndpoint.CreateSlackUserEndpointDto(
new SlackUserEndpointDto() {
UserId = "U123456789",
}
),
}
);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel endpoint |
UpdateChannelEndpointRequestDto |
UpdateChannelEndpointRequestDto | ✔️ | N/A |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelEndpointsControllerUpdateChannelEndpointResponse
| 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 endpoint by its unique identifier.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.ChannelEndpoints.DeleteAsync(identifier: "<value>");
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
Identifier |
string | ✔️ | The unique identifier of the channel endpoint |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
ChannelEndpointsControllerDeleteChannelEndpointResponse
| 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 | */* |