# Submit user feedback

Submit product feedback explicitly requested by the user as their authenticated account. Saves a text message in the existing website feedback conversation and notifies the team. Never submit automatically or include credentials. Returns the saved message id and createdAt; after an uncertain response, read feedback.list before retrying to avoid duplicates.

- Capability ID: `feedback.create`
- Operation: `ielts_feedback_create`
- Category: 消息与反馈
- Endpoint: `POST /api/v1/agent/capabilities/ielts_feedback_create`
- Authentication: Bearer Token（通过 /api/v1/agent-bindings 绑定账号）
- Required scopes: feedback:write
- Side effect: write
- Human documentation: https://ieltsbuddy.igopx.cn/developers/api/ielts_feedback_create

## Request parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `content` | string | 是 | User-authorized feedback text. Describe the issue, expected behavior and reproduction steps; exclude tokens, passwords and unrelated private data. |
| `pagePath` | string | 否 | Optional affected IELTS Buddy page path, without credentials or sensitive query parameters. |

## Request example

```bash
curl -X POST \
  'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_feedback_create' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $IELTS_BUDDY_TOKEN" \
  --data '{"content":"<content>"}'
```

## Request schema

```json
{
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000,
      "description": "User-authorized feedback text. Describe the issue, expected behavior and reproduction steps; exclude tokens, passwords and unrelated private data."
    },
    "pagePath": {
      "description": "Optional affected IELTS Buddy page path, without credentials or sensitive query parameters.",
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "content"
  ],
  "additionalProperties": false
}
```

## Response envelope

Saved feedback receipt in the authenticated user's existing message conversation.

- Text only, up to 2,000 characters. The server derives the sender from the Agent Token; no userId is accepted.
- This write is not idempotent. Read feedback.list before retrying after a timeout.

```json
{
  "code": 0,
  "data": {
    "id": 123,
    "createdAt": "2026-09-09T00:00:00.000Z"
  },
  "message": "ok"
}
```

## Response data schema

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "createdAt"
  ]
}
```

## Errors

| HTTP | Code | Meaning |
| --- | --- | --- |
| 400 | `40001` | 请求参数不符合接口契约 |
| 401 | `40101` | 缺少或使用了无效的访问令牌 |
| 403 | `40301` | 访问令牌不包含接口所需权限 |
| 404 | `40401` | 接口或目标资源不存在 |
