Updates the custom fields in a template.

Each custom field used in a template must have a unique name.

Request

HTTP request

PUT /v2/accounts/{accountId}/templates/{templateId}/custom_fields

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID Guid.

templateIdstring

The ID of the template being accessed.

Responses

CodeDescriptionReference
200

Successful response.

TemplateCustomFields
400

Error encountered.

errorDetails

SDK Method

Templates::updateCustomFields

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCodestring

An error code associated with the error.

messagestring

A short error message.

listCustomField

configurationTypestring

If merge field's are being used, specifies the type of the merge field. The only supported value is salesforce.

errorDetailserrorDetails

fieldIdstring

An ID used to specify a custom field.

listItems[array]

namestring

The name of the custom field.

requiredstring

When set to true, the signer is required to fill out this tab

showstring

A boolean indicating if the value should be displayed. If this value is set to true, the custom field is displayed at the top of the certificate of completion. If this value is left blank/ or set to false, then it does not appear in the certificate of completion.

valuestring

The value of the custom field.

Maximum Length: 100 characters.

templateCustomFields

listCustomFields[listCustomField]

An array of list custom fields.

textCustomFields[textCustomField]

An array of text custom fields.

textCustomField

configurationTypestring

If merge field's are being used, specifies the type of the merge field. The only supported value is salesforce.

errorDetailserrorDetails

fieldIdstring

An ID used to specify a custom field.

namestring

The name of the custom field.

requiredstring

When set to true, the signer is required to fill out this tab

showstring

A boolean indicating if the value should be displayed. If this value is set to true, the custom field is displayed at the top of the certificate of completion. If this value is left blank/ or set to false, then it does not appear in the certificate of completion.

valuestring

The value of the custom field.

TemplateCustomFields

Template custom fields

listCustomFields[listCustomField]

An array of list custom fields.

textCustomFields[textCustomField]

An array of text custom fields.

Examples

Generic JSON Request/Response

Request
{
  "password": "sample string 1",
  "textCustomFields": [
    {
      "fieldId": "sample string 1",
      "name": "sample string 2",
      "show": "sample string 3",
      "required": "sample string 4",
      "value": "sample string 5",
      "configurationType": "sample string 6"
    }
  ],
  "listCustomFields": [
    {
      "listItems": [
        "sample string 1"
      ],
      "fieldId": "sample string 1",
      "name": "sample string 2",
      "show": "sample string 3",
      "required": "sample string 4",
      "value": "sample string 5",
      "configurationType": "sample string 6"
    }
  ]
}
Response
{
  "textCustomFields": [
    {
      "fieldId": "sample string 1",
      "name": "sample string 2",
      "show": "sample string 3",
      "required": "sample string 4",
      "value": "sample string 5",
      "configurationType": "sample string 6",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    }
  ],
  "listCustomFields": [
    {
      "listItems": [
        "sample string 1"
      ],
      "fieldId": "sample string 1",
      "name": "sample string 2",
      "show": "sample string 3",
      "required": "sample string 4",
      "value": "sample string 5",
      "configurationType": "sample string 6",
      "errorDetails": {
        "errorCode": "SUCCESS",
        "message": ""
      }
    }
  ]
}
Generic XML Request/Response

Request
<templateCustomFields xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <listCustomFields>
    <listCustomField>
      <configurationType>sample string 6</configurationType>
      <fieldId>sample string 1</fieldId>
      <name>sample string 2</name>
      <required>sample string 4</required>
      <show>sample string 3</show>
      <value>sample string 5</value>
      <listItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
      </listItems>
    </listCustomField>
  </listCustomFields>
  <textCustomFields>
    <textCustomField>
      <configurationType>sample string 6</configurationType>
      <fieldId>sample string 1</fieldId>
      <name>sample string 2</name>
      <required>sample string 4</required>
      <show>sample string 3</show>
      <value>sample string 5</value>
    </textCustomField>
  </textCustomFields>
  <password>sample string 1</password>
</templateCustomFields> 
Response
<customFields xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <listCustomFields>
    <listCustomField>
      <configurationType>sample string 6</configurationType>
      <errorDetails>
        <errorCode>SUCCESS</errorCode>
        <message></message>
      </errorDetails>
      <fieldId>sample string 1</fieldId>
      <name>sample string 2</name>
      <required>sample string 4</required>
      <show>sample string 3</show>
      <value>sample string 5</value>
      <listItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
      </listItems>
    </listCustomField>
  </listCustomFields>
  <textCustomFields>
    <textCustomField>
      <configurationType>sample string 6</configurationType>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <fieldId>sample string 1</fieldId>
      <name>sample string 2</name>
      <required>sample string 4</required>
      <show>sample string 3</show>
      <value>sample string 5</value>
    </textCustomField>
  </textCustomFields>
</customFields> 
}} />