> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# UploadTemplate

This method returns SaveTemplateResult. **Note:** this method currently only supports Docusign Professional Template XML.

### Schema

![UploadTemplate](/_fern-files/_img/fa56e1e3ed9fc8ee9595f5bd592d30c899fbce2cb5d4daa412a0154397f344e5.webp)

**`C#`**

```csharp title="C#"
// Read the template that you want to upload
String templateXML = System.IO.File.ReadAllText("path to template");

// Upload the specified template to the account
DocuSignWeb.SaveTemplateResult result = _apiClient.UploadTemplate(templateXML,
    _accountId, false);

// Confirm that the template saved successfully
Console.WriteLine("The template was successfully uploaded? {0}", result.Success);
```

**`PHP`**

```php title="PHP"
// Read the template that you want to upload 
$templateXML = file_get_contents("path to template");

// Send
$uploadTemplateparams = new UploadTemplate();
$uploadTemplateparams->AccountID = $AccountID;
$uploadTemplateparams->TemplateXML = $templateXML;
$uploadTemplateparams->Shared = true;
$response = $api->UploadTemplate($uploadTemplateparams);
```

| Name        | Schema Type | Description                                                                                                                                 |
| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| TemplateXML | String      | XML data to be transformed into a Docusign server side template.NOTE: only Docusign Professional template XML is supported.                 |
| AccountID   | DSXId       | Account ID to add the template to. If blank, the API user’s default account will be used.                                                   |
| Shared      | Boolean     | If true, the template is shared with the Everyone group in the account. If false, the template is only shared with the Administrator group. |

## Rules and exceptions for UploadTemplate

* Account_Lacks_Permissions – account does not have permissions to use this API.
* User_Lacks_Permissions – user does not have permissions to use this API.