Get an attachment
GET
/attachments/*path
const url = 'https://api.engram.page/attachments/*path';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”path
required
string
Attachment path
Query Parameters
Section titled “Query Parameters”raw
string
“1” streams raw bytes instead of JSON.
Responses
Section titled “Responses”Attachment
Media typeapplication/json
AttachmentWithContent
object
content_base64
required
Base64-encoded file bytes.
string
created_at
string format: date-time
id
string format: uuid
mime_type
string
mtime
number format: float
path
required
string
size_bytes
integer
updated_at
string format: date-time
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"}