REST API v1

API Documentation

Everything you need to automate uploads, manage projects, and integrate Lunaris CDN into your workflow.

Base URL: https://lunaris.win/api/v1

Projects

Projects are containers for versioned files. Each project has a unique slug derived from its name.

GET /projects List all projects

Returns all projects owned by the authenticated user, ordered by creation date (newest first).

Response 200

{
  "projects": [
    {
      "id": "abc123",
      "name": "My App",
      "slug": "my-app",
      "description": "Windows installer",
      "isPublic": true,
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T10:00:00.000Z"
    }
  ]
}

cURL

curl https://lunaris.win/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY"
POST /projects Create a project

Creates a new project. The slug is automatically generated from the name.

Request Body

FieldTypeRequiredDescription
namestringyes1–100 characters
descriptionstringnoUp to 500 characters
isPublicbooleannoDefault: true

Response 201

{ "project": { "id": "abc123", "slug": "my-app", ... } }

cURL

curl -X POST https://lunaris.win/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"My App","description":"Windows installer","isPublic":true}'
GET /projects/{slug} Get project + versions

Returns project details along with all versions.

Response 200

{
  "project": { "id": "abc123", "slug": "my-app", ... },
  "versions": [
    { "id": "v1", "tag": "2.1.0", "isLatest": true, "createdAt": "..." }
  ]
}
PATCH /projects/{slug} Update a project

All fields are optional. Only provided fields are updated.

Request Body (all optional)

{
  "name": "New Name",
  "description": "Updated description",
  "isPublic": false
}

Response 200

{ "project": { "id": "abc123", "slug": "new-name", ... } }
DELETE /projects/{slug} Delete a project

Permanently deletes the project and all its versions, files, and stored objects. Storage quota is reclaimed.

Response 200

{ "success": true }

JavaScript Example

const BASE = 'https://lunaris.win/api/v1';
const KEY  = 'YOUR_API_KEY';

// Create a project
const { project } = await fetch(`$${BASE}/projects`, {
	method: 'POST',
	headers: {
		'Authorization': `Bearer $${KEY}`,
		'Content-Type': 'application/json',
	},
	body: JSON.stringify({ name: 'My App', isPublic: true }),
}).then(r => r.json());

console.log(project.slug); // "my-app"

Ready to start building?

Generate an API key from your dashboard and start automating your releases.