# Client Contact API

API for managing client contacts - individual contact persons associated with clients

**Version:** 1.0.0

## Overview

### Base URLs

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

### API Categories

- **Client Contact**: Client contact management operations

## Authentication

This API uses the following authentication methods:

- **ApiKeyAuth**

## Endpoints

### `/client-contact`

#### GET /client-contact

**Summary:** Get all client contacts

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

**Tags:** Client Contact

##### 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 contact ID(s) |

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

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

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

| `to_updatedAt` | query | integer | No | Filter contacts updated before this timestamp |

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

| `to__id` | query | string | No | Filter contacts 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-contact

**Summary:** Create a new client contact

**Description:** Create a new client contact

**Tags:** Client Contact

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Client contact created successfully

Content-Type: `application/json`

**400** - No description

**401** - No description

**500** - No description

---

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

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

**Summary:** Get a specific client contact

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

**Tags:** Client Contact

##### Parameters

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

| `id` | path | string | Yes | Client contact ID |

##### Responses

**200** - Successful response

Content-Type: `application/json`

**404** - No description

**401** - No description

**500** - No description

---

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

**Summary:** Update a client contact

**Description:** Update an existing client contact

**Tags:** Client Contact

##### Parameters

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

| `id` | path | string | Yes | Client contact ID |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Client contact updated successfully

Content-Type: `application/json`

**400** - No description

**404** - No description

**401** - No description

**500** - No description

---

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

**Summary:** Delete a client contact

**Description:** Delete an existing client contact

**Tags:** Client Contact

##### Parameters

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

| `id` | path | string | Yes | Client contact ID |

##### Responses

**200** - Client contact deleted successfully

Content-Type: `application/json`

**404** - No description

**401** - No description

**500** - No description

---

## Data Models

### ClientContactSchema

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

| `_id` | string | Yes | Unique identifier for the client contact |

| `creator` | object | Yes | User who created this contact |

| `editor` | object | No | User who last edited this contact |

| `name` | string | Yes | Contact name |

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

| `phone1` | string | No | Primary phone number |

| `phone2` | string | No | Secondary phone number |

| `email` | string | No | Email address |

| `title` | string | No | Job title or position |

| `extra_info` | string | No | Additional information about the contact |

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

| `media` | array | No | Array of media file URLs |

| `cover_photo` | string | No | Cover photo URL |

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

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

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

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

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

### ClientContactCreateBody

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

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

| `creator` | object | No | User who created this contact |

| `editor` | object | No | User who last edited this contact |

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

| `phone1` | string | No | Primary phone number |

| `phone2` | string | No | Secondary phone number |

| `email` | string | No | Email address |

| `title` | string | No | Job title or position |

| `extra_info` | string | No | Additional information about the contact |

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

| `media` | array | No | Array of media file URLs |

| `cover_photo` | string | No | Cover photo URL |

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

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

### ClientContactUpdateBody

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

| `name` | string | No | Contact name |

| `creator` | object | No | User who created this contact |

| `editor` | object | No | User who last edited this contact |

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

| `phone1` | string | No | Primary phone number |

| `phone2` | string | No | Secondary phone number |

| `email` | string | No | Email address |

| `title` | string | No | Job title or position |

| `extra_info` | string | No | Additional information about the contact |

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

| `media` | array | No | Array of media file URLs |

| `cover_photo` | string | No | Cover photo URL |

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

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

| `_id` | string | No | Contact 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) |

### AdminCreator

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

| `_id` | string | Yes | No description |

| `username` | string | Yes | No description |

| `name` | string | Yes | No description |

| `type` | string | Yes | No description |

### RepCreator

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

| `_id` | string | Yes | No description |

| `username` | string | Yes | No description |

| `name` | string | Yes | No description |

| `type` | string | Yes | No description |

### ClientCreator

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

| `_id` | string | Yes | No description |

| `username` | string | Yes | No description |

| `name` | string | Yes | No description |

| `type` | string | Yes | No description |

### 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-contact-examples.md](./client-contact-examples.md) for detailed TypeScript usage examples.
