Skip to content

Projects

Projects are the top-level organizational unit. Each project has its own snapshots, files, team members, webhooks, quotas, and API keys.

POST /machine/projects

Creates a new project and returns a new API key scoped to it with owner role.

{
"name": "backend-api",
"description": "Backend service environment tracking"
}
FieldTypeRequiredDescription
namestringYesProject name
descriptionstringNoProject description
{
"projectId": "a1b2c3d4-...",
"apiKeyId": "e5f6g7h8-...",
"apiKey": "mk_...",
"name": "backend-api",
"message": "Store this API key securely — it will not be shown again."
}

The returned apiKey is for the new project. Use it (not your existing key) to access the new project.

GET /machine/projects

Returns all projects the current API key has access to.

{
"projects": [
{
"id": "a1b2c3d4-...",
"name": "backend-api",
"description": "Backend service environment tracking",
"role": "owner",
"createdAt": "2026-02-07T12:00:00.000Z",
"updatedAt": "2026-02-07T12:00:00.000Z"
}
]
}

GET /machine/projects/:id

Returns project details including resource counts. Requires membership.

{
"id": "a1b2c3d4-...",
"name": "backend-api",
"description": "Backend service environment tracking",
"role": "owner",
"counts": { "snapshots": 12, "files": 5, "members": 3 },
"createdAt": "2026-02-07T12:00:00.000Z",
"updatedAt": "2026-02-07T12:00:00.000Z"
}

Returns 403 if you’re not a member, 404 if the project doesn’t exist.

PATCH /machine/projects/:id

Roles: owner admin

Update name or description. At least one field required.

{
"name": "renamed-project",
"description": "Updated description"
}

Returns { "success": true }.

DELETE /machine/projects/:id

Roles: owner only

Permanently deletes the project and all associated data — snapshots, files, API keys, team members, webhooks, delivery logs, usage logs, rate limit windows, and quotas.

This action is irreversible.

{
"success": true,
"message": "Project and all associated data deleted"
}