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

# ドキュメントテンプレート

> 個人用・共有テンプレートを作成し、指定したセクションだけを更新する方法です。

個人用テンプレートを作成するには、ユーザー資格情報と `note_document_template:write` スコープで `create_document_template` を呼び出します。作成時に共有するには、書き込み可能なワークスペースの `workspaceGuid` を指定します。ワークスペースに紐付くユーザーキーでは、既定でそのワークスペースに作成されます。組み込みテンプレートは読み取り専用です。

```json theme={"system"}
{
  "title": "週次会議",
  "sections": [
    {
      "title": "決定事項",
      "sectionType": "PLAIN_TEXT",
      "userInstruction": "決定事項をまとめてください。"
    }
  ]
}
```

簡潔な一覧を取得するには、`list_document_templates` に `{"pagination":{"size":20}}` を渡します。次のページでは、返された `nextCursor` を `pagination.cursor` に指定します。null は最終ページを示します。引数なしで呼ぶと、従来どおりセクションと件数が返ります。

## セクションの取得と更新

返された `templateId` で `get_document_template` を呼び出すと、各セクションの ID と表示順を取得できます。取得には `note_document_template:read` が必要です。OAuth 接続で作成・更新・削除を行うには、新しい書き込みスコープに同意してください。

`update_document_template` では更新するフィールドだけを送信します。既存のセクションは ID を指定し、ID を省略すると追加されます。削除するには `id` と `delete: true` だけを送信してください。省略したセクションやフィールドは保持されます。セクション数は1～100、テンプレート名とセクション名は120文字までです。明示的な null は 400 になります。

```json theme={"system"}
{
  "templateId": 42,
  "sections": [
    {
      "id": 7,
      "title": "合意事項"
    }
  ]
}
```

削除を確認してから、`templateId` を指定して `delete_document_template` を呼び出します。削除後の取得は 404 になります。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.