> ## 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.

# 获取 Identity Config

> 获取某个 Identity 与 Template 的用户级配置。

`GET /api/v1/forward/identities/{identity_id}/templates/{template_id}/config`

返回存储的 Forward Identity Config DSL；这是覆盖层，不是编译后的运行时配置。

## 请求头

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

## 路径参数

| 参数           | 类型     | 是否必填 | 说明                   |
| ------------ | ------ | ---- | -------------------- |
| identity\_id | string | 是    | Forward Identity ID。 |
| template\_id | string | 是    | Forward Template ID。 |

## 示例请求

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

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "type": "config",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "name": "CRM profile",
  "status": "active",
  "identity_config": {
    "system": {
      "mode": "append",
      "content": "Prefer CRM data when answering."
    },
    "skills": {
      "skill_customer_reply": {
        "enabled": true
      }
    }
  },
  "metadata": {},
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:00:00Z"
}
```

## 响应字段

| 字段               | 类型     | 说明            |
| ---------------- | ------ | ------------- |
| type             | string | 固定为 `config`。 |
| identity\_config | object | 存储的用户级覆盖 DSL。 |
| metadata         | object | 业务元数据。        |

## 错误

| HTTP | Type                   | Code                      | 触发条件                            |
| ---- | ---------------------- | ------------------------- | ------------------------------- |
| 404  | `not_found_error`      | -                         | Identity、Template 或 Config 不存在。 |
| 401  | `authentication_error` | `authentication_required` | PAT 无效或已过期。                     |

## 注意事项

* 要查看编译后的运行时配置，请使用 Get Effective Config。
* 资源 map 中的 `enabled=false` 会禁用从 Template 继承的资源。

## 相关

<CardGroup cols={2}>
  <Card title="创建或更新 Identity Config" icon="gear" href="/cloud-agents/api/forward/identities/upsert-config" />

  <Card title="获取 Effective Config" icon="layer-group" href="/cloud-agents/api/forward/identities/effective" />
</CardGroup>
