# Availability methods: set

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

> The Availability Verbs set as typed SDK methods, with inputs, result, refusals and an example.

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

### Availability.set
Set records the weekly hours a Worker can be booked in and the calendars whose busy times it subtracts. [Verb page](/business/nouns/availability/set?interface=sdk).

```ts
interface AvailabilityVerbs {
  set(input: AvailabilitySetInput, options?: SB.CallOptions): SB.Call<Availability>
}
```

Emits [`Availability.set`](/business/events/Availability.set).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `worker` | [Worker](/business/nouns/worker) | Yes | Who is booked. |
| `hours` | `json` | Yes | Open hours by weekday. |
| `timezone` | `string` | Yes | An IANA time zone. |
| `calendars` | `string[]` | No | Connected calendars to subtract busy times from. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `availability` | [Availability](/business/nouns/availability) | Yes | The Availability, replacing the Worker’s last one. |

**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 availability = await $.Availability.set({ worker: 'worker_whZFpOKWIV', hours: { tue: ['09:00-12:00'], thu: ['13:00-17:00'] }, timezone: 'America/Chicago' })
```