# Access Level

URL: /business/nouns/access-level · Id: `noun:access-level`

> An Access Level is a named preset of Permissions a Worker holds in a namespace, such as owner or viewer; it is never a Role.

An Access Level is a named preset of [Permissions](/business/nouns/permission) a [Worker](/business/nouns/worker) holds in a namespace, such as owner or viewer; it is never a [Role](/business/nouns/role).

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | Its name, such as `owner`, `admin`, `member`, or `viewer`. |
| `grants` | list of [Permission](/business/nouns/permission) | Yes | The Permissions it presets: read, write or all Verbs, or named Verbs, on Nouns. |
| `order` | `integer` | No | Its rank: 1 holds the most access. |

## Object
```json
{
  "$id": "https://api.sb/patentpad.com/access-levels/access_level_1",
  "$type": "AccessLevel",
  "name": "owner",
  "grants": [
    "permission_1"
  ],
  "order": 1
}
```

## Relationships
- <a id="rel-workers"></a>An Access Level **has** many [Workers](/business/nouns/worker): a [Worker](/business/nouns/worker) holds one Access Level in each namespace it works in, apart from the [Role](/business/nouns/role) it fills. `workers`, inverse [`hasAccess`](/business/nouns/worker#rel-has-access).

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| <a id="get"></a>[AccessLevel.get](/business/nouns/access-level/get) | Returns one Access Level by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[AccessLevel.list](/business/nouns/access-level/list) | Returns Access Levels, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |

An Access Level is kept forever and never edited: it has no `update` or `delete`.

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `AccessLevel.get` | Yes | Yes | Yes | Yes |
| `AccessLevel.list` | Yes | Yes | Yes | Yes |

## Call it

**Ask**

```text
Show me the latest access level.
```

**API**

```bash
curl https://api.sb/kilnbakery.com/access-levels/access_level_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/kilnbakery.com",
  "$type": "AccessLevel",
  "$id": "https://api.sb/kilnbakery.com/access-levels/access_level_1",
  "accessLevel": {
    "$id": "https://api.sb/kilnbakery.com/access-levels/access_level_1",
    "$type": "AccessLevel",
    "name": "owner",
    "grants": [
      "permission_1"
    ]
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/access-levels/access_level_1",
    "up": "https://api.sb/kilnbakery.com/access-levels"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const accessLevel = await $.AccessLevel.get({ id: 'access_level_1' })
```

**CLI**

```bash
npx startup-builder do AccessLevel.get --json '{"id":"access_level_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.AccessLevel.get({ id: 'access_level_1' })"
  }
}
```

## Example
A design contractor joins a [Startup](/business/nouns/startup) as a `member`. They can edit [Offers](/business/nouns/offer) and [Pages](/business/nouns/page), but not a [Permission](/business/nouns/permission) or a [Limit](/business/nouns/limit). The same person fills the [Designer](/agents/product/designer) Role: the Access Level sets what they may touch, and the Role sets the work they own.