Creates a new custom menu for a company. Requires authentication and proper permissions. For Icon Usage Details please refer to https://doc.clickup.com/8631005/d/h/87cpx-243696/d60fa70db6b92b2
http
POST https://services.leadconnectorhq.com/custom-menus/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. |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
title | string | Yes | Custom Menu | Title of the custom menu |
url | string | Yes | https://custom-menus.com/ | URL of the custom menu |
icon | object | Yes | Icon information for the custom menu | |
showOnCompany | boolean | Yes | True | Whether the menu must be displayed on the agency's level |
showOnLocation | boolean | Yes | True | Whether the menu must be displayed for accounts level |
showToAllLocations | boolean | Yes | True | Whether the menu must be displayed to all accounts |
openMode | string | Yes | Mode for opening the menu link Possible values: 'iframe', 'new_tab', 'current_tab' | |
locations | string[] | No | List of account IDs where the menu should be shown. This list is applicable only when showOnLocation is true and showToAllLocations is false | |
userRole | string | Yes | Which user-roles should the menu be accessible to? Possible values: 'all', 'admin', 'user' | |
allowCamera | boolean | No | False | Whether to allow camera access (only for iframe mode) |
allowMicrophone | boolean | No | False | Whether to allow microphone access (only for iframe mode) |
Responses
400 - Bad Request - Invalid input
403 - Forbidden - Insufficient permissions
422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/custom-menus/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"title": "Custom Menu",
"url": "https://custom-menus.com/",
"showOnCompany": true,
"showOnLocation": true,
"showToAllLocations": true,
"openMode": "iframe",
"locations": [
"gfWreTIHL8pDbggBb7af",
"67WreTIHL8pDbggBb7ty"
],
"userRole": "all",
"allowCamera": false,
"allowMicrophone": false
}'const response = await fetch('https://services.leadconnectorhq.com/custom-menus/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/custom-menus/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/custom-menus/');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'title': 'Custom Menu', 'url': 'https://custom-menus.com/', 'showOnCompany': true, 'showOnLocation': true, 'showToAllLocations': true, 'openMode': 'iframe', 'locations': ['gfWreTIHL8pDbggBb7af', '67WreTIHL8pDbggBb7ty'], 'userRole': 'all', 'allowCamera': false, 'allowMicrophone': false}),
]);
$data = json_decode(curl_exec($ch), true);