cURL
curl -L 'https://api.box.com/2.0/docgen_templates' \
-H 'box-version: 2025.0' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-D '{
"file": {
"id": "12345678",
"type": "file"
}
}'client.docgen_template.create_docgen_template_v2025_r0(FileReferenceV2025R0(id=file.id))await client.docgenTemplate.createDocgenTemplateV2025R0({
file: new FileReferenceV2025R0({ id: file.id }),
} satisfies DocGenTemplateCreateRequestV2025R0);try await client.docgenTemplate.createDocgenTemplateV2025R0(requestBody: DocGenTemplateCreateRequestV2025R0(file: FileReferenceV2025R0(id: file.id)))client.getDocgenTemplate().createDocgenTemplateV2025R0(new DocGenTemplateCreateRequestV2025R0(new FileReferenceV2025R0(file.getId())))await client.DocgenTemplate.CreateDocgenTemplateV2025R0Async(requestBody: new DocGenTemplateCreateRequestV2025R0(file: new FileReferenceV2025R0(id: file.Id)));{
"file": {
"type": "file",
"id": "42037322"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}Box Doc Genテンプレート
Box Doc Genテンプレートを作成
ファイルをBox Doc Genテンプレートとして設定します。
POST
/
docgen_templates
cURL
curl -L 'https://api.box.com/2.0/docgen_templates' \
-H 'box-version: 2025.0' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-D '{
"file": {
"id": "12345678",
"type": "file"
}
}'client.docgen_template.create_docgen_template_v2025_r0(FileReferenceV2025R0(id=file.id))await client.docgenTemplate.createDocgenTemplateV2025R0({
file: new FileReferenceV2025R0({ id: file.id }),
} satisfies DocGenTemplateCreateRequestV2025R0);try await client.docgenTemplate.createDocgenTemplateV2025R0(requestBody: DocGenTemplateCreateRequestV2025R0(file: FileReferenceV2025R0(id: file.id)))client.getDocgenTemplate().createDocgenTemplateV2025R0(new DocGenTemplateCreateRequestV2025R0(new FileReferenceV2025R0(file.getId())))await client.DocgenTemplate.CreateDocgenTemplateV2025R0Async(requestBody: new DocGenTemplateCreateRequestV2025R0(file: new FileReferenceV2025R0(id: file.Id)));{
"file": {
"type": "file",
"id": "42037322"
}
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}「Box SDKのバージョニング戦略について詳しく学ぶ。」
承認
The access token received from the authorization server in the OAuth 2.0 flow.
ヘッダー
Version header.
利用可能なオプション:
2025.0 ボディ
application/json
指定されたファイルをBox Doc Genテンプレートとして設定します。
ドキュメントをBox Doc Genテンプレートとして設定するためのスキーマ。
ドキュメントを生成するためのBox Doc Genテンプレートとしてファイルを設定します。
Show child attributes
Show child attributes
レスポンス
現在Box Doc Genテンプレートとして設定されているファイル。
他のリソース内にネストされたときに使用されるBox Doc GenテンプレートのBase版の表示。
ドキュメントの生成元となるファイルを有効にします。
Show child attributes
Show child attributes
最終更新日 2026年1月23日
このページは役に立ちましたか?
⌘I
