Projects API

Projects

Manage your DeskForge projects programmatically.

List Projects

Retrieve a list of all your projects.

GET/projects

Request

curl -X GET https://api.deskforge.app/projects \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "projects": [
    {
      "id": "proj_abc123",
      "name": "My Desktop App",
      "url": "https://myapp.com",
      "platforms": ["mac", "windows", "linux"],
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:45:00Z"
    }
  ],
  "total": 1
}

Get Project

Retrieve details for a specific project.

GET/projects/:projectId

Path Parameters

projectIdstring

The unique identifier for the project

Request

curl -X GET https://api.deskforge.app/projects/proj_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "id": "proj_abc123",
  "name": "My Desktop App",
  "author": "Your Name",
  "version": "1.0.0",
  "url": "https://myapp.com",
  "appId": "com.example.myapp",
  "platforms": ["mac", "windows", "linux"],
  "window": {
    "width": 1200,
    "height": 800,
    "resizable": true
  },
  "features": {
    "autoUpdate": true,
    "tray": false,
    "menuBar": true
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z"
}

Create Project

Create a new project.

POST/projects

Request Body

namestring (required)

Project name

urlstring (required)

Web app URL

platformsarray (required)

Target platforms: ["mac", "windows", "linux"]

configobject (optional)

Additional configuration options

Request

curl -X POST https://api.deskforge.app/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Desktop App",
    "url": "https://myapp.com",
    "platforms": ["mac", "windows"],
    "config": {
      "window": {
        "width": 1200,
        "height": 800
      }
    }
  }'

Response

{
  "id": "proj_abc123",
  "name": "My Desktop App",
  "url": "https://myapp.com",
  "platforms": ["mac", "windows"],
  "createdAt": "2024-01-15T10:30:00Z",
  "message": "Project created successfully"
}

Update Project

Update an existing project.

PATCH/projects/:projectId

Request

curl -X PATCH https://api.deskforge.app/projects/proj_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated App Name",
    "platforms": ["mac", "windows", "linux"]
  }'

Response

{
  "id": "proj_abc123",
  "name": "Updated App Name",
  "platforms": ["mac", "windows", "linux"],
  "updatedAt": "2024-01-20T14:45:00Z",
  "message": "Project updated successfully"
}

Delete Project

Permanently delete a project and all associated builds.

Warning: This action cannot be undone. All builds and artifacts will be permanently deleted.

DELETE/projects/:projectId

Request

curl -X DELETE https://api.deskforge.app/projects/proj_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "id": "proj_abc123",
  "deleted": true,
  "message": "Project deleted successfully"
}