Create a New Word Document

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

The supported formats are:

Format Extension Description
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 Request parameters are the following:

Parameter Name Query String/HTTPBody Description
fileName Query String: fileName=documentName.docx The file name.

Usage examples with cURL and Postman

You can carry out REST API interactions using cURL and Postman. Please read these instructions to receive a personal JWT_TOKEN for authorization.

Aspose.Words Cloud SDK Family

Using SDK is the best way to speed up the development. Please go to the GitHub repository to explore a wide family of our Cloud SDKs. These powerful libraries take care of all low-level programming details and let you focus on your primary tasks.

Usage examples in Python, Java, C#, etc.

The following code samples show how to interact with the REST API using almost any mainstream programming language.

You can find a lot of other examples in Python, Java, C#, JavaScript, PHP, C++, Golang, Ruby, Swift, Dart on GitHub. All codes are thoroughly tested and ready for production use.