Associates a calendar with the given schedule by adding the calendarId to a schedule
http
PUT https://services.leadconnectorhq.com/calendars/schedules/{id}/associations/{calendarId}Authorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
id | string | Yes | IkqiJlXJ7o9h61tCHHod | Unique identifier of the schedule |
calendarId | string | Yes | WvVX9LpvlBO6K506xLbp | Unique identifier of the team calendar to add to the schedule |
Responses
200 - Calendar successfully added to schedule
success(boolean): Example:True
json
{
"success": true
}400 - Schedule and calendar must belong to the same account
json
{}401 - User not authenticated
json
{}404 - Schedule or calendar not found
json
{}Example
curl -X PUT 'https://services.leadconnectorhq.com/calendars/schedules/YOUR_id/associations/YOUR_calendarId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/calendars/schedules/YOUR_id/associations/YOUR_calendarId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/calendars/schedules/YOUR_id/associations/YOUR_calendarId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/schedules/YOUR_id/associations/YOUR_calendarId');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);