smplkit Environments API
The Environments API from smplkit — 3 operation(s) for environments.
The Environments API from smplkit — 3 operation(s) for environments.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/smplkit-com:smplkit-com-environments-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: smplkit Environments API
description: API for the smplkit platform.
version: 0.1.0
tags:
- name: Environments
paths:
/api/v1/environments:
post:
tags:
- Environments
summary: Create Environment
description: Create a new environment. The caller provides the id (key) in the request body.
operationId: create_environment
security:
- HTTPBearer: []
requestBody:
required: true
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentCreateRequest'
responses:
'201':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
get:
tags:
- Environments
summary: List Environments
description: List all environments for the authenticated account. `filter[search]` does a case-insensitive substring match against the environment `key` and `name`. `filter[classification]` narrows the result to one classification (`STANDARD` or `AD_HOC`). `filter[managed]` narrows by managed state (`true` or `false`).
operationId: list_environments
security:
- HTTPBearer: []
parameters:
- name: filter[search]
in: query
required: false
schema:
type:
- string
- 'null'
description: Case-insensitive substring match against the environment `key` and `name`. An environment is returned if either field contains the search term.
title: Filter[Search]
description: Case-insensitive substring match against the environment `key` and `name`. An environment is returned if either field contains the search term.
- name: filter[classification]
in: query
required: false
schema:
type:
- string
- 'null'
description: Narrow the result to environments with the given classification. One of `STANDARD` or `AD_HOC`.
title: Filter[Classification]
description: Narrow the result to environments with the given classification. One of `STANDARD` or `AD_HOC`.
- name: filter[managed]
in: query
required: false
schema:
type:
- boolean
- 'null'
description: Narrow the result to managed (`true`) or unmanaged (`false`) environments. Omit to return both.
title: Filter[Managed]
description: Narrow the result to managed (`true`) or unmanaged (`false`) environments. Omit to return both.
- name: sort
in: query
required: false
schema:
type: string
description: 'Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`.'
enum:
- created_at
- -created_at
- key
- -key
- name
- -name
- updated_at
- -updated_at
default: name
title: Sort
description: 'Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`.'
- name: page[number]
in: query
required: false
schema:
type: integer
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
default: 1
title: Page[Number]
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
- name: page[size]
in: query
required: false
schema:
type: integer
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
default: 1000
title: Page[Size]
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
- name: meta[total]
in: query
required: false
schema:
type: boolean
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
default: false
title: Meta[Total]
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentListResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/environments/{id}:
get:
tags:
- Environments
summary: Get Environment
description: Return an environment by id.
operationId: get_environment
security:
- HTTPBearer: []
parameters:
- name: id
in: path
required: true
schema:
type: string
title: Id
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
put:
tags:
- Environments
summary: Update Environment
description: Update an environment by id.
operationId: update_environment
security:
- HTTPBearer: []
parameters:
- name: id
in: path
required: true
schema:
type: string
title: Id
requestBody:
required: true
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentRequest'
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
delete:
tags:
- Environments
summary: Delete Environment
description: Delete an environment by id. When `cascade=true` is set, also remove every per-environment reference held by flags, configs, and loggers in the corresponding services before deleting the environment row. The default `cascade=false` deletes only the environment row, leaving downstream references in place.
operationId: delete_environment
security:
- HTTPBearer: []
parameters:
- name: id
in: path
required: true
schema:
type: string
title: Id
- name: cascade
in: query
required: false
schema:
type: boolean
description: When `true`, remove every flag rule, env-level flag default, config override, and logger override scoped to this environment before deleting the environment row.
default: false
title: Cascade
description: When `true`, remove every flag rule, env-level flag default, config override, and logger override scoped to this environment before deleting the environment row.
responses:
'204':
description: Successful Response
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/environments/{id}/usage:
get:
tags:
- Environments
summary: Report Environment Usage
description: Report how many flag rules, env-level flag defaults, config overrides, and logger overrides reference this environment. Used by the console's delete dialog so the user can see what would survive a non-cascading delete.
operationId: get_environment_usage
security:
- HTTPBearer: []
parameters:
- name: id
in: path
required: true
schema:
type: string
title: Id
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/EnvironmentUsageResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ListMeta:
properties:
pagination:
$ref: '#/components/schemas/PaginationMeta'
type: object
required:
- pagination
title: ListMeta
description: Top-level ``meta`` block included on every JSON:API list response.
EnvironmentCreateRequest:
properties:
data:
$ref: '#/components/schemas/EnvironmentCreateResource'
type: object
required:
- data
title: EnvironmentCreateRequest
description: 'JSON:API request envelope for creating an environment.
Distinct from :class:`EnvironmentRequest` because create requires
caller-supplied ``data.id`` while update does not (the id lives in
the URL path).'
ErrorResponse:
properties:
errors:
items:
$ref: '#/components/schemas/Error'
type: array
title: Errors
type: object
required:
- errors
title: ErrorResponse
description: JSON:API error response envelope.
EnvironmentUsageResource:
properties:
id:
type:
- string
- 'null'
title: Id
type:
type: string
enum:
- environment_usage
title: Type
attributes:
$ref: '#/components/schemas/EnvironmentUsage'
type: object
required:
- type
- attributes
title: EnvironmentUsageResource
description: JSON:API resource envelope for an environment-usage report.
example:
attributes:
config_overrides: 5
flag_env_defaults: 2
flag_rules: 3
logger_overrides: 1
id: production
type: environment_usage
EnvironmentRequest:
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
type: object
required:
- data
title: EnvironmentRequest
description: JSON:API request envelope for updating an environment.
EnvironmentListResponse:
properties:
data:
items:
$ref: '#/components/schemas/EnvironmentResource'
type: array
title: Data
meta:
$ref: '#/components/schemas/ListMeta'
type: object
required:
- data
- meta
title: EnvironmentListResponse
description: JSON:API collection response for environments.
EnvironmentCreateResource:
properties:
id:
type: string
title: Id
description: Client-supplied resource id.
type:
type: string
enum:
- environment
title: Type
attributes:
$ref: '#/components/schemas/Environment'
type: object
required:
- id
- type
- attributes
title: EnvironmentCreateResource
description: JSON:API resource envelope for creating an environment (id required).
example:
attributes:
name: Production
id: production
type: environment
EnvironmentUsage:
properties:
flag_rules:
type: integer
minimum: 0.0
title: Flag Rules
description: Number of feature-flag targeting rules scoped to this environment. Each flag may contribute multiple rules.
flag_env_defaults:
type: integer
minimum: 0.0
title: Flag Env Defaults
description: Number of feature flags that declare an environment-level default value for this environment.
config_overrides:
type: integer
minimum: 0.0
title: Config Overrides
description: Number of config-item overrides keyed to this environment, summed across all configs.
logger_overrides:
type: integer
minimum: 0.0
title: Logger Overrides
description: Number of loggers with an environment-level level override for this environment.
type: object
required:
- flag_rules
- flag_env_defaults
- config_overrides
- logger_overrides
title: EnvironmentUsage
description: 'Counts of references to an environment held by other resources.
Returned by `GET /environments/{id}/usage` so the console can warn
the user about per-environment configuration that would survive a
bare environment-row deletion. Each count is the number of distinct
referencing resources, not the number of rule entries within them.'
example:
config_overrides: 5
flag_env_defaults: 2
flag_rules: 3
logger_overrides: 1
Environment:
properties:
name:
type: string
maxLength: 255
title: Name
description: Human-readable name for the environment.
color:
type:
- string
- 'null'
maxLength: 50
title: Color
description: Display color used by the console to badge the environment. Accepts any CSS color string.
classification:
type: string
enum:
- STANDARD
- AD_HOC
title: Classification
description: '`STANDARD` for environments deliberately created (and shown by default in the environment grid); `AD_HOC` for auto-discovered environments seen in SDK traffic (hidden from the default view). Case-insensitive on input. Independent of the `managed` flag.'
default: STANDARD
managed:
type: boolean
title: Managed
description: 'When `true`, per-environment resource values can be set against this environment and it counts toward the account''s managed-environments quota. When `false`, the environment is view-only: existing values are displayed for comparison but no new values can be written. Promotion and demotion flip this boolean via `PUT /api/v1/environments/{id}`; promotion is subject to the quota.'
default: false
created_at:
type:
- string
- 'null'
format: date-time
title: Created At
description: When the environment was created.
readOnly: true
updated_at:
type:
- string
- 'null'
format: date-time
title: Updated At
description: When the environment was last modified.
readOnly: true
type: object
required:
- name
title: Environment
description: 'A named deployment context — for example, `production`, `staging`, or
`development`. Resources scoped to an environment (such as config items
and feature flags) are evaluated against environment-specific values.'
example:
classification: STANDARD
color: '#2ecc71'
created_at: '2026-03-20T11:02:16.616Z'
managed: true
name: Production
updated_at: '2026-03-20T11:02:16.616Z'
EnvironmentUsageResponse:
properties:
data:
$ref: '#/components/schemas/EnvironmentUsageResource'
type: object
required:
- data
title: EnvironmentUsageResponse
description: JSON:API single-resource response envelope for environment-usage counts.
EnvironmentResponse:
properties:
data:
$ref: '#/components/schemas/EnvironmentResource'
type: object
required:
- data
title: EnvironmentResponse
description: JSON:API single-resource response envelope for an environment.
Error:
properties:
status:
type: string
title: Status
title:
type: string
title: Title
detail:
type:
- string
- 'null'
title: Detail
source:
additionalProperties: true
type:
- object
- 'null'
title: Source
type: object
required:
- status
- title
title: Error
description: Single JSON:API error object.
EnvironmentResource:
properties:
id:
type:
- string
- 'null'
title: Id
type:
type: string
enum:
- environment
title: Type
attributes:
$ref: '#/components/schemas/Environment'
type: object
required:
- type
- attributes
title: EnvironmentResource
description: 'JSON:API resource envelope for an environment.
`id` must not be specified for create requests (the server assigns it).'
example:
attributes:
classification: STANDARD
color: '#2ecc71'
created_at: '2026-03-20T11:02:16.616Z'
managed: true
name: Production
updated_at: '2026-03-20T11:02:16.616Z'
id: production
type: environment
PaginationMeta:
properties:
page:
type: integer
title: Page
description: 1-based page number returned.
size:
type: integer
title: Size
description: Number of items per page.
total:
type:
- integer
- 'null'
title: Total
description: Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
total_pages:
type:
- integer
- 'null'
title: Total Pages
description: Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
type: object
required:
- page
- size
title: PaginationMeta
description: 'Pagination block returned inside ``meta`` on every list response.
``page`` and ``size`` are always present and echo the parameters that
served the response (their defaults when the client omitted them).
``total`` and ``total_pages`` are present only when the request included
``meta[total]=true``.'
securitySchemes:
HTTPBearer:
type: http
description: JWT access token or API key (sk_api_*)
scheme: bearer