---
title: "Prepare a short video for text messaging"
---

> 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 › LiveChat

`POST /api/livechat/video/prepare`

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Request body

_Required._

- `workspaceId` (`post/api/livechat/video/prepare.workspaceId`; string, required)
- `storagePath` (`post/api/livechat/video/prepare.storagePath`; string, required) — Workspace video-raw storage path
- `purpose` (`post/api/livechat/video/prepare.purpose`; string, optional) — Optional RCS preparation profile; omitted retains manual MMS behavior
  - one of `"flow-rcs"`

## Example request

```json
{
  "workspaceId": "string",
  "storagePath": "string",
  "purpose": "flow-rcs"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/livechat/video/prepare \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": "string",
  "storagePath": "string",
  "purpose": "flow-rcs"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/livechat/video/prepare';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({workspaceId: 'string', storagePath: 'string', purpose: 'flow-rcs'})
};

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/livechat/video/prepare"

payload = {
    "workspaceId": "string",
    "storagePath": "string",
    "purpose": "flow-rcs"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Preparation started

#### Example

```json
{
  "runId": "string"
}
```

- `runId` (`post/api/livechat/video/prepare.response.200.runId`; string, optional)

### 400

Invalid workspace or raw path

### 401

Verified session required

### 403

Workspace membership required

### 503

Preparation unavailable


Source: https://developer.channelautomations.com/api/post-api-livechat-video-prepare/index.md
