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"
]
}
'{
"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>"
]
}
}Create new schedule with specified rules, timezone, location, user and calendar associations.
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"
]
}
'{
"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>"
]
}
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-04-15 Timezone for the schedule (IANA timezone identifier)
^[A-Za-z_]+/[A-Za-z_]+$"America/New_York"
Location ID where this schedule applies
"IkqiJlXJ7o9h61tCHHod"
Human-readable name for the schedule
"Business Hours Schedule"
User ID associated with the schedule
"IkqiJlXJ7o9h61tCHHod"
Schedule rules defining when the schedule is active
Show child attributes
[
{
"type": "wday",
"day": "monday",
"intervals": [{ "from": "09:00", "to": "17:00" }]
}
]Calendar IDs associated with the schedule
[
"WvVX9LpvlBO6K506xLbp",
"XyZ8MnQrStUvWxYzAbCdEf"
]Schedule created successfully
Show child attributes
Was this page helpful?