Authentication against the env0 API is done via API Keys.

An API Key is created by an organization administrator, but is not connected to any specific user when it's being used.

Creating an API Key

Once you've created your own organization, you can create 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 your reference and isn't used directly in authentication.

After you click on Add you will see the following modal -

API Key Created ModalAPI Key Created Modal

API Key Created Modal


Save Your API Key ID & Secret

The secret will not be available after you close this modal

Using an API Key to Authenticate

Authentication to the env0 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 using the flag --user {API Key ID}:{API Key Secret}.

API Key Permissions

API Keys are given the role of an Organization Admin, meaning they can be used to perform any action, in any project, under the scope of the organization.