# Repzo API - Media

OpenAPI specification for Repzo Media endpoints.

**Version:** 1.0.0

## Overview

### Base URLs

- \*\*\*\*: `https://sv.api.repzo.me`

## Authentication

No authentication required.

## Endpoints

### `/media`

#### GET /media

**Summary:** Find media

##### Parameters

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

| `params` | query | object | No | Query parameters for filtering media |

##### Responses

**200** - A list of media

Content-Type: `application/json`

---

#### POST /media

**Summary:** Create media

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**201** - Media created

Content-Type: `application/json`

---

### `/media/{id}`

#### GET /media/{id}

**Summary:** Get media by ID

##### Parameters

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

| `id` | path | string | Yes | No description |

##### Responses

**200** - Media details

Content-Type: `application/json`

---

#### PUT /media/{id}

**Summary:** Update media

##### Parameters

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

| `id` | path | string | Yes | No description |

##### Request Body

**Content Types:**

- `application/json`

##### Responses

**200** - Media updated

Content-Type: `application/json`

---

#### DELETE /media/{id}

**Summary:** Remove media

##### Parameters

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

| `id` | path | string | Yes | No description |

##### Responses

**200** - Media removed

Content-Type: `application/json`

---

## Data Models

### MediaFindResult

Result of finding media

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

| `data` | array | No | No description |

| `total_result` | number | No | Total number of media |

| `current_count` | number | No | Count of media in current page |

| `total_pages` | number | No | Total number of pages |

| `current_page` | number | No | Current page number |

| `per_page` | number | No | Number of media per page |

| `first_page_url` | string | No | URL for the first page |

| `last_page_url` | string | No | URL for the last page |

| `next_page_url` | string | No | URL for the next page |

| `prev_page_url` | string | No | URL for the previous page |

| `path` | string | No | Base URL path |

### MediaSchema

Media schema

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

| `_id` | string | No | Unique identifier for the media |

| `name` | string | No | Name of the media |

| `description` | string | No | Description of the media |

| `url` | string | No | URL of the media |

| `document_type` | string | No | Type of media document |

| `parent_document_type` | string | No | Type of parent document |

| `parent_document_key` | string | No | Key of parent document |

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

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### MediaCreateBody

Body for creating media

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

| `name` | string | Yes | Name of the media |

| `description` | string | No | Description of the media |

| `url` | string | Yes | URL of the media |

| `document_type` | string | Yes | Type of media document |

| `parent_document_type` | string | No | Type of parent document |

| `parent_document_key` | string | No | Key of parent document |

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

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

### MediaCreateResult

Result of creating media

### MediaGetResult

Result of getting media

### MediaUpdateBody

Body for updating media

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

| `name` | string | No | Name of the media |

| `description` | string | No | Description of the media |

| `url` | string | No | URL of the media |

| `document_type` | string | No | Type of media document |

| `parent_document_type` | string | No | Type of parent document |

| `parent_document_key` | string | No | Key of parent document |

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

| `integration_meta` | object | No | Integration metadata |

| `company_namespace` | array | No | Company namespaces |

| `_id` | string | No | Unique identifier for the media |

| `createdAt` | string | No | Creation timestamp |

| `updatedAt` | string | No | Last update timestamp |

| `__v` | number | No | Version number |

### MediaUpdateResult

Result of updating media

### MediaRemoveResult

Result of removing media

## TypeScript Usage

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