App Configuration API
Audience: Frontend engineers and administrators managing application configuration.- Base URL:
https://jethings-backend.fly.dev - Content-Type:
application/json
Conventions
- All responses are JSON.
- Errors follow standard HTTP status codes with
{ message: string }body. - Unless noted, successful responses are
200 OK. - Admin endpoints require
adminorsuper_adminrole. - Public endpoints require no authentication.
Get App Configuration (Public)
GET/app-config/public
Requires Authentication: None (Public endpoint)
Success Response
No Active Config Response
Example Request
Create App Configuration (Admin Only)
POST/app-config
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin
Request Body
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
minVersion | string | Yes | Minimum supported app version |
currentVersion | string | Yes | Current app version |
releaseNotes | string | No | Release notes for the version |
isActive | boolean | No | Whether this config is active (default: true) |
Success Response
Possible Errors
409 Conflict:{ "message": "An active app config already exists. Please update the existing one or deactivate it first." }400 Bad Request:{ "message": "Failed to create app config" }
Example Request
Get All App Configurations (Admin Only)
GET/app-config
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin
Success Response
Example Request
Get App Configuration by ID (Admin Only)
GET/app-config/:id
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin
Path Parameters
id(string): Configuration ID (UUID format)
Success Response
Possible Errors
404 Not Found:{ "message": "App config with ID ck_123... not found" }
Example Request
Update App Configuration (Admin Only)
PUT/app-config/:id
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin
Path Parameters
id(string): Configuration ID (UUID format)
Request Body
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
minVersion | string | No | Minimum supported app version |
currentVersion | string | No | Current app version |
releaseNotes | string | No | Release notes for the version |
isActive | boolean | No | Whether this config is active |
Success Response
Possible Errors
404 Not Found:{ "message": "App config with ID ck_123... not found" }400 Bad Request:{ "message": "Failed to update app config" }
Example Request
Delete App Configuration (Admin Only)
DELETE/app-config/:id
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin
Path Parameters
id(string): Configuration ID (UUID format)
Success Response
Possible Errors
404 Not Found:{ "message": "App config with ID ck_123... not found" }
Example Request
Create or Update Active Configuration (Admin Only)
PUT/app-config/active
Requires Authentication: Bearer token in Authorization headerRequires Role: Admin or Super Admin This endpoint provides a convenient way to manage the active configuration. If an active configuration exists, it will be updated. If no active configuration exists, a new one will be created.
Request Body
Success Response
Example Request
Error Responses
Common Error Codes
400 Bad Request: Invalid request data or validation errors401 Unauthorized: Missing or invalid authentication token403 Forbidden: Insufficient permissions (not admin for admin-only endpoints)404 Not Found: Resource not found409 Conflict: Resource conflict (active config already exists)500 Internal Server Error: Server error