Box Developer Documentation
Latest version

Create a Box Doc Gen template

post
https://api.box.com/2.0
/docgen_templates

Marks a file as a Box Doc Gen template.

Request

bearer [ACCESS_TOKEN]
application/json

Request Headers

stringin headerrequired

Version header

Value is always 2025.0

Request Body

objectin body

Marks the file as a Box Doc Gen template to generate the document from.

stringin bodyrequired
"42037322"

ID of the object

stringin bodyrequired
"file"

file

Value is always file

Response

The file which has now been marked as a Box Doc Gen template.

application/jsonClient error

The server cannot or will not process the request due to an apparent client error.

application/jsonClient error

The client does not have access rights to the content or resource requested.

application/jsonClient error

The user has sent too many requests in a given amount of time.

application/jsonClient error

An unexpected condition was encountered on the server.

post
Create a Box Doc Gen template
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

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"
        }
}'

Response Example

{
  "file": {
    "id": "42037322",
    "type": "file"
  }
}