# Template

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Template/

A template for new objects, as returned by
[GetTemplates](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTemplates/index.md).

- **Full name:** `MFiles.Template`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-title"></a>`title` | `string` | 1 | The title of the template file. |
| <a id="f-title_resource"></a>`title_resource` | `string` | 2 | The resource key for the title of the template file. It will be available only for blank template file. |
| <a id="f-file_template_id"></a>`file_template_id` | `string` | 3 | The file ID of the template file. It will be available only for blank templates. |
| <a id="f-obj_id"></a>`obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | 4 | The template object ID. It will be available only for User defined templates. |
| <a id="f-class_id"></a>`class_id` | `int32` | 5 | The class of the object version. For blank templates it will be always 0, For user defined templates the class id of the object will be available. |
| <a id="f-icon"></a>`icon` | `bytes` | 6 | The icon for the template file. Currently it is not carrying any data. It will be implemented in future. |
| <a id="f-restricted_to_classes"></a>`restricted_to_classes` | repeated `uint32` | 7 | The array of restrict to class IDs. Currently it is not carrying any data. It will be implemented in future. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCObjectOperations.GetTemplates](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTemplates/index.md): Gets the templates of an object type, optionally only those of one class or matching keywords.

<a id="used-in-fields"></a>

## Used in fields

- [`GetTemplatesResponse.templates`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetTemplates/index.md#response): Templates.
