{
  "service": "campaign_cleaner",
  "displayName": "Campaign Cleaner",
  "categories": [
    "Communication",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "cc_live_xxxxxxxxxxxxx",
      "description": "Campaign Cleaner API key sent in the X-CC-API-Key header. Manage API keys from API Management in the Campaign Cleaner dashboard.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://campaigncleaner.com",
  "actions": [
    {
      "id": "campaign_cleaner.delete_campaign",
      "service": "campaign_cleaner",
      "name": "delete_campaign",
      "description": "Delete one saved Campaign Cleaner campaign by campaign ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Campaign Cleaner campaign identifier."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for referencing one Campaign Cleaner campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failure"
            ],
            "description": "Whether Campaign Cleaner deleted the campaign successfully."
          },
          "error": {
            "type": "string",
            "description": "The upstream failure reason when the delete request is unsuccessful."
          }
        },
        "additionalProperties": false,
        "required": [
          "status"
        ],
        "description": "The delete result returned by Campaign Cleaner."
      }
    },
    {
      "id": "campaign_cleaner.get_campaign",
      "service": "campaign_cleaner",
      "name": "get_campaign",
      "description": "Retrieve the full Campaign Cleaner analysis payload for one saved campaign.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Campaign Cleaner campaign identifier."
          },
          "minimize_html": {
            "type": "boolean",
            "description": "Whether the returned campaign HTML should be minimized."
          }
        },
        "additionalProperties": false,
        "required": [
          "campaign_id"
        ],
        "description": "The input payload for retrieving one Campaign Cleaner campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The full Campaign Cleaner campaign analysis object."
          }
        },
        "additionalProperties": false,
        "description": "The full campaign analysis returned by Campaign Cleaner."
      }
    },
    {
      "id": "campaign_cleaner.get_campaign_pdf_analysis",
      "service": "campaign_cleaner",
      "name": "get_campaign_pdf_analysis",
      "description": "Download a Campaign Cleaner PDF analysis report and return it as a transit file.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Campaign Cleaner campaign identifier."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for referencing one Campaign Cleaner campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "content": {
            "type": "object",
            "properties": {
              "fileId": {
                "type": "string",
                "description": "The local transit file identifier for the PDF report."
              },
              "downloadUrl": {
                "type": "string",
                "description": "The local transit file download URL for the PDF report."
              },
              "sizeBytes": {
                "type": "number",
                "description": "The PDF report size in bytes."
              },
              "name": {
                "type": "string",
                "description": "The filename of the downloaded PDF report."
              },
              "mimeType": {
                "type": "string",
                "description": "The MIME type of the downloaded PDF report."
              }
            },
            "additionalProperties": false,
            "description": "The downloadable Campaign Cleaner PDF report."
          }
        },
        "additionalProperties": false,
        "description": "The downloaded Campaign Cleaner PDF analysis report."
      }
    },
    {
      "id": "campaign_cleaner.get_campaign_status",
      "service": "campaign_cleaner",
      "name": "get_campaign_status",
      "description": "Fetch the current processing status of one submitted Campaign Cleaner campaign.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Campaign Cleaner campaign identifier."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for referencing one Campaign Cleaner campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaign_status": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Campaign Cleaner campaign identifier."
              },
              "campaign_name": {
                "type": "string",
                "description": "The saved campaign name."
              },
              "status": {
                "type": "string",
                "enum": [
                  "processing",
                  "completed",
                  "paused"
                ],
                "description": "The Campaign Cleaner campaign lifecycle status."
              },
              "date_added": {
                "type": "string",
                "description": "The timestamp when the campaign was saved or submitted."
              }
            },
            "additionalProperties": false,
            "description": "A Campaign Cleaner campaign summary."
          }
        },
        "additionalProperties": false,
        "description": "The current processing status returned by Campaign Cleaner."
      }
    },
    {
      "id": "campaign_cleaner.get_credits",
      "service": "campaign_cleaner",
      "name": "get_credits",
      "description": "Get the remaining Campaign Cleaner credits available to the current API key.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "This action does not require any input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "number",
            "description": "The remaining Campaign Cleaner credits."
          }
        },
        "additionalProperties": false,
        "description": "The Campaign Cleaner credit balance."
      }
    },
    {
      "id": "campaign_cleaner.list_campaigns",
      "service": "campaign_cleaner",
      "name": "list_campaigns",
      "description": "List saved Campaign Cleaner campaigns together with their current processing status.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "This action does not require any input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Campaign Cleaner campaign identifier."
                },
                "campaign_name": {
                  "type": "string",
                  "description": "The saved campaign name."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "processing",
                    "completed",
                    "paused"
                  ],
                  "description": "The Campaign Cleaner campaign lifecycle status."
                },
                "date_added": {
                  "type": "string",
                  "description": "The timestamp when the campaign was saved or submitted."
                }
              },
              "additionalProperties": false,
              "description": "A Campaign Cleaner campaign summary."
            },
            "description": "The saved campaigns visible to the current API key."
          }
        },
        "additionalProperties": false,
        "description": "The list of saved Campaign Cleaner campaigns."
      }
    },
    {
      "id": "campaign_cleaner.send_campaign",
      "service": "campaign_cleaner",
      "name": "send_campaign",
      "description": "Submit an email campaign HTML payload for Campaign Cleaner analysis and processing.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_html": {
            "type": "string",
            "minLength": 1,
            "description": "The full HTML content of the email campaign."
          },
          "campaign_name": {
            "type": "string",
            "minLength": 1,
            "description": "The saved name of the email campaign."
          },
          "adjust_font_colors": {
            "type": "boolean",
            "description": "Whether Campaign Cleaner should normalize spam-triggering font colors."
          },
          "adjust_font_size": {
            "type": "boolean",
            "description": "Whether Campaign Cleaner should enforce the configured font size bounds."
          },
          "convert_h_to_p_tags": {
            "type": "boolean",
            "description": "Whether header tags should be converted into paragraph tags."
          },
          "custom_info": {
            "type": "string",
            "maxLength": 500,
            "description": "Custom caller metadata returned later by get_campaign."
          },
          "host_extensionless_images": {
            "type": "boolean",
            "description": "Whether extensionless images should be hosted when resize-and-host is enabled."
          },
          "inline_css": {
            "type": "boolean",
            "description": "Whether CSS should be inlined into each HTML element."
          },
          "inline_css_important": {
            "type": "boolean",
            "description": "Whether inlined CSS should include the !important flag."
          },
          "media_queries_important": {
            "type": "boolean",
            "description": "Whether media query rules should be marked as !important."
          },
          "image_max_width": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum width in pixels applied to all images."
          },
          "min_font_size_allowed": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99,
            "description": "The minimum allowed font size in pixels."
          },
          "max_font_size_allowed": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99,
            "description": "The maximum allowed font size in pixels."
          },
          "preserve_media_queries": {
            "type": "boolean",
            "description": "Whether media queries should be preserved in the returned HTML."
          },
          "relative_links_base_url": {
            "type": "string",
            "description": "The absolute base URL used to expand relative links in the campaign.",
            "format": "uri"
          },
          "remove_classes_and_ids": {
            "type": "boolean",
            "description": "Whether class and ID attributes should be removed after CSS inlining."
          },
          "remove_comments": {
            "type": "boolean",
            "description": "Whether HTML and CSS comments should be removed."
          },
          "remove_control_non_printable": {
            "type": "boolean",
            "description": "Whether control and non-printable characters should be removed."
          },
          "remove_css_inheritance": {
            "type": "boolean",
            "description": "Whether inherited CSS should be removed after inlining."
          },
          "remove_image_height": {
            "type": "boolean",
            "description": "Whether fixed image heights should be removed."
          },
          "remove_successive_punctuation": {
            "type": "boolean",
            "description": "Whether repeated punctuation should be collapsed to a single character."
          },
          "replace_diacritics": {
            "type": "boolean",
            "description": "Whether diacritic characters should be replaced with ASCII equivalents."
          },
          "replace_non_ascii_characters": {
            "type": "boolean",
            "description": "Whether non-ASCII characters should be replaced with ASCII equivalents."
          },
          "resize_and_host": {
            "type": "boolean",
            "description": "Whether eligible images should be resized, converted, and hosted by Campaign Cleaner."
          },
          "surrounding_div": {
            "type": "object",
            "properties": {
              "max_width": {
                "type": "integer",
                "minimum": 1,
                "description": "The surrounding div max width in pixels."
              },
              "text_align": {
                "type": "string",
                "enum": [
                  "left",
                  "center",
                  "right"
                ],
                "description": "The text alignment applied inside the surrounding div."
              },
              "font_size": {
                "type": "integer",
                "minimum": 1,
                "description": "The default surrounding div font size in pixels."
              },
              "center_to_parent": {
                "type": "boolean",
                "description": "Whether the surrounding div should be centered within its parent."
              }
            },
            "additionalProperties": false,
            "description": "Optional surrounding div settings applied to the submitted campaign."
          },
          "webhook_url": {
            "type": "string",
            "description": "An absolute webhook URL that receives the finished campaign analysis.",
            "format": "uri"
          }
        },
        "additionalProperties": false,
        "required": [
          "campaign_html",
          "campaign_name"
        ],
        "description": "The input payload for submitting a campaign to Campaign Cleaner."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Campaign Cleaner campaign identifier."
              }
            },
            "additionalProperties": false,
            "description": "The created campaign reference."
          }
        },
        "additionalProperties": false,
        "description": "The output payload returned after submitting a campaign."
      }
    }
  ]
}
