Base URL
All API requests should be made to:Authentication
The Galey Cloud API uses session-based authentication powered by Supabase. All API endpoints require authentication via HTTP-only cookies set during the login process.See the Authentication page for detailed information on how to authenticate your requests.
Request Format
The API accepts requests with the following content types:application/json- For most endpointsmultipart/form-data- For file upload endpoints
Response Format
All API responses are returned in JSON format with appropriate HTTP status codes.Success Response
Successful responses return the requested data directly:Error Response
Error responses include an error message:HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
400 | Bad Request - Missing or invalid parameters |
401 | Unauthorized - Authentication required or invalid |
404 | Not Found - Resource does not exist |
500 | Internal Server Error - Server error occurred |
Error Handling
All endpoints follow a consistent error handling pattern:401 Unauthorized
Returned when the user is not authenticated:400 Bad Request
Returned when required parameters are missing or invalid:404 Not Found
Returned when a requested resource doesn’t exist:500 Internal Server Error
Returned when a server-side error occurs:Rate Limiting
Currently, there are no rate limits enforced on the API. This may change in future versions.API Versioning
The API is currently unversioned. All endpoints are accessed directly under/api. Future versions may introduce versioning if breaking changes are necessary.
Available Resources
The Galey Cloud API provides access to the following resources:Getting Started
- Authenticate - Log in to obtain a session cookie
- Create an Album - Use
POST /api/albumsto create your first album - Upload Photos - Use
POST /api/photos/uploadto upload photos - Organize - Move photos between albums using
PATCH /api/photos/move
All API requests must include the session cookie obtained during authentication. The cookie is automatically included when making requests from the same domain.