---
title: "Creates custom document fields in an existing envelope document."
method: POST
path: "/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields"
tags: ["EnvelopeDocumentFields"]
---

# Creates custom document fields in an existing envelope document.

`POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields`

Creates custom document fields in an existing envelope document.

## Path parameters

- `accountId` string, required
- `documentId` string, required
- `envelopeId` string, required

## Request body

- EnvelopeDocumentFields — Envelope document fields
  - `documentFields` NameValue[] — The array of name/value custom data strings to be added to a document. Custom document field information is returned in the status, but otherwise is not used by Docusign. The array contains the elements: * name - A string that can be a maximum of 50 characters. * value - A string that can be a maximum of 200 characters. *IMPORTANT*: If you are using xml, the name/value pair is contained in a nameValue element.
    - `errorDetails` ErrorDetails — This object describes errors that occur. It is only valid for responses and ignored in requests.
      - `errorCode` string — The code associated with the error condition.
      - `message` string — A brief message describing the error condition.
    - `name` string — The name of the item.
    - `originalValue` string — The initial value of the item.
    - `value` string — The current value of the item.

## Response `201`

Successful response.

## Other responses

- `400` — Error encountered.

---

[API](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api.md) · [All operations](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/docusign/apis/docusign-esignature-rest-api/revisions/77f1998c313d?raw)
