> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Layers

Stack layers (Primary, Secondary, etc.) on a schedule.

# Layers

Layers are the building blocks of a schedule. Each layer is an independent rotation with its own timezone, handoff schedule, restriction, and member list.

## Create layer

POST `/oncall/schedules/{schedule_id}/layers`

Layer name (Primary, Secondary, Manager, etc.).

Stacking order. Lower = higher priority. Default = next available.

`daily`, `weekly`, or `custom`.

Required when `rotation_type=custom`. 1–60.

IANA timezone (e.g. `America/New_York`).

0–6 (Sunday–Saturday). Required for `weekly`.

0–23.

`none`, `weekday_hours`, `weekends`, or `custom`. Default `none`.

Array of day numbers when `restriction_type=custom`.

0–23.

0–23. If less than `start_hour`, restriction wraps midnight (overnight shift).

Array of user IDs. Order is rotation order.

```json
{
  "name": "Primary",
  "rotation_type": "weekly",
  "timezone": "America/New_York",
  "handoff_day": 1,
  "handoff_hour": 9,
  "restriction_type": "weekday_hours",
  "restriction_start_hour": 9,
  "restriction_end_hour": 17,
  "members": ["usr_alice", "usr_bob"]
}
```

## Update layer

PATCH `/oncall/layers/{id}`

Any field above can be updated. Member reordering changes rotation position.

## Delete layer

DELETE `/oncall/layers/{id}`

Cascades to members and fixed shifts on the layer. Overrides are not cascaded — they live on the schedule.

## Reorder members

POST `/oncall/layers/{id}/reorder`

```json
{ "member_ids": ["usr_carol", "usr_alice", "usr_bob"] }
```

Useful for "move someone to start of next rotation."