Update Event notification by id
http
PUT https://services.leadconnectorhq.com/calendars/{calendarId}/notifications/{notificationId}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 |
|---|---|---|---|---|
calendarId | string | Yes | ||
notificationId | string | Yes |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
receiverType | string | No | Notification recipient type Possible values: 'contact', 'guest', 'assignedUser', 'emails', 'phoneNumbers', 'business' | |
additionalEmailIds | string[] | No | Additional email addresses to receive notifications. | |
additionalPhoneNumbers | string[] | No | Additional phone numbers to receive notifications. | |
selectedUsers | string[] | No | Selected users for in-App and business email notifications. Supports user IDs and special keyword "sub_account_admin" | |
channel | string | No | Notification channel Possible values: 'email', 'inApp', 'sms', 'whatsapp' | |
notificationType | string | No | Notification type Possible values: 'booked', 'confirmation', 'cancellation', 'reminder', 'followup', 'reschedule' | |
isActive | boolean | No | Is the notification active | |
deleted | boolean | No | Marks the notification as deleted (soft delete) | |
templateId | string | No | Template ID for email notification | |
body | string | No | Body for email notification. Not necessary for in-App notification | |
subject | string | No | Subject for email notification. Not necessary for in-App notification |
afterTime(object[]): Specifies the time after which the follow-up notification should be sent. This is not required for other notification types.timeOffset(number)unit(string)
beforeTime(object[]): Specifies the time before which the reminder notification should be sent. This is not required for other notification types.timeOffset(number)unit(string)
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
fromAddress | string | No | From address for email notification | |
fromNumber | string | No | from number for sms notification | |
fromName | string | No | From name for email/sms notification |
Responses
200 - Successful response
message(string, required): Result of delete/update operation
json
{
"message": "string"
}400 - Bad Request
json
{}Example
curl -X PUT 'https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"receiverType": "contact",
"additionalEmailIds": [
"example1@email.com",
"example2@email.com"
],
"additionalPhoneNumbers": [
"+919876744444",
"+919876744445"
],
"selectedUsers": [
"userId1",
"userId2",
"sub_account_admin"
],
"channel": "email",
"notificationType": "booked",
"isActive": true,
"deleted": false,
"templateId": "string",
"body": "string",
"subject": "string",
"afterTime": [
{
"timeOffset": 1,
"unit": "hours"
}
],
"beforeTime": [
{
"timeOffset": 1,
"unit": "hours"
}
],
"fromAddress": "string",
"fromNumber": "string",
"fromName": "string"
}'const response = await fetch('https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"receiverType": "contact", "additionalEmailIds": ["example1@email.com", "example2@email.com"], "additionalPhoneNumbers": ["+919876744444", "+919876744445"], "selectedUsers": ["userId1", "userId2", "sub_account_admin"], "channel": "email", "notificationType": "booked", "isActive": true, "deleted": false, "templateId": "string", "body": "string", "subject": "string", "afterTime": [{"timeOffset": 1, "unit": "hours"}], "beforeTime": [{"timeOffset": 1, "unit": "hours"}], "fromAddress": "string", "fromNumber": "string", "fromName": "string"}),
});
const data = await response.json();import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"receiverType": "contact", "additionalEmailIds": ["example1@email.com", "example2@email.com"], "additionalPhoneNumbers": ["+919876744444", "+919876744445"], "selectedUsers": ["userId1", "userId2", "sub_account_admin"], "channel": "email", "notificationType": "booked", "isActive": true, "deleted": false, "templateId": "string", "body": "string", "subject": "string", "afterTime": [{"timeOffset": 1, "unit": "hours"}], "beforeTime": [{"timeOffset": 1, "unit": "hours"}], "fromAddress": "string", "fromNumber": "string", "fromName": "string"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'receiverType': 'contact', 'additionalEmailIds': ['example1@email.com', 'example2@email.com'], 'additionalPhoneNumbers': ['+919876744444', '+919876744445'], 'selectedUsers': ['userId1', 'userId2', 'sub_account_admin'], 'channel': 'email', 'notificationType': 'booked', 'isActive': true, 'deleted': false, 'templateId': 'string', 'body': 'string', 'subject': 'string', 'afterTime': [{'timeOffset': 1, 'unit': 'hours'}], 'beforeTime': [{'timeOffset': 1, 'unit': 'hours'}], 'fromAddress': 'string', 'fromNumber': 'string', 'fromName': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);