Skip to content

Creates a site using CT 1.0.

Method create.sites
Description Creates a site using CT 1.0.
Who has access Agents and clients

Request parameters

Name Type Required Valid values Description
access_token string yes Access token used to authenticate the request.
domain_name string yes Site domain name, without the http:// or https:// protocol prefix.
name string no Site name displayed in the client area's site filter, overview report, and site list.
default_phone_number string yes Default phone number to which calls are forwarded. A scenario is created for this number and named using the pattern "Redirect to phone_number".
default_scenario_id number no Unique ID of the default scenario used to process calls to this number.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use get.customer_users.
industry_id number yes The industry associated with the site:
1 - Automotive and transportation
2 - Business and services
3 - Food and beverages
4 - Animals and pets
5 - Law and government
6 - Internet and telecommunications
7 - Computers and electronics
8 - Beauty and fitness
9 - Healthcare
10 - Real estate
11 - Accommodation and hotels
12 - Industry and manufacturing
13 - Travel and tourism
14 - Sports
15 - Construction and renovation
16 - Education
17 - Finance
18 - Hobbies and entertainment
19 - E-commerce and retail
target_call_min_duration number no Minimum duration, in seconds, after which a call is considered a target call. Default: 30.
track_subdomains_enabled boolean no false, true Whether to track the site's subdomains. Default: true.
cookie_lifetime number no Cookie lifetime, in days. Default: 90.
campaign_lifetime number no Advertising campaign lifetime, in days. Default: 90.
sales_enabled boolean no false, true Whether to include sales data. Default: false.
second_communication_period number no 1-365 Repeat communication period, in days. Default: 1.
services_enabled boolean no false, true Whether services are enabled for the site. When false, CallGear continues collecting site statistics, but services such as call tracking and online chat are disabled. Default: true.
replacement_dynamical_block_enabled boolean no false, true Whether to select numbers automatically for dynamically loaded blocks. Default: false.
widget_link object no Link displayed on offline message, chat, and personal data request forms. When clicked, the visitor is redirected to the specified URL.
enabled boolean yes Whether to display the link in widgets.
text string yes Link text. Maximum length: 100 characters.
url string yes Destination URL.
Visitor ID display
show_visitor_id object no Visitor ID display settings. Displaying a visitor ID on the site allows agents to ask callers for the ID and associate the call with the corresponding visit data, including search queries.
enabled boolean yes false, true Whether to display the visitor ID on the site. Default: false.
element_id_value string yes ID of the HTML element in which the visitor ID is displayed. Add an element with this ID to the site, for example: <div id="comagicID"></div>.
message string no Text displayed before the visitor ID.
length_visitor_id number no from 1 to 20 Number of digits in the visitor ID. Default: 6.

Response parameters

Name Type Required Description
id number yes Unique site ID.

Example request

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

Example response

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "data": {
      "id": "number"
    },
    "metadata": "object"
  }
}

Possible errors

See the "Errors for create methods" section.