Create a New Word Document

This REST API creates a new Document with a format, specified by file extension.

The supported formats are:

FormatExtensionDescription
Doc“.doc”Microsoft Word 97 - 2007 Document format
Docx“.docx”Office Open XML WordprocessingML Document (macro-free)
Docm“.docm”Office Open XML WordprocessingML Macro-Enabled Document
Dot“.dot”Microsoft Word 97 - 2007 Template format
Dotm“.dotm”Office Open XML WordprocessingML Macro-Enabled Template
Dotx“.dotx”Office Open XML WordprocessingML Template (macro-free)
FlatOpc“.flatopc”, “.fopc”Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package
FlatOpcMacroEnabled“.flatopc_macro”, “.fopc_macro”Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package.
FlatOpcTemplate“.flatopc_template”, “.fopc_template”Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package.
FlatOpcTemplateMacroEnabled“.flatopc_template_macro”, “.fopc_template_macro”Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package.
WordML“.wordml”, “.wml”Microsoft Word 2003 WordprocessingML format.
Rtf“.rtf”RTF format. All characters above 7-bits are escaped as hexadecimal or Unicode characters

and the request parameters are the following:

Parameter NameQuery String/HTTPBodyDescription
fileNameQuery String: fileName=documentName.docxThe file name.

REST API

The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.

You can use cURL command-line tool to easily interact with Aspose.Words web services. The following example shows how to make calls to Cloud API with cURL.

Cloud SDK Family

Using an SDK is the best way to speed up the development. An SDK takes care of low-level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Words Cloud SDKs.

The following code examples demonstrate how to make calls to Aspose.Words web services using various SDKs: