Skip to content

Get an attachment

GET
/attachments/*path
curl --request GET \
--url 'https://api.engram.page/attachments/*path' \
--header 'Authorization: Bearer <token>'

Returns metadata + base64 content by default. Pass ?raw=1 to stream the raw bytes instead.

path
required
string

Attachment path

raw
string

“1” streams raw bytes instead of JSON.

Attachment

Media typeapplication/json
AttachmentWithContent
object
content_base64
required

Base64-encoded file bytes.

string
created_at
string format: date-time
nullable
id
string format: uuid
nullable
mime_type
string
nullable
mtime
number format: float
path
required
string
size_bytes
integer
updated_at
string format: date-time
nullable
Examplegenerated
{
"content_base64": "example",
"created_at": "2026-04-15T12:00:00Z",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"mime_type": "example",
"mtime": 1,
"path": "example",
"size_bytes": 1,
"updated_at": "2026-04-15T12:00:00Z"
}

No such attachment

Media typeapplication/json
MessageError
object
error
required
string
Example
{
"error": "not found"
}

Fetch error

Media typeapplication/json
MessageError
object
error
required
string
Example
{
"error": "not found"
}

Storage fetch failed

Media typeapplication/json
MessageError
object
error
required
string
Example
{
"error": "not found"
}