跳转到主要内容
GET /api/v1/forward/templates 返回 Template 基线列表;归档 Template 仅在按状态请求时返回。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

查询参数

参数类型是否必填默认值说明
statusstring-activearchived 过滤。
limitinteger20分页大小,最大 100。
after_idstring-向后翻页游标,不能与 before_id 同用。
before_idstring-向前翻页游标,不能与 after_id 同用。

示例请求

curl -s -X GET 'https://api.qoder.com/api/v1/forward/templates' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "type": "template",
      "id": "tmpl_support",
      "name": "Support assistant",
      "description": "Handles customer support requests",
      "status": "active",
      "created_at": "2026-06-18T10:00:00Z",
      "updated_at": "2026-06-18T10:00:00Z"
    }
  ],
  "first_id": "tmpl_support",
  "last_id": "tmpl_support",
  "has_more": false
}

响应字段

字段类型说明
dataarray当前页的 Template 摘要列表。
first_idstring | null当前页第一条记录 ID。
last_idstring | null当前页最后一条记录 ID。
has_moreboolean是否还有更多记录。

错误

HTTPTypeCode触发条件
400invalid_request_error-分页参数不合法或 limit 超过上限。
401authentication_errorauthentication_requiredPAT 无效或已过期。
403permission_error-当前调用方无权访问该资源。

注意事项

  • 结果只包含当前鉴权账号可见的 Template。
  • after_idbefore_id 不能同时传入。

相关

创建 Template

获取 Template