> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create new site

> Create new site with given parameters



## OpenAPI

````yaml /automation.api.json post /sites
openapi: 3.0.3
info:
  title: OpenAPI definition for automation API
  version: 1.0.0
servers:
  - url: https://api.kameleoon.com
security: []
tags:
  - description: >-
      This is an object representing a Kameleoon account. You can retrieve it to
      view its properties, such as its current email address or locale. With
      proper authorization, your application can read and update an account and
      profile settings.<aside class="notice"> The API does not expose all
      settings. See the API reference for details. </aside>
    name: Account
  - description: >-
      Feature flag helps our clients implement new features, test and deploy
      them via our SDK. This service allows you to create and configure the
      feature flag that your source code uses.
    name: Feature flag
  - description: >
      You can use your account to set up multiple websites. This is helpful if
      you want to test your website and its mobile version or if you want to try
      Kameleoon on your site in a pre-production environment. It allows you to
      create different testing environments.
    name: Site
  - description: >-
      Custom data is an advanced tool that lets you target your customers in a
      unique way using data that already exists, such as user account
      information.
    name: Custom data
  - description: >-
      Experiment is an A/B test which can target a specific audience or any
      other audience. Kameleoon has several types of experiments: `Classic`,
      `Multivariate test (MVT)`, `Server-side` and the one that suits the best
      can achieve the best results.
    name: Experiment
  - description: >-
      To measure the efficiency of an experiment or a personalization, it must
      link to one or several goals. The Kameleoon interface or Automation API
      can manage all goals. There are variety of different goals you can choose
      from to better measure the results.
    name: Goal
  - description: This is an object representing an image
    name: Image
  - description: >-
      This is an object representing a key moment. Please note that Kameleoon
      has now renamed `KeyMoment` to `Triggers`.
    name: Key moment
  - description: >-
      Key page allows you to target visitors that have visited a particular
      page, or multiple pages on your website.
    name: Key page
  - description: >
      Web personalization tailors the experience for each visitor to improve
      your conversion rate.

      The personalization object contains all vital information about a
      personalization as well as segments and variations used in it.
    name: Personalization
  - description: This is an object representing a projectThemeConfig
    name: Project theme config
  - description: This is an object representing a recommender block
    name: Recommender block
  - description: >
      Referrer is an advanced tool that allows you to target visitors according
      to acquisition methods that lead them to your website.

      Kameleoon automatically creates 5 default channels: `Bing`, `Baidu`,
      `Google`, `Yahoo` and `Google Adwords`.
    name: Referrer
  - description: >-
      Segmenting allows you to effectively target visitors. You can create,
      modify, and duplicate segments using the Segment Builder tool in
      Kameleoon’s backend or through our Automation API.
    name: Segment
  - description: This is an object representing studio recommender block
    name: Studio recommender block
  - description: This is an object representing tag
    name: Tag
  - description: >-
      Represents an object aggregating the main information about an experiment
      result.
    name: Takeaway
  - description: This is an object representing a takeaway comment.
    name: Takeaway comment
  - description: >-
      A targeting rule is a system entity that combines segments (user groups)
      and triggers (activation conditions) to define precise targeting rules for
      experiments.
    name: Targeting rule
  - description: This is an object representing a theme
    name: Theme
  - description: >-
      A variation is a modified version of your webpage that you can edit for
      experiments or personalization.

      When you add a new variation, Kameleoon creates a copy of the original
      page from which you started. Kameleoon saves all changes in the variation,
      which will include all your edits when the test starts.
    name: Variation
  - description: This is an object representing a widget
    name: Widget
  - description: This is an object representing a widget studio
    name: Widget studio
  - description: This is an object representing widget studio template
    name: Widget studio template
  - description: Widget template setting API
    name: Widget template setting
  - name: Data
    description: >
      Web personalization involves offering visitors a tailored experience to
      optimize your conversion rate.

      A personalization object contains information about a personalization, as
      well as the segments and variations used in it.
  - name: Goal campaign
    description: >-
      Retrieve experiments that use a specific goal, optionally filtered by
      whether that goal had a positive, negative, or neutral impact on the
      experiment. Results are paginated using cursor-based pagination.
  - name: Data API request stats
    description: Traffic statistics for requests sent to the Kameleoon Data API.
  - name: Audience
    description: >-
      Audience refers to statistical information regarding the number of visits,
      conversions, and other metrics related to a specific segment. Use these
      statistics to understand your website's audience and adjust your segments.
  - name: Raw Export
    description: >-
      Start a raw data exportation for experiment or personalization, which will
      be sent to the given emails.
paths:
  /sites:
    post:
      tags:
        - Site
      summary: Create new site
      description: Create new site with given parameters
      operationId: create-site
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Site'
        required: true
      responses:
        '201':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Site'
          description: Created
        '400':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseObject'
          description: Bad Request
        '403':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseObject'
          description: Forbidden
        '423':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseObject'
          description: Locked
        '500':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseObject'
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    Site:
      type: object
      properties:
        abtestConsent:
          type: string
          enum:
            - 'OFF'
            - REQUIRED
            - IABTCF
        applicationFileUrl:
          type: string
          description: >-
            URL for self-hosted kameleoon.js file. If the request omits the URL,
            Kameleoon loads kameleoon.js by default URL -
            SITE_CODE.kameleoon.eu/kameleoon.js
        audienceConfig:
          $ref: '#/components/schemas/AudienceConfig'
          description: Audience configuration.
        behaviorWhenTimeout:
          type: string
          description: >-
            Behavior if timeout occurs. You can redefine the behavior of
            Kameleoon Application when the script exceeds the usual loading
            time. By default, the application will eventually launch, but with a
            flicker effect.
          enum:
            - RUN
            - DISABLE_FOR_PAGE
            - DISABLE_FOR_VISIT
        captureEventMethod:
          type: string
          enum:
            - CLICK
            - MOUSEDOWN
            - MOUSEUP
        code:
          type: string
          description: System generated code to uniquely identify a website.
          readOnly: true
        currency:
          type: string
          enum:
            - USD
            - EUR
            - JPY
            - GBP
            - CNY
            - AUD
            - CAD
            - CHF
            - HKD
            - SGD
            - SEK
            - KRW
            - NOK
            - NZD
            - INR
            - MXN
            - TWD
            - ZAR
            - BRL
            - DKK
            - PLN
            - THB
            - ILS
            - IDR
            - CZK
            - AED
            - TRY
            - HUF
            - CLP
            - SAR
            - PHP
            - MYR
            - COP
            - RUB
            - RON
            - PEN
            - BHD
            - BGN
            - ARS
            - KWD
        customAttributes:
          type: string
        customSelectors:
          type: array
          items:
            type: string
        dataStorage:
          type: string
          description: >-
            This option allows you to choose the source where you can store the
            data of your A/B tests on the visitor's device.
          enum:
            - STANDARD_COOKIE
            - LOCAL_STORAGE
            - CUSTOM_COOKIE
        dateCreated:
          type: string
          format: date-time
          description: Date of site creation.
          readOnly: true
        description:
          type: string
          description: Website description.
          maxLength: 255
          minLength: 0
        domainNames:
          type: array
          items:
            type: string
        experimentConfig:
          $ref: '#/components/schemas/ExperimentConfig'
          description: Configuration of an experiment.
        id:
          type: integer
          format: int64
          description: Unique ID of the website.
          readOnly: true
        imagesUrl:
          type: string
          description: >-
            URL for self-hosted images. If the request omits the URL, Kameleoon
            loads images by default URL - SITE_CODE.kameleoon.eu/images/
        indicators:
          type: array
          description: >-
            List of indicators such as: Retention rate, number of pages seen and
            dwell time.
          items:
            type: string
            enum:
              - RETENTION_RATE
              - NUMBER_OF_PAGES_SEEN
              - DWELL_TIME
        isAudienceUsed:
          type: boolean
          description: Indicates if the website enables and uses the audience feature.
        isKameleoonEnabled:
          type: boolean
          description: Indicates if the website enables the Kameleoon application.
        isScriptActive:
          type: boolean
          description: >-
            Indicates if a user installed the script successfully and the script
            is active on the website.
        kameleoonDomain:
          type: string
        lastScriptRebuildDate:
          type: string
          format: date-time
          description: Date last rebuild Script.
        lastScriptRebuildStatus:
          type: string
          description: Status last rebuild Script.
          enum:
            - SUCCESS
            - FAILURE
        name:
          type: string
          description: Name of the website.
          maxLength: 30
          minLength: 0
        personalizationConfig:
          $ref: '#/components/schemas/PersonalizationConfig'
          description: Configuration of a personalization.
        realTimeConfigUpdate:
          type: boolean
          description: Can SDK receive the configuration in real-time.
        recommendationSecretKey:
          type: string
          description: Product recommendation secret key.
        recommendationStoreKey:
          type: string
          description: Product recommendation store key.
        responsiveMobile:
          type: boolean
        shadowDom:
          type: boolean
          description: ShadowDOM option.
        tags:
          type: array
          description: List of tags associated with the website.
          items:
            type: string
        trackingScript:
          type: string
          description: >-
            Global custom script is any JavaScript code that you add which
            executes at each page load. This custom script executes right after
            the loading of Kameleoon application. For instance, you can add
            complex tracking code or integration to some third party solutions
            in this section.
        type:
          type: string
          description: Project type.
          enum:
            - SITE
            - SITE_JS
            - SITE_SDK
            - APPLICATION
        url:
          type: string
          description: URL of the website.
        wideDomain:
          type: string
          deprecated: true
          description: Deprecated, use kameleoonDomain instead
        widgetFonts:
          type: array
          description: Widget fonts for site.
          items:
            $ref: '#/components/schemas/WidgetFont'
      required:
        - url
    ResponseObject:
      type: object
      properties:
        code:
          type: string
        impersonator:
          type: string
        message:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - SUCCESS
            - ERROR
        sub:
          type: string
        time:
          type: integer
          format: int64
        timestamp:
          type: string
          format: date-time
    AudienceConfig:
      type: object
      properties:
        cartAmountGoal:
          type: integer
          format: int64
          description: Goal to which the value of a customer's basket links
        cartAmountValue:
          type: integer
          format: int64
          description: Conversion value linked to the primary goal
        dateCreated:
          type: string
          format: date-time
          description: Audience configuration creation date
        excludedConfigurationUrlList:
          type: array
          description: URLS to exclude from your recommendations
          items:
            $ref: '#/components/schemas/AudienceConfigUrl'
        excludedCustomData:
          type: array
          description: Personalized data to exclude from your recommendations
          items:
            type: integer
            format: int64
        excludedExperimentList:
          type: array
          description: A/B tests to exclude from your recommendations
          items:
            type: integer
            format: int64
        excludedGoalList:
          type: array
          description: Goals to exclude from your recommendations
          items:
            type: integer
            format: int64
        excludedPersonalizationList:
          type: array
          description: Personalizations to exclude from your recommendations
          items:
            type: integer
            format: int64
        excludedTargetingSegmentList:
          type: array
          description: Segments to exclude from your recommendations
          items:
            type: integer
            format: int64
        excludedTargetingTypeList:
          type: array
          description: Targeting criteria to exclude from your recommendations
          items:
            type: string
            enum:
              - PAGE_URL
              - PAGE_TITLE
              - LANDING_PAGE
              - ORIGIN
              - ORIGIN_TYPE
              - REFERRERS
              - NEW_VISITORS
              - BROWSER_LANGUAGE
              - GEOLOCATION
              - DEVICE_TYPE
              - SCREEN_DIMENSION
              - VISITOR_IP
              - AD_BLOCKER
              - PREVIOUS_PAGE
              - KEY_PAGES
              - PAGE_VIEWS
              - FIRST_VISIT
              - LAST_VISIT
              - ACTIVE_SESSION
              - TIME_SINCE_PAGE_LOAD
              - SAME_DAY_VISITS
              - VISITS
              - VISITS_BY_PAGE
              - INTERNAL_SEARCH_KEYWORDS
              - TABS_ON_SITE
              - HEAT_SLICE
              - SKY_STATUS
              - TEMPERATURE
              - DAY_NIGHT
              - FORECAST_SKY_STATUS
              - FORECAST_TEMPERATURE
              - DAY_OF_WEEK
              - TIME_RANGE
              - HOUR_MINUTE_RANGE
              - JS_CODE
              - COOKIE
              - EVENT
              - EXPLICIT_TRIGGER
              - BROWSER
              - OPERATING_SYSTEM
              - DOM_ELEMENT
              - MOUSE_OUT
              - TARGET_EXPERIMENT
              - TARGET_PERSONALIZATION
              - EXCLUSIVE_EXPERIMENT
              - CONVERSIONS
              - CUSTOM_DATUM
              - YSANCE_SEGMENT
              - YSANCE_ATTRIBUT
              - TEALIUM_BADGE
              - TEALIUM_AUDIENCE
              - PRICE_OF_DISPLAYED_PAGE
              - NUMBER_OF_VISITED_PAGES
              - VISITED_PAGES
              - SEGMENT
              - KEY_MOMENT
              - CUSTOM
              - SDK_LANGUAGE
              - VISITOR_CODE
              - TARGET_FEATURE_FLAG
              - APPLICATION_VERSION
        id:
          type: integer
          format: int64
          description: Unique ID of the audience configuration
          readOnly: true
        ignoreURLSettings:
          type: boolean
          description: Ignore the settings in the URL of your pages
        includedConfigurationUrlList:
          type: array
          description: Primary URLs you want to optimize
          items:
            $ref: '#/components/schemas/AudienceConfigUrl'
        includedCustomData:
          type: array
          description: Personalized data to prioritize in your recommendations
          items:
            type: integer
            format: int64
        includedExperimentList:
          type: array
          description: A/B tests to prioritize in your recommendations
          items:
            type: integer
            format: int64
        includedPersonalizationList:
          type: array
          description: Personalizations to prioritize in your recommendations
          items:
            type: integer
            format: int64
        includedTargetingSegmentList:
          type: array
          description: >-
            Additional segments to track. Kameleoon tracks predictive segments
            by default
          items:
            type: integer
            format: int64
        includedTargetingTypeList:
          type: array
          description: The 3 targeting criteria to prioritize in your recommendations
          items:
            type: string
            enum:
              - PAGE_URL
              - PAGE_TITLE
              - LANDING_PAGE
              - ORIGIN
              - ORIGIN_TYPE
              - REFERRERS
              - NEW_VISITORS
              - BROWSER_LANGUAGE
              - GEOLOCATION
              - DEVICE_TYPE
              - SCREEN_DIMENSION
              - VISITOR_IP
              - AD_BLOCKER
              - PREVIOUS_PAGE
              - KEY_PAGES
              - PAGE_VIEWS
              - FIRST_VISIT
              - LAST_VISIT
              - ACTIVE_SESSION
              - TIME_SINCE_PAGE_LOAD
              - SAME_DAY_VISITS
              - VISITS
              - VISITS_BY_PAGE
              - INTERNAL_SEARCH_KEYWORDS
              - TABS_ON_SITE
              - HEAT_SLICE
              - SKY_STATUS
              - TEMPERATURE
              - DAY_NIGHT
              - FORECAST_SKY_STATUS
              - FORECAST_TEMPERATURE
              - DAY_OF_WEEK
              - TIME_RANGE
              - HOUR_MINUTE_RANGE
              - JS_CODE
              - COOKIE
              - EVENT
              - EXPLICIT_TRIGGER
              - BROWSER
              - OPERATING_SYSTEM
              - DOM_ELEMENT
              - MOUSE_OUT
              - TARGET_EXPERIMENT
              - TARGET_PERSONALIZATION
              - EXCLUSIVE_EXPERIMENT
              - CONVERSIONS
              - CUSTOM_DATUM
              - YSANCE_SEGMENT
              - YSANCE_ATTRIBUT
              - TEALIUM_BADGE
              - TEALIUM_AUDIENCE
              - PRICE_OF_DISPLAYED_PAGE
              - NUMBER_OF_VISITED_PAGES
              - VISITED_PAGES
              - SEGMENT
              - KEY_MOMENT
              - CUSTOM
              - SDK_LANGUAGE
              - VISITOR_CODE
              - TARGET_FEATURE_FLAG
              - APPLICATION_VERSION
        mainGoal:
          type: integer
          format: int64
          description: >-
            Primary goal. It must correspond to the main conversion action of
            the site
        siteType:
          type: string
          description: Typology of the website
          enum:
            - ECOMMERCE
            - MEDIA
            - OTHER
      required:
        - mainGoal
    ExperimentConfig:
      type: object
      properties:
        abtestConsent:
          type: string
          enum:
            - 'OFF'
            - REQUIRED
            - IABTCF
        abtestConsentOptout:
          type: string
          enum:
            - RUN
            - BLOCK
        beforeAbtestConsent:
          type: string
          enum:
            - NONE
            - PARTIALLY
            - ALL
        customVariationSelectionScript:
          type: string
          description: >-
            Variation Selection Script: By default, a random mechanism handles
            the assignment of a variation for an experiment to a visitor. You
            can customize this behavior by writing JavaScript code here. This
            code must return the ID of the assigned variation (see the developer
            documentation for more details).
        isEditorLaunchedByShortcut:
          type: boolean
          description: >-
            Enables graphic editor launching through `shift + F2` keyboard
            shortcut.
        isKameleoonReportingEnabled:
          type: boolean
          description: >-
            Result reporting. Activate Kameleoon’s reporting to view test
            results
        minWiningReliability:
          type: integer
          format: int32
          description: >-
            Level of reliability needed to determine the winning variation of an
            experiment. Reliability of the variations is inferior to the rate
            determined in setup. You should not consider the variations as
            winning in your test results, regardless of the number of
            conversions for these variations. Be cautious when changing this
            parameter, as it impacts the results Kameleoon provides.
    PersonalizationConfig:
      type: object
      properties:
        beforePersonalizationConsent:
          type: string
          enum:
            - NONE
            - PARTIALLY
            - ALL
        isSameJqueryInjectionAllowed:
          type: boolean
          description: >-
            Allow the injection of jQuery. By default, Kameleoon allows you to
            display multiple personalization of the same type on a single page
            (for example, two pop-ups or two images in the same location). To
            disable this feature, turn on the toggle option.
        isSameTypePersonalizationEnabled:
          type: boolean
          description: >-
            Advanced options. By default, Kameleoon allows you to display
            multiple personalization of the same type on a single page (for
            example, two pop-ups or two images in the same location). To disable
            this feature, turn on the toggle option.
        personalizationConsent:
          type: string
          enum:
            - 'OFF'
            - REQUIRED
            - IABTCF
        personalizationConsentOptout:
          type: string
          enum:
            - RUN
            - BLOCK
        personalizationsDeviation:
          type: number
          format: double
          description: >-
            Include visitors. Percentage of your visitors included in
            personalizations. You can define a visitor rate that Kameleoon will
            hide from your personalizations. Additionally, Kameleoon recommends
            keeping a hidden sample population to determine the efficiency of
            your personalizations.
    WidgetFont:
      type: object
      properties:
        fontFamily:
          type: string
        fontSrc:
          type: string
        fontWeights:
          type: array
          items:
            type: string
        id:
          type: string
        importSrc:
          type: string
    AudienceConfigUrl:
      type: object
      properties:
        matchType:
          type: string
          enum:
            - EXACT
            - CONTAINS
            - REGULAR_EXPRESSION
            - TARGETED_URL
        url:
          type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````