Base URL
All API requests should be made to:Authentication
The XGP Photo API uses JWT (JSON Web Token) authentication. Protected endpoints require a valid JWT token obtained through the/api/auth/login endpoint.
Authentication Header Format
Include the JWT token in theAuthorization header of your requests:
Obtaining a Token
To obtain a JWT token, send a POST request to/api/auth/login with valid credentials and client information. See the Login endpoint documentation for details.
Token Expiration
Tokens are valid for 60 minutes by default. After expiration, you’ll need to request a new token by logging in again.Authorization Roles
Some endpoints require specific roles:- Admin: Full access to create and update projects
- Anonymous: Public access to read-only endpoints
Request Format
All POST and PUT requests should include aContent-Type: application/json header with a JSON request body.
Response Format
All responses are returned in JSON format with appropriate HTTP status codes.Success Responses
200 OK: Request successful201 Created: Resource created successfully