**Source URL:** https://limited.veevavault.dev/medical/vault-api/api-reference/17.3/documents/document-templates/create-document-template.md

# Create Document Template



Upload one document template. To upload multiple document templates, see [Bulk Create Document Templates](/vault-api/api-reference/17.3/documents/document-templates/bulk-create-document-templates).

<Endpoint path="/api/{version}/objects/documents/templates" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `multipart/form-data` |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## File Upload {#file-upload}

To upload the file, use the multi-part attachment with the file component `"file={file_name}"`. The maximum allowed file size is 4GB.

## Body Parameters {#body-parameters}

When creating document templates, the following fields are required in all Vaults:

<FieldTable>
| Name | Description |
| --- | --- |
| `name__v` | The name of the new document template. If not included, Vault will use the specified `label__v` value to generate a value for the `name__v` field. |
| `label__v` | The label of the new document template. This is the name users will see among the available binder templates in the UI. |
| `type__v` | The name of the document type to which the template will be associated. |
| `subtype__v` | The name of the document subtype to which the template will be associated. This is only required if associating the template with a document subtype. |
| `classification__v` | The name of the document classification to which the template will be associated. This is only required if associating the template with a document classification. |
| `active__v` | Set to true or false to indicate whether or not the new document template should be set to active, i.e., available for selection when creating a document. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-H "Accept: text/csv" \
-F "file=Promo Ad Template.docx" \
-F "label__v=Promo Ad Template" \
-F "type__v=promotional_piece__c" \
-F "subtype__v=advertisement__c" \
-F "classification__v=print__c" \
-F "active__v=true" \
https://myvault.veevavault.com/api/v15.0/objects/documents/templates

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
responseStatus,name,errors
SUCCESS,promo_ad_template__c,

```
</CodeExample>

## Response Details {#response-details}

* The input format is set to `multipart/form-data` (name-value pair with file upload).

* The response format is set to `text/csv`.

* The path/name of the document template source file on the [FTP staging server](/vault-api/guides/file-staging) is specified.

* The `name__v` field is not included. Vault will use the specified `label__v` field value to create the `name__v=promo_ad_template__c`

* The `label__v` field specifies the document template label "Promo Ad Template". This is what users will see among the available templates in the UI.

* The document `type__v`, `subtype__v`, and `classification__v` are all specified. This template is being created for documents of `classification__v=print__c`.

* The template is being set to `active__v=true`. It will be available for selection when creating a new document.

On SUCCESS, Vault returns the name of the new document template.



---

**Previous:** [Download Document Template File](/medical/vault-api/api-reference/17.3/documents/document-templates/download-document-template-file)  
**Next:** [Bulk Create Document Templates](/medical/vault-api/api-reference/17.3/documents/document-templates/bulk-create-document-templates)