Reference
API reference
The Lofenta dashboard is powered by a small JSON API for projects and custom domains.
Authentication
Most dashboard routes under /api require an authenticated Lofenta session cookie. CLI routes under /api/cli also accept a bearer API key generated from the dashboard.
Response format
Successful responses return { ok: true, data: ... }. Error responses return { ok: false, code?, message }.
Success
{
"ok": true,
"data": { ... }
}Error
{
"ok": false,
"code": "NOT_FOUND",
"message": "Resource not found"
}Projects
/api/projectsList all projects owned by the current user, newest first.
Response
{
"ok": true,
"data": [
{
"id": "proj_123",
"name": "docs",
"status": "running",
"domain": null,
"subdomain": "docs-a1b2c3",
"gitRepo": "acme/docs",
"gitBranch": "main",
"createdAt": "2026-05-12T14:05:00.000Z",
"updatedAt": "2026-05-12T14:07:00.000Z"
}
]
}/api/projectsCreate a new project, reserve its generated subdomain, and queue the first deployment.
Request body
{
"name": "Docs",
"gitRepo": "acme/docs",
"gitBranch": "main"
}Response
{
"ok": true,
"data": {
"id": "proj_123",
"name": "Docs",
"status": "idle",
"subdomain": "docs-a1b2c3",
"gitRepo": "acme/docs",
"gitBranch": "main"
}
}/api/projects/:idFetch a single project owned by the current user.
Response
{
"ok": true,
"data": {
"id": "proj_123",
"name": "Docs",
"status": "running",
"domain": "docs.example.com",
"subdomain": "docs-a1b2c3",
"gitRepo": "acme/docs",
"gitBranch": "main"
}
}/api/projects/:idUpdate editable project fields.
Request body
{
"name": "Docs v2",
"domain": "docs.example.com",
"gitBranch": "release"
}Response
{
"ok": true,
"data": {
"id": "proj_123",
"name": "Docs v2",
"domain": "docs.example.com",
"gitBranch": "release"
}
}/api/projects/:idDelete a project owned by the current user.
Response
204 No Content
Deployments
/api/projects/:id/deploymentsList recent deployments for a project owned by the current user.
Response
{
"ok": true,
"data": [
{
"id": "dep_123",
"projectId": "proj_123",
"status": "queued",
"steps": [],
"commitSha": null,
"commitMessage": "Initial deploy",
"createdAt": "2026-05-12T14:12:00.000Z",
"finishedAt": null
}
]
}/api/projects/:id/deploymentsQueue a manual redeploy for a project owned by the current user.
Response
{
"ok": true,
"data": {
"id": "dep_456",
"projectId": "proj_123",
"status": "queued",
"steps": [],
"commitMessage": "Manual redeploy"
}
}Domains
/api/domainsList custom domains attached to all projects owned by the current user.
Response
{
"ok": true,
"data": [
{
"id": "dom_123",
"projectId": "proj_123",
"domain": "docs.example.com",
"sslStatus": "pending",
"verified": false,
"createdAt": "2026-05-12T14:10:00.000Z"
}
]
}/api/domainsAttach a custom domain to one of the current user's projects.
Request body
{
"projectId": "proj_123",
"domain": "docs.example.com"
}Response
{
"ok": true,
"data": {
"id": "dom_123",
"projectId": "proj_123",
"domain": "docs.example.com",
"sslStatus": "pending",
"verified": false
}
}/api/domains/:idRemove a custom domain from a project owned by the current user.
Response
{
"ok": true
}Status values
Project status
idleenumbuildingenumrunningenumfailedenumstoppedenumDeployment status
queuedenumcloningenuminstallingenumbuildingenumstartingenumhealth_checkenumliveenumfailedenumcancelledenumCLI endpoints
Auth via Authorization: Bearer <cli_token> (generated from Dashboard › Settings › CLI access). All endpoints are stable v0.4.
/api/cli/meConnected user info (id, email, plan)/api/cli/usagePlan limits + current consumption (services, domains, build minutes, storage)/api/cli/templatesAvailable project templates with min plan + requirements/api/cli/projectsList your projects with last deploy status/api/cli/projects/{idOrName}One project with recent deployments + domains/api/cli/deployCreate a project or trigger a deploy by repo/template/api/cli/projects/{idOrName}/redeployTrigger a fresh deploy on an existing project/api/cli/projects/{idOrName}/restartRestart the running container without rebuilding/api/cli/projects/{idOrName}/rollbackBody { "deploymentId"?: string } - revert to a prior live deployment/api/cli/projects/{idOrName}/deploymentsRecent deployments per plan retention/api/cli/projects/{idOrName}/logsLive tail of the latest deploy log (Server-Sent Events)/api/cli/projects/{idOrName}/tailLive tail of container stdout/stderr (Server-Sent Events)/api/cli/projects/{idOrName}/execBody { "command": "ls /app", "user"?: "root" } - one-shot docker exec/api/cli/projects/{idOrName}/envList env vars (values returned to authed CLI)/api/cli/projects/{idOrName}/envBody { "set": [{key,value}], "remove": [key] } - merge env updates/api/cli/projects/{idOrName}/domainsList custom domains + DNS records needed/api/cli/projects/{idOrName}/domainsBody { "domain": "app.example.com" } - attach a custom domain/api/cli/projects/{idOrName}/domains?domain=xDetach a custom domain/api/cli/projects/{idOrName}/snapshotsList DB snapshots (postgres/mariadb projects)/api/cli/projects/{idOrName}/snapshotsBody { "label"?: string } - take a new DB snapshot/api/cli/projects/{idOrName}/snapshots/{id}/restoreRestore a snapshot into the running database/api/cli/projects/{idOrName}/servicesLinked internal services (Postgres/Redis/etc) + candidates/api/cli/projects/{idOrName}/volumesNamed Docker volumes attached to a projectQuick examples
List your projects:
curl -H "Authorization: Bearer $LOFENTA_TOKEN" \ https://lofenta.com/api/cli/projects
Trigger a redeploy on an existing project:
curl -X POST -H "Authorization: Bearer $LOFENTA_TOKEN" \ https://lofenta.com/api/cli/projects/my-app/redeploy
Run a one-shot command in the running container:
curl -X POST -H "Authorization: Bearer $LOFENTA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"command":"node --version"}' \
https://lofenta.com/api/cli/projects/my-app/execBulk import env vars from a local .env:
lofenta env import my-app .env
# or via raw API
curl -X PATCH -H "Authorization: Bearer $LOFENTA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"set":[{"key":"DATABASE_URL","value":"..."}]}' \
https://lofenta.com/api/cli/projects/my-app/envCurrent limits
- Source upload from the CLI (deploy --from-dir) is not exposed yet. Git-based or template-based deploys are the supported paths.
- WebSocket transports are not part of the public API. Logs and container tail use Server-Sent Events.
- Per-token rate limit is 600 requests per minute. Exec endpoint additionally caps stdout at 256 KiB and runtime at 30s.
Next
Introduction
Back to the docs overview