---
title: "Upload an MP4 for sequence video steps"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Media

`POST /api/media/upload-video`

## Authentication

Requires one of the following:

- `BearerAuth`, http, header `Authorization`, format `JWT`
- `ApiKeyAuth`, apiKey, in header, header `X-API-Key`, format `API_KEY`

## Request body

_Required._

- `video` (`post/api/media/upload-video.video`; string, optional) — MP4 video file
  - format `binary`
- `workspaceId` (`post/api/media/upload-video.workspaceId`; string, optional) — Workspace ID (ignored; taken from auth context)

## Example request

```text
{
  "video": "<video>",
  "workspaceId": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/media/upload-video \
  --header 'Authorization: Bearer <token>' \
  --form 'video=@<video>;type=application/octet-stream' \
  --form-string 'workspaceId=string'
```

### TypeScript

```typescript
import { readFile } from 'node:fs/promises';

const formData = new FormData();
formData.append('video', new Blob([await readFile('<video>')]), '<video>');
formData.append('workspaceId', 'string');

const url = 'https://api.channelautomation.com/api/media/upload-video';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}, body: formData};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/media/upload-video"

files = [
    ("video", ("<video>", open("<video>", "rb"), "application/octet-stream"))
]
payload = { "workspaceId": "string" }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
```

## Responses

### 200

Video uploaded successfully

#### Example

```json
{
  "success": true,
  "url": "string",
  "fileName": "string",
  "originalName": "string",
  "size": 0,
  "contentType": "string"
}
```

- `success` (`post/api/media/upload-video.response.200.success`; boolean, optional)
- `url` (`post/api/media/upload-video.response.200.url`; string, optional)
- `fileName` (`post/api/media/upload-video.response.200.fileName`; string, optional)
- `originalName` (`post/api/media/upload-video.response.200.originalName`; string, optional)
- `size` (`post/api/media/upload-video.response.200.size`; number, optional)
- `contentType` (`post/api/media/upload-video.response.200.contentType`; string, optional)

### 400

Bad request or validation error

### 500

Server error


Source: https://developer.channelautomations.com/api/post-api-media-upload-video/index.md
