Create Calendar
Create calendar in a location.
POST
/
calendars
Create Calendar
curl --request POST \
--url https://services.leadconnectorhq.com/calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"isActive": true,
"notifications": [
{
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"isPrimary": true,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
],
"slotDuration": 30,
"slotInterval": 30,
"slotBuffer": 123,
"preBuffer": 123,
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [
3
],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": false,
"recurring": {
"count": 23
},
"formId": "<string>",
"stickyContact": true,
"isLivePaymentMode": true,
"autoConfirm": true,
"shouldSendAlertEmailsToAssignedMember": true,
"alertEmail": "<string>",
"googleInvitationEmails": false,
"allowReschedule": true,
"allowCancellation": true,
"shouldAssignContactToTeamMember": true,
"shouldSkipAssigningContactForExisting": true,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": false
}
],
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 'ocQHyuzHvysMo5N5VsXc',
name: 'test calendar',
isActive: true,
notifications: [
{
shouldSendToContact: true,
shouldSendToGuest: true,
shouldSendToUser: true,
shouldSendToSelectedUsers: true,
selectedUsers: 'user1@testemail.com,user2@testemail.com',
type: 'email'
}
],
groupId: 'BqTwX8QFwXzpegMve9EQ',
teamMembers: [
{
userId: 'ocQHyuzHvysMo5N5VsXc',
priority: 0.5,
isPrimary: true,
locationConfigurations: [{kind: 'custom', location: '+14455550132'}]
}
],
eventType: 'RoundRobin_OptimizeForAvailability',
description: 'this is used for testing',
slug: 'test1',
widgetSlug: 'test1',
widgetType: 'classic',
eventTitle: '{{contact.name}}',
eventColor: '#039be5',
locationConfigurations: [{kind: 'custom', location: '+14455550132'}],
slotDuration: 30,
slotInterval: 30,
slotBuffer: 123,
preBuffer: 123,
appoinmentPerSlot: 1,
appoinmentPerDay: 123,
allowBookingAfter: 123,
allowBookingAfterUnit: 'days',
allowBookingFor: 123,
allowBookingForUnit: 'days',
openHours: [
{
daysOfTheWeek: [3],
hours: [{openHour: 11.5, openMinute: 30, closeHour: 11.5, closeMinute: 30}]
}
],
enableRecurring: false,
recurring: {count: 23},
formId: '<string>',
stickyContact: true,
isLivePaymentMode: true,
autoConfirm: true,
shouldSendAlertEmailsToAssignedMember: true,
alertEmail: '<string>',
googleInvitationEmails: false,
allowReschedule: true,
allowCancellation: true,
shouldAssignContactToTeamMember: true,
shouldSkipAssigningContactForExisting: true,
notes: '<string>',
pixelId: '<string>',
formSubmitType: 'ThankYouMessage',
formSubmitRedirectURL: '<string>',
formSubmitThanksMessage: '<string>',
availabilities: [
{
date: '2023-09-24T00:00:00.000Z',
hours: [{openHour: 11.5, openMinute: 30, closeHour: 11.5, closeMinute: 30}],
deleted: false
}
],
consentLabel: '<string>',
calendarCoverImage: 'https://path-to-image.com'
})
};
fetch('https://services.leadconnectorhq.com/calendars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars"
payload = {
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"isActive": True,
"notifications": [
{
"shouldSendToContact": True,
"shouldSendToGuest": True,
"shouldSendToUser": True,
"shouldSendToSelectedUsers": True,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"isPrimary": True,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
],
"slotDuration": 30,
"slotInterval": 30,
"slotBuffer": 123,
"preBuffer": 123,
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [3],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": False,
"recurring": { "count": 23 },
"formId": "<string>",
"stickyContact": True,
"isLivePaymentMode": True,
"autoConfirm": True,
"shouldSendAlertEmailsToAssignedMember": True,
"alertEmail": "<string>",
"googleInvitationEmails": False,
"allowReschedule": True,
"allowCancellation": True,
"shouldAssignContactToTeamMember": True,
"shouldSkipAssigningContactForExisting": True,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": False
}
],
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"calendar": {
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"id": "0TkCdp9PfvLeWKYRRvIz",
"isActive": true,
"notifications": [
{
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"meetingLocationType": "custom",
"meetingLocation": "<string>",
"isPrimary": true,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132",
"meetingId": "my_conference_id"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"calendarType": "round_robin",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"meetingLocation": "<string>",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132",
"meetingId": "my_conference_id"
}
],
"slotDuration": 30,
"slotDurationUnit": "mins",
"slotInterval": 30,
"slotIntervalUnit": "mins",
"slotBuffer": 123,
"slotBufferUnit": "mins",
"preBuffer": 123,
"preBufferUnit": "mins",
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [
3
],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": false,
"recurring": {
"freq": "DAILY",
"count": 23,
"bookingOption": "skip",
"bookingOverlapDefaultStatus": "confirmed"
},
"formId": "<string>",
"stickyContact": true,
"isLivePaymentMode": true,
"autoConfirm": true,
"shouldSendAlertEmailsToAssignedMember": true,
"alertEmail": "<string>",
"googleInvitationEmails": false,
"allowReschedule": true,
"allowCancellation": true,
"shouldAssignContactToTeamMember": true,
"shouldSkipAssigningContactForExisting": true,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilityType": 0,
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": false
}
],
"guestType": "count_only",
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com",
"lookBusyConfig": {
"enabled": true,
"LookBusyPercentage": 123
}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}Authorizations
Body
application/json
Last modified on March 8, 2026
Was this page helpful?
Create Calendar
curl --request POST \
--url https://services.leadconnectorhq.com/calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"isActive": true,
"notifications": [
{
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"isPrimary": true,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
],
"slotDuration": 30,
"slotInterval": 30,
"slotBuffer": 123,
"preBuffer": 123,
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [
3
],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": false,
"recurring": {
"count": 23
},
"formId": "<string>",
"stickyContact": true,
"isLivePaymentMode": true,
"autoConfirm": true,
"shouldSendAlertEmailsToAssignedMember": true,
"alertEmail": "<string>",
"googleInvitationEmails": false,
"allowReschedule": true,
"allowCancellation": true,
"shouldAssignContactToTeamMember": true,
"shouldSkipAssigningContactForExisting": true,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": false
}
],
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 'ocQHyuzHvysMo5N5VsXc',
name: 'test calendar',
isActive: true,
notifications: [
{
shouldSendToContact: true,
shouldSendToGuest: true,
shouldSendToUser: true,
shouldSendToSelectedUsers: true,
selectedUsers: 'user1@testemail.com,user2@testemail.com',
type: 'email'
}
],
groupId: 'BqTwX8QFwXzpegMve9EQ',
teamMembers: [
{
userId: 'ocQHyuzHvysMo5N5VsXc',
priority: 0.5,
isPrimary: true,
locationConfigurations: [{kind: 'custom', location: '+14455550132'}]
}
],
eventType: 'RoundRobin_OptimizeForAvailability',
description: 'this is used for testing',
slug: 'test1',
widgetSlug: 'test1',
widgetType: 'classic',
eventTitle: '{{contact.name}}',
eventColor: '#039be5',
locationConfigurations: [{kind: 'custom', location: '+14455550132'}],
slotDuration: 30,
slotInterval: 30,
slotBuffer: 123,
preBuffer: 123,
appoinmentPerSlot: 1,
appoinmentPerDay: 123,
allowBookingAfter: 123,
allowBookingAfterUnit: 'days',
allowBookingFor: 123,
allowBookingForUnit: 'days',
openHours: [
{
daysOfTheWeek: [3],
hours: [{openHour: 11.5, openMinute: 30, closeHour: 11.5, closeMinute: 30}]
}
],
enableRecurring: false,
recurring: {count: 23},
formId: '<string>',
stickyContact: true,
isLivePaymentMode: true,
autoConfirm: true,
shouldSendAlertEmailsToAssignedMember: true,
alertEmail: '<string>',
googleInvitationEmails: false,
allowReschedule: true,
allowCancellation: true,
shouldAssignContactToTeamMember: true,
shouldSkipAssigningContactForExisting: true,
notes: '<string>',
pixelId: '<string>',
formSubmitType: 'ThankYouMessage',
formSubmitRedirectURL: '<string>',
formSubmitThanksMessage: '<string>',
availabilities: [
{
date: '2023-09-24T00:00:00.000Z',
hours: [{openHour: 11.5, openMinute: 30, closeHour: 11.5, closeMinute: 30}],
deleted: false
}
],
consentLabel: '<string>',
calendarCoverImage: 'https://path-to-image.com'
})
};
fetch('https://services.leadconnectorhq.com/calendars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars"
payload = {
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"isActive": True,
"notifications": [
{
"shouldSendToContact": True,
"shouldSendToGuest": True,
"shouldSendToUser": True,
"shouldSendToSelectedUsers": True,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"isPrimary": True,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132"
}
],
"slotDuration": 30,
"slotInterval": 30,
"slotBuffer": 123,
"preBuffer": 123,
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [3],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": False,
"recurring": { "count": 23 },
"formId": "<string>",
"stickyContact": True,
"isLivePaymentMode": True,
"autoConfirm": True,
"shouldSendAlertEmailsToAssignedMember": True,
"alertEmail": "<string>",
"googleInvitationEmails": False,
"allowReschedule": True,
"allowCancellation": True,
"shouldAssignContactToTeamMember": True,
"shouldSkipAssigningContactForExisting": True,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": False
}
],
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"calendar": {
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "test calendar",
"id": "0TkCdp9PfvLeWKYRRvIz",
"isActive": true,
"notifications": [
{
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com",
"type": "email"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"meetingLocationType": "custom",
"meetingLocation": "<string>",
"isPrimary": true,
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132",
"meetingId": "my_conference_id"
}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"calendarType": "round_robin",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"meetingLocation": "<string>",
"locationConfigurations": [
{
"kind": "custom",
"location": "+14455550132",
"meetingId": "my_conference_id"
}
],
"slotDuration": 30,
"slotDurationUnit": "mins",
"slotInterval": 30,
"slotIntervalUnit": "mins",
"slotBuffer": 123,
"slotBufferUnit": "mins",
"preBuffer": 123,
"preBufferUnit": "mins",
"appoinmentPerSlot": 1,
"appoinmentPerDay": 123,
"allowBookingAfter": 123,
"allowBookingAfterUnit": "days",
"allowBookingFor": 123,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [
3
],
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
]
}
],
"enableRecurring": false,
"recurring": {
"freq": "DAILY",
"count": 23,
"bookingOption": "skip",
"bookingOverlapDefaultStatus": "confirmed"
},
"formId": "<string>",
"stickyContact": true,
"isLivePaymentMode": true,
"autoConfirm": true,
"shouldSendAlertEmailsToAssignedMember": true,
"alertEmail": "<string>",
"googleInvitationEmails": false,
"allowReschedule": true,
"allowCancellation": true,
"shouldAssignContactToTeamMember": true,
"shouldSkipAssigningContactForExisting": true,
"notes": "<string>",
"pixelId": "<string>",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "<string>",
"formSubmitThanksMessage": "<string>",
"availabilityType": 0,
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{
"openHour": 11.5,
"openMinute": 30,
"closeHour": 11.5,
"closeMinute": 30
}
],
"deleted": false
}
],
"guestType": "count_only",
"consentLabel": "<string>",
"calendarCoverImage": "https://path-to-image.com",
"lookBusyConfig": {
"enabled": true,
"LookBusyPercentage": 123
}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}