Skip to content

Creating websites

Method create.sites
Description Creating a website
Who has access Agent, Customer

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
domain_name string yes Website address on the internet. Without protocol - "http://" or "https://".
default_phone_number string yes Phone number, calls are forwarded to by default. A scenario with the number is made, the scenario's name should comply with the template "Call forwarding to phone_number".
default_scenario_id number no
Scenario ID. All the calls to the number will be processed according to the logic of the default scenario
user_id number no The ID of an agent's customer user who makes request
Is required for agent
To get a list of customer users, you need to use the method "get.customer_users"
industry_id number yes The industry the website belongs to.
1 Auto, moto
2 Audio, video, photo
3 Entertainment affiche
4 Business services
5 Household appliances
6 Dating
7 Internet technologies
8 Computers, office appliances
9 Beauty and wellbeing
10 Healthcare
11 Real estate
12 Clothing, accessories
13 Telecomminications
14 Construction, renovations
15 Transport
16 Tourism and leisure
17 Learning and education
18 Finance
19 Banks, loans
20 Insurance
21 Securities
target_call_min_duration number no Default value is "30". Minimal time after which a call is considered targeted. Value is in seconds.
track_subdomains_enabled boolean no false, true Default value is "true". Track website subdomains.
cookie_lifetime number no Default value is "90". Lifespan of a "cookie". Value is in days.
campaign_lifetime number no Default value is "90". Lifespan of an advertising campaign. Value is in days.
sales_enabled boolean no false, true Default value is "false". Whether or not sales should be taken into account.
second_communication_period number no 1-365 Default value is "1". Time period for return visit. Value is in days.
services_enabled boolean no false, true

Default value is "true". You can disable service for a specific website. When the service is disabled, all the services, such as call tracking and live support, are switched off and not working, except website statistics gathering.

replacement_dynamical_block_enabled boolean no false, true Replacing numbers in dynamical blocks. (Default value is False)
widget_link object no
When activating the option, a link appears in inquiry forms, chats and profile details. When a user clicks it, he or she is redirected to the specified URL.
enabled boolean yes
Link in widgets
text string yes
Text of the link (up to 100 symbols)
url string yes
URL
Show customer ID on the website
show_visitor_id object no Displaying visitor ID on the website and asking for it during phone call, you can connect visit data with a call. This will help you to find out comprehensive data about the callers (for example, which search queries led them).
enabled boolean yes false, true Default value is "false".
element_id_value string yes

For a visitor's ID to appear on the website, you need to specify the ID of an HTML element of the website. You also need to add a container with the ID data on the website's pages where you would place user ID (for example, <div id="callgearID"></div> .

)
message string no Defines text, that will be displayed alongside with a visitor's phone number on the website.
length_visitor_id number no from 1 to 20 Default value is 6. Visitor ID digits count.

Parameters of a reply

Title Type Required Description
id number yes Website unique ID

JSON request structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "method": "create.sites",
  "params": {
    "access_token": "string",
    "domain_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",
    "widget_link" : {
      "enabled": "boolean",
      "text": "string",
      "url": "string"
    },
    "show_visitor_id": {
      "enabled": "boolean",
      "element_id_value": "string",
      "message": "string",
      "length_visitor_id": "number"
    }
  }
}

JSON reply structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "id": "number",
    "success": "true"
  }
}

List of returning errors

Refer to the section "List of errors for the methods with the verb create"