> 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/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/v2/reference/templates/templatecustomfields/list

## Authentication

- `Authorization` header (required) — OAuth 2.0 access token (JWT or auth-code grant). Sent as Authorization: Bearer \<token>.

## 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 being accessed.

## 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) — An error code associated with the error.
- `message` (string, optional) — A short error message.

## Types

### listCustomField

- `configurationType` (string, optional) — If merge field's are being used, 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) — An ID used to specify a custom field.
- `listItems` (list of string, optional)
- `name` (string, optional) — The name of the custom field.
- `required` (string, optional) — When set to **true**, the signer is required to fill out this tab
- `show` (string, optional) — 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.
- `value` (string, optional) — The value of the custom field. Maximum Length: 100 characters.

### textCustomField

- `configurationType` (string, optional) — If merge field's are being used, 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) — An ID used to specify a custom field.
- `name` (string, optional) — The name of the custom field.
- `required` (string, optional) — When set to **true**, the signer is required to fill out this tab
- `show` (string, optional) — 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.
- `value` (string, optional) — The value of the custom field.

### errorDetails

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

- `errorCode` (string, optional) — An error code associated with the error.
- `message` (string, optional) — A short error message.

## Examples

**Response**

```json
{
  "listCustomFields": [
    {
      "configurationType": "string",
      "errorDetails": {
        "errorCode": "string",
        "message": "string"
      },
      "fieldId": "string",
      "listItems": [
        "string"
      ],
      "name": "string",
      "required": "string",
      "show": "string",
      "value": "string"
    }
  ],
  "textCustomFields": [
    {
      "configurationType": "string",
      "errorDetails": {
        "errorCode": "string",
        "message": "string"
      },
      "fieldId": "string",
      "name": "string",
      "required": "string",
      "show": "string",
      "value": "string"
    }
  ]
}
```