# Setting

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

> A Setting is a configurable value a Thing inherits from its nearest holder, Studio to Startup to Product, unless it sets its own.

A Setting is a configurable value a [Thing](/business/nouns/thing) inherits from its nearest holder, [Studio](/business/nouns/studio) to [Startup](/business/nouns/startup) to [Product](/business/nouns/product), unless it sets its own.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | `string` | Yes | The name of the choice. |
| `value` | `json` | Yes | The chosen value. |
| `locked` | `boolean` | No | True when no holder below may override it. |

## Object
```json
{
  "$id": "https://api.sb/tutorloop.com/settings/setting_1",
  "$type": "Setting",
  "key": "Example key",
  "value": {},
  "locked": true
}
```

## Relationships
- <a id="rel-configures"></a>A Setting **configures** one [Thing](/business/nouns/thing): the [Thing](/business/nouns/thing) whose choice a Setting holds; everything below it inherits the value unless it sets its own. `configures`, inverse [`configuredBy`](/business/nouns/thing#rel-configured-by).

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

## Call it

**Ask**

```text
Add a setting to QuietCopy.
```

**API**

```bash
curl -X POST https://api.sb/quietcopy.com/settings \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"Example key","value":{}}'
```

```json
{
  "api": "https://api.sb/quietcopy.com",
  "setting": {
    "$id": "https://api.sb/quietcopy.com/settings/setting_1",
    "$type": "Setting",
    "key": "Example key",
    "value": {}
  },
  "action": {
    "$id": "https://api.sb/quietcopy.com/actions/action_1",
    "operation": "Setting.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/quietcopy.com/actions/action_1"
  }
}
```

**SDK**

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

const setting = await $.Setting.create({ key: 'Example key', value: {} })
```

**CLI**

```bash
npx startup-builder do Setting.create --json '{"key":"Example key","value":{}}'
```

**MCP**

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

## Example
The Studio sets the default currency to USD. A Startup selling in euros overrides it with EUR, and its Products inherit EUR.