# Survey

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

> A Survey is a Form sent to measure, such as NPS or CSAT, whose answers become Metrics and Evidence.

A Survey is a [Form](/business/nouns/form) sent to measure, such as NPS or CSAT, whose answers become [Metrics](/business/nouns/metric) and [Evidence](/business/nouns/evidence).

## Properties
<details>
<summary>Inherited from [Form](/business/nouns/form): 1 property</summary>

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `fields` | `json` | Yes | The fields and their types. |

</details>

## Object
```json
{
  "$id": "https://api.sb/quietcopy.com/surveys/survey_1",
  "$type": "Survey",
  "fields": {}
}
```

## Relationships
- <a id="rel-informs"></a>A Survey **informs** many [Metrics](/business/nouns/metric): Survey answers compute [Metrics](/business/nouns/metric), such as a satisfaction score. `informs`, inverse [`informedBy`](/business/nouns/metric#rel-informed-by).

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

## Call it

**Ask**

```text
Add a survey to TutorLoop.
```

**API**

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

```json
{
  "api": "https://api.sb/tutorloop.com",
  "survey": {
    "$id": "https://api.sb/tutorloop.com/surveys/survey_1",
    "$type": "Survey",
    "fields": {}
  },
  "action": {
    "$id": "https://api.sb/tutorloop.com/actions/action_1",
    "operation": "Survey.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/actions/action_1"
  }
}
```

**SDK**

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

const survey = await $.Survey.create({ fields: {} })
```

**CLI**

```bash
npx startup-builder do Survey.create --json '{"fields":{}}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Survey.create({ fields: {} })"
  }
}
```

## Example
An NPS Survey goes to each [Customer](/business/nouns/customer) 30 days after signup. Scores feed the NPS Metric, and comments become Evidence.