{ "openapi": "3.0.1", "info": { "title": "ConvertAPI", "description": "# High-Performance File Conversion API\nConvert Word, Excel, PowerPoint, HTML, PDF and Image formats with our powerful file conversion service.\nWe support more than [200 file types.]( https://www.convertapi.com/doc/file-formats)", "termsOfService": "https://www.convertapi.com/terms", "contact": { "url": "https://www.convertapi.com/support", "email": "support@convertapi.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "v2" }, "servers": [ { "url": "https://v2.convertapi.com" }, { "url": "https://eu-v2.convertapi.com" }, { "url": "https://uk-v2.convertapi.com" }, { "url": "https://us-v2.convertapi.com" }, { "url": "https://ca-v2.convertapi.com" }, { "url": "https://as-v2.convertapi.com" }, { "url": "https://au-v2.convertapi.com" } ], "paths": { "/convert/pdf/to/redact": { "summary": "Redact PDF API", "description": "Automatically find and redact sensitive data in PDFs using AI", "post": { "tags": [ "Conversion" ], "externalDocs": { "description": "Read more about the converter", "url": "https://www.convertapi.com/pdf-to-redact" }, "requestBody": { "content": { "multipart/form-data": { "schema": { "required": [ "File" ], "type": "object", "properties": { "Timeout": { "maximum": 1200, "minimum": 10, "type": "integer", "description": "Conversion timeout in seconds.", "default": 900, "x-ca-featured": false, "x-ca-label": "Timeout", "x-ca-group": "Execution", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "1200" } }, "StoreFile": { "type": "boolean", "description": "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.\r\n\r\nWhen `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.\r\n", "default": false, "x-ca-featured": false, "x-ca-label": "Store file", "x-ca-group": "Output", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "File": { "type": "string", "description": "File to be converted. Value can be URL or file content.", "format": "binary", "x-ca-featured": true, "x-ca-label": "File", "x-ca-group": "Input", "x-ca-type": "File", "x-ca-representation": "Default", "x-ca-allowed-extensions": [ "pdf" ] }, "FileName": { "type": "string", "description": "The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and\r\nunique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the\r\ncorrect file extension based on the target format, and includes an indexing feature to distinguish multiple output files\r\nfrom a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file,\r\nor `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable.", "x-ca-featured": false, "x-ca-label": "Output file name", "x-ca-group": "Output", "x-ca-type": "String", "x-ca-representation": "Default", "x-ca-range": { "from": "1", "to": "200" } }, "Password": { "type": "string", "description": "Sets the password to open protected PDF.", "x-ca-featured": false, "x-ca-label": "Open password", "x-ca-group": "Input", "x-ca-type": "String", "x-ca-representation": "Default" }, "Preset": { "enum": [ "auto", "gdpr", "hipaa", "ferpa", "foia", "glba", "ccpa", "manual" ], "type": "string", "description": "The Preset parameter determines the type of sensitive data the AI will detect and redact from the document. It complements the `RedactionData`, enabling you to refine or expand the redaction criteria. Select `manual` to use your customized redaction options exclusively.\r\n\r\nChoose a preset to define the type of sensitive data the AI will detect and redact from the document:\r\n\r\n- **Auto** - Automatically detects and redacts sensitive data across all categories, including PII, financial, healthcare, legal, and confidential information. Best for general redaction when the document type is unknown or contains mixed data.\r\n\r\n- **GDPR** - Redacts personal data as required by GDPR, including names, emails, IP addresses, phone numbers, and national IDs.\r\n\r\n- **HIPAA** - Ensures compliance with HIPAA by redacting protected health information (PHI) such as patient names, medical record numbers, diagnoses, and prescription details.\r\n\r\n- **FERPA** - Redacts personally identifiable student information to comply with FERPA, including student names, school records, and educational identifiers.\r\n\r\n- **FOIA** - Prevents the exposure of sensitive personal or national security data in documents released under FOIA. This includes classified content, addresses, and government IDs.\r\n\r\n- **GLBA** - Complies with GLBA by redacting financial data such as bank account numbers, credit card details, loan records, and investment information.\r\n\r\n- **CCPA** -Meets CCPA requirements by removing consumer personal data such as purchase history, geolocation, contact details, and online identifiers upon request.\r\n\r\n- **Manual** - Disables automatic AI detection preset. Only the manually set parameters will be used to determine what should be redacted. Ideal for users who want full control over redaction without AI-based automation.", "default": "auto", "x-ca-featured": true, "x-ca-label": "Detect preset", "x-ca-group": "Automatic AI Redaction", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "auto": "Detect All Sensitive Data", "gdpr": "Personally Identifiable Information", "hipaa": "Patient Health Information", "ferpa": "Student Identification Data", "foia": "Personal or National Security Data", "glba": "Sensitive Financial Data", "ccpa": "Personal Consumer Data", "manual": "Custom Redaction Only" } }, "ContextSize": { "enum": [ "balanced", "page" ], "type": "string", "description": "Defines how the AI engine processes the document in terms of context.\r\n\r\nWhen the `ContextSize` parameter is set to `Page`, each page is processed independently, without context from other pages. This mode is useful when a document contains structured or repetitive data (such as tables with rows of values), or when a high volume of detections is expected. By limiting context to a single page, the AI avoids confusion from unrelated content and ensures accuracy per page.\r\n\r\nWhen the `ContextSize` parameter is set to `Balanced`, the AI maintains context across multiple pages while still optimizing processing efficiency. This mode is recommended for large or multi-page documents where relationships between sections matter, and it also provides improved performance for large documents.", "default": "balanced", "x-ca-featured": false, "x-ca-label": "Context Size", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Collection", "x-ca-representation": "Dropdown", "x-ca-values": { "balanced": "Balanced", "page": "Page" } }, "RedactionColor": { "type": "string", "description": "Specifies the color used to mask redacted text, accepting formats such as Hexadecimal (e.g., `#FFFFFF` for white or `#FF5733` for orange), RGB with an optional alpha channel (e.g., `255,255,255` for white or `255,255,255`), and named colors (e.g., `white`, `red`, `blue`).", "default": "#000000", "x-ca-featured": false, "x-ca-label": "Redaction Color", "x-ca-group": "Custom Redaction Options", "x-ca-type": "String", "x-ca-representation": "Default" }, "RedactionThickness": { "maximum": 2, "minimum": 0.5, "type": "number", "description": "The RedactionThickness property controls the height of the redaction stroke line relative to the original line height.\r\n\r\n- A value of 1 means the stroke height matches the original line height.\r\n- Values less than 1 (e.g., 0.5) reduce the stroke height.\r\n- Values greater than 1 (e.g., 1.5 or 2) increase the stroke height.", "default": 1, "x-ca-featured": false, "x-ca-label": "Redaction Thickness", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Double", "x-ca-representation": "Default", "x-ca-range": { "from": "0.5", "to": "2" } }, "PII": { "type": "boolean", "description": "**Personally Identifiable Information (PII)** - Detects and redacts common personal identifiers, including names, email addresses, phone numbers, birthdates, and home addresses.", "default": false, "x-ca-featured": false, "x-ca-label": "Personally Identifiable Information (PII)", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "PHI": { "type": "boolean", "description": "**Patient Health Information (PHI)** - Detects health-related information such as patient names, medical records, insurance details, and prescription data.", "default": false, "x-ca-featured": false, "x-ca-label": "Patient Health Information (PHI)", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "Financial": { "type": "boolean", "description": "**Financial Data** - Focuses on financial records, including credit card numbers, bank account numbers, financial transaction details, etc.", "default": false, "x-ca-featured": false, "x-ca-label": "Financial Data", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "Legal": { "type": "boolean", "description": "**Legal and Contractual Data** - Detects legal and contractual terms, including case numbers, legal clauses, signatures, and confidential agreements.", "default": false, "x-ca-featured": false, "x-ca-label": "Legal and Contractual Data", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "Confidential": { "type": "boolean", "description": "**Legal and Contractual Data** - Detects proprietary business information, contracts and agreements, internal communications, trade secrets, intellectual property details, and sensitive corporate data.", "default": false, "x-ca-featured": false, "x-ca-label": "Confidential", "x-ca-group": "Custom Redaction Options", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "RedactionData": { "type": "string", "description": "A JSON array defining specific values for redaction. Supports three methods:\r\n\r\n- **Text** – Exact text to be redacted.\r\n- **Regex** – *Escaped* regular expression patterns for flexible text matching.\r\n- **Detect** – AI-based detection using a description of what to find.\r\n\r\nIf `RedactionData` is passed, it forces: `Preset` is set to `manual`, and all built-in detection options (such as `PII`, `PHI`, `Financial`, `Legal`, `Confidential`) are disabled. In this mode, only the values defined in RedactionData are applied.\r\n\r\n#### Example JSON\r\n\r\n```json\r\n[\r\n {\r\n \"Text\": \"john@domain.com\"\r\n },\r\n {\r\n \"Detect\": \"Bank account number\"\r\n },\r\n {\r\n \"Regex\": \"\\\\b100\\\\s*(€|\\\\$)\\\\b\"\r\n }\r\n]\r\n```", "x-ca-featured": false, "x-ca-label": "Text to Mask JSON Payload", "x-ca-group": "Custom Redaction Options", "x-ca-type": "String", "x-ca-representation": "Default" }, "MinimumConfidence": { "maximum": 0.99, "minimum": 0.01, "type": "number", "description": "Sets the minimum confidence threshold for AI-based detection of sensitive data. Higher values reduce false positives but may miss subtle matches.", "default": 0.5, "x-ca-featured": false, "x-ca-label": "Minimum confidence", "x-ca-group": "Automatic AI Redaction", "x-ca-type": "Double", "x-ca-representation": "Default", "x-ca-range": { "from": "0.01", "to": "0.99" } }, "PageRange": { "type": "string", "description": "Set page range. Example 1-10 or 1,2,5.", "default": "1-2000", "x-ca-featured": false, "x-ca-label": "Page Range", "x-ca-group": "Document", "x-ca-type": "String", "x-ca-representation": "Default", "x-ca-range": { "from": "1", "to": "2000" } } } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "ConversionCost": { "type": "integer", "description": "This amount will be deducted from your balance after the conversion.", "format": "int32", "example": 1 }, "Files": { "type": "array", "items": { "type": "object", "properties": { "FileName": { "type": "string", "description": "Name of the converted file.", "example": "myfile.pdf" }, "FileExt": { "type": "string", "description": "File type (file name extension)", "example": "pdf" }, "FileSize": { "type": "integer", "description": "File size", "format": "int32", "example": 111955 }, "FileId": { "type": "string", "description": "File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "Url": { "type": "string", "description": "File URL", "example": "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf" }, "FileData": { "type": "string", "description": "Base64 encoded file data", "format": "base64", "example": "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n..." } } } } }, "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationjson-1" } } }, "multipart/mixed": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#multipartmixed" } }, "example": "--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f\nConversionCost: 1\nContent-Type: application/octet-stream\nContent-Disposition: attachment; filename=\"my_file.pdf\"; size=8475\n\n--FILE CONTENT--\n--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f--\n" }, "application/octet-stream": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationoctet-stream-1" } } } } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "415": { "$ref": "#/components/responses/415" }, "500": { "$ref": "#/components/responses/500" }, "503": { "$ref": "#/components/responses/503" } }, "security": [ { "secret": [ ] }, { "token": [ ] }, { "jwt": [ ] } ] }, "x-ca-overview": "Automatically detect and black out information in PDF document. Whether you need to secure business documents or protect personal information, our tool provides reliable, efficient, and user-friendly redaction solutions. Start safeguarding your PDFs today with our trusted Data Redact API.", "x-ca-meta-title": "Redact Sensitive PDF Data with AI - Redact PDF API", "x-ca-meta-description": "Redact sensitive data from PDF documents easily using AI or JSON. Redact PDFs to protect confidential information with our intelligent PDF Redact API.", "x-ca-source-formats": "pdf", "x-ca-destination-formats": "pdf", "x-ca-tags": [ "ai", "pdf", "security", "modify" ] } }, "components": { "schemas": { "fileId": { "maxLength": 32, "minLength": 32, "type": "string", "description": "Uploaded File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "error": { "type": "object", "properties": { "Code": { "type": "integer", "description": "Error message code", "format": "int32", "example": 4000 }, "Message": { "type": "string", "description": "Error message text", "example": "Parameter validation error." } }, "externalDocs": { "url": "https://www.convertapi.com/doc/response-codes" } } }, "responses": { "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "401": { "description": "Authentication error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "415": { "description": "File type error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "500": { "description": "Conversion failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "503": { "description": "Conversion rate limit error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } } }, "parameters": { "fileId": { "name": "fileId", "in": "path", "description": "File ID", "required": true, "schema": { "$ref": "#/components/schemas/fileId" } }, "src": { "name": "src", "in": "path", "description": "Source file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } }, "dst": { "name": "dst", "in": "path", "description": "Destination file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } } }, "headers": { "content-disposition": { "description": "File information ([docummentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition))", "schema": { "type": "string" } }, "file-name": { "description": "File name", "schema": { "type": "string" } }, "file-ext": { "description": "File name extension", "schema": { "type": "string" } }, "file-size": { "description": "File size", "schema": { "type": "integer" } } }, "securitySchemes": { "secret": { "type": "http", "description": "[Get `Secret`](https://www.convertapi.com/a/secret)", "scheme": "bearer" }, "token": { "type": "http", "description": "[Get `Token`](https://www.convertapi.com/a/api-tokens)", "scheme": "bearer" }, "jwt": { "type": "http", "description": "[Get `JWT`](https://www.convertapi.com/a/jwt-tokens)", "scheme": "bearer", "bearerFormat": "JWT" } } }, "tags": [ { "name": "Conversion", "description": "File Conversion API call", "externalDocs": { "description": "File Conversion related operations", "url": "https://www.convertapi.com/doc/content-types" } }, { "name": "File Server", "description": "ConvertAPI temporary file storage", "externalDocs": { "description": "File Server related operations", "url": "https://www.convertapi.com/doc/upload" } }, { "name": "User", "description": "API User", "externalDocs": { "description": "API User related operations", "url": "https://www.convertapi.com/doc/user" } } ], "externalDocs": { "description": "Find out more about ConvertAPI", "url": "https://www.convertapi.com/doc" } }