در حال بارگذاری…
Downloads an attached file's binary content. Fully authenticated — unlike /media downloads, there is no token-in-URL access; send the Sanctum bearer token as usual.
| Permission | Description |
|---|---|
ai_thread_messages.view | View messages (and download their attachments) in your own thread |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| thread-id | int | Yes | ID of the thread | 123 |
| message-id | int | Yes | ID of the message | 456 |
| attachment-id | int | Yes | ID of the attachment | 5 |
Streams the file's bytes. The Content-Disposition header carries the original filename:
Content-Disposition: attachment; filename="photo.jpg"
Content-Type: image/jpeg
| Status | Description | Reference |
|---|---|---|
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden (no permission) | Permission error |
| 404 | Thread, message, or attachment not found; message not in thread; attachment not on message; or file missing on disk | Not found error |