# Team

URL: /business/nouns/team · Id: `noun:team`

> A Team is a named group of Roles under one owner; every Startup starts with eleven default Teams.

A Team is a named group of [Roles](/business/nouns/role) under one owner; every [Startup](/business/nouns/startup) starts with eleven default Teams. Most stay asleep until their [Trigger](/business/nouns/trigger) wakes them.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `mission` | `text` | Yes | What the Team is for, in one sentence. |
| `status` | `string` | Yes | One of `asleep` or `awake`: whether any of its Processes is on. |

## Object
```json
{
  "$id": "https://api.sb/routewise.dev/teams/team_1",
  "$type": "Team",
  "mission": "Example mission",
  "status": "asleep"
}
```

## Relationships
- <a id="rel-groups"></a>A Team **groups** many [Roles](/business/nouns/role): a Team groups the [Roles](/business/nouns/role) that do one kind of work under one owner. `groups`, inverse [`team`](/business/nouns/role#rel-team).
- <a id="rel-serves"></a>A Team **serves** many [Startups](/business/nouns/startup): a Team does its one kind of work for every [Startup](/business/nouns/startup) it serves; a Startup wakes a Team when its trigger [Event](/business/nouns/event) happens. `serves`, inverse [`teams`](/business/nouns/startup#rel-teams).

## Lifecycle

| State | Meaning | Moves to |
| --- | --- | --- |
| `asleep` (first) | None of its Processes is on, so its Roles hold no work. | `awake` on [`Process.enabled`](/business/events/Process.enabled) when the Process belongs to this Team; `awake` on [`Startup.built`](/business/events/Startup.built) when the Startup’s Templates turn on one of this Team’s Processes |
| `awake` | At least one of its Processes is on, and its Roles do that work. | `asleep` on [`Process.paused`](/business/events/Process.paused) when no other Process of this Team is on |

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| <a id="create"></a>[Team.create](/business/nouns/team/create) | Creates a Team. Inherited from [Noun](/business/nouns/noun). | None. | `Team.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[Team.get](/business/nouns/team/get) | Returns one Team by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[Team.list](/business/nouns/team/list) | Returns Teams, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[Team.update](/business/nouns/team/update) | Changes the given properties of a Team. Inherited from [Noun](/business/nouns/noun). | None. | `Team.updated` | Two-way: `try`, `send`, `do` |
| <a id="delete"></a>[Team.delete](/business/nouns/team/delete) | Deletes a Team; its history is kept. Inherited from [Noun](/business/nouns/noun). | None. | `Team.deleted` | One-way: `send`, `do` |

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

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `Team.create` | Yes | Yes | Yes | No |
| `Team.get` | Yes | Yes | Yes | Yes |
| `Team.list` | Yes | Yes | Yes | Yes |
| `Team.update` | Yes | Yes | Yes | No |
| `Team.delete` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Add a team to LedgerLark.
```

**API**

```bash
curl -X POST https://api.sb/ledgerlark.com/teams \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mission":"Example mission"}'
```

```json
{
  "api": "https://api.sb/ledgerlark.com",
  "team": {
    "$id": "https://api.sb/ledgerlark.com/teams/team_1",
    "$type": "Team",
    "mission": "Example mission",
    "status": "asleep"
  },
  "action": {
    "$id": "https://api.sb/ledgerlark.com/actions/action_1",
    "operation": "Team.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/ledgerlark.com/actions/action_1"
  }
}
```

**SDK**

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

const team = await $.Team.create({ mission: 'Example mission' })
```

**CLI**

```bash
npx startup-builder do Team.create --json '{"mission":"Example mission"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Team.create({ mission: 'Example mission' })"
  }
}
```

## Example
The [Customer Team](/agents/customer) of a tutoring marketplace wakes when the first parent accepts an [Offer](/business/nouns/offer). It groups the [Customer Lead](/agents/customer/customer-lead), [Onboarding Specialist](/agents/customer/onboarding-specialist) and [Success Manager](/agents/customer/success-manager) Roles under one owner.