> ## Documentation Index
> Fetch the complete documentation index at: https://docs.topify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 记录的 URL

> 管理用于提示词发现和推荐的项目 URL。

记录的 URL 是与项目关联、可用于 URL 驱动提示词发现的页面。记录 URL 本身不会创建提示词；如需生成候选提示词，请使用 URL 推荐端点。

## 列出记录的 URL

```http theme={null}
GET /projects/{project_id}/recording
```

```bash theme={null}
curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/recording" \
  -H "X-API-Key: tk_live_..."
```

### 响应

```json theme={null}
{
  "code": 200,
  "message": "200 OK",
  "data": {
    "project_id": "a1b2c3d4-...",
    "total": 1,
    "urls": [
      {
        "id": "e5f6a7b8-...",
        "url": "https://acme.com/pricing",
        "normalized_url": "https://acme.com/pricing",
        "title": "Pricing | Acme",
        "icon_urls": ["https://www.google.com/s2/favicons?domain=acme.com&sz=128"],
        "created_at": "2026-07-13T12:00:00+00:00"
      }
    ]
  }
}
```

***

## 添加记录的 URL

```http theme={null}
POST /projects/{project_id}/recording
```

一次最多添加 50 个 URL。若省略 `title`，Topify 会在后台获取标题。

### 请求体

| 字段             | 类型        | 必填 | 说明            |
| -------------- | --------- | -- | ------------- |
| `urls`         | object\[] | 是  | 1-50 个 URL 对象 |
| `urls[].url`   | string    | 是  | 页面 URL        |
| `urls[].title` | string    | 否  | 页面标题；省略时异步获取  |

```bash theme={null}
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/recording" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"urls":[{"url":"https://acme.com/pricing","title":"Pricing | Acme"}]}'
```

### 响应

```json theme={null}
{
  "code": 200,
  "message": "200 OK",
  "data": {
    "project_id": "a1b2c3d4-...",
    "affected_count": 1,
    "total_recorded": 4
  }
}
```

***

## 移除记录的 URL

```http theme={null}
DELETE /projects/{project_id}/recording
```

从记录列表中移除 URL。此操作不会删除提示词或提示词分析数据。

<Warning>
  仅发送需要移除的 URL。当前 API 密钥对整个团队拥有完整权限。
</Warning>

```bash theme={null}
curl -X DELETE "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/recording" \
  -H "X-API-Key: tk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://acme.com/pricing"]}'
```

响应使用与添加端点相同的 `affected_count` 和 `total_recorded` 字段。
