Appearance
Projects
Create and manage feature flag projects. Projects are top-level containers that group flags, segments, and experiments by application or team.
Base URL: https://app.krafter.dev/api/v1
List Projects
Retrieve all projects.
GET /flags/projectsRequired scope: flags:read
Example Request
bash
curl https://app.krafter.dev/api/v1/flags/projects \
-H "Authorization: Bearer kr_live_abc123def456"Example Response
json
{
"data": [
{
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Web App",
"slug": "web-app",
"environments": ["production", "staging", "development"],
"settings": {
"default_environment": "production"
},
"created_at": "2025-03-10T08:00:00Z",
"updated_at": "2025-03-10T08:00:00Z"
},
{
"id": "b2c3d4e5-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"name": "Mobile App",
"slug": "mobile-app",
"environments": ["production", "staging"],
"settings": {
"default_environment": "production"
},
"created_at": "2025-03-12T14:20:00Z",
"updated_at": "2025-03-12T14:20:00Z"
}
]
}Create Project
Create a new project.
POST /flags/projectsRequired scope: flags:write
Per-project API key scoping
Once a project exists you can restrict an API key to only this project by adding a flag_project permission with the project's UUID as the resource id. See Authentication and per-project permissions for the pass-through rule and how the per-project plug enforces 403 Forbidden on mismatched keys.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the project. |
slug | string | No | URL-friendly identifier. Auto-generated from name if omitted. |
environments | string[] | No | List of environment names. Defaults to ["production", "staging", "development"]. |
settings | object | No | Project-level settings (e.g., default_environment). |
Example Request
bash
curl -X POST https://app.krafter.dev/api/v1/flags/projects \
-H "Authorization: Bearer kr_live_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"name": "Web App",
"slug": "web-app",
"environments": ["production", "staging", "development"],
"settings": {
"default_environment": "production"
}
}'Example Response
json
// 201 Created
{
"data": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Web App",
"slug": "web-app",
"environments": ["production", "staging", "development"],
"settings": {
"default_environment": "production"
},
"created_at": "2025-03-10T08:00:00Z",
"updated_at": "2025-03-10T08:00:00Z"
}
}Get Project
Retrieve details of a specific project.
GET /flags/projects/:project_idRequired scope: flags:read
Example Request
bash
curl https://app.krafter.dev/api/v1/flags/projects/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d \
-H "Authorization: Bearer kr_live_abc123def456"Example Response
json
{
"data": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Web App",
"slug": "web-app",
"environments": ["production", "staging", "development"],
"settings": {
"default_environment": "production"
},
"created_at": "2025-03-10T08:00:00Z",
"updated_at": "2025-03-10T08:00:00Z"
}
}Update Project
Update an existing project. Only provided fields are changed.
PATCH /flags/projects/:project_idRequired scope: flags:write
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Display name for the project. |
slug | string | No | URL-friendly identifier. |
environments | string[] | No | List of environment names. |
settings | object | No | Project-level settings. |
Example Request
bash
curl -X PATCH https://app.krafter.dev/api/v1/flags/projects/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d \
-H "Authorization: Bearer kr_live_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"name": "Web Application",
"environments": ["production", "staging", "development", "qa"]
}'Example Response
json
{
"data": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Web Application",
"slug": "web-app",
"environments": ["production", "staging", "development", "qa"],
"settings": {
"default_environment": "production"
},
"created_at": "2025-03-10T08:00:00Z",
"updated_at": "2025-03-15T11:45:00Z"
}
}Delete Project
Permanently delete a project and all associated flags, rules, segments, and experiments.
DELETE /flags/projects/:project_idRequired scope: flags:write
Example Request
bash
curl -X DELETE https://app.krafter.dev/api/v1/flags/projects/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d \
-H "Authorization: Bearer kr_live_abc123def456"Example Response
// 204 No Content