---
title: "Read public website metadata for a conversation link preview"
description: "Verified workspace members only. Checks public DNS and each redirect, limits HTML to 512 KiB and six seconds, and never executes scripts or forwards credentials. Returns null when the site cannot be previewed."
---

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

`POST /api/link-preview`

Verified workspace members only. Checks public DNS and each redirect, limits HTML to 512 KiB and six seconds, and never executes scripts or forwards credentials. Returns null when the site cannot be previewed.

## Authentication

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

## Request body

_Required._

- `url` (`post/api/link-preview.url`; string, required)
  - maxLength 4096

## Example request

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/link-preview';
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/link-preview"

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

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

print(response.text)
```

## Responses

### 200

Public page metadata or null when unavailable

#### Example

```json
{
  "preview": {
    "title": "string",
    "description": "string",
    "image": "string"
  }
}
```

- `preview` (`post/api/link-preview.response.200.preview`; object, optional, nullable)
  - `title` (`post/api/link-preview.response.200.preview.title`; string, optional)
  - `description` (`post/api/link-preview.response.200.preview.description`; string, optional)
  - `image` (`post/api/link-preview.response.200.preview.image`; string, optional, nullable)

### 400

Invalid or private URL

### 401

Verified session required

### 403

Workspace membership required

### 429

Preview request limit reached

### 503

Authentication or membership lookup unavailable


Source: https://developer.channelautomations.com/api/post-api-link-preview/index.md
