This method updates an existing account custom field.

Request

HTTP request

PUT /v2.1/accounts/{accountId}/custom_fields/{customFieldId}

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

customFieldIdstring

The id of the custom field.

Optional Query Parameters
apply_to_templatesstring

Request Body

customField

Responses

CodeDescriptionReference
200

Successful response.

AccountCustomFields
400

Error encountered.

errorDetails

SDK Method

Accounts::updateCustomField

Definitions

customField

This object provides details about a custom field.

customFieldTypestring

The type of custom field. Valid values are:

  • text (default)
  • list

errorDetailserrorDetails

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

fieldIdstring

The id of the custom field.

listItems[array]

For a list custom field, this is an array of strings that represent the items in a list.

Maximum Length: 2,000 characters.

namestring

The name of the custom field.

requiredstring

When set to true, the signer must complete the custom field.

showstring

When set to true, the custom field displays at the top of the certificate of completion.

valuestring

Specifies the value of the custom field.

Maximum Length: 2,000 characters.

errorDetails

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

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

listCustomField

This object represents a custom field that accepts a list.

configurationTypestring

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

errorDetailserrorDetails

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

fieldIdstring

The id of the custom field.

listItems[array]

An array of strings that represent the items in a list.

namestring

The name of the list custom field.

requiredstring

When set to true, the signer is required to fill out the custom field.

showstring

When set to true, the custom field displays at the top of the certificate of completion.

valuestring

The value of the custom field.

Maximum Length: 100 characters.

textCustomField

This object represents a custom field that accepts text.

configurationTypestring

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

errorDetailserrorDetails

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

fieldIdstring

The id of the custom field.

namestring

The name of the text custom field.

requiredstring

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

showstring

When set to true, the custom field displays at the top of the certificate of completion.

valuestring

The button text that displays on the custom field in the document.

AccountCustomFields

An accountCustomField is an envelope custom field that you set at the account level. Applying custom fields enables account administators to group and manage envelopes.

listCustomFields[listCustomField]

An array of list custom fields.

textCustomFields[textCustomField]

An array of text custom fields.

Examples

Generic JSON Request/Response

Request
{
  "fieldId": "sample string 1",
  "name": "sample string 2",
  "show": "sample string 3",
  "required": "sample string 4",
  "value": "sample string 5",
  "customFieldType": "sample string 6",
  "listItems": [
    "sample string 1"
  ]
}
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
<customField xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <customFieldType>sample string 6</customFieldType>
  <fieldId>sample string 1</fieldId>
  <listItems xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
  </listItems>
  <name>sample string 2</name>
  <required>sample string 4</required>
  <show>sample string 3</show>
  <value>sample string 5</value>
</customField> 
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> 
}} />