API Overview
Midden exposes JSON and multipart endpoints under /api/v1.
The runtime OpenAPI document is available at:
GET /api/openapi.json
The OpenAPI output is the machine-readable reference for the running version. This guide provides practical usage notes and examples.
Enable API
[features]
api = true
[policy]
use_api = "anonymous"
Individual endpoints still check feature flags, policies, scopes, roles, and rate limits.
Common Response Fields
File item responses can include:
idurlraw_urlinternal_urlthumbnail_urlfilenamecontent_typesize_bytesimage_widthimage_heightvisibilitymetadataexpires_atstatecreated_at
Paste item responses can include:
idurlraw_urltitlesyntaxsize_bytesvisibilityexpires_atstatecreated_at
Errors
API routes use standard HTTP status codes such as 400, 401, 403, 404, 413, 429, and 500. Feature-disabled API routes return 403 or 404 depending on the surface.