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

# 列出 Identities

> 分页列出当前账号下的 Forward Identity。

`GET /api/v1/forward/identities`

返回当前鉴权账号拥有的 Identity 记录。

## 请求头

| Header        | 是否必填 | 说明             |
| ------------- | ---- | -------------- |
| Authorization | 是    | `Bearer <PAT>` |

## 查询参数

| 参数           | 类型      | 是否必填 | 默认值 | 说明                           |
| ------------ | ------- | ---- | --- | ---------------------------- |
| external\_id | string  | 否    | -   | 按集成方终端用户 ID 过滤。              |
| limit        | integer | 否    | 20  | 分页大小，最大 100；超过上限返回 HTTP 400。 |
| after\_id    | string  | 否    | -   | 向后翻页游标，不能与 `before_id` 同用。   |
| before\_id   | string  | 否    | -   | 向前翻页游标，不能与 `after_id` 同用。    |

## 示例请求

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/identities' \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "idn_019eabc123",
      "external_id": "user_456",
      "name": "Example User",
      "enabled": true,
      "metadata": {},
      "created_at": "2026-06-18T10:00:00Z",
      "updated_at": "2026-06-18T10:00:00Z"
    }
  ],
  "first_id": "idn_019eabc123",
  "last_id": "idn_019eabc123",
  "has_more": false
}
```

## 响应字段

| 字段        | 类型             | 说明                |
| --------- | -------------- | ----------------- |
| data      | array          | 当前页的 Identity 对象。 |
| first\_id | string \| null | 当前页第一条记录 ID。      |
| last\_id  | string \| null | 当前页最后一条记录 ID。     |
| has\_more | boolean        | 是否还有更多记录。         |

## 错误

| HTTP | Type                    | Code                      | 触发条件                   |
| ---- | ----------------------- | ------------------------- | ---------------------- |
| 400  | `invalid_request_error` | -                         | 分页参数不合法或 `limit` 超过上限。 |
| 401  | `authentication_error`  | `authentication_required` | PAT 无效或已过期。            |
| 403  | `permission_error`      | -                         | 当前调用方无权访问该资源。          |

## 注意事项

* `after_id` 和 `before_id` 不能同时传入。
* 软删除的 Identity 不应继续用于正常业务。

## 相关

<CardGroup cols={2}>
  <Card title="创建 Identity" icon="plus" href="/cloud-agents/api/forward/identities/create" />

  <Card title="获取 Identity" icon="file-lines" href="/cloud-agents/api/forward/identities/get" />
</CardGroup>
