# PUT /scheduling-availability

**Resource:** [Scheduling Availability](./scheduling-availability.md)  
**Scopes:** `company:write`  
**Write operation:** yes

Update or create scheduling availability. Upserts -- creates the record if it does not exist.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `weekly_hours` | body | array | no | Array of {day: 0-6, start: "HH:MM", end: "HH:MM"}. day 0=Sunday, 6=Saturday. |
| `timezone` | body | string | no | IANA timezone (e.g. "Australia/Sydney") |
| `date_overrides` | body | array | no | Array of {date: "YYYY-MM-DD", type: "blocked"\|"custom", start?, end?, reason?} |
| `user_id` | body | string | no | Set user-specific availability instead of company default |

## Request example

```bash
curl -X PUT \
  "https://api.trustpager.com/functions/v1/api/v1/scheduling-availability" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "weekly_hours": [
      {"day": 1, "start": "09:00", "end": "17:00"},
      {"day": 2, "start": "09:00", "end": "17:00"},
      {"day": 3, "start": "09:00", "end": "17:00"},
      {"day": 4, "start": "09:00", "end": "17:00"},
      {"day": 5, "start": "09:00", "end": "17:00"}
    ],
    "timezone": "Australia/Sydney",
    "date_overrides": [
      {"date": "2026-12-25", "type": "blocked", "reason": "Christmas"}
    ]
  }'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`