# Dashboard methods: ask, schedule

URL: /code/sdk/dashboard/verbs · Id: `page:code/sdk/dashboard/verbs`

> The Dashboard Verbs ask, schedule as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Dashboard](/business/nouns/dashboard), one group of [Dashboard methods](/code/sdk/dashboard).

### Dashboard.ask
Ask answers a plain-language question with a query over the Startup’s records and shows the query beside the result. [Verb page](/business/nouns/dashboard/ask?interface=sdk).

```ts
interface DashboardVerbs {
  ask(input: DashboardAskInput, options?: SB.CallOptions): SB.Call<DashboardAskOutput>
}
```

Emits [`Dashboard.asked`](/business/events/Dashboard.asked).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `question` | `text` | Yes | The question, in plain language. |
| `dashboard` | [Dashboard](/business/nouns/dashboard) | No | The Dashboard to add the answer to as a tile. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | `text` | Yes | The query it ran, to read and reuse. |
| `rows` | `json` | Yes | The result, as a table or chart. |
| `dashboard` | [Dashboard](/business/nouns/dashboard) | Yes | The Dashboard the question was asked on. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

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

const { query, rows, dashboard } = await $.Dashboard.ask({ question: 'Example question' })
```

### Dashboard.schedule
Schedule sends a Dashboard on a cadence to a Mailbox, a Channel or an Agent’s context, rendered for each. [Verb page](/business/nouns/dashboard/schedule?interface=sdk).

```ts
interface DashboardVerbs {
  schedule(input: DashboardScheduleInput, options?: SB.CallOptions): SB.Call<Dashboard>
}
```

Emits [`Dashboard.scheduled`](/business/events/Dashboard.scheduled).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `dashboard` | [Dashboard](/business/nouns/dashboard) | Yes | The Dashboard to send. |
| `cadence` | `string` | Yes | How often it goes out. |
| `to` | `string` | Yes | The Mailbox, Channel or Agent that receives it. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `dashboard` | [Dashboard](/business/nouns/dashboard) | Yes | The Dashboard, with its schedule. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

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

const dashboard = await $.Dashboard.schedule({ dashboard: 'dashboard_QL9I0ALqO4', cadence: 'daily', to: 'Example to' })
```