OwnMediaHostDocs
API reference

Responses & errors

Response envelopes, status codes, and error handling.

All API responses follow a consistent envelope format:

Success

json
{
  "success": true,
  "data": { ... }
}

Error

json
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "File not found"
  }
}

Common HTTP Status Codes

CodeMeaning
200Success
201Created
400Bad Request (invalid parameters)
401Unauthorized (missing or invalid auth)
403Forbidden (insufficient permissions)
404Not Found
409Conflict (duplicate file, alias already exists)
413Payload Too Large
500Internal Server Error

All errors return a consistent JSON envelope:

json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "filename is required"
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource does not exist
VALIDATION_ERROR400Invalid request parameters
DUPLICATE409Resource already exists
PAYLOAD_TOO_LARGE413File exceeds upload size limit
INTERNAL_ERROR500Server error

Rate Limiting

OwnMediaHost is self-hosted and does not enforce rate limits by default. If you deploy behind a reverse proxy (Caddy, Nginx), you can configure rate limiting at the proxy level.


Based on the supplied platform and API documentation. View project source ↗