Create user availability schedule
Create new schedule with specified rules, timezone, location, user and calendar associations.
POST
/
calendars
/
schedules
Create user availability schedule
curl --request POST \
--url https://services.leadconnectorhq.com/calendars/schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"timezone": "America/New_York",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"userId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"day": "monday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
]
}
],
"calendarIds": [
"WvVX9LpvlBO6K506xLbp",
"XyZ8MnQrStUvWxYzAbCdEf"
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
timezone: 'America/New_York',
locationId: 'IkqiJlXJ7o9h61tCHHod',
name: 'Business Hours Schedule',
userId: 'IkqiJlXJ7o9h61tCHHod',
rules: [{type: 'wday', day: 'monday', intervals: [{from: '09:00', to: '17:00'}]}],
calendarIds: ['WvVX9LpvlBO6K506xLbp', 'XyZ8MnQrStUvWxYzAbCdEf']
})
};
fetch('https://services.leadconnectorhq.com/calendars/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars/schedules"
payload = {
"timezone": "America/New_York",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"userId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"day": "monday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
]
}
],
"calendarIds": ["WvVX9LpvlBO6K506xLbp", "XyZ8MnQrStUvWxYzAbCdEf"]
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"schedule": {
"id": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
],
"date": "2023-04-15",
"day": "monday"
}
],
"timezone": "America/New_York",
"dateAdded": "2023-01-15T10:30:00.000Z",
"dateUpdated": "2023-01-20T14:45:00.000Z",
"userId": "IkqiJlXJ7o9h61tCHHod",
"deleted": false,
"calendarIds": [
"<string>"
]
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Authorizations
Body
application/json
Last modified on March 8, 2026
Was this page helpful?
Create user availability schedule
curl --request POST \
--url https://services.leadconnectorhq.com/calendars/schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"timezone": "America/New_York",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"userId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"day": "monday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
]
}
],
"calendarIds": [
"WvVX9LpvlBO6K506xLbp",
"XyZ8MnQrStUvWxYzAbCdEf"
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
timezone: 'America/New_York',
locationId: 'IkqiJlXJ7o9h61tCHHod',
name: 'Business Hours Schedule',
userId: 'IkqiJlXJ7o9h61tCHHod',
rules: [{type: 'wday', day: 'monday', intervals: [{from: '09:00', to: '17:00'}]}],
calendarIds: ['WvVX9LpvlBO6K506xLbp', 'XyZ8MnQrStUvWxYzAbCdEf']
})
};
fetch('https://services.leadconnectorhq.com/calendars/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars/schedules"
payload = {
"timezone": "America/New_York",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"userId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"day": "monday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
]
}
],
"calendarIds": ["WvVX9LpvlBO6K506xLbp", "XyZ8MnQrStUvWxYzAbCdEf"]
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"schedule": {
"id": "IkqiJlXJ7o9h61tCHHod",
"name": "Business Hours Schedule",
"locationId": "IkqiJlXJ7o9h61tCHHod",
"rules": [
{
"type": "wday",
"intervals": [
{
"from": "09:00",
"to": "17:00"
}
],
"date": "2023-04-15",
"day": "monday"
}
],
"timezone": "America/New_York",
"dateAdded": "2023-01-15T10:30:00.000Z",
"dateUpdated": "2023-01-20T14:45:00.000Z",
"userId": "IkqiJlXJ7o9h61tCHHod",
"deleted": false,
"calendarIds": [
"<string>"
]
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}