# Channel Manager

Channel Manager exposes workspace-scoped endpoints for email channel setup and channel use cases. Use cases bind a channel to an approved setup and define how that channel is used by services.

## Supported Channels

| Channel              | Description                                   |
| -------------------- | --------------------------------------------- |
| `outbound_voice`     | Outbound phone calls                          |
| `inbound_voice`      | Inbound phone calls                           |
| `ringless_voicemail` | Voicemail drops without ringing the recipient |
| `email`              | Outbound and inbound email                    |

## Email Setups

An email setup represents a verified sending and receiving domain. Creating a setup returns DNS records that must be published before the setup can be used by an email use case.

### Endpoints

| Method   | Path                                                      | Description                              |
| -------- | --------------------------------------------------------- | ---------------------------------------- |
| `POST`   | `/v1/{workspace_id}/channels/ses-setup`                   | Create an email setup                    |
| `GET`    | `/v1/{workspace_id}/channels/ses-setup`                   | List email setups                        |
| `GET`    | `/v1/{workspace_id}/channels/ses-setup/{setup_id}`        | Get an email setup with live DNS refresh |
| `POST`   | `/v1/{workspace_id}/channels/ses-setup/{setup_id}/verify` | Refresh DNS verification                 |
| `DELETE` | `/v1/{workspace_id}/channels/ses-setup/{setup_id}`        | Delete an email setup                    |

### Create Email Setup

`POST /v1/{workspace_id}/channels/ses-setup`

#### Request Body

| Field             | Type   | Required | Description                                                                      |
| ----------------- | ------ | -------- | -------------------------------------------------------------------------------- |
| `tenant_name`     | string | Yes      | Logical tenant name. 1-64 characters, letters, digits, hyphens, and underscores. |
| `domain_identity` | string | Yes      | Domain to verify for sending and receiving. Max 255 characters.                  |

#### Response

| Field             | Type             | Description                 |
| ----------------- | ---------------- | --------------------------- |
| `id`              | string           | Setup identifier            |
| `tenant_name`     | string           | Tenant name                 |
| `domain_identity` | string           | Verified domain             |
| `dns_checked_at`  | datetime or null | Last DNS verification check |
| `dns_records`     | array            | DNS records to publish      |
| `created_at`      | datetime         | Creation timestamp          |
| `updated_at`      | datetime         | Last update timestamp       |

Each `dns_records` item includes `address`, `record`, `type`, and `verified`.

### List Email Setups

`GET /v1/{workspace_id}/channels/ses-setup`

Supports `limit` and `continuation_token` query parameters. Returns cached aggregate DNS verification status.

#### Response

| Field                | Type            | Description                           |
| -------------------- | --------------- | ------------------------------------- |
| `items`              | array           | Setup list items                      |
| `continuation_token` | integer or null | Token for the next page, when present |

Each item includes `id`, `tenant_name`, `domain_identity`, `dns_verified`, `dns_checked_at`, `created_at`, and `updated_at`.

### Get or Verify Email Setup

Use either endpoint to refresh DNS verification and return full setup detail:

* `GET /v1/{workspace_id}/channels/ses-setup/{setup_id}`
* `POST /v1/{workspace_id}/channels/ses-setup/{setup_id}/verify`

### Delete Email Setup

`DELETE /v1/{workspace_id}/channels/ses-setup/{setup_id}`

Returns `204 No Content` on success. The API returns `409` if active use cases still reference the setup.

## Use Cases

A use case binds a communication channel to an approved setup.

### Endpoints

| Method   | Path                                         | Description       |
| -------- | -------------------------------------------- | ----------------- |
| `POST`   | `/v1/{workspace_id}/use-cases`               | Create a use case |
| `GET`    | `/v1/{workspace_id}/use-cases`               | List use cases    |
| `DELETE` | `/v1/{workspace_id}/use-cases/{use_case_id}` | Delete a use case |

### Create Voice or Voicemail Use Case

`POST /v1/{workspace_id}/use-cases`

#### Request Body

| Field         | Type           | Required | Description                                                 |
| ------------- | -------------- | -------- | ----------------------------------------------------------- |
| `channel`     | string         | Yes      | `outbound_voice`, `inbound_voice`, or `ringless_voicemail`. |
| `entity_name` | string         | Yes      | Business entity name. 1-31 letters, spaces, or hyphens.     |
| `name`        | string         | Yes      | Use case name. 1-31 letters, spaces, or hyphens.            |
| `setup_id`    | UUID           | Yes      | Approved setup to bind.                                     |
| `description` | string or null | No       | Description. Max 2000 characters.                           |

### Create Email Use Case

`POST /v1/{workspace_id}/use-cases`

#### Request Body

| Field                  | Type           | Required | Description                                             |
| ---------------------- | -------------- | -------- | ------------------------------------------------------- |
| `channel`              | string         | Yes      | `email`.                                                |
| `entity_name`          | string         | Yes      | Business entity name. 1-31 letters, spaces, or hyphens. |
| `name`                 | string         | Yes      | Use case name. 1-31 letters, spaces, or hyphens.        |
| `setup_id`             | UUID           | Yes      | Verified email setup to bind.                           |
| `sender_email_address` | string         | Yes      | Sender address whose domain matches the setup domain.   |
| `email_type`           | string         | Yes      | `transactional` or `marketing`.                         |
| `description`          | string or null | No       | Description. Max 2000 characters.                       |

### Use Case Response

| Field                    | Type           | Description              |
| ------------------------ | -------------- | ------------------------ |
| `id`                     | string         | Use case identifier      |
| `channel`                | string         | Channel value            |
| `entity_name`            | string         | Business entity name     |
| `name`                   | string         | Use case name            |
| `description`            | string or null | Description              |
| `setup_id`               | string         | Bound setup identifier   |
| `configuration_set_name` | string or null | Email configuration name |
| `sender_email_address`   | string or null | Email sender address     |
| `email_type`             | string or null | Email type               |
| `tier`                   | string or null | Email reputation tier    |
| `created_at`             | datetime       | Creation timestamp       |
| `updated_at`             | datetime       | Last update timestamp    |

### List Use Cases

`GET /v1/{workspace_id}/use-cases`

Optional query parameters:

| Parameter     | Type   | Description                    |
| ------------- | ------ | ------------------------------ |
| `entity_name` | string | Filter by business entity name |
| `channel`     | string | Filter by channel              |
| `setup_id`    | UUID   | Filter by bound setup          |

### Delete Use Case

`DELETE /v1/{workspace_id}/use-cases/{use_case_id}`

Returns `204 No Content` on success. The API returns `409` if the use case is still bound to a service or still has active phone assignments.

## Permissions

| Operation          | Required Permission |
| ------------------ | ------------------- |
| List or get setups | `Channel.view`      |
| Create setups      | `Channel.create`    |
| Delete setups      | `Channel.delete`    |
| List use cases     | `Channel.view`      |
| Create use cases   | `Channel.create`    |
| Delete use cases   | `Channel.delete`    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/developer-guide/platform-api/platform-api/channel-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
