> 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

# Get custom document fields from template

GET https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields

Retrieves the custom document field information from an existing template.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/templates/templatecustomfields/list

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.
- `templateId` (string, required) — The ID of the template.

## Response

### 200

Successful response.

- `listCustomFields` (list of listCustomField, optional) — An array of list custom fields.
- `textCustomFields` (list of textCustomField, optional) — An array of text custom fields.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### listCustomField

This object represents a list custom field from which envelope creators and senders can select custom data.

- `configurationType` (string, optional) — If you are using merge fields, this property specifies the type of the merge field. The only supported value is `salesforce`.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `fieldId` (string, optional) — The ID of the custom field.
- `listItems` (list of string, optional) — An array of strings that represents the options in a list. Maximum length: 2048 characters, but each individual option string can only be a maximum of 100 characters.
- `name` (string, optional) — The name of the custom field.
- `required` (string, optional) — When **true,** senders are required to select an option from the list before they can send the envelope.
- `show` (string, optional) — When **true,** the field displays in the **Envelope Custom Fields** section when a user creates or sends an envelope.
- `value` (string, optional) — The value of the custom field. This is the value that the user who creates or sends the envelope selects from the list.

### textCustomField

This object represents a free text custom field where envelope creators and senders can enter custom data.

- `configurationType` (string, optional) — If you are using merge fields, this property specifies the type of the merge field. The only supported value is `salesforce`.
- `errorDetails` (errorDetails, optional) — This object describes errors that occur. It is only valid for responses, and ignored in requests.
- `fieldId` (string, optional) — The ID of the custom field.
- `name` (string, optional) — The name of the custom field.
- `required` (string, optional) — When **true,** senders are required to enter or select information for the field before they can send the envelope.
- `show` (string, optional) — When **true,** the field displays in the **Envelope Custom Fields** section when a user creates or sends an envelope.
- `value` (string, optional) — The value of the custom field. The user who creates or sends the envelope provides this value. Maximum length: 100 characters.

### errorDetails

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

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Examples

**Response**

```json
{
  "listCustomFields": [
    {
      "configurationType": "sample string 1",
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      },
      "fieldId": "sample string 2",
      "listItems": [
        "sample string 1"
      ],
      "name": "sample string 3",
      "required": "sample string 4",
      "show": "sample string 5",
      "value": "sample string 6"
    }
  ],
  "textCustomFields": [
    {
      "configurationType": "sample string 1",
      "fieldId": "sample string 2",
      "name": "sample string 3",
      "required": "sample string 4",
      "show": "sample string 5",
      "value": "sample string 6"
    }
  ]
}
```