---
updatedAt: 2025-06-02T21:40:16.000Z
agentTools:
  projectIndex: https://developers.evrythng.com/llms.txt
---

# evrythng.js v6.0.0

The release of evrythng.js version 6.0.0 brings several breaking changes. There is an introduction of new API key types, which also bring a set of new API entities.

***

## Breaking Changes

### New Default setup() Options

When using `setup()`, `apiVersion:2` is used by default, which means the [enterprise API v2](https://developers.evrythng.com/docs/access-control-v2) is used. If you still want to use the previous version, you must set  `apiVersion:1`

```javascript
// Before
evrythng.setup({})
// apiUrl is `apiUrl:https://api.evrythng.com`

// Now
evrythng.setup({})
// apiUrl is `https://api.evrythng.io/v2`
```

### Configurable apiUrl in setup()

The `apiUrl` option is selected automatically depending on the values you specify for region and apiVersion.

```javascript
// Before
evrythng.setup({})
// output is `apiUrl:https://api.evrythng.com`

// Now
evrythng.setup({
  apiVersion: 2,
  region: 'eu'
})
// apiUrl is `https://api.eu.evrythng.io/v2`
```

## New Scopes for apiVersion:2

In API version 2, only two scope types are supported: Operator and Access Token.

```javascript
// to create Operator scope
import { Operator } from 'evrythng';
const operator = new Operator(OPERATOR_API_KEY);

// to create Access Token scope
import { AccessToken } from 'evrythng';
const accessToken = new AccessToken(ACCESS_TOKEN_API_KEY);
```

## New APIs for apiVersion:2

### Operator Access

Create, read, update, or delete an operator access.

```javascript
const accountId = '...';

// to create operatorAccess()
const operarorAccess = await operator
	.sharedAccount(accountId)
	.operatorAccess()
	.create(data)
```

### Access Policy

Create, read, update, or delete an [access policy](https://developers.evrythng.com/reference/access-policies).

```javascript
// to create accessPolicy()
const accessPolicy = await operator.accessPolicy().create(data)
```

### Access Token

Create and read an access token.

```javascript
// to create accessToken()
const accessToken = await operator.accessToken().create(data)
```

### Me

To read your Operator access scope, use the `me()` endpoint.

```javascript
import { Operator } from 'evrythng';
const operator = new Operator(OPERATOR_API_KEY);

// to read my Operator access
const operatorAccess = await operator.me().read();
```

See our [enterprise API v2](https://developers.evrythng.com/docs/access-control-v2) documentation to learn more about these new scopes. See our [operatorAccess](https://developers.evrythng.com/reference/operator-access), [accessTokens](https://developers.evrythng.com/reference/access-tokens) and [me](https://developers.evrythng.com/reference/me) API documents to learn more about our new APIs.