# Save an existing configuration as a reusable template Saves the specified configuration as a template for future reuse across deployments. ## Endpoints **POST** `/dcapi/configuration/{collectionId}/saveAsTemplate` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/configuration/{collectionId}/saveAsTemplate` ## Scope `DesktopCentralCloud.Configurations.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** `string` — **Mandatory** - `application/collnTemplateDetails.v1+json` ### Path Parameters - **collectionId** `string` — **Mandatory` - The unique numeric identifier of the configuration to be saved as a reusable template. Fetch from [Get Configurations View](https://www.manageengine.com/products/desktop-central/help/api/cloud/deployment-fw-get-configurations-view.html). ## Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/configuration/{collectionId}/saveAsTemplate \ --header 'Accept: application/collnTemplateDetails.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` `JSON Object` - **templateId** `long` - The unique ID of the newly created template - **status** `string` - Human-readable confirmation message ### HTTP Code 400 Response Body — `application/json` `JSON Object` - **error_code** `string` - SERVICE_NOT_AVAILABLE: the configuration was created from a Global Template and save-as-template is restricted for MSP - **error_description** `string` - Message indicating Global Template restriction prevents save-as-template ### HTTP Code 401 Response Body — `application/json` `JSON Object` - **errorCode** `long` - Unauthorized error code: credentials missing, expired, or invalid - **errorMsg** `string` - Authentication failure reason ### HTTP Code 413 Response Body — `application/json` `JSON Object` - **error_code** `string` - INTERNAL_SERVER_ERROR: storage limit exceeded on the server to create the template - **error_description** `string` - Message indicating insufficient storage space to create the template ## Possible Response Codes - **200** — HTTP code - **400** — HTTP code - **401** — HTTP code - **413** — HTTP code ## Sample Response: HTTP 200 Template created successfully from existing configuration ```json { "templateId": 2001, "status": "Template created successfully." } ``` ## Sample Response: HTTP 400 Configuration was created from a Global Template ```json { "error_description": "Configuration created from a Global Template cannot be saved as template", "error_code": "SERVICE_NOT_AVAILABLE" } ``` ## Sample Response: HTTP 401 User lacks write role ```json { "error_description": "Access denied - You are not allowed to access the requested resource.", "error_code": "UAC_UNAUTHORIZED" } ``` ## Sample Response: HTTP 413 Server storage limit exceeded ```json { "error_description": "Insufficient storage space to create the template", "error_code": "INTERNAL_SERVER_ERROR" } ``` ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.