# Attach a file to a chat conversation

`POST /api/ai-chat/attachments`

Authentication: no security requirement declared for this operation.

Responses:

- 201: The stored attachment descriptor.

- 400: No file uploaded, or no organization scope.

- 413: Attachment exceeds the 25 MB limit.

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/ai-chat/attachments'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/ai-chat/attachments', {
  method: 'POST',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post('http://localhost:3000/api/ai-chat/attachments')
print(response.text)
```
