# Client Channel API

API for managing client channels - distribution channels for organizing and categorizing clients

**Version:** 1.0.0

## Overview

### Base URLs

- **Production server**: `https://api.repzo.me/v1`

### API Categories

- **Channel**: Client channel management operations

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/client-channel`

#### GET /client-channel

**Summary:** Get all client channels

**Description:** Retrieve a list of all client channels with optional filtering and pagination

**Tags:** Channel

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `page` | query | integer | No | Page number for pagination |

| `per_page` | query | integer | No | Number of items per page |

| `sort` | query | string | No | Sort field |

| `_id` | query | | No | Filter by channel ID(s) |

| `search` | query | string | No | Search text for channel name |

| `name` | query | | No | Filter by channel name(s) |

| `local_name` | query | | No | Filter by local name(s) |

| `disabled` | query | boolean | No | Filter by disabled status |

| `from_updatedAt` | query | integer | No | Filter channels updated after this timestamp |

| `from__id` | query | string | No | Filter channels with ID greater than this value |

| `to__id` | query | string | No | Filter channels with ID less than this value |

| `sortBy` | query | array | No | Advanced sorting options |

##### Responses

**200** - Successful response

Content-Type: `application/json`

**400** - No description

**401** - No description

**500** - No description

---

#### POST /client-channel

**Summary:** Create a new client channel

**Description:** Create a new client channel

**Tags:** Channel

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Channel created successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**500** - No description

---

### `/client-channel/{id}`

#### GET /client-channel/{id}

**Summary:** Get a specific client channel

**Description:** Retrieve a specific client channel by ID

**Tags:** Channel

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Channel ID |

##### Responses

**200** - Successful response

Content-Type: `application/json`

**404** - No description

**401** - No description

**500** - No description

---

#### PUT /client-channel/{id}

**Summary:** Update a client channel

**Description:** Update an existing client channel

**Tags:** Channel

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Channel ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Channel updated successfully

Content-Type: `application/json`

**400** - No description

**404** - No description

**401** - No description

**500** - No description

---

#### DELETE /client-channel/{id}

**Summary:** Delete a client channel

**Description:** Delete an existing client channel

**Tags:** Channel

##### Parameters

| Name | Location | Type | Required | Description |
| ---- | -------- | ---- | -------- | ----------- |

| `id` | path | string | Yes | Channel ID |

##### Responses

**200** - Channel deleted successfully

Content-Type: `application/json`

**404** - No description

**401** - No description

**500** - No description

---

## Data Models

### ChannelSchema

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `_id` | string | Yes | Unique identifier for the channel |

| `name` | string | Yes | Channel name |

| `local_name` | string | No | Local/translated name |

| `disabled` | boolean | No | Whether the channel is disabled |

| `integration_meta` | object | No | Metadata for third-party integrations |

| `company_namespace` | array | Yes | Company namespaces this channel belongs to |

| `createdAt` | string | Yes | Creation timestamp |

| `updatedAt` | string | Yes | Last update timestamp |

| `__v` | integer | Yes | Version key |

### ChannelCreateBody

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | Yes | Channel name (required) |

| `local_name` | string | No | Local/translated name |

| `disabled` | boolean | No | Whether the channel is disabled |

| `integration_meta` | object | No | Metadata for third-party integrations |

| `company_namespace` | array | No | Company namespaces this channel belongs to |

### ChannelUpdateBody

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `name` | string | No | Channel name |

| `local_name` | string | No | Local/translated name |

| `disabled` | boolean | No | Whether the channel is disabled |

| `integration_meta` | object | No | Metadata for third-party integrations |

| `company_namespace` | array | No | Company namespaces this channel belongs to |

| `_id` | string | No | Channel ID (for internal use) |

| `createdAt` | string | No | Creation timestamp (for internal use) |

| `updatedAt` | string | No | Last update timestamp (for internal use) |

| `__v` | integer | No | Version key (for internal use) |

### PaginationResult

| Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- |

| `page` | integer | No | No description |

| `per_page` | integer | No | No description |

| `pre_page` | integer | No | No description |

| `next_page` | integer | No | No description |

| `total` | integer | No | No description |

| `total_page` | integer | No | No description |

## TypeScript Usage

See [client-channel-examples.md](./client-channel-examples.md) for detailed TypeScript usage examples.
