Creates custom document fields in an existing envelope document.

Request

HTTP request

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

Parameters

Parameter name Value Description
Path parameters
accountId string

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

documentId string

The ID of the document being accessed.

envelopeId string

The envelope's GUID. Eg 93be49ab-afa0-4adf-933c-f752070d71ec

Request Body

Responses

Code Description Reference
201 Created Successful response.
400 Bad Request Error encountered.

SDK Method

Envelopes::createDocumentFields

Definitions Expand All | Collapse All

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

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

errorCode string

An error code associated with the error.

message string

A short error message.

nameValue

errorDetails errorDetails
name string

The name or key of a name/value pair.

originalValue string

The initial value of the tab when it was sent to the recipient.

value string

The value field of a name/value pair.

Examples

Generic JSON Request/Response

Request

{
"documentFields": [
{}
]
}

Response

{
"documentFields": [
{}
]
}

Generic XML Request/Response

Request

<documentFieldsInformation 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<documentFields>
<nameValue />
</documentFields>
</documentFieldsInformation>

Response

<documentFieldsInformation 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<documentFields>
<nameValue />
</documentFields>
</documentFieldsInformation>