Skip to end of metadata
Go to start of metadata
Contents Summary


This REST API allows you to add a field to a document, section or paragraph. The API returns added field data in XML/JSON format. The request parameters are:

Parameter NameTypeQuery String/HTTPBodyDescription
insertBeforeNodestringQuery String: insertBeforeNode="nodeId"The field will be inserted before a node with id="nodeId".

Resource URI

{file-name} is the name of the Word document containing elements.
{nodePath} is the path to a specific node in the document. If this URI is used, only elements contained within a specific node will be returned. Supported syntax:

  • sections/{sectionIndex} - references specific section.
  • paragraphs/{paragraphIndex} - references specific paragraph.
  • sections/{sectionIndex}/paragraphs/{paragraphIndex} - references specific paragraph within section.

index} is the index of a specific field.

The resource properties are:

Property NameTypeDescription
FieldCodestringReturns field code.
LocaleIdintSpecifies LCID of the field.
ResultstringReturns field result.

Swagger UI lets you call this REST API directly from the browser.  

cURL Example



Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Words Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.

SDK Examples

  • No labels