# POST /files/upload-url

**Resource:** [Files](./files.md)  
**MCP tool:** `create_video_upload_url`  
**Scopes:** `files:write`  
**Write operation:** no

Step 1 of uploading a video (MP4, WebM or MOV, up to 500MB) to the Files library. Returns an upload_url that works for 4 hours: PUT the raw file bytes to it with exactly the returned required_headers (e.g. curl -X PUT --data-binary @film.mp4), then call complete_video_upload. The finished video is public on trustpager.net and streams (Range/206), so it plays on iPhone and can be linked from emails and websites. Needs a caller that can send the file itself (a script or a shell); a model cannot pass the bytes through this tool. Charged once as a video upload on completion.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `name` | body | string | yes | The filename with its extension (e.g. "sales-film.mp4"). |
| `mime_type` | body | string | yes | video/mp4, video/webm or video/quicktime. Must match the Content-Type of the PUT. |
| `size` | body | number | yes | The exact file size in bytes (max 524288000, 500MB). Must match the Content-Length of the PUT. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/files/upload-url"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","mime_type":"...","size":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`