# Domain Templates

This API allows you to store predefined templates at the domain level and use them to send messages using the Sending API.

 - [GET /v3/{domain_name}/templates](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/get-v3--domain-name--templates.md): Returns a list of templates for the domain.
 - [POST /v3/{domain_name}/templates](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/post-v3--domain-name--templates.md): Store a new template, including its name, description and (optionally) the template content. If the template content is provided, a new version is automatically created and becomes the active version.
 - [DELETE /v3/{domain_name}/templates](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/delete-v3--domain-name--templates.md): Delete all templates and their versions for the domain.
 - [GET /v3/{domain_name}/templates/{template_name}/versions](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/get-v3--domain-name--templates--template-name--versions.md): Returns a paginated list of template versions.
 - [POST /v3/{domain_name}/templates/{template_name}/versions](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/post-v3--domain-name--templates--template-name--versions.md): Adds a new template version. If the template doesn’t contain any other versions, the first version becomes active. A template can store up to 40 versions.
 - [GET /v3/{domain_name}/templates/{template_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/get-v3--domain-name--templates--template-name-.md): Returns metadata information about the stored template specified in the url. If the active flag is provided, the content of the active version of the template is returned. If the version_name flag is
 - [PUT /v3/{domain_name}/templates/{template_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/put-v3--domain-name--templates--template-name-.md): Update the description of a template.
 - [DELETE /v3/{domain_name}/templates/{template_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/delete-v3--domain-name--templates--template-name-.md): Delete the template specified in the url. NOTE: This method deletes all versions of the specified template.
 - [GET /v3/{domain_name}/templates/{template_name}/versions/{version_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/get-v3--domain-name--templates--template-name--versions--version-name-.md): Retrieve the information and content of the specified version of a template.
 - [PUT /v3/{domain_name}/templates/{template_name}/versions/{version_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/put-v3--domain-name--templates--template-name--versions--version-name-.md): Update information or content of the specific template version. Existing fields not included in the request will not be changed
 - [DELETE /v3/{domain_name}/templates/{template_name}/versions/{version_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/delete-v3--domain-name--templates--template-name--versions--version-name-.md): Delete a specific template version.
 - [PUT /v3/{domain_name}/templates/{template_name}/copy](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/put-v3--domain-name--templates--template-name--copy.md): Copies an existing template into new templates with the provided names and account IDs.
 - [PUT /v3/{domain_name}/templates/{template_name}/versions/{version_name}/copy/{new_version_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/put-v3--domain-name--templates--template-name--versions--version-name--copy--new-version-name-.md): Copies an existing version into a new version with the provided name.
 - [PUT /v3/{domain_name}/templates/{template_name}/rename/{new_template_name}](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-templates/put-v3--domain-name--templates--template-name--rename--new-template-name-.md): Renames the specified template
