# Quickstart

From zero to your first valid response in four steps.

## 1. Prepare credentials

Create an API token in IntelliTracer under **Config**, **Company**, **API tokens**. Add one, give it a name, tick the privileges your integration needs, and save. The token belongs to the company rather than to a person, so it keeps working when someone leaves. Step by step, with screenshots of where things live: [Getting credentials](/docs/workspaces).

Send it as a bearer token. The examples below use the placeholder `$GD_API_TOKEN`; replace it with your own value, which starts with `itr_pat_`.

## 2. First request

Fetch the list of resource groups. This endpoint returns a small payload quickly and is a good sanity check.

```curl title="first-request.sh"
curl https://api.geodynamics.dev/intellitracer/v1/resourcegroups \
  -H "Authorization: Bearer $GD_API_TOKEN" \
  -H "Accept: application/json"
```

```node title="first-request.ts"
const res = await fetch(
  "https://api.geodynamics.dev/intellitracer/v1/resourcegroups",
  {
    headers: {
      Authorization: `Bearer ${process.env.GD_API_TOKEN}`,
      Accept: "application/json",
    },
  },
);

if (!res.ok) {
  throw new Error(`${res.status} ${res.statusText}`);
}

const groups = await res.json();
console.log(groups);
```

```python title="first-request.py"
import os, requests

res = requests.get(
    "https://api.geodynamics.dev/intellitracer/v1/resourcegroups",
    headers={
        "Authorization": f"Bearer {os.environ['GD_API_TOKEN']}",
        "Accept": "application/json",
    },
    timeout=10,
)
res.raise_for_status()

groups = res.json()
print(groups)
```

## 3. Verify the response

A successful call returns `HTTP 200` and a JSON array of resource groups. Each object carries a stable `Id`, a `Name`, and optionally a `Code`.

```json title="response.json"
[
  {
    "Id": "a7c1f3b0-0e7c-4f1a-9d51-2b6f0a1e83cf",
    "Name": "Site crews",
    "Code": "WERF"
  },
  {
    "Id": "5d2a98e1-71a3-43b8-95ae-1f0c1c6e2d44",
    "Name": "Warehouse",
    "Code": "MAG"
  }
]
```

Got a different status code back? See [Errors](/docs/errors). The most common ones:

-   `401`: the token is missing, revoked, or copied incorrectly. Check the `Authorization: Bearer itr_pat_...` header.
-   `403`: credentials work, but your user is missing the `Api: Resource read` privilege. Ask an IntelliTracer admin to grant it.
-   `429`: too many requests. Wait the number of seconds in the `Retry-After` header.

## 4. Build further

-   Read [Authentication](/docs/authentication) for token scopes and what a `401` or `403` is telling you.
-   Open the [REST API reference](/api) for the full endpoint catalogue.
-   Check [Rate limits](/docs/rate-limits) for your company's request budget.
