Update Group by group ID
http
PUT https://services.leadconnectorhq.com/calendars/groups/{groupId}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 |
|---|---|---|---|---|
groupId | string | Yes | ocQHyuzHvysMo5N5VsXc | Group Id |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
name | string | Yes | group a | |
description | string | Yes | group description | |
slug | string | Yes | 15-mins |
Responses
200 - Successful response
group(object)locationId(string, required): Example:ocQHyuzHvysMo5N5VsXcname(string, required): Example:group adescription(string, required): Example:group descriptionslug(string, required): Example:15-minsisActive(boolean): Example:Trueid(string): Example:ocQHyuzHvysMo5N5VsXc
json
{
"group": {
"locationId": "ocQHyuzHvysMo5N5VsXc",
"name": "group a",
"description": "group description",
"slug": "15-mins",
"isActive": true,
"id": "ocQHyuzHvysMo5N5VsXc"
}
}400 - Bad Request
json
{}Example
curl -X PUT 'https://services.leadconnectorhq.com/calendars/groups/YOUR_groupId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "group a",
"description": "group description",
"slug": "15-mins"
}'const response = await fetch('https://services.leadconnectorhq.com/calendars/groups/YOUR_groupId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "group a", "description": "group description", "slug": "15-mins"}),
});
const data = await response.json();import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/calendars/groups/YOUR_groupId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "group a", "description": "group description", "slug": "15-mins"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/groups/YOUR_groupId');
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({'name': 'group a', 'description': 'group description', 'slug': '15-mins'}),
]);
$data = json_decode(curl_exec($ch), true);