# Audience

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

> An Audience is a saved query over Visitors, Leads, Prospects, or Customers, used to target Ads and Messages.

An Audience is a saved query over [Visitors](/business/nouns/visitor), [Leads](/business/nouns/lead), [Prospects](/business/nouns/prospect), or [Customers](/business/nouns/customer), used to target [Ads](/business/nouns/ad) and [Messages](/business/nouns/message).

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `size` | `integer` | No | How many people match. |

<details>
<summary>Inherited from [Collection](/business/nouns/collection): 1 property</summary>

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | `json` | No | The saved query that defines a dynamic Collection. |

</details>

<details>
<summary>Inherited from [Thing](/business/nouns/thing): 4 properties</summary>

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The stable identifier, which never changes. |
| `type` | list of [Noun](/business/nouns/noun) | Yes | The Nouns this Thing is an instance of. |
| `state` | `string` | No | The current state in its lifecycle. |
| `outside` | `json` | No | The ids this Thing has in outside tools, one per Integration, so a re-run matches instead of duplicating. |

</details>

## Object
```json
{
  "$id": "https://api.sb/tutorloop.com/audiences/audience_1",
  "$type": "Audience",
  "id": "Example id",
  "type": [
    "noun_1"
  ],
  "state": "Example state",
  "outside": {},
  "query": {},
  "size": 1
}
```

## Relationships
- <a id="rel-targeted-by"></a>An Audience **is targeted by** many [Ads](/business/nouns/ad): an [Ad](/business/nouns/ad) is shown to the people its Audiences select. `targetedBy`, inverse [`targets`](/business/nouns/ad#rel-targets).

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

## Call it

**Ask**

```text
Add an audience to QuietCopy with a noun.
```

**API**

```bash
curl -X POST https://api.sb/quietcopy.com/audiences \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"audience_1","type":["noun_1"]}'
```

```json
{
  "api": "https://api.sb/quietcopy.com",
  "audience": {
    "$id": "https://api.sb/quietcopy.com/audiences/audience_1",
    "$type": "Audience",
    "id": "Example id",
    "type": [
      "noun_1"
    ]
  },
  "action": {
    "$id": "https://api.sb/quietcopy.com/actions/action_1",
    "operation": "Audience.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/quietcopy.com/actions/action_1"
  }
}
```

**SDK**

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

const audience = await $.Audience.create({ id: 'audience_1', type: ['noun_1'] })
```

**CLI**

```bash
npx startup-builder do Audience.create --json '{"id":"audience_1","type":["noun_1"]}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Audience.create({ id: 'audience_1', type: ['noun_1'] })"
  }
}
```

## Example
The Audience of trial users with no API call in 7 days feeds a reminder Message each morning. It drops anyone who becomes a [Customer](/business/nouns/customer).