Complete reference for the FiveHost API. All endpoints require authentication via the X-API-Key header unless otherwise noted.
Register a new user account with a purchase key.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Unique username |
| string | Yes | Valid email address | |
| purchaseKey | string | Yes | Valid purchase key |
{
"success": true,
"apiKey": "fh_xxxxx",
"username": "johndoe",
"expiresAt": "2024-12-31T23:59:59Z",
"maxUploads": 1000
}Validate an API key and get user information.
| Header | Required | Description |
|---|---|---|
| X-API-Key | Yes | Your API key |
Upload a file. Requires multipart/form-data.
| Header | Required | Description |
|---|---|---|
| X-API-Key | Yes | Your API key |
| Field | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | File to upload |
{
"success": true,
"embedUrl": "https://example.com/u/abc123",
"rawUrl": "https://example.com/raw/abc123",
"flippedId": "abc123",
"filename": "image.png",
"filesize": 12345
}List all uploads for the authenticated user with pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number |
| limit | number | 50 | Items per page (max 100) |
{
"uploads": [
{
"flipped_id": "abc123",
"filename": "image.png",
"filesize": 12345,
"mimetype": "image/png",
"created_at": "2024-01-01T12:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 100,
"totalPages": 2
}
}Delete an uploaded file.
| Parameter | Type | Required | Description |
|---|---|---|---|
| flippedId | string | Yes | The flipped ID of the file |
Get current embed configuration settings.
Update embed configuration settings.
| Parameter | Type | Required | Description |
|---|---|---|---|
| embedColor | string | No | Hex color code (e.g., #3b82f6) |
| embedTitleFormat | string | No | Title format. Use {username} and {filename} placeholders |
View file embed page with metadata and preview.
Get raw file content for direct download or embedding.