---
title: "Classify a media URL before attaching it to a sequence step"
description: "Server-side HEAD (5s timeout, at most 3 redirects) with an SSRF guard. Used by the sequence composer to steer YouTube/Vimeo/Loom watch pages into video-link mode instead of attaching them as MMS.\n"
---

> 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/validate-url`

Server-side HEAD (5s timeout, at most 3 redirects) with an SSRF guard. Used by the sequence composer to steer YouTube/Vimeo/Loom watch pages into video-link mode instead of attaching them as MMS.

## 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._

- `url` (`post/api/media/validate-url.url`; string, required)

## Example request

```json
{
  "url": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/api/media/validate-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/media/validate-url';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({url: 'string'})
};

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/validate-url"

payload = { "url": "string" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Classification result

#### Example

```json
{
  "ok": true,
  "contentType": "string",
  "bytes": 0,
  "kind": "image",
  "provider": "youtube",
  "reason": "string"
}
```

- `ok` (`post/api/media/validate-url.response.200.ok`; boolean, optional)
- `contentType` (`post/api/media/validate-url.response.200.contentType`; string, optional, nullable)
- `bytes` (`post/api/media/validate-url.response.200.bytes`; number, optional, nullable)
- `kind` (`post/api/media/validate-url.response.200.kind`; string, optional)
  - one of `"image"`, `"video"`, `"webpage"`, `"unknown"`
- `provider` (`post/api/media/validate-url.response.200.provider`; string, optional)
  - one of `"youtube"`, `"vimeo"`, `"loom"`, `"r2"`, `"other"`
- `reason` (`post/api/media/validate-url.response.200.reason`; string, optional, nullable)

### 400

Invalid or private URL


Source: https://developer.channelautomations.com/api/post-api-media-validate-url/index.md
