API Reference
RESTful API for release management
Complete API documentation for integrating with ReleaseHub. Use these endpoints for custom integrations, CI/CD pipelines, and automation.
Base URL
All API requests are made to:
# Hosted version
https://releasehub.dev
# Self-hosted
https://your-releasehub-instance.com
Authentication
Login (JWT)
Authenticate to receive a JWT token for admin API access:
/api/auth/login
Request Body
{
"email": "admin@releasehub.local",
"password": "your-password"
}
Response
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOi...",
"token_type": "bearer",
"expires_in": 3600,
"user": {
"id": "01HQXYZ...",
"email": "user@example.com",
"name": "John Doe",
"role": "admin"
}
}
API Keys
For upload and public API access, use project API keys instead of JWT:
# Include in request headers
Authorization: Bearer {api_key}
Tip: Create API keys in the admin panel under Project Settings. Each key can have specific permissions (read, upload, admin).
Public API
Version Check
Check if an update is available for a project:
/api/check/{projectKey}
{projectKey} can be either the project slug (e.g., my-app) or bundle ID (e.g., com.example.myapp).
Query Parameters
| Parameter | Type | Description |
|---|---|---|
version | string | Current app version (e.g., "1.0.0") |
build | integer | Current build number |
channel | string | Release channel (e.g., "stable", "beta") |
arch | string | Device architecture (e.g., "arm64-v8a") |
Example Request
Response
{
"hasUpdate": true,
"latestVersion": {
"version": "1.2.0",
"build": 42,
"versionString": "1.2.0+42",
"releaseNotes": "Bug fixes and improvements",
"minVersion": "1.0.0",
"isRequired": false
},
"download": {
"url": "/api/download/my-app/42/arm64-v8a"
}
}
Download
Download a release file:
/api/download/{uuid}
Returns the binary file. The UUID is provided in the version check response.
Download Latest Version
Download the latest version directly without knowing the UUID:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/download/{slug}/latest | Download latest version |
| GET | /api/download/{slug}/{arch}/latest | Download for specific architecture |
Optional query parameter: ?channel=beta to specify release channel.
Example
Public Projects
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/public/projects | List public projects |
| GET | /api/public/projects/{slug} | Get project details |
| GET | /api/public/projects/{slug}/releases | Get project releases |
| POST | /api/public/verify-code | Verify access code |
| GET | /api/check/{projectKey}/latest | Get latest version info |
| GET | /api/check/{projectKey}/channels | List channels |
Upload API
ReleaseHub uses chunked uploads to handle large files and bypass PHP limits. All upload endpoints require an API key with upload permissions.
Initialize Upload
/api/upload/init
Request
// Headers
Authorization: Bearer {api_key}
Content-Type: application/json
// Body
{
"bundle_id": "com.example.myapp",
"filename": "app-release.apk",
"file_size": 52428800,
"chunk_size": 5242880,
"version": "1.3.0",
"build_number": 52,
"platform": "android",
"architecture": "arm64-v8a"
}
Use either bundle_id or project_id to identify the project. All fields except filename and file_size are optional.
Response
{
"sessionId": "abc123-...",
"filename": "app-release.apk",
"fileSize": 52428800,
"chunkSize": 5242880,
"totalChunks": 10,
"expiresAt": "2024-01-15T12:00:00Z"
}
Upload Chunk
/api/upload/chunk
// Headers
Authorization: Bearer {api_key}
Content-Type: multipart/form-data
// Form Data
session_id: {session_id}
chunk_index: 0
chunk: (binary data)
Complete Upload
/api/upload/complete
Request
// Headers
Authorization: Bearer {api_key}
Content-Type: application/json
// Body
{
"session_id": "{session_id}",
"version": "1.3.0",
"build_number": 52,
"channel": "stable",
"changelog": "## What's New\n- Bug fixes",
"is_force_update": false,
"is_draft": false,
"platform": "android",
"architecture": "arm64-v8a"
}
Response
{
"success": true,
"version": {
"id": "01HQXYZ...",
"version": "1.3.0",
"build": 52,
"versionString": "1.3.0+52",
"channel": "stable",
"isDraft": false
},
"file": {
"uuid": "abc123-...",
"filename": "app-release.apk",
"size": 52428800,
"platform": "android",
"architecture": "arm64-v8a",
"checksum": {
"md5": "d41d8cd98f...",
"sha256": "e3b0c44298fc..."
},
"downloadUrl": "/api/download/abc123-..."
}
}
Admin API
All admin endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer {jwt_token}
Projects
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/projects | List all projects |
| POST | /api/admin/projects | Create project |
| GET | /api/admin/projects/{id} | Get project details |
| PUT | /api/admin/projects/{id} | Update project |
| DELETE | /api/admin/projects/{id} | Delete project |
Versions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/projects/{id}/versions | List versions |
| POST | /api/admin/projects/{id}/versions | Create version |
| GET | /api/admin/versions/{id} | Get version details |
| PUT | /api/admin/versions/{id} | Update version |
| DELETE | /api/admin/versions/{id} | Delete version |
| POST | /api/admin/versions/{id}/publish | Publish version |
| POST | /api/admin/versions/{id}/unpublish | Unpublish version (revert to draft) |
| GET | /api/admin/versions/{id}/files | List version files |
Release Files
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/files/{id} | Get file details |
| DELETE | /api/admin/files/{id} | Delete file |
Channels
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/projects/{id}/channels | List channels |
| POST | /api/admin/projects/{id}/channels | Create channel |
| POST | /api/admin/projects/{id}/channels/apply-preset | Apply channel preset |
| PUT | /api/admin/channels/{id} | Update channel |
| DELETE | /api/admin/channels/{id} | Delete channel |
Global API Keys
API keys that work across multiple projects.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/global-api-keys | List global API keys |
| POST | /api/admin/global-api-keys | Create global API key |
| GET | /api/admin/global-api-keys/projects | List projects for key assignment |
| PUT | /api/admin/global-api-keys/{id} | Update global API key |
| DELETE | /api/admin/global-api-keys/{id} | Delete global API key |
| POST | /api/admin/global-api-keys/{id}/regenerate | Regenerate key secret |
Users & System
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/users | List users |
| POST | /api/admin/users | Create user |
| GET | /api/admin/users/{id} | Get user details |
| PUT | /api/admin/users/{id} | Update user |
| DELETE | /api/admin/users/{id} | Delete user |
User Permissions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/users/{id}/permissions | Get all project permissions |
| GET | /api/admin/users/{id}/permissions/{project} | Get project permissions |
| PUT | /api/admin/users/{id}/permissions/{project} | Update project permissions |
| DELETE | /api/admin/users/{id}/permissions/{project} | Revoke project access |
System & Settings
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/platforms | List platforms |
| POST | /api/admin/platforms | Create platform |
| PUT | /api/admin/platforms/{id} | Update platform |
| DELETE | /api/admin/platforms/{id} | Delete platform |
| GET | /api/admin/audit-logs | View audit logs |
| GET | /api/admin/audit-logs/{id} | View audit log details |
| GET | /api/admin/settings | Get settings |
| PUT | /api/admin/settings | Update settings |
| POST | /api/admin/settings/branding/logo | Upload logo |
| DELETE | /api/admin/settings/branding/logo | Delete logo |
| GET | /api/admin/dashboard | Dashboard statistics |
| GET | /api/admin/statistics/overview | Statistics overview |
| GET | /api/admin/statistics/downloads | Download statistics |
Additional Project Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/admin/projects/{id}/api-keys | List API keys |
| POST | /api/admin/projects/{id}/api-keys | Create API key |
| GET | /api/admin/projects/{id}/access-codes | List access codes |
| GET | /api/admin/projects/{id}/invite-links | List invite links |
| GET | /api/admin/projects/{id}/webhooks | List webhooks |