Any API calls to CommandK should be authenticated using API tokens. To do so, head over to the CommandK dashboard, and on the left panel, click on Settings > API Access.

In the tab that opens up, in the top-right corner, click on the button that says "New token".

Enter a memorable name for your API token, select the applications that you want this token to be able to access, and the environments that you want to restrict this action to.

You can also select the scope of the token to be either Read or Write.

Do note that Write is not a superset of a Read token, and a Write token does not allow any Read operations. The only Read operation that a Write token can perform is getting the list of all environments.

Creating an API access token

Click on "Create" and copy the access token that was generated. Do note that we do not display the access token once this panel is collapsed, so make sure you copy the token before dismissing the panel.

Any requests to CommandK should send this API access token in the request header in the following manner:

Authorization: Bearer {{your_token_value}}