# How to Use Teams API

## Get Teams API Keys

Before starting API integration for Vagon Teams, you must have at least one Team Computer. API Key and Secret Key will be accessible on the **Settings** tab on your dashboard.

* **API Public Key**
* **Secret Key**

<figure><img src="/files/hkM5M2ejtiWeBVxXrule" alt=""><figcaption></figcaption></figure>

## Authentication <a href="#id-1-client-authentication" id="id-1-client-authentication"></a>

The client must be authenticated by using **API Public** and **Secret** **keys** with HMAC authentication, by using the SHA256 algorithm.

* Every API call requires to be authenticated via the Authorization header.
* **Header format**\
  `Authorization: HMAC {key}:{signature}:{nonce}:{timestamp}`
* Signature payload is calculated as\
  `payload = "{api key}{request method}{request path}{timestamp}{nonce}{request body}"`
* `request path` shouldn't include the base API endpoint. For example; if you send a GET request to `https://api.vagon.io/organization-management/v1/machines` the request path should be `/organization-management/v1/machines`
* Request body should be an empty string for `GET` requests.
* Signature is calculated as the\
  `signature = HMAC(SHA256, payload, api secret)`
* Signature should be in HexaDecimal format
* The nonce is a random string value and the timestamp is the current UTC timestamp (milliseconds).

#### **Machine Status List**

| friendly\_status  | description                                                    |
| ----------------- | -------------------------------------------------------------- |
| off               | Machine is stopped                                             |
| creating          | Machine is started at the first time                           |
| turning\_on       | Machine is turning on                                          |
| ready             | Machine is running, and ready to connect                       |
| turning\_off      | Machine is turning off, to be stopped                          |
| resizing\_disk    | Machine disk size is expanding                                 |
| installing        | Machine image/template assignment post process is in progress. |
| region\_migration | Machine region migration is in progress                        |
| warming\_up       | Machine is getting ready at the first run                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vagon.io/teams/reference/how-to-use-teams-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
