Docs API Reference

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.

REST API JWT Auth JSON
Download .md

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:

POST /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:

GET /api/check/{projectKey}

{projectKey} can be either the project slug (e.g., my-app) or bundle ID (e.g., com.example.myapp).

Query Parameters

ParameterTypeDescription
versionstringCurrent app version (e.g., "1.0.0")
buildintegerCurrent build number
channelstringRelease channel (e.g., "stable", "beta")
archstringDevice architecture (e.g., "arm64-v8a")

Example Request

$ curl "https://releasehub.dev/api/check/my-app?version=1.0.0&build=10&channel=stable&arch=arm64-v8a"

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:

GET /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:

MethodEndpointDescription
GET/api/download/{slug}/latestDownload latest version
GET/api/download/{slug}/{arch}/latestDownload for specific architecture

Optional query parameter: ?channel=beta to specify release channel.

Example

$ curl -OJ "https://app.v2.sk/api/download/my-app/arm64-v8a/latest"

Public Projects

MethodEndpointDescription
GET/api/public/projectsList public projects
GET/api/public/projects/{slug}Get project details
GET/api/public/projects/{slug}/releasesGet project releases
POST/api/public/verify-codeVerify access code
GET/api/check/{projectKey}/latestGet latest version info
GET/api/check/{projectKey}/channelsList 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

POST /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

POST /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

POST /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

MethodEndpointDescription
GET/api/admin/projectsList all projects
POST/api/admin/projectsCreate project
GET/api/admin/projects/{id}Get project details
PUT/api/admin/projects/{id}Update project
DELETE/api/admin/projects/{id}Delete project

Versions

MethodEndpointDescription
GET/api/admin/projects/{id}/versionsList versions
POST/api/admin/projects/{id}/versionsCreate 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}/publishPublish version
POST/api/admin/versions/{id}/unpublishUnpublish version (revert to draft)
GET/api/admin/versions/{id}/filesList version files

Release Files

MethodEndpointDescription
GET/api/admin/files/{id}Get file details
DELETE/api/admin/files/{id}Delete file

Channels

MethodEndpointDescription
GET/api/admin/projects/{id}/channelsList channels
POST/api/admin/projects/{id}/channelsCreate channel
POST/api/admin/projects/{id}/channels/apply-presetApply 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.

MethodEndpointDescription
GET/api/admin/global-api-keysList global API keys
POST/api/admin/global-api-keysCreate global API key
GET/api/admin/global-api-keys/projectsList 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}/regenerateRegenerate key secret

Users & System

MethodEndpointDescription
GET/api/admin/usersList users
POST/api/admin/usersCreate 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

MethodEndpointDescription
GET/api/admin/users/{id}/permissionsGet 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

MethodEndpointDescription
GET/api/admin/platformsList platforms
POST/api/admin/platformsCreate platform
PUT/api/admin/platforms/{id}Update platform
DELETE/api/admin/platforms/{id}Delete platform
GET/api/admin/audit-logsView audit logs
GET/api/admin/audit-logs/{id}View audit log details
GET/api/admin/settingsGet settings
PUT/api/admin/settingsUpdate settings
POST/api/admin/settings/branding/logoUpload logo
DELETE/api/admin/settings/branding/logoDelete logo
GET/api/admin/dashboardDashboard statistics
GET/api/admin/statistics/overviewStatistics overview
GET/api/admin/statistics/downloadsDownload statistics

Additional Project Endpoints

MethodEndpointDescription
GET/api/admin/projects/{id}/api-keysList API keys
POST/api/admin/projects/{id}/api-keysCreate API key
GET/api/admin/projects/{id}/access-codesList access codes
GET/api/admin/projects/{id}/invite-linksList invite links
GET/api/admin/projects/{id}/webhooksList webhooks