- 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.
import novu_py
from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.channel_connections.list(request={
"limit": 10,
"subscriber_id": "subscriber-123",
"channel": novu_py.QueryParamChannel.CHAT,
"provider_id": novu_py.ProvidersIDEnum.SLACK,
"integration_identifier": "slack-prod",
"context_keys": [
"tenant:org-123",
"region:us-east-1",
],
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.ChannelConnectionsControllerListChannelConnectionsRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ChannelConnectionsControllerListChannelConnectionsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ErrorDto | 414 | application/json |
| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| models.ValidationErrorDto | 422 | application/json |
| models.ErrorDto | 500 | application/json |
| models.APIError | 4XX, 5XX | */* |
Create a new channel connection for a resource for given integration. Only one channel connection is allowed per resource and integration.
from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.channel_connections.create(create_channel_connection_request_dto={
"identifier": "slack-prod-user123-abc4",
"subscriber_id": "subscriber-123",
"context": {
"key": "org-acme",
},
"integration_identifier": "slack-prod",
"workspace": {
"id": "T123456",
"name": "Acme HQ",
},
"auth": {
"access_token": "Workspace access token",
},
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
create_channel_connection_request_dto |
models.CreateChannelConnectionRequestDto | ✔️ | N/A |
idempotency_key |
Optional[str] | ➖ | A header for idempotency purposes |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ChannelConnectionsControllerCreateChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ErrorDto | 414 | application/json |
| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| models.ValidationErrorDto | 422 | application/json |
| models.ErrorDto | 500 | application/json |
| models.APIError | 4XX, 5XX | */* |
Retrieve a specific channel connection by its unique identifier.
from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.channel_connections.retrieve(identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
identifier |
str | ✔️ | The unique identifier of the channel connection |
idempotency_key |
Optional[str] | ➖ | A header for idempotency purposes |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ChannelConnectionsControllerGetChannelConnectionByIdentifierResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ErrorDto | 414 | application/json |
| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| models.ValidationErrorDto | 422 | application/json |
| models.ErrorDto | 500 | application/json |
| models.APIError | 4XX, 5XX | */* |
Update an existing channel connection by its unique identifier.
from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.channel_connections.update(identifier="<value>", update_channel_connection_request_dto={
"workspace": {
"id": "T123456",
"name": "Acme HQ",
},
"auth": {
"access_token": "Workspace access token",
},
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
identifier |
str | ✔️ | The unique identifier of the channel connection |
update_channel_connection_request_dto |
models.UpdateChannelConnectionRequestDto | ✔️ | N/A |
idempotency_key |
Optional[str] | ➖ | A header for idempotency purposes |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ChannelConnectionsControllerUpdateChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ErrorDto | 414 | application/json |
| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| models.ValidationErrorDto | 422 | application/json |
| models.ErrorDto | 500 | application/json |
| models.APIError | 4XX, 5XX | */* |
Delete a specific channel connection by its unique identifier.
from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.channel_connections.delete(identifier="<value>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
identifier |
str | ✔️ | The unique identifier of the channel connection |
idempotency_key |
Optional[str] | ➖ | A header for idempotency purposes |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ChannelConnectionsControllerDeleteChannelConnectionResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ErrorDto | 414 | application/json |
| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| models.ValidationErrorDto | 422 | application/json |
| models.ErrorDto | 500 | application/json |
| models.APIError | 4XX, 5XX | */* |