# Create a site host

Creates a host for a site.

Endpoint: POST /api/v1/sites/{siteId}/hosts
Version: v1
Security: Bearer

## Path parameters:

  - `siteId` (string, required)
    The identifier of the site.

## Query parameters:

  - `environmentId` (string)
    The identifier of the environment
    Example: "main"

## Request fields (application/json):

  - `name` (string, required)
    The name of the new host.
Example value: skate-park
    Example: "skate-park"

  - `hostnames` (array,null)
    One or more hostnames.
Example value: [
  "dev.skate-park.com",
  "uat.skate-park.com"
]
    Example: ["dev.skate-park.com","uat.skate-park.com"]

  - `targetHostname` (string,null)
    The target hostname.
Example value: www.skate-park.com
    Example: "www.skate-park.com"

  - `editingHost` (string,null)
    The rendering host.
Example value: Default
    Example: "Default"

  - `homePageId` (string,null)
    The identifier of the home page.
Example value: 110d559fdea542ea9c1c8a5df7e70ef9
    Example: "110d559fdea542ea9c1c8a5df7e70ef9"

  - `thumbnail` (string,null)
    The thumbnail information.

  - `analyticsIdentifiers` (array,null)
    The list of analytics tracker identifiers mapped to the host, per language.

  - `analyticsIdentifiers.language` (string, required)
    The language for the analytics identifier.
Example value: en
    Example: "en"

  - `analyticsIdentifiers.name` (string, required)
    The name of the analytics identifier.
Example value: skate-park
    Example: "skate-park"

  - `settings` (object,null)
    The host settings collection.

  - `languageSettings` (object)
    The language settings of the host.

  - `languageSettings.defaultLanguage` (string,null)
    The default language.
Example value: en
    Example: "en"

  - `languageSettings.languageEmbedding` (boolean,null)
    Whether language embedding is enabled.
Example value: False

  - `languageSettings.itemLanguageFallback` (boolean,null)
    Whether item language fallback is enabled.
Example value: False

  - `languageSettings.fieldLanguageFallback` (boolean,null)
    Whether field language fallback is enabled.
Example value: False

  - `renderingHost` (string,null)
    The rendering host.
Example value: Default
    Example: "Default"

## Response 201 fields (application/json):

  - `id` (string,null)
    The host ID.
Example value: 5aae1eeaea2440bf96f11f43da82c77b
    Example: "5aae1eeaea2440bf96f11f43da82c77b"

  - `name` (string,null)
    The name of the site host.
Example value: skate-park
    Example: "skate-park"

  - `hostnames` (array,null)
    One or more hostnames.
Example value: [
  "dev.skate-park.com",
  "uat.skate-park.com"
]
    Example: ["dev.skate-park.com","uat.skate-park.com"]

  - `targetHostname` (string,null)
    The target hostname.
Example value: www.skate-park.com
    Example: "www.skate-park.com"

  - `homePageId` (string,null)
    The identifier of the home page.
Example value: 5aae1eeaea2440bf96f11f43da82c77b
    Example: "5aae1eeaea2440bf96f11f43da82c77b"

  - `renderingHost` (object)
    The rendering host response entity.

  - `renderingHost.id` (string,null)
    The rendering host ID.
Example value: 5aae1eeaea2440bf96f11f43da82c77b
    Example: "5aae1eeaea2440bf96f11f43da82c77b"

  - `renderingHost.name` (string,null)
    The name of the rendering host.
Example value: Default
    Example: "Default"

  - `renderingHost.appName` (string,null)
    The name of the app.
Example value: Default
    Example: "Default"

  - `renderingHost.layoutServiceConfiguration` (string,null)
    The server side rendering engine configuration URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config"

  - `renderingHost.serverSideRenderingEngineEndpointUrl` (string,null)
    The server side rendering engine endpoint URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render"

  - `renderingHost.serverSideRenderingEngineApplicationUrl` (string,null)
    The server side rendering engine application URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io/
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io/"

  - `editingHost` (object)
    The editing host response entity.

  - `editingHost.id` (string,null)
    The editing host ID.
Example value: 5aae1eeaea2440bf96f11f43da82c77b
    Example: "5aae1eeaea2440bf96f11f43da82c77b"

  - `editingHost.name` (string,null)
    The name of the editing host.
Example value: Default
    Example: "Default"

  - `editingHost.appName` (string,null)
    The name of the app.
Example value: Default
    Example: "Default"

  - `editingHost.layoutServiceConfiguration` (string,null)
    The server side rendering engine configuration URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/config"

  - `editingHost.serverSideRenderingEngineEndpointUrl` (string,null)
    The server side rendering engine endpoint URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io:443/api/editing/render"

  - `editingHost.serverSideRenderingEngineApplicationUrl` (string,null)
    The server side rendering engine application URL.
Example value: https://xmc-eh-uniqueid.sitecorecloud.io/
    Example: "https://xmc-eh-uniqueid.sitecorecloud.io/"

  - `permissions` (object)
    The access rights of the current user to the site.

  - `permissions.canAdmin` (boolean)
    Whether the current user has admin rights. Being an admin means that you control access permissions for other users, and have full read and write rights.
Example value: False

  - `permissions.canWrite` (boolean)
    Whether the current user has permissions to edit values. Users with write access also have read access.
Example value: False

  - `permissions.canCreate` (boolean)
    Whether the current user has permission to create entities.
Example value: False

  - `permissions.canDelete` (boolean)
    Whether the current user has permission to delete entities.
Example value: False

  - `permissions.canRename` (boolean)
    Whether the current user has permission to rename entities.
Example value: False

  - `permissions.canRead` (boolean)
    Whether the current user has permission to see entities, including all their parameters.
Example value: False

  - `permissions.canPublish` (boolean)
    Whether the current user has permission to publish sites in this environment.
Example value: False

  - `permissions.canDuplicate` (boolean)
    Whether the current user has permission to duplicate entities.
Example value: False

  - `permissions.canWriteLanguage` (boolean)
    Whether the current user has permission to write item language entities.
Example value: False

  - `settings` (object,null)
    The host settings collection.
    Example: {"isSiteThumbnailSource":"true","sxaLinkable":"false"}

  - `properties` (object,null)
    Readonly host properties collection.
    Example: {"siteDefinitionID":"{9004989A-E482-4587-B5C5-F9AECCD43565}","startItem":"/Home"}

  - `analyticsIdentifiers` (object,null)
    The list of analytics tracker identifiers mapped to the host, per language.
Example value: [
  {
    "name": "skate-park",
    "language": "en-US"
  }
]
    Example: [{"name":"skate-park","language":"en-US"}]

  - `languageSettings` (object)
    The language settings of the host.

  - `languageSettings.defaultLanguage` (string,null)
    The default language.
Example value: en
    Example: "en"

  - `languageSettings.languageEmbedding` (boolean,null)
    Whether language embedding is enabled.
Example value: False

  - `languageSettings.itemLanguageFallback` (boolean,null)
    Whether item language fallback is enabled.
Example value: False

  - `languageSettings.fieldLanguageFallback` (boolean,null)
    Whether field language fallback is enabled.
Example value: False

  - `created` (string,null)
    The date when the host was created.
Example value: 2019-08-24T14:15:22Z
    Example: "2019-08-24T14:15:22Z"

  - `createdBy` (string,null)
    The ID of the user who created the host.
Example value: L6kfw52ZVf
    Example: "L6kfw52ZVf"

## Response 400 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 409 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.


