# Media Service

## Request video master file generation

### POST

`https://api.typeform.com/media/videos/{id}/master`

Initiates the master file generation process for a video. This should be called after uploading a video file.

**Master File Process:**

1. After uploading a video to the `upload_url`, call this endpoint to start processing
2. The service will begin generating the master file (high-quality downloadable version)
3. Use the GET endpoint to poll for status and retrieve the download URL when ready

**Note:** This endpoint is idempotent - calling it multiple times for the same video will not restart processing.

## Request

### Path Parameters

| Parameter | Type   | Required | Description | 
|-----------|--------|----------|-------------| 
| id        | string | Yes      | Unique ID for the video returned from the upload endpoint |

## Responses

### Status

**200** Master file generation request accepted

#### Schema

| Property | Type   | Description | 
|----------|--------|-------------| 
| status   | string | Valid values: none, preparing, ready | 
| url      | string | Download URL for the processed media file. Present only when status is "ready". Temporary signed URL to be used promptly. |

**Current transcoding status:**
- **none**: No master file has been requested
- **preparing**: Upload being prepared
- **ready**: Processing complete, media available for download

#### Example

```json
{
  "status": "ready",
  "url": "https://stream.mux.com/video-id/high.mp4?token=signed-token"
}
```

### Status

**401** Unauthorized - invalid or missing authentication token

#### Schema

| Property | Type   | Description | 
|----------|--------|-------------| 
| code     | string | Error code identifying the type of error | 
| details  | object | Additional error details specific to the error type |  
| message   | string | Human-readable error message |

### Status

**404** Video not found

#### Schema
