Path: API › 网站管理

`POST /site`

创建网站流量统计规则。

## Request body

_Required._

- `request_time` (`action276.request_time`; string, required) — Unix 时间戳。
- `request_token` (`action276.request_token`; string, required) — 按 API 概览生成的签名。
- `action` (`action276.action`; string, required) — 具体操作名称。
  - one of `"create_flow_rule"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "create_flow_rule"
}
```

## Code samples

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

```bash
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=create_flow_rule"
```

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "msg": "创建成功"
}
```

- `status` (`action276.response.default.status`; boolean, optional) — 请求结果，`true` 表示成功
- `msg` (`action276.response.default.msg`; string, optional) — 提示信息


## create_flow_rule

创建网站流量统计规则。

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

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `create_flow_rule` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | 请求结果，`true` 表示成功 |
| msg | String | 提示信息 |

```json
{"status": true, "msg": "创建成功"}
```

## 相关接口

- [get_generated_flow_info](/api/site/get_generated_flow_info) — 查看流量统计

