> Calendly developer docs. For page Markdown, append .md to any URL.
> Index: https://developer.calendly.com/llms.txt
> API catalog: https://developer.calendly.com/.well-known/api-catalog
> OpenAPI: https://developer.calendly.com/openapi/calendly-api.yaml
> OAuth authorization server: https://calendly.com/.well-known/oauth-authorization-server
> MCP protected resource: https://mcp.calendly.com/.well-known/oauth-protected-resource
> Scheduling MCP endpoint: https://mcp.calendly.com
> Docs search MCP: https://developer.calendly.com/_mcp/server

# Update User Availability Schedule

PATCH https://api.calendly.com/user_availability_schedules/{uuid}
Content-Type: application/json

Renames a schedule, changes its timezone or rules, or makes it the default.

**Behavior:**

* Omitted fields are left unchanged. When rules is sent, it replaces the schedule's entire rule set.
* To change part of the rules, such as one weekday or one date, read the schedule with GET /user\_availability\_schedules/\{uuid}, edit it, and send all the rules back.
* date rules dated before yesterday, in the schedule's timezone, return 400. Yesterday and later dates are allowed.
* default: true makes this schedule the default and the previous default stops being one, in a single step. The user never has zero defaults.
* default: false is not a supported target state and returns 400.
* Changes apply to every Event Type that uses the schedule. Which Event Types use it does not change.

> `availability:write`

Reference: https://developer.calendly.com/api-docs/calendly-api/availability/update-user-availability-schedule

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0
- `Authorization` header (bearer token, required) — Personal Access Token

## Request

### Path parameters

- `uuid` (string, required) — The UUID of the availability schedule.

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — New name for the availability schedule.
- `timezone` (string, optional) — IANA time zone used to interpret the schedule's availability rules. Changing it is expected to keep each rule's local times, so their absolute times shift.
- `rules` (list of AvailabilityRule, optional) — Complete replacement set of availability rules for the schedule. Same structure and validation as rules in Create User Availability Schedule. Must include exactly one wday rule for each day of the week when provided. date rules are optional overrides on top of the weekly rules.
- `default` (boolean, optional) — Sets the availability schedule as the user's default schedule when true. false is not a supported target state and returns 400.

## Response

### 200

OK

- `resource` (AvailabilitySchedule, required) — The availability schedule set by the user.

## Errors

### 400 Bad Request Error

Request is not valid

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 401 Unauthorized Error

Cannot authenticate caller

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 403 Forbidden Error

Caller not authorized to perform this action or insufficient scope

- `Update-user-availability-scheduleRequestForbiddenError`
  - UserNotInOrganizationError: UserNotInOrganizationError
  - InsufficientScopeError: InsufficientScopeError

### 404 Not Found Error

Requested resource not found

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 429 Too Many Requests Error

Too Many Requests

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 500 Internal Server Error

An error has occurred on the server

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

## Types

### AvailabilityRule

The rules for an availability schedule. When creating or updating a schedule, you must include exactly one wday rule for each day of the week (sunday through saturday). date rules are optional overrides on top of the weekly rules. - When type is "wday", the wday field is required and date must be omitted. - When type is "date", the date field is required and wday must be omitted.

- `type` (enum, required) — The type of this Availability Rule; can be "wday" or a specific "date".
  - Allowed values: `wday`, `date`
- `intervals` (list of AvailabilityRuleIntervalsItems, required) — The intervals to be applied to this Rule. Each interval represents when booking a meeting is allowed. If the interval array is empty, then there is no booking availability for that day. Time is in 24h format (i.e. "17:30") and local to the timezone in the Availability Schedule.
- `wday` (enum, optional) — The day of the week for which this Rule should be applied to. Required when type is "wday".
  - Allowed values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`
- `date` (string, optional) — A specific date that this should be applied to (i.e. "2030-12-31"). Required when type is "date". Format `YYYY-MM-DD`.

### AvailabilitySchedule

The availability schedule set by the user.

- `uri` (string, required) — A URI reference to this Availability Schedule.
- `default` (boolean, required) — This is the default Availability Schedule in use.
- `name` (string, required) — The name of this Availability Schedule.
- `user` (string, required) — A URI reference to a User.
- `timezone` (string, required) — The timezone for which this Availability Schedule is originated in.
- `rules` (list of AvailabilityRule, required) — The rules of this Availability Schedule.

### ErrorResponseDetailsItem

- `message` (string, required)
- `parameter` (string, optional)
- `code` (string, optional)

### UserNotInOrganizationError

Permission Denied or caller not authorized to perform this action

- `title` (enum, optional)
  - Allowed values: `Permission Denied`
- `message` (enum, optional)
  - Allowed values: `This user is not in your organization`

### InsufficientScopeError

Caller does not have required oauth scopes

- `title` (enum, required)
  - Allowed values: `Insufficient scope`
- `message` (enum, required)
  - Allowed values: `This operation requires the scopes listed in the 'required_scopes' array.`
- `required_scopes` (list of string, required)

### AvailabilityRuleIntervalsItems

- `from` (string, required) — Format: `"hh:mm"`
- `to` (string, required) — Format: `"hh:mm"`

## Examples

### Update schedule name

**Response**

```json
{
  "resource": {
    "uri": "https://api.calendly.com/user_availability_schedule/AAAAAAAAAAAAAAAA",
    "default": false,
    "name": "Customer Meeting Hours",
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}
```

**SDK Code**

```python Update schedule name
import requests

url = "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Update schedule name
const url = 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Update schedule name
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Update schedule name
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Update schedule name
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Update schedule name
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Update schedule name
using RestSharp;

var client = new RestClient("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Update schedule name
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Set as default schedule

**Response**

```json
{
  "resource": {
    "uri": "https://api.calendly.com/user_availability_schedule/AAAAAAAAAAAAAAAA",
    "default": true,
    "name": "Working Hours",
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}
```

**SDK Code**

```python Set as default schedule
import requests

url = "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Set as default schedule
const url = 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Set as default schedule
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Set as default schedule
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Set as default schedule
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Set as default schedule
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Set as default schedule
using RestSharp;

var client = new RestClient("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Set as default schedule
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Replace rules

**Request**

```json
{
  "rules": [
    {
      "type": "wday",
      "intervals": [],
      "wday": "sunday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "08:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "16:00"
        }
      ],
      "wday": "monday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ],
      "wday": "tuesday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "10:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "17:00"
        }
      ],
      "wday": "wednesday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "10:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "16:00"
        }
      ],
      "wday": "thursday"
    },
    {
      "type": "wday",
      "intervals": [],
      "wday": "friday"
    },
    {
      "type": "wday",
      "intervals": [],
      "wday": "saturday"
    },
    {
      "type": "date",
      "intervals": [],
      "date": "2026-12-23"
    }
  ]
}
```

**Response**

```json
{
  "resource": {
    "uri": "https://api.calendly.com/user_availability_schedule/AAAAAAAAAAAAAAAA",
    "default": false,
    "name": "Office Hours",
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "timezone": "America/Los_Angeles",
    "rules": [
      {
        "type": "wday",
        "intervals": [],
        "wday": "sunday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:00",
            "to": "12:00"
          },
          {
            "from": "13:00",
            "to": "16:00"
          }
        ],
        "wday": "monday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "09:00",
            "to": "17:00"
          }
        ],
        "wday": "tuesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "10:00",
            "to": "12:00"
          },
          {
            "from": "13:00",
            "to": "17:00"
          }
        ],
        "wday": "wednesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "10:00",
            "to": "12:00"
          },
          {
            "from": "13:00",
            "to": "16:00"
          }
        ],
        "wday": "thursday"
      },
      {
        "type": "wday",
        "intervals": [],
        "wday": "friday"
      },
      {
        "type": "wday",
        "intervals": [],
        "wday": "saturday"
      },
      {
        "type": "date",
        "intervals": [],
        "date": "2026-12-23"
      }
    ]
  }
}
```

**SDK Code**

```python Replace rules
import requests

url = "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

payload = { "rules": [
        {
            "type": "wday",
            "intervals": [],
            "wday": "sunday"
        },
        {
            "type": "wday",
            "intervals": [
                {
                    "from": "08:00",
                    "to": "12:00"
                },
                {
                    "from": "13:00",
                    "to": "16:00"
                }
            ],
            "wday": "monday"
        },
        {
            "type": "wday",
            "intervals": [
                {
                    "from": "09:00",
                    "to": "17:00"
                }
            ],
            "wday": "tuesday"
        },
        {
            "type": "wday",
            "intervals": [
                {
                    "from": "10:00",
                    "to": "12:00"
                },
                {
                    "from": "13:00",
                    "to": "17:00"
                }
            ],
            "wday": "wednesday"
        },
        {
            "type": "wday",
            "intervals": [
                {
                    "from": "10:00",
                    "to": "12:00"
                },
                {
                    "from": "13:00",
                    "to": "16:00"
                }
            ],
            "wday": "thursday"
        },
        {
            "type": "wday",
            "intervals": [],
            "wday": "friday"
        },
        {
            "type": "wday",
            "intervals": [],
            "wday": "saturday"
        },
        {
            "type": "date",
            "intervals": [],
            "date": "2026-12-23"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Replace rules
const url = 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"rules":[{"type":"wday","intervals":[],"wday":"sunday"},{"type":"wday","intervals":[{"from":"08:00","to":"12:00"},{"from":"13:00","to":"16:00"}],"wday":"monday"},{"type":"wday","intervals":[{"from":"09:00","to":"17:00"}],"wday":"tuesday"},{"type":"wday","intervals":[{"from":"10:00","to":"12:00"},{"from":"13:00","to":"17:00"}],"wday":"wednesday"},{"type":"wday","intervals":[{"from":"10:00","to":"12:00"},{"from":"13:00","to":"16:00"}],"wday":"thursday"},{"type":"wday","intervals":[],"wday":"friday"},{"type":"wday","intervals":[],"wday":"saturday"},{"type":"date","intervals":[],"date":"2026-12-23"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Replace rules
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"rules\": [\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"sunday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"08:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"monday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"09:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"tuesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"wednesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"thursday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"friday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"saturday\"\n    },\n    {\n      \"type\": \"date\",\n      \"intervals\": [],\n      \"date\": \"2026-12-23\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Replace rules
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"rules\": [\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"sunday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"08:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"monday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"09:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"tuesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"wednesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"thursday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"friday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"saturday\"\n    },\n    {\n      \"type\": \"date\",\n      \"intervals\": [],\n      \"date\": \"2026-12-23\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Replace rules
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"rules\": [\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"sunday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"08:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"monday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"09:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"tuesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"wednesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"thursday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"friday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"saturday\"\n    },\n    {\n      \"type\": \"date\",\n      \"intervals\": [],\n      \"date\": \"2026-12-23\"\n    }\n  ]\n}")
  .asString();
```

```php Replace rules
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA', [
  'body' => '{
  "rules": [
    {
      "type": "wday",
      "intervals": [],
      "wday": "sunday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "08:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "16:00"
        }
      ],
      "wday": "monday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "09:00",
          "to": "17:00"
        }
      ],
      "wday": "tuesday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "10:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "17:00"
        }
      ],
      "wday": "wednesday"
    },
    {
      "type": "wday",
      "intervals": [
        {
          "from": "10:00",
          "to": "12:00"
        },
        {
          "from": "13:00",
          "to": "16:00"
        }
      ],
      "wday": "thursday"
    },
    {
      "type": "wday",
      "intervals": [],
      "wday": "friday"
    },
    {
      "type": "wday",
      "intervals": [],
      "wday": "saturday"
    },
    {
      "type": "date",
      "intervals": [],
      "date": "2026-12-23"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Replace rules
using RestSharp;

var client = new RestClient("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"rules\": [\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"sunday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"08:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"monday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"09:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"tuesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"17:00\"\n        }\n      ],\n      \"wday\": \"wednesday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [\n        {\n          \"from\": \"10:00\",\n          \"to\": \"12:00\"\n        },\n        {\n          \"from\": \"13:00\",\n          \"to\": \"16:00\"\n        }\n      ],\n      \"wday\": \"thursday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"friday\"\n    },\n    {\n      \"type\": \"wday\",\n      \"intervals\": [],\n      \"wday\": \"saturday\"\n    },\n    {\n      \"type\": \"date\",\n      \"intervals\": [],\n      \"date\": \"2026-12-23\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Replace rules
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["rules": [
    [
      "type": "wday",
      "intervals": [],
      "wday": "sunday"
    ],
    [
      "type": "wday",
      "intervals": [
        [
          "from": "08:00",
          "to": "12:00"
        ],
        [
          "from": "13:00",
          "to": "16:00"
        ]
      ],
      "wday": "monday"
    ],
    [
      "type": "wday",
      "intervals": [
        [
          "from": "09:00",
          "to": "17:00"
        ]
      ],
      "wday": "tuesday"
    ],
    [
      "type": "wday",
      "intervals": [
        [
          "from": "10:00",
          "to": "12:00"
        ],
        [
          "from": "13:00",
          "to": "17:00"
        ]
      ],
      "wday": "wednesday"
    ],
    [
      "type": "wday",
      "intervals": [
        [
          "from": "10:00",
          "to": "12:00"
        ],
        [
          "from": "13:00",
          "to": "16:00"
        ]
      ],
      "wday": "thursday"
    ],
    [
      "type": "wday",
      "intervals": [],
      "wday": "friday"
    ],
    [
      "type": "wday",
      "intervals": [],
      "wday": "saturday"
    ],
    [
      "type": "date",
      "intervals": [],
      "date": "2026-12-23"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Rename schedule

**Request**

```json
{
  "name": "Customer Meeting Hours"
}
```

**Response**

```json
{
  "resource": {
    "uri": "https://api.calendly.com/user_availability_schedule/AAAAAAAAAAAAAAAA",
    "default": false,
    "name": "Customer Meeting Hours",
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}
```

**SDK Code**

```python Rename schedule
import requests

url = "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

payload = { "name": "Customer Meeting Hours" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Rename schedule
const url = 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Customer Meeting Hours"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Rename schedule
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"name\": \"Customer Meeting Hours\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Rename schedule
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Customer Meeting Hours\"\n}"

response = http.request(request)
puts response.read_body
```

```java Rename schedule
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Customer Meeting Hours\"\n}")
  .asString();
```

```php Rename schedule
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA', [
  'body' => '{
  "name": "Customer Meeting Hours"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Rename schedule
using RestSharp;

var client = new RestClient("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Customer Meeting Hours\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Rename schedule
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["name": "Customer Meeting Hours"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Set as default

**Request**

```json
{
  "default": true
}
```

**Response**

```json
{
  "resource": {
    "uri": "https://api.calendly.com/user_availability_schedule/AAAAAAAAAAAAAAAA",
    "default": false,
    "name": "Customer Meeting Hours",
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}
```

**SDK Code**

```python Set as default
import requests

url = "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

payload = { "default": True }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Set as default
const url = 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"default":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Set as default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"default\": true\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Set as default
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"default\": true\n}"

response = http.request(request)
puts response.read_body
```

```java Set as default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"default\": true\n}")
  .asString();
```

```php Set as default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA', [
  'body' => '{
  "default": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Set as default
using RestSharp;

var client = new RestClient("https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"default\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Set as default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["default": true] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```