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

# Get a template

> Forward テンプレートを ID で取得します。

`GET /api/v1/forward/templates/{template_id}`

エージェント設定とセッションのデフォルト値を含む、完全なテンプレートオブジェクトを返します。

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Path parameters

| Parameter     | Type   | Required | Description            |
| ------------- | ------ | -------- | ---------------------- |
| `template_id` | string | Yes      | Forward の Template ID。 |

## Example request

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

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "type": "template",
  "id": "tmpl_support",
  "name": "Support assistant",
  "description": "Handles pre-sales and after-sales support",
  "status": "active",
  "model": "ultimate",
  "system": "You are a helpful support assistant.",
  "tools": [],
  "mcp_servers": [],
  "skills": [],
  "multiagent": null,
  "environment_id": "env_support",
  "vault_ids": ["vault_crm"],
  "files": {},
  "environment_variables": {
    "BASE_MODE": "support"
  },
  "metadata": {},
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:00:00Z"
}
```

## Response fields

| Field            | Type   | Description              |
| ---------------- | ------ | ------------------------ |
| `type`           | string | 常に `template`。           |
| `id`             | string | Template ID。             |
| `name`           | string | テンプレート名。                 |
| `status`         | string | `active` または `archived`。 |
| `model`          | string | モデル識別子。                  |
| `system`         | string | システムプロンプト。               |
| `environment_id` | string | デフォルトの Environment ID。   |
| `metadata`       | object | カスタムメタデータ。               |

## Errors

| HTTP | Type                   | Trigger                       |
| ---- | ---------------------- | ----------------------------- |
| 401  | `authentication_error` | PAT が無効または期限切れ。               |
| 403  | `permission_error`     | このリソースへのアクセス権がない。             |
| 404  | `not_found_error`      | テンプレートが存在しない、または呼び出し元に表示されない。 |

## Notes

* アーカイブ済みのテンプレートも ID で取得できます。
* 実行時のみに存在する Qoder Cloud Agents のフィールドは、このレスポンスには追加されません。

## Related

<CardGroup cols={2}>
  <Card title="テンプレートの更新" icon="pencil" href="/cloud-agents/api/forward/templates/update" />

  <Card title="テンプレートのアーカイブ" icon="archive" href="/cloud-agents/api/forward/templates/archive" />
</CardGroup>
