KeyEnvKeyEnv
API Reference

Projects

Project management

Projects

Project management

List projects

GET /api/v1/projects

Returns all projects the user has access to through their teams

Operation ID: listProjects · Authentication: Authorization: Bearer <token>

Responses

StatusDescriptionBody
200List of projectsobject
401Authentication requiredError

Response body (200)

FieldTypeDescription
projectsobject[]

Example

curl -X GET "https://api.keyenv.dev/api/v1/projects" \
  -H "Authorization: Bearer $KEYENV_TOKEN"

Create project

POST /api/v1/projects

Creates a new project within a team. Default environments (development, staging, production) are created automatically.

Operation ID: createProject · Authentication: Authorization: Bearer <token>

Request body

application/json (required)

FieldTypeRequiredDescription
team_idstring (uuid)yes
namestringyes

Responses

StatusDescriptionBody
201Project createdProject
400Invalid requestError
401Authentication requiredError
403Insufficient permissionsError
409A project whose name produces the same slug already exists in the teamError
429Plan limit exceededLimitError

Response body (201)

FieldTypeDescription
idstring (uuid)
team_idstring (uuid)
namestring
slugstring
created_atstring (date-time)

Example

curl -X POST "https://api.keyenv.dev/api/v1/projects" \
  -H "Authorization: Bearer $KEYENV_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"team_id":"00000000-0000-0000-0000-000000000000","name":"string"}'

Get project

GET /api/v1/projects/{projectId}

Returns project details including environments

Operation ID: getProject · Authentication: Authorization: Bearer <token>

Path parameters

NameTypeRequiredDescription
projectIdstringyesProject UUID or slug (e.g., "my-project")

Responses

StatusDescriptionBody
200Project detailsobject
401Authentication requiredError
403Insufficient permissionsError
404Resource not foundError

Example

curl -X GET "https://api.keyenv.dev/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer $KEYENV_TOKEN"

Update project

PATCH /api/v1/projects/{projectId}

Updates project name

Operation ID: updateProject · Authentication: Authorization: Bearer <token>

Path parameters

NameTypeRequiredDescription
projectIdstringyesProject UUID or slug (e.g., "my-project")

Request body

application/json (required)

FieldTypeRequiredDescription
namestringyes

Responses

StatusDescriptionBody
200Project updatedProject
400Invalid requestError
401Authentication requiredError
403Insufficient permissionsError
404Resource not foundError

Response body (200)

FieldTypeDescription
idstring (uuid)
team_idstring (uuid)
namestring
slugstring
created_atstring (date-time)

Example

curl -X PATCH "https://api.keyenv.dev/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer $KEYENV_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'

Delete project

DELETE /api/v1/projects/{projectId}

Soft deletes a project and all its environments and secrets

Operation ID: deleteProject · Authentication: Authorization: Bearer <token>

Path parameters

NameTypeRequiredDescription
projectIdstringyesProject UUID or slug (e.g., "my-project")

Responses

StatusDescriptionBody
204Project deleted
401Authentication requiredError
403Insufficient permissionsError
404Resource not foundError

Example

curl -X DELETE "https://api.keyenv.dev/api/v1/projects/{projectId}" \
  -H "Authorization: Bearer $KEYENV_TOKEN"

On this page