> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin client: notifications

> Read the company's Slack connection and route a workspace's Bolt alerts to Slack channels, Slack users and email from Python with paradime.admin.notifications.

`paradime.admin.notifications` reads the company's Slack connection and sets where a workspace's alerts go: Slack and email. For the GraphQL operations, see [Notifications](https://docs.paradime.io/developers/graphql-api/admin-api/notifications).

> [!NOTE]
>
> **Prerequisites**
>
> * These operations are part of the Enterprise plan. On other plans, they raise `AdminPlanUpgradeRequiredException`.
> * Your API key needs the **Notifications admin** capability group. To disconnect Slack, use a company API key.
> * The admin client of the `paradime-io` package. See [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index).

The examples on this page use this client:

```python theme={"system"}
from paradime import Paradime

paradime = Paradime(api_endpoint="API_ENDPOINT", api_secret="prdm_cmp_...", workspace_uid="WORKSPACE_UID")
```

> [!NOTE]
>
> Slack is connected once for the company, and every workspace shares the connection. A company admin connects it in a browser: the API can't. See [Notifications](https://docs.paradime.io/products/settings/configuration/notifications.md).

## Get the Slack connection

Reads the company's Slack connection. When Slack is not connected, `install_url` is the Paradime settings page where a company admin connects it.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to target, for a company API key. The Slack connection doesn't depend on it.

**Returns** `Optional[SlackInstallation]`

The connection, or `None` when the server returned none.

```python theme={"system"}
from paradime.apis.admin.notifications.types import SlackInstallationStatus

slack = paradime.admin.notifications.get_slack()
if slack.status != SlackInstallationStatus.CONNECTED:
    print(f"A company admin connects Slack at {slack.install_url}")
```

## Disconnect Slack

Removes the company's Slack connection, for every workspace. Needs a company API key. Disconnecting again is not an error.

**team\_id** `Optional[str]` (default: None)

The Slack team that you expect to be connected. When another team is connected, nothing changes and the call raises `AdminConflictException`.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to target, for a company API key.

**Returns** `SlackInstallation`

The connection, now pending.

```python theme={"system"}
paradime.admin.notifications.disconnect_slack(team_id="T0123ABCD")
```

## Get alert destinations

Reads where one category of the workspace's alerts goes.

**category** `AlertCategory` (default: AlertCategory.BOLT\_SYSTEM)

The alerts to read. `BOLT_SYSTEM` is the alerts that Paradime sends about Bolt schedules and their runs.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**Returns** `Optional[AlertNotifications]`

The destinations, or `None` when the server returned none.

```python theme={"system"}
alerts = paradime.admin.notifications.get_alert_notifications()
print(alerts.slack.channel_ids, alerts.email.is_enabled)
```

## Set alert destinations

Routes one category of the workspace's alerts. A destination you leave out keeps its value. Each destination you give replaces its value, so an empty list removes it.

**category** `AlertCategory` (default: AlertCategory.BOLT\_SYSTEM)

The alerts to route.

**slack\_channel\_ids** `Optional[Sequence[str]]` (default: None)

Slack channel ids. When you give it, with or without `slack_user_ids`, it replaces the Slack destination.

**slack\_user\_ids** `Optional[Sequence[str]]` (default: None)

Slack user ids.

**email\_enabled** `Optional[bool]` (default: None)

Whether alerts go to the workspace's admins by email.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `AlertNotifications`

Where the category's alerts go now.

```python theme={"system"}
paradime.admin.notifications.set_alert_notifications(
    slack_channel_ids=["C0123456789"],
    email_enabled=True,
)
```

> [!WARNING]
>
> Giving `slack_channel_ids` or `slack_user_ids` replaces both Slack lists. To add a channel, read the current destinations first and send the full list.

## Types

Import the models and enums from `paradime.apis.admin.notifications.types`.

**SlackInstallation** `model`

**fields**

**status** `SlackInstallationStatus`

`CONNECTED`, or `PENDING_USER_ACTION` while a company admin still has to connect Slack in a browser.

**install\_url** `Optional[str]`

The Paradime settings page where a company admin connects Slack. `None` once Slack is connected with every scope it needs.

**team\_id** `Optional[str]`

The connected Slack team's id.

**team\_name** `Optional[str]`

The connected Slack team's name.

**is\_reconnect\_required** `Optional[bool]`

Whether Slack must be connected again to grant the scopes it lacks.

**missing\_scopes** `Optional[List[str]]`

The Slack scopes the connection lacks.

**AlertNotifications** `model`

**fields**

**category** `AlertCategory`

The alerts that these destinations receive.

**slack** `Optional[SlackAlertDestination]`

The Slack destinations: `channel_ids` and `user_ids`.

**email** `Optional[EmailAlertDestination]`

The email destination: `is_enabled`.


## Related topics

- [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index.md)
- [Admin client: Bolt](https://docs.paradime.io/developers/python-sdk/modules/admin/bolt.md)
- [Admin client: setup status](https://docs.paradime.io/developers/python-sdk/modules/admin/setup-status.md)
- [Admin client: workspaces](https://docs.paradime.io/developers/python-sdk/modules/admin/workspaces.md)
- [Admin client: users](https://docs.paradime.io/developers/python-sdk/modules/admin/users.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.