# Update a video by ID

`PUT /api/plugins/videos/{id}`

Updates an existing video record based on the provided ID and metadata.

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (path, string, required)
  Type: string

Request body: application/json (required)

Type: object

Schema: [UpdateVideoDTO](https://sourcey-gauzy.pages.dev/api-reference/models/updatevideodto/index.md)

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `title` (required)
  Type: string
  
  Title of the video

- `recordedAt` (optional)
  Type: timestamptz
  
  Date when the video was recorded

- `duration` (required)
  Type: number
  
  Duration of the video in seconds

- `size` (required)
  Type: number
  
  Size of the video file in bytes

- `fullUrl` (required)
  Type: string
  
  Full URL to access the video

- `description` (required)
  Type: string
  
  Video description

- `storageProvider` (optional)
  Type: string
  
  enum: ["LOCAL","S3","WASABI","CLOUDINARY","DIGITALOCEAN"]

- `resolution` (optional)
  Type: string
  
  Video resolution in format WIDTH:HEIGHT (e.g., 1920:1080, 3840:2160)

- `codec` (optional)
  Type: string
  
  Video codec used for encoding (e.g., libx264, libx265, vp9)

- `frameRate` (required)
  Type: number
  
  Video frame rate

- `timeSlotId` (optional)
  Type: string
  
  The UUID of the associated TimeSlot

Responses:

- 200: The video has been successfully updated.

Content type: application/json

Type: object

Schema: [Video](https://sourcey-gauzy.pages.dev/api-reference/models/video/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `title` (required)
  Type: string
  
  Title of the video

- `file` (required)
  Type: string
  
  Video file path or identifier

- `recordedAt` (optional)
  Type: timestamptz
  
  Date when the video was recorded

- `duration` (required)
  Type: number
  
  Duration of the video in seconds

- `size` (required)
  Type: number
  
  Size of the video file in bytes

- `fullUrl` (required)
  Type: string
  
  Full URL to access the video

- `description` (required)
  Type: string
  
  Video description

- `storageProvider` (optional)
  Type: string
  
  enum: ["LOCAL","S3","WASABI","CLOUDINARY","DIGITALOCEAN"]

- `resolution` (optional)
  Type: string
  
  Video resolution in format WIDTH:HEIGHT (e.g., 1920:1080, 3840:2160)

- `codec` (optional)
  Type: string
  
  Video codec used for encoding (e.g., libx264, libx265, vp9)

- `frameRate` (required)
  Type: number
  
  Video frame rate

- `timeSlotId` (optional)
  Type: string
  
  The UUID of the associated TimeSlot

- 400: Invalid input, The response body may contain clues as to what went wrong.

- 404: Video record not found.

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/plugins/videos/string' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "tenantId": "string",
  "organizationId": "string",
  "title": "string",
  "duration": 0,
  "size": 0,
  "fullUrl": "string",
  "description": "string",
  "storageProvider": "LOCAL",
  "resolution": "string",
  "codec": "string",
  "frameRate": 0,
  "timeSlotId": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "tenantId": "string",
  "organizationId": "string",
  "title": "string",
  "duration": 0,
  "size": 0,
  "fullUrl": "string",
  "description": "string",
  "storageProvider": "LOCAL",
  "resolution": "string",
  "codec": "string",
  "frameRate": 0,
  "timeSlotId": "string"
}`;

const response = await fetch('http://localhost:3000/api/plugins/videos/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "tenantId": "string",
  "organizationId": "string",
  "title": "string",
  "duration": 0,
  "size": 0,
  "fullUrl": "string",
  "description": "string",
  "storageProvider": "LOCAL",
  "resolution": "string",
  "codec": "string",
  "frameRate": 0,
  "timeSlotId": "string"
}'''

response = requests.put(
    'http://localhost:3000/api/plugins/videos/string',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
