Skip to main content
PUT
Update Organization

Authorizations

Authorization
string
header
required

env zero API authentication is done via API keys. An API Key can either be created by an organization administrator, in which case it will not be connected to any specific user, or via Personal API Keys to authenticate as a user.

Creating an API Key with a Specific Role

  • Once you've created your organization, you can set up and manage API Keys.
  • Navigate to the Organization Settings page and click the API Keys tab.
  • Click Add API Key and enter a name for your key in the Name field. This name is for reference purposes only and isn't used directly in authentication.

❗️Save Your API Key ID and secret The secret will not be available after you close this window.

Creating a Personal API Key

  • Click on your avatar (located on the top right of the screen)
  • Click on Personal Settings
  • Select the API Keys tab
  • Click Add API Key, and enter a name for your key in the Name field. This name is for reference purposes and isn't used directly in authentication.

❗️Save your API Key ID & secret The secret will not be available after you close this window.

Using an API Key to Authenticate

Authentication of the env zero API is done using the Basic Authentication method. Each request made should include the API Key ID as the username, and the API Key secret as the password. For example, when using curl, we can include these parameters via flag --user {API Key ID}:{API Key Secret}.

API Key Permissions

When creating an API key through the organization settings, you will need to choose if you’d like to grant it Organization Admin or User permissions. In case of the latter, you can assign fine-grained permissions per project. Personal API Keys can be created through the user’s profile page and will have the same permissions as the user has.

Rate Limits

env zero API allows up to 1K requests per 60 seconds, requests are aggregated by IP, HTTP Method and URI. If you exceed this limit, you will receive a 429 status code.

Path Parameters

id
string
required

Body

application/json
name
string
required
photoUrl
string
description
string

Response

200 - application/json
projectCustomFlowsPolicy
enum<string>
required
Available options:
MERGE_WITH_TEMPLATES,
OVERRIDE_TEMPLATES,
MERGE_WITH_TEMPLATES,
OVERRIDE_TEMPLATES
id
string
required
name
string
required
createdBy
string
required
mode
enum<string>
required
Available options:
paying,
free,
paying,
free
role
string
required
maxTtl
string | null

The maximum allowed TTL. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite

Pattern: ^\d+-[h|d|w|M]|inherit
defaultTtl
string | null

The default TTL set when creating environments. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite

Pattern: ^\d+-[h|d|w|M]|inherit
doNotReportSkippedStatusChecks
boolean
doNotConsiderMergeCommitsForPrPlans
boolean
enableOidc
boolean
enforcePrCommenterPermissions
boolean
requireVerifiedVcsUserIds
boolean

When true, a PR comment command runs only for a commenter who connected their VCS account in env0, and a typed VCS user ID is ignored. Applies to the VCS providers that support connecting (GitHub, GitLab and Azure DevOps today)

notifyAdminsOnVcsUserIdChange
boolean

Email the organization admins when a user sets, changes or removes a VCS user ID. Undefined means on.

repositoryCustomFlowsPolicy
enum<string>

Whether env0.yml files in a template's repository run. ALLOW runs them. VERIFIED_USERS runs a pull request's env0.yml only when the pusher is a verified VCS user with the Run Custom Flow permission on the environment, and otherwise runs the tracked branch's env0.yml. env0 identifies the pusher on GitHub, GitLab and Bitbucket Cloud only, so on other VCS providers a pull request that changes env0.yml runs the tracked branch's env0.yml. A deployment of a revision whose env0.yml differs from the tracked one also needs the Run Custom Flow permission. BLOCK never runs them, so only custom flows assigned in env0 run. VERIFIED_USERS and BLOCK take effect only for organizations where repository custom flow controls are enabled by env0. Undefined means ALLOW

Available options:
ALLOW,
VERIFIED_USERS,
BLOCK,
ALLOW,
VERIFIED_USERS,
BLOCK
allowEnv0Secrets
boolean
requireApprovalForPrApplies
boolean
disablePrComments
boolean
allowMergeableBypassForPrApply
boolean
ipAllowlist
object[]

IP allowlist rules. When non-empty, only requests from matching IPs are allowed for the organization (both UI/SSO logins and agent API). Empty or undefined means open by default.

codingAgentEnabled
boolean

Whether env0 runs the AI coding agent for this organization's drift fixes. Turning it on requires codingAgentTermsVersion, unless the organization already accepted the current terms

codingAgentTermsVersion
string

Request only, never returned. The version of the coding agent terms the caller accepts. Required, as the current version, when codingAgentEnabled turns the agent on under terms the organization has not accepted

description
string
photoUrl
string
createdAt
string<date-time>
updatedAt
string<date-time>
trialEnd
string<date-time>

Read-only. The last acceptance of the coding agent terms, kept when the coding agent is turned off

isSelfHostedK8s
boolean