POST/team/envs

Create a team shared environment variable

Creates a shared environment variable for the authenticated user's team. Provide key to identify the variable, and use is_shown_once to hide its saved value in the UI and API responses.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

6 body fields

The team shared environment variable to create. key is required.

commentstringoptional
An optional comment for the environment variable; may be null.
is_literalbooleanoptional
Whether the value is treated as a literal.
is_multilinebooleanoptional
Whether the value contains multiple lines.
is_shown_oncebooleanoptional
If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values.
keystringrequired
The environment variable's key.
valuestringoptional
The environment variable's value; may be null.

4 status codes
201Returns confirmation that the environment variable was created.
401Returned when the request is unauthenticated.
messagestringoptional
409Returned when the environment variable already exists.
422Returned when request validation fails.
errorsobjectoptional
messagestringoptional

Error handling

A 401 indicates that the request is unauthenticated. A 409 is returned when the environment variable already exists, and a 422 indicates validation failed. key is required; value and comment may be null.