Install widget into account

This method allows installing the widget into the account.

Limitations
The method is available for administrators of the account only.

Request parameters

To install a widget, mandatory parameters based on the widget settings should be passed.

Available field types and their format are listed below.

ParameterData typeDescription
textstringValue for this type is passed as a regular string
passstringValue for this type is passed as a regular string
usersobjectAn object containing user ID as key and his extension number as value
users_lpobjectAn object containing user ID as key and an object with login and password as value
users_lp[login]objectUser login
users_lp[password]objectUser password

An example of the request
In the following example we’ll pass fields required to install the asterisk widget.
Fields “login” and “script_path” have the “text” type.
Field “password” has the “pass” type.
Field “phones” has the “users” type.

{
    "login": "example",
    "password": "eXaMp1E",
    "phones": {
        504141: "1039"    
    },
    "script_path": "https://example.com/"
}

Data type header when the request is successful
Content-Type: application/hal+json

Data type header in case of an error
Content-Type: application/problem+json

Response parameters

The method returns an object of the installed widget and its settings.

ParameterData typeDescription
idintWidget ID
codestringWidget code
versionstringWidget version
ratingstring|floatWidget rating (rating system doesn't exist on Kommo yet)
settings_templatearrayAn array of widget settings fields
settings_template[0]objWidget settings field
settings_template[key]stringField value key
settings_template[name]stringWidget settings field name
settings_template[type]stringWidget settings field data type (text, pass, custom, users, or users_lp)
settings_template[is_required]boolShows whether filling in the is mandatory
is_lead_sourceboolShows whether a widget can be set as a lead source
is_work_with_dpboolShows whether a widget is available in Digital Pipeline
is_crm_templateboolShows whether a widget is a CRM template
client_uuidstring|nullUUID of the widget’s oAuth integration
is_active_in_accountboolShows whether the widget is installed in the account
pipeline_idintPipeline ID where a widget is set as a lead source
settingsarrayWidget settings. The key is returned only when an integration requests its own settings
Path Params
string
required

Widget code

Body Params
json
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json