Developer Features: Server Script: items.NewSite
## Overview
Create a new instance of the "apiModel object" for the "「Site」" in the "「Server Script」".
## Syntax
```
items.NewSite(referenceType)
```
## Parameters
|Parameter|Type|Required|Description|
|:----------|:----------|:---:|:---------------------------|
|referenceType|string|Yes|Specify the site type. <br>"Sites": Site<br>"Issues": Time-limited Table<br>"Results": Recorded Table<br>"Wikis": Wiki<br>"DashBoard": Dashboard|
## Return Value
Returns the "apiModel object" of the "「Site」".
## Usage Example 1
In the example below, a "「Folder」" named "Pleasanter" will be created on the top page (site ID 0).
##### JavaScript
```
let siteId = 0;
let item = items.NewSite("Sites");
item.Title = 'Pleasanter';
items.Create(siteId, item);
context.Log(item.SiteId); // Output ID of the created site
```
## Usage Example 2
In the example below, we create a "Time-limited Table" named "Issue Management" on site ID 2. Use items.Create.
##### JavaScript
```
let siteId = 2;
let item = items.NewSite("Issues");
item.Title = 'Issue Management';
item.SiteSettings = {};
items.Create(siteId, item);
context.Log(item.SiteId); // Output ID of the created site
```
## Usage Example 3
In the example below, we create a "Recorded Table" named "Customer Management" on site ID 2. Use apiModel.Create.
##### JavaScript
```
let siteId = 2;
let apiModel= items.NewSite("Results");
apiModel.Title = 'Customer Management';
apiModel.SiteSettings = {};
apiModel.Create(siteId);
context.Log(apiModel.SiteId); // Output ID of the created site
```
## Related Information
<div id="ManualList">
<article class="s-blog_list_unit"><h2>
<h2>The specified information was not found.</h2>
<p><a href="/ja/manual">Return to top</a></p>
</article>
</div><input id="SearchTextHidden" type="hidden" value="" />