### GET /d/{fileId} Source: https://v2.convertapi.com/info/openapi API endpoint for GET /d/{fileId} ```markdown ### Parameters - **fileId** (fileId, path, required): File ID - **download** (string (attachment|inline), query, optional): - `attachment` - download a file - `inline` - view file in a web browser ### Responses #### 200 - Success #### 404 - File not found File not found ### Example Usage ```bash curl -X GET "https://v2.convertapi.com/d/{fileId}?download=attachment" ``` ``` -------------------------------- ### POST /convert/potx/to/pdf Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/potx/to/pdf ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **Password** (string): Sets the password to open protected documents. - **PageRange** (string): Set page range. Example 1-10 or 1,2,5. - **ConvertHiddenSlides** (boolean): Include hidden slides while converting. - **ConvertMetadata** (boolean): Convert document metadata like Title, Author, Keywords to PDF metadata. - **ConvertSpeakerNotes** (string (Disabled|SeparatePage|PageComments)): Choose how speaker notes will be converted. ("Disabled"|"SeparatePage"|"PageComments") - **EmbedFonts** (boolean): Embed fonts in PDF. - **Pdfa** (boolean): Create PDF/A-3a compliant document. ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/potx/to/pdf" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "Password": "string", "PageRange": "1-2000", "ConvertHiddenSlides": "false", "ConvertMetadata": "true", "ConvertSpeakerNotes": "Disabled", "EmbedFonts": "true", "Pdfa": "false" }' ``` ``` -------------------------------- ### POST /convert/dotx/to/pdf Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/dotx/to/pdf ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **Password** (string): Sets the password to open protected documents. - **PageRange** (string): Set page range. Example 1-10. - **ConvertMarkups** (boolean): Convert document markups like revisions and comments. - **ConvertTags** (boolean): Convert document structure tags for accessibility. - **ConvertMetadata** (boolean): Convert document metadata like Title, Author, Keywords to PDF metadata. - **BookmarkMode** (string (none|headings|bookmarks)): Specifies how bookmarks are created in the generated PDF: `None` disables bookmark creation, `Headings` generates bookmarks based on document headings, and `Bookmarks` uses existing bookmarks defined in the original file. ("none"|"headings"|"bookmarks") - **UpdateToc** (boolean): Update all tables of content in the document. - **Pdfa** (boolean): Create PDF/A-3a compliant document. ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/dotx/to/pdf" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "Password": "string", "PageRange": "1-6000", "ConvertMarkups": "false", "ConvertTags": "false", "ConvertMetadata": "true", "BookmarkMode": "headings", "UpdateToc": "false", "Pdfa": "false" }' ``` ``` -------------------------------- ### Security: jwt Source: https://v2.convertapi.com/info/openapi [Get `JWT`](https://www.convertapi.com/a/jwt-tokens) ```markdown ## Security: jwt **Description:** [Get `JWT`](https://www.convertapi.com/a/jwt-tokens) **Type:** http **Scheme:** bearer **Bearer Format:** JWT ``` -------------------------------- ### POST /convert/ps/to/pdf Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/ps/to/pdf ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **PdfVersion** (string (1.2|1.3|1.4|1.5|1.6|1.7|1.8|2.0)): Set PDF version. ("1.2"|"1.3"|"1.4"|"1.5"|"1.6"|"1.7"|"1.8"|"2.0") - **PdfResolution** (integer): Set PDF resolution. - **PdfTitle** (string): Provide a value to customize the PDF title. Otherwise, the default document title will be used. Use single quotes and a space (' ') to remove the title. - **PdfSubject** (string): Provide a value to customize the PDF subject. Otherwise, the default document subject will be used. Use single quotes and a space (' ') to remove the subject. - **PdfAuthor** (string): Provide a value to customize the PDF author. Otherwise, the default document author will be used. Use single quotes and a space (' ') to remove the author. - **PdfKeywords** (string): Provide a value to customize the PDF keywords. Otherwise, the default document keywords will be used. Use single quotes and a space (' ') to remove the keywords. - **OpenPage** (integer): Set the page number at which the PDF document should open. - **EmbedFonts** (boolean): Embed fonts in PDF. - **SubsetFonts** (boolean): Include in the output PDF document only the font characters that are used in the original document. - **SubsetFontsThreshold** (integer): Sets the Subset Fonts threshold. If the percentage of used characters, compared with total characters of the particular font, exceeds this threshold, the entire font is embedded. - **OpenZoom** (string (Default|ActualSize|FitPage|FitWidth|FitHeight|FitVisible|25|50|75|100|125|150|200|400|800|1600|2400|3200|6400)): Set the default zoom percentage for when you open PDF files . ("Default"|"ActualSize"|"FitPage"|"FitWidth"|"FitHeight"|"FitVisible"|"25"|"50"|"75"|"100"|"125"|"150"|"200"|"400"|"800"|"1600"|"2400"|"3200"|"6400") - **ColorSpace** (string (Default|RGB|CMYK|Gray)): Set PDF color space. ("Default"|"RGB"|"CMYK"|"Gray") ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/ps/to/pdf" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "PdfVersion": "1.5", "PdfResolution": "300", "PdfTitle": "string", "PdfSubject": "string", "PdfAuthor": "string", "PdfKeywords": "string", "OpenPage": "1", "EmbedFonts": "true", "SubsetFonts": "true", "SubsetFontsThreshold": "100", "OpenZoom": "Default", "ColorSpace": "Default" }' ``` ``` -------------------------------- ### Security: token Source: https://v2.convertapi.com/info/openapi [Get `Token`](https://www.convertapi.com/a/api-tokens) ```markdown ## Security: token **Description:** [Get `Token`](https://www.convertapi.com/a/api-tokens) **Type:** http **Scheme:** bearer ``` -------------------------------- ### POST /convert/dxf/to/pdf Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/dxf/to/pdf ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **SpaceToConvert** (string (default|all|model)): Set space type to convert. ("default"|"all"|"model") - **CustomSpaceToConvert** (string): Set custom layout name to convert by setting it name or index. This property overrides the SpaceToConvert property. - **ExportLayers** (boolean): Export AutoCAD layers. - **AutoFit** (boolean): The converted drawing is detected and adjusted to fit the current page size, with the possibility of changing the page orientation to accommodate the drawing. - **PageSize** (string (default|a0|a1|a2|a3|a4|a5|a6|a7|a8|a9|b0|b1|b2|b3|b4|b5|letter|legal|ledger)): PDF page size. ("default"|"a0"|"a1"|"a2"|"a3"|"a4"|"a5"|"a6"|"a7"|"a8"|"a9"|"b0"|"b1"|"b2"|"b3"|"b4"|"b5"|"letter"|"legal"|"ledger") - **PageOrientation** (string (portrait|landscape)): Set PDF page orientation. The property will only work if the PageSize property is also set. ("portrait"|"landscape") - **PageHeight** (integer): Custom page height in millimeters (mm). This option override PageSize option. - **PageWidth** (integer): Custom page width in millimeters (mm). This option override PageSize option. - **ColorSpace** (string (truecolors|grayscale|monochrome)): Set output color space. ("truecolors"|"grayscale"|"monochrome") ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/dxf/to/pdf" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "SpaceToConvert": "default", "CustomSpaceToConvert": "string", "ExportLayers": "true", "AutoFit": "true", "PageSize": "default", "PageOrientation": "portrait", "PageHeight": "0", "PageWidth": "0", "ColorSpace": "truecolors" }' ``` ``` -------------------------------- ### Security: secret Source: https://v2.convertapi.com/info/openapi [Get `Secret`](https://www.convertapi.com/a/secret) ```markdown ## Security: secret **Description:** [Get `Secret`](https://www.convertapi.com/a/secret) **Type:** http **Scheme:** bearer ``` -------------------------------- ### GET /user/statistic Source: https://v2.convertapi.com/info/openapi The endpoint that returns information about your usage statistics based on the date range. ```markdown ### Parameters - **startDate** (string, query, required): Conversions from date - **endDate** (string, query, required): Conversions to date ### Responses #### 200 - Success - Array of object - **Result** (boolean): Is conversion successful - **CreatedAt** (string): Conversion time - **ExecutionTime** (integer (int32)): Conversion duration - **Converter** (string): File converter name - **SourceFormat** (string): Source file format (docx, pdf, jpg etc.) - **DestinationFormat** (string): Destination file format (docx, pdf, jpg etc.) - **Ip** (string): File conversion request origin IP - **Source** (string): Source file name - **Error** (string): Conversion error message #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X GET "https://v2.convertapi.com/user/statistic?startDate=string&endDate=string" ``` ``` -------------------------------- ### POST /convert/docx/to/compare Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/docx/to/compare ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **Password** (string): Sets the password to open protected documents. - **CompareFile** (string (binary)) (required): Specifies the Word document with which the specified document is compared. - **CompareLevel** (string (Word|Character)): The property defines the granularity of comparisons between documents or text segments. It determines the precision of the comparison process, allowing users to specify whether differences are identified based on larger text blocks, such as words or sentences, or at a more detailed level, such as characters or formatting. ("Word"|"Character") - **CompareFormatting** (boolean): Determines whether to indicate variations in formatting between the two documents. - **CompareCaseChanges** (boolean): Determines whether to highlight discrepancies in capitalization between the two documents. - **CompareWhitespace** (boolean): Determines whether to identify dissimilarities in whitespace, such as gaps or paragraphs, between the two documents. - **CompareTables** (boolean): Determines whether to evaluate variations in the information presented within tables between the two documents. - **CompareHeaders** (boolean): Determines whether to contrast divergences in headers and footers between the two documents. - **CompareFootnotes** (boolean): Determines whether to compare differences in footnotes and endnotes between the two documents. - **CompareTextboxes** (boolean): Determines whether to assess differences in the information presented within text boxes between the two documents. - **CompareFields** (boolean): Determines whether to detect disparities in fields between the two documents. - **CompareComments** (boolean): Determines whether to evaluate distinctions in comments between the two documents. - **CompareMoves** (boolean): Indicates the name of the individual to credit for modifications when comparing the two documents. - **AcceptRevisions** (boolean): Specifies whether to accept revisions before document comparison. - **RevisionAuthor** (string): Author name who made revision. ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/docx/to/compare" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "Password": "string", "CompareFile": "string", "CompareLevel": "Word", "CompareFormatting": "true", "CompareCaseChanges": "true", "CompareWhitespace": "true", "CompareTables": "true", "CompareHeaders": "true", "CompareFootnotes": "true", "CompareTextboxes": "true", "CompareFields": "true", "CompareComments": "true", "CompareMoves": "true", "AcceptRevisions": "false", "RevisionAuthor": "Compared using ConvertAPI" }' ``` ``` -------------------------------- ### POST /convert/web/to/txt Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/web/to/txt ```markdown ### Request Body **Content-Type:** multipart/form-data - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **Timeout** (integer): Conversion timeout in seconds. - **ConversionDelay** (integer): Delay in seconds before page load and PDF creation. Sometimes useful to let web page fully load. - **Version** (string (latest|146|145|140|130|126|117)): Specify a particular version of the Chromium engine to render the web page. ("latest"|"146"|"145"|"140"|"130"|"126"|"117") - **AuthUsername** (string): HTTP authentication username. Could be used if conversion web page is protected with HTTP authentication. - **AuthPassword** (string): HTTP authentication password. Could be used if conversion web page is protected with HTTP authentication. - **AdBlock** (boolean): Block ads in converting page. - **CookieConsentBlock** (boolean): Tries to remove EU regulation required cookie warnings from web pages. - **Cookies** (string): Set additional cookies for the page request. Example: cookiename1=cookievalue1; cookiename2=cookievalue2; cookiename3=cookievalue3 - **JavaScript** (boolean): Allow web pages to run JavaScript. - **WaitElement** (string): Element selector string of the DOM element. Converter will wait for this element to appear in DOM before conversion begins. - **UserJs** (string): Execute provided JavaScript before conversion begins. - **UserCss** (string): Apply additional CSS before conversion begins. - **HideElements** (string): Element selector string of the DOM elements that needs to be hidden during conversion. - **CssMediaType** (string): Use CSS media type in conversion process. The default screen and print media types are supported but not limited to these. The custom media type, like convertapi can be used too. - **Headers** (string): Set custom HTTP headers to include in the request. Format: `Header1:Value1|Header2:Value2|Header3:Value3` - Each header is separated by `|`. - Each name/value pair is separated by `:`. - **Url** (string (uri)) (required): URI of a web page to convert. If URI has special characters like ? or & they must be encoded. - **ExtractElements** (string): Specifies a CSS selector to identify and extract specific DOM elements from the page, instead of scraping the entire content, allowing for more targeted and efficient data retrieval; for example, to select elements by class name use `.class-name`, to select an element by its ID use `#elementId`, or to select elements by their tag name use `tagName`. ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/web/to/txt" \ -H "Content-Type: application/json" \ -d '{ "StoreFile": "false", "FileName": "string", "Timeout": "120", "ConversionDelay": "0", "Version": "117", "AuthUsername": "string", "AuthPassword": "string", "AdBlock": "false", "CookieConsentBlock": "false", "Cookies": "string", "JavaScript": "true", "WaitElement": "string", "UserJs": "string", "UserCss": "string", "HideElements": "string", "CssMediaType": "screen", "Headers": "string", "Url": "string", "ExtractElements": "string" }' ``` ``` -------------------------------- ### GET /user Source: https://v2.convertapi.com/info/openapi The endpoint returns information about a user account. It is helpful to check the account balance status and other data. The endpoint can be authenticated only with a secret, the token is not accepted. ```markdown ### Responses #### 200 - Success - **Active** (boolean): User can perform conversions - **Email** (string): User email (example: "user@example.com") - **Secret** (string): Authentication secret (example: "1XKrszdaFZH33WTh") - **ApiKey** (integer (int64)): Authentication API key (example: 842679918) - **ConversionsTotal** (integer (int64)): Plan conversion count (example: 5000) - **ConversionsConsumed** (integer (int64)): Conversions consumed (example: 458) - **SecondsLeft** (integer (int64)) - **FullName** (string): User full name (example: "John Wick") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X GET "https://v2.convertapi.com/user" ``` ``` -------------------------------- ### POST /convert/wpd/to/pdf Source: https://v2.convertapi.com/info/openapi API endpoint for POST /convert/wpd/to/pdf ```markdown ### Request Body **Content-Type:** multipart/form-data - **Timeout** (integer): Conversion timeout in seconds. - **StoreFile** (boolean): When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted. When `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content. - **File** (string (binary)) (required): File to be converted. Value can be URL or file content. - **FileName** (string): The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and unique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the correct file extension based on the target format, and includes an indexing feature to distinguish multiple output files from a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file, or `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable. - **Password** (string): Sets the password to open protected documents. - **PageRange** (string): Set page range. Example 1-10. - **ConvertMarkups** (boolean): Convert document markups like revisions and comments. - **ConvertTags** (boolean): Convert document structure tags for accessibility. - **ConvertMetadata** (boolean): Convert document metadata like Title, Author, Keywords to PDF metadata. - **BookmarkMode** (string (none|headings|bookmarks)): Specifies how bookmarks are created in the generated PDF: `None` disables bookmark creation, `Headings` generates bookmarks based on document headings, and `Bookmarks` uses existing bookmarks defined in the original file. ("none"|"headings"|"bookmarks") - **UpdateToc** (boolean): Update all tables of content in the document. - **Pdfa** (boolean): Create PDF/A-3a compliant document. ### Responses #### 200 - Success - **ConversionCost** (integer (int32)): This amount will be deducted from your balance after the conversion. (example: 1) - **Files** (array (object)) Array items: - **FileName** (string): Name of the converted file. (example: "myfile.pdf") - **FileExt** (string): File type (file name extension) (example: "pdf") - **FileSize** (integer (int32)): File size (example: 111955) - **FileId** (string): File ID (example: "25811safe8e61dd3f51ef00ee5f58b92") - **Url** (string): File URL (example: "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf") - **FileData** (string (base64)): Base64 encoded file data (example: "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...") #### 400 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 401 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 415 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 500 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") #### 503 - response **error** - **Code** (integer (int32)): Error message code (example: 4000) - **Message** (string): Error message text (example: "Parameter validation error.") ### Example Usage ```bash curl -X POST "https://v2.convertapi.com/convert/wpd/to/pdf" \ -H "Content-Type: application/json" \ -d '{ "Timeout": "900", "StoreFile": "false", "File": "string", "FileName": "string", "Password": "string", "PageRange": "1-6000", "ConvertMarkups": "false", "ConvertTags": "false", "ConvertMetadata": "true", "BookmarkMode": "headings", "UpdateToc": "false", "Pdfa": "false" }' ``` ```