Path: API › 网站管理

`POST /site`

启动（启用）已停止的网站。

## Request body

_Required._

- `action270.request_time` (string, required) — Unix 时间戳。
- `action270.request_token` (string, required) — 按 API 概览生成的签名。
- `action270.action` (string, required) — 具体操作名称。
  - one of `"SiteStart"`
- `action270.id` (integer, required) — 网站 ID
- `action270.name` (string, required) — 网站域名

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "SiteStart",
  "id": 0,
  "name": "string"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/site" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=SiteStart" \
  --data-urlencode "id=<id>" \
  --data-urlencode "name=<name>"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "status": true,
  "msg": "站点已启用"
}
```

- `action270.response.default.status` (boolean, optional) — `true` 启用成功
- `action270.response.default.msg` (string, optional) — `站点已启用`


## SiteStart

启动（启用）已停止的网站。

- **路由**：`POST /site`
- **action**：`SiteStart`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `SiteStart` |
| id | 是 | Integer | 网站 ID |
| name | 是 | String | 网站域名 |

> `id` 和 `name` 必须同时传入。

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 启用成功 |
| msg | String | `站点已启用` |

## 示例

### 请求

```
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=SiteStart&id=1&name=testapi.bt.local
```

### 响应

```json
{"status": true, "msg": "站点已启用"}
```

## 相关接口

- [SiteStop](/api/site/sitestop) — 停用网站

