Developer Function: API: Site Operation: Create Site
## Overview
You can use the API to create a website.
## Supported Versions
Pleasanter 1.3.4.0 and later
## Preparation
Please [Create an API Key](/manual/api-key) before performing API operations. Also, this function can only be performed by the tenant administrator, so please set up the tenant administrator from user management.
## Request
Send json data in the following request format:
|Setting item|Value|
|:--|:--|
|HTTP Method|POST|
|Content-Type |application/json|
|Character Code|UTF-8|
|URL|http://{server name}/api/items/{parent site ID}/createsite (*1)|
|Body|Refer to the json data below|
(*1) Please edit the {server name} and {parent site ID} parts to suit your environment as appropriate.
For pleasanter.net, the format is as follows:
https\://pleasanter.net/fs/api/items/{parent site ID}/createsite
For {parent site ID}, specify the parent site for which the site is to be created.
##### JSON
```
{
"ApiVersion": "1.1",
"ApiKey": "345yuAjA6789dA09d8uj6...",
"TenantId": 1,
"Title": "Site name",
"ReferenceType": "Issues",
"InheritPermission": 99999,
"SiteSettings": {
"Version": 1.017,
"ReferenceType": "Issues",
"GridColumns": [
"IssueId",
"TitleBody",
"Comments",
"StartTime",
"CompletionTime",
"WorkValue",
"ProgressRate",
"RemainingWorkValue",
"Status",
"Manager",
"Owner",
"Updator",
"UpdatedTime"
],
"EditorColumnHash": {
"General": [
"IssueId",
"Ver",
"Title",
"Body",
"StartTime",
"CompletionTime",
"WorkValue",
"ProgressRate",
"RemainingWorkValue",
"Status",
"Manager",
"Owner",
"Comments"
]
}
}
}
```
*For the parameters after TenantID, please set the same value as the "Site" parameter when exporting the site package.
The following example creates a Wiki.
##### JSON
```json
{
"ApiVersion": 1.1,
"ApiKey": "345yuAjA6789dA09d8uj6...",
"Title": "Wiki test",
"ReferenceType": "Wikis",
"ParentId": 1,
"InheritPermission": 1,
"SiteSettings": {
"ReferenceType": "Wikis"
}
}
```
Please refer to the following manual for how to use it in scripts.
[Developer Function: Scripts: $p.apiCreateSite](/manual/script-api-create-site)