Create an environment
Requires an Account API key. Create one from Account API keys in the dashboard.
Creates a new environment. Additional environments are limited by your pricing plan.
You can create a production environment by setting is_production: true.
The response includes an environment uuid. Use it to create an Environment API key or delete the environment. Creating an environment also creates a default full-access Environment API key, but the secret is not returned.
Response example
{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "staging"
}
}Create a new environment
bearerAuthAuthorizationBearer <token>An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.
application/json- body
name*stringEnvironment name. Lowercase letters, digits, hyphens, and underscores only. Max 255 characters. The reserved name prod is always treated as production.
^[a-z0-9_-]+$length <= 255is_production?booleanWhether to mark the environment as production. Defaults to false, except for the reserved name prod.
callback_url?stringCustom OAuth callback URL for this environment.
urihmac_key?stringHMAC key used by the legacy public-key authorization flow.
length <= 1000hmac_enabled?booleanWhether HMAC verification is enabled for the legacy public-key authorization flow.
slack_notifications?booleanWhether Slack notifications are enabled for this environment.
otlp_endpoint?stringOpenTelemetry collector endpoint. Requires a plan with OpenTelemetry export. Pass an empty string to set an empty endpoint.
otlp_headers?array<>Headers sent with OpenTelemetry export requests. Requires a plan with OpenTelemetry export. Maximum 100 headers.
items <= 100Successfully created an environment
application/json- response
data*curl -X POST 'https://api.tenklo.dev/environments' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "data": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string" }}