# Channels

The status of Slack, Teams and phone channels, and links to finish linking them in the app.

Web version: https://www.svanja.com/docs/api/channels/

Channels are the places where the assistant reaches you outside the app, such as Slack, Microsoft Teams, or your phone. You can find them in the app under [Settings, Channels](https://app.svanja.com/settings/channels). Use these endpoints to check which channels are linked or to send someone to the page where they can link one. To read channel data, you need access to the Channels area, which is included in both Full access and Read-only. For more details, see [Notifications and channels](https://www.svanja.com/docs/notifications/).

Use `GET /channels` and `GET /channels/{id}` to check a channel's status. Linking and unlinking happen in the app itself. When you make the API call, it waits for a person to approve it and then returns a `settings_url` pointing to the Channels page in Settings, where you finish the setup.

With the same approval, `PATCH /channels/{id}` updates two of your personal settings: `voice_spoken_responses_enabled` and `voice_keep_recordings`. If you prefer working from a terminal, use [svanja channel](https://www.svanja.com/docs/cli/connections-and-channels/).

## Operations

| Operation | What it does | Effect | Endpoints |
| --- | --- | --- | --- |
| `channel.link` | Link or unlink a channel. | Changes access or automation | `POST /channels`<br>`POST /channels/{id}/actions` |
| `channel.preferences` | Update channel preferences. | Changes data in Svanja | `POST /channels/{id}/actions` |
| `channel.read` | Read assistant channel status. | Reads only | `GET /channels`<br>`GET /channels/{id}` |

## Endpoints

### GET /api/v1/channels

List channel status

### POST /api/v1/channels

Start a channel action

### GET /api/v1/channels/{id}

Read a channel link

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### PATCH /api/v1/channels/{id}

Update channel preferences

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### POST /api/v1/channels/{id}/actions

Run a channel action

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
