# 用戶參數

## 新增用戶身上的參數

在您的伺服器呼叫 BotBonnie 用戶標籤 API：

```
POST https://api.botbonnie.com/v1/api/user/params
```

### **Request headers**

| Name              | Description          |
| ----------------- | -------------------- |
| **Content-Type**  | application/json     |
| **Authorization** | Bearer `{API Token}` |

### **Request body**

| Name              | Type   | Description                  | Required |
| ----------------- | ------ | ---------------------------- | -------- |
| **bot\_raw\_uid** | String | 用戶 ID                        | o        |
| **bot\_id**       | String | 機器人 ID                       | o        |
| **bot\_pid**      | String | 粉絲頁 ID                       | o        |
| **bot\_channel**  | Number | 渠道代號   `0`：Facebook `1`：LINE | o        |
| **params**        | Object | 參數物件，範例如下                    | o        |

### Params 範例物件

#### 新增或修改參數值

```javascript
{
    "gender": "male" // 範例：新增或修改性別參數，值為 male
}
```

```javascript
{
    "gender": {
        "value": "male"
    } // 範例: 使用 object 來新增或修改性別參數值
}
```

## 刪除用戶身上的參數

在您的伺服器呼叫 BotBonnie 用戶標籤 API：

```
DELETE https://api.botbonnie.com/v1/api/user/params
```

### **Request headers**

| Name              | Description          |
| ----------------- | -------------------- |
| **Content-Type**  | application/json     |
| **Authorization** | Bearer `{API Token}` |

### **Request body**

| Name              | Type   | Description                  | Required |
| ----------------- | ------ | ---------------------------- | -------- |
| **bot\_raw\_uid** | String | 用戶 ID                        | o        |
| **bot\_id**       | String | 機器人 ID                       | o        |
| **bot\_pid**      | String | 粉絲頁 ID                       | o        |
| **bot\_channel**  | Number | 渠道代號   `0`：Facebook `1`：LINE | o        |
| **params**        | Object | 參數物件，範例如下                    | o        |

### Params 範例物件

```javascript
{
    "gender": {
        "groupId": ""
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.botbonnie.com/jiao-xue-fan-li/user-params.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
