> 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 Event Type Availability Schedules

PATCH https://api.calendly.com/event_type_availability_schedules
Content-Type: application/json

Update an event type availability schedule

> `availability:write`

Reference: https://developer.calendly.com/api-docs/calendly-api/availability/update-event-type-availability

## Authentication

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

## Request

### Query parameters

- `event_type` (string, required) — Event Type uri in which to update the availability schedule

### Body (application/json)

This endpoint expects an object.

- `availability_rule` (EventTypeAvailabilitySchedulesPatchRequestBodyContentApplicationJsonSchemaAvailabilityRule, required)
- `availability_setting` (enum, optional, default: host) — By default every host on the Event Type shares an identical schedule.
  - Allowed values: `host`

## Response

### 200

OK

- `resource` (EventTypeAvailabilitySchedule, required) — A configuration for an Event Type Availability Schedule

## 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

Permission denied or insufficient scope

- `Update-event-type-availabilityRequestForbiddenError`

### 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)

### 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

### EventTypeAvailabilitySchedulesPatchRequestBodyContentApplicationJsonSchemaAvailabilityRule

- `timezone` (string, required) — The timezone for which this Event Type Availability Schedule is originated in.
- `rules` (list of AvailabilityRule, optional) — The rules for an availability schedule. Warning: Updating rules will overwrite all existing rules for the event type. Use the GET endpoint to first retrieve the existing rules and then pass the modified rules to the rules object.
- `user` (string, optional) — Required when an admin or org owner is making the call to update a specific users availability schedule

### EventTypeAvailabilitySchedule

A configuration for an Event Type Availability Schedule

- `event_type` (string, optional) — The URI of the event type associated with the Event Type Availability Schedule
- `availability_setting` (enum, optional, default: host) — The setting for event type availability specifies if all hosts follow the same schedule or if each host has their own unique schedule on the event type.
  - Allowed values: `host`
- `availability_rule` (EventTypeAvailabilityScheduleAvailabilityRule, optional)

### ErrorResponseDetailsItem

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

### UpdateEventTypeAvailabilityRequestForbiddenError0

Error Object

- `title` (enum, required)
  - Allowed values: `Permission Denied`
- `message` (enum, required)
  - Allowed values: `You do not have permission to access this resource.`, `You do not have permission`
- `details` (list of ErrorResponseDetailsItem, optional)

### 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)

### AvailabilityRule

The rules for an availability schedule.

- `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.
  - Allowed values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`
- `date` (string, optional) — A specific date in the future that this should be applied to (i.e. "2030-12-31").

### EventTypeAvailabilityScheduleAvailabilityRule

- `timezone` (string, optional) — The timezone for which this Event Type Availability Schedule is originated in.
- `uri` (string, optional) — Canonical reference (unique identifier) for the Availability Schedule that is referenced in the Event Type.
- `name` (string, optional, nullable) — The name of the Availability Schedule that is referenced in the Event Type.
- `user` (string, optional) — A URI reference to a user to be returned if availability_setting is not 'all'
- `rules` (list of AvailabilityRule, optional)

### AvailabilityRuleIntervalsItems

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

## Examples

### Updating Timezone

**Request**

```json
{
  "availability_rule": {
    "timezone": "America/Chicago"
  }
}
```

**Response**

```json
{
  "resource": {
    "event_type": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
    "availability_setting": "host",
    "availability_rule": {
      "timezone": "America/Chicago",
      "uri": "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA",
      "name": "Working Hours",
      "rules": [
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "sunday"
        }
      ]
    }
  }
}
```

**SDK Code**

```python Updating Timezone
import requests

url = "https://api.calendly.com/event_type_availability_schedules"

querystring = {"event_type":"https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"}

payload = { "availability_rule": { "timezone": "America/Chicago" } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Updating Timezone
const url = 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"availability_rule":{"timezone":"America/Chicago"}}'
};

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

```go Updating Timezone
package main

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

func main() {

	url := "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Chicago\"\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 Updating Timezone
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")

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  \"availability_rule\": {\n    \"timezone\": \"America/Chicago\"\n  }\n}"

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

```java Updating Timezone
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Chicago\"\n  }\n}")
  .asString();
```

```php Updating Timezone
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA', [
  'body' => '{
  "availability_rule": {
    "timezone": "America/Chicago"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Updating Timezone
using RestSharp;

var client = new RestClient("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"availability_rule\": {\n    \"timezone\": \"America/Chicago\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Updating Timezone
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["availability_rule": ["timezone": "America/Chicago"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")! 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()
```

### Updating Rules to ONLY have availability on Sunday

**Request**

```json
{
  "availability_rule": {
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}
```

**Response**

```json
{
  "resource": {
    "event_type": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
    "availability_setting": "host",
    "availability_rule": {
      "timezone": "America/New_York",
      "uri": "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA",
      "name": "Working Hours",
      "rules": [
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "sunday"
        }
      ]
    }
  }
}
```

**SDK Code**

```python Updating Rules to ONLY have availability on Sunday
import requests

url = "https://api.calendly.com/event_type_availability_schedules"

querystring = {"event_type":"https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"}

payload = { "availability_rule": {
        "timezone": "America/New_York",
        "rules": [
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "sunday"
            }
        ]
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Updating Rules to ONLY have availability on Sunday
const url = 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"availability_rule":{"timezone":"America/New_York","rules":[{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"sunday"}]}}'
};

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

```go Updating Rules to ONLY have availability on Sunday
package main

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

func main() {

	url := "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"availability_rule\": {\n    \"timezone\": \"America/New_York\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      }\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 Updating Rules to ONLY have availability on Sunday
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")

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  \"availability_rule\": {\n    \"timezone\": \"America/New_York\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      }\n    ]\n  }\n}"

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

```java Updating Rules to ONLY have availability on Sunday
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"availability_rule\": {\n    \"timezone\": \"America/New_York\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php Updating Rules to ONLY have availability on Sunday
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA', [
  'body' => '{
  "availability_rule": {
    "timezone": "America/New_York",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Updating Rules to ONLY have availability on Sunday
using RestSharp;

var client = new RestClient("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"availability_rule\": {\n    \"timezone\": \"America/New_York\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Updating Rules to ONLY have availability on Sunday
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["availability_rule": [
    "timezone": "America/New_York",
    "rules": [
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "sunday"
      ]
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")! 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()
```

### Updating Rules to have availability every day

**Request**

```json
{
  "availability_rule": {
    "timezone": "America/Los_Angeles",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "monday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "tuesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "wednesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "thursday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "friday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "saturday"
      }
    ]
  },
  "availability_setting": "host"
}
```

**Response**

```json
{
  "resource": {
    "event_type": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
    "availability_setting": "host",
    "availability_rule": {
      "timezone": "America/New_York",
      "uri": "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA",
      "name": "Working Hours",
      "rules": [
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "sunday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "monday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "tuesday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "wednesday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "thursday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "friday"
        },
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "saturday"
        }
      ]
    }
  }
}
```

**SDK Code**

```python Updating Rules to have availability every day
import requests

url = "https://api.calendly.com/event_type_availability_schedules"

querystring = {"event_type":"https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"}

payload = {
    "availability_rule": {
        "timezone": "America/Los_Angeles",
        "rules": [
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "sunday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "monday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "tuesday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "wednesday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "thursday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "friday"
            },
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "saturday"
            }
        ]
    },
    "availability_setting": "host"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Updating Rules to have availability every day
const url = 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"availability_rule":{"timezone":"America/Los_Angeles","rules":[{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"sunday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"monday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"tuesday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"wednesday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"thursday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"friday"},{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"saturday"}]},"availability_setting":"host"}'
};

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

```go Updating Rules to have availability every day
package main

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

func main() {

	url := "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Los_Angeles\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"monday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"tuesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"wednesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"thursday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"friday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"saturday\"\n      }\n    ]\n  },\n  \"availability_setting\": \"host\"\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 Updating Rules to have availability every day
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")

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  \"availability_rule\": {\n    \"timezone\": \"America/Los_Angeles\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"monday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"tuesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"wednesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"thursday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"friday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"saturday\"\n      }\n    ]\n  },\n  \"availability_setting\": \"host\"\n}"

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

```java Updating Rules to have availability every day
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Los_Angeles\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"monday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"tuesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"wednesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"thursday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"friday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"saturday\"\n      }\n    ]\n  },\n  \"availability_setting\": \"host\"\n}")
  .asString();
```

```php Updating Rules to have availability every day
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA', [
  'body' => '{
  "availability_rule": {
    "timezone": "America/Los_Angeles",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "monday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "tuesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "wednesday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "thursday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "friday"
      },
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "saturday"
      }
    ]
  },
  "availability_setting": "host"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Updating Rules to have availability every day
using RestSharp;

var client = new RestClient("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"availability_rule\": {\n    \"timezone\": \"America/Los_Angeles\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"monday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"tuesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"wednesday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"thursday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"friday\"\n      },\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"saturday\"\n      }\n    ]\n  },\n  \"availability_setting\": \"host\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Updating Rules to have availability every day
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "availability_rule": [
    "timezone": "America/Los_Angeles",
    "rules": [
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "sunday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "monday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "tuesday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "wednesday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "thursday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "friday"
      ],
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "saturday"
      ]
    ]
  ],
  "availability_setting": "host"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")! 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()
```

### An admin or org owner updating a user

**Request**

```json
{
  "availability_rule": {
    "timezone": "America/Denver",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday",
        "date": "2022-12-31"
      }
    ],
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
  },
  "availability_setting": "host"
}
```

**Response**

```json
{
  "resource": {
    "event_type": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
    "availability_setting": "host",
    "availability_rule": {
      "timezone": "America/New_York",
      "uri": "https://api.calendly.com/user_availability_schedules/AAAAAAAAAAAAAAAA",
      "name": "Working Hours",
      "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
      "rules": [
        {
          "type": "wday",
          "intervals": [
            {
              "from": "08:30",
              "to": "09:30"
            }
          ],
          "wday": "sunday",
          "date": "2022-12-31"
        }
      ]
    }
  }
}
```

**SDK Code**

```python An admin or org owner updating a user
import requests

url = "https://api.calendly.com/event_type_availability_schedules"

querystring = {"event_type":"https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"}

payload = {
    "availability_rule": {
        "timezone": "America/Denver",
        "rules": [
            {
                "type": "wday",
                "intervals": [
                    {
                        "from": "08:30",
                        "to": "09:30"
                    }
                ],
                "wday": "sunday",
                "date": "2022-12-31"
            }
        ],
        "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
    },
    "availability_setting": "host"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript An admin or org owner updating a user
const url = 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"availability_rule":{"timezone":"America/Denver","rules":[{"type":"wday","intervals":[{"from":"08:30","to":"09:30"}],"wday":"sunday","date":"2022-12-31"}],"user":"https://api.calendly.com/users/AAAAAAAAAAAAAAAA"},"availability_setting":"host"}'
};

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

```go An admin or org owner updating a user
package main

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

func main() {

	url := "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA"

	payload := strings.NewReader("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Denver\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\",\n        \"date\": \"2022-12-31\"\n      }\n    ],\n    \"user\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n  },\n  \"availability_setting\": \"host\"\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 An admin or org owner updating a user
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")

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  \"availability_rule\": {\n    \"timezone\": \"America/Denver\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\",\n        \"date\": \"2022-12-31\"\n      }\n    ],\n    \"user\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n  },\n  \"availability_setting\": \"host\"\n}"

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

```java An admin or org owner updating a user
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"availability_rule\": {\n    \"timezone\": \"America/Denver\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\",\n        \"date\": \"2022-12-31\"\n      }\n    ],\n    \"user\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n  },\n  \"availability_setting\": \"host\"\n}")
  .asString();
```

```php An admin or org owner updating a user
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA', [
  'body' => '{
  "availability_rule": {
    "timezone": "America/Denver",
    "rules": [
      {
        "type": "wday",
        "intervals": [
          {
            "from": "08:30",
            "to": "09:30"
          }
        ],
        "wday": "sunday",
        "date": "2022-12-31"
      }
    ],
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
  },
  "availability_setting": "host"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp An admin or org owner updating a user
using RestSharp;

var client = new RestClient("https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"availability_rule\": {\n    \"timezone\": \"America/Denver\",\n    \"rules\": [\n      {\n        \"type\": \"wday\",\n        \"intervals\": [\n          {\n            \"from\": \"08:30\",\n            \"to\": \"09:30\"\n          }\n        ],\n        \"wday\": \"sunday\",\n        \"date\": \"2022-12-31\"\n      }\n    ],\n    \"user\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\"\n  },\n  \"availability_setting\": \"host\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift An admin or org owner updating a user
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "availability_rule": [
    "timezone": "America/Denver",
    "rules": [
      [
        "type": "wday",
        "intervals": [
          [
            "from": "08:30",
            "to": "09:30"
          ]
        ],
        "wday": "sunday",
        "date": "2022-12-31"
      ]
    ],
    "user": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
  ],
  "availability_setting": "host"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/event_type_availability_schedules?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2FAAAAAAAAAAAAAAAA")! 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()
```