> ## Documentation index
> Fetch the complete documentation index at: https://workover.io/docs/llms.txt

# Upload a file for the AI agent

POST`/messenger/{messengerId}/sources/pdf`

A PDF the AI agent answers from, stored as a hidden doc and cited by its file name. Multipart field `file` (20 MB), or JSON `{ name, base64 }` (3.5 MB). The same file again answers `created: false`.

## Path Parameters

`messengerId`

numberrequired

## Response

200

**cURL**

```bash
curl --request POST \
  --url 'https://api.workover.io/messenger/{messengerId}/sources/pdf' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

**JavaScript**

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({})
};

fetch('https://api.workover.io/messenger/{messengerId}/sources/pdf', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

**Python**

```python
import requests

url = "https://api.workover.io/messenger/{messengerId}/sources/pdf"

payload = {}

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

print(response.text)
```
