Method update.sites
Description Website editing
Available to Agent, Client

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
id number yes Unique site identifier
domain_name string no Site address on the Internet. Without specifying the protocol - "http://" or "https://".
name string no Site name to display in the LC site filter, overview report and site list.
default_phone_number string yes Default phone number to which calls will be forwarded. A script with the specified number is created. The name of the script corresponds to the pattern "Redirect to phone_number".
default_scenario_id number no
Scenario ID All calls to this number will be processed according to the logic of the selected default scenario
user_id number no Unique user identifier of the agent client on behalf of which the request is made
Required for the agent
To obtain a list of client users, you must use the "get.customer_users" method
industry_id number yes The industry to which the site belongs.
1 Cars and transport. means
2 Business and services
3 Food and drinks
4 Animals
5 Law and government
6 Internet and communications
7 Computers and electronics
8 Beauty and fitness
9 Medicine
10 Real Estate
11 Accommodation and hotels
12 Industry
13 Travel and tourism
14 Sports
15 Construction, renovation
16 Study and education
17 Finance
18 Hobbies and entertainment
19 E-commerce and shopping
target_call_min_duration number no Default is "30". The minimum call time after which it is considered target. The value is specified in seconds.
track_subdomains_enabled boolean no false, true Default is "true". Track site subdomains.
cookie_lifetime number no The default is "90". Cookie lifetime. Time is specified in days.
campaign_lifetime number no The default is "90". Lifetime of an advertising company. Time is specified in days.
sales_enabled boolean no false, true Default is "false". Should sales be taken into account?
second_communication_period number no 1-365 Default "1". Re-application period. Specified in days.
services_enabled boolean no false, true

Default is "true". Ability to deactivate the service for one specific site. In the deactivated state, only site statistics are collected; all services (call tracking, online consultant) are disabled and do not work.

replacement_dynamical_block_enabled boolean no false, true Automatically select numbers in dynamically loaded blocks.
is_support_web_directory boolean No Site directory tracking
child_customer_id integer No Identifier of the client (branch) for which the site was created. Method for getting a list of clients: "get.customers"
is_block_robot_traffic boolean no Managing robot blocking on the site. If enabled, visits and robot activity are not tracked.
Link on widgets
widget_link object no
When the option is activated, a link will appear on the application, chat and personal data request forms, upon clicking on which the site visitor will be redirected to the specified URL.
enabled boolean yes
Link on widgets
text string yes
Link text (Maximum 100 characters)
urlstring yes
URL
Show visitor ID on the site
show_visitor_id object no By displaying the visitor ID on the site and finding it out from the visitor when they call, you can associate data about the visit with the call and thereby find out complete data about the callers (for example, what specific search queries are used by the visitors who call you).
enabled boolean yes false, true Default "false".
element_id_value string yes

In order for a visitor identifier to appear on the site, you must specify the identifier (id) of the site's HTML element in this field. Where the visitor ID is placed on the site pages, you need to add a container with this id (for example, <div id="comagicID"></div> .

)
message string no Sets the text that will be displayed before the visitor number on the site.
length_visitor_id number no from 1 to 20 Default 6. Number of digits of the visitor ID.

JSON request structure```json

{ "jsonrpc": "2.0", "id": "number", "method": "update.sites", "params": { "access_token": "string", "id": "number", "domain_name": "string", "name": "string", "default_phone_number": "string", "default_scenario_id": "number", "user_id": "number", "industry_id": "number", "target_call_min_duration": "number", "track_subdomains_enabled": "boolean", "cookie_lifetime": "number", "campaign_lifetime": "number", "sales_enabled": "boolean", "second_communication_period": "number", "services_enabled": "boolean", "replacement_dynamical_block_enabled" : "boolean", "is_block_robot_traffic" : "boolean", "widget_link" : { "enabled": "boolean", "text": "string", "url": "string" }, "show_visitor_id": { "enabled": "boolean", "element_id_value": "string", "message": "string", "length_visitor_id": "number" } } }

### JSON response structure```json
{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
      "data": {},
      "metadata": "object"
  }
}

List of returned errors

See the section "List of errors for methods with the update verb"