{
  "properties": {
    "connectionParameters": {
      "api_key": {
        "type": "securestring",
        "uiDefinition": {
          "displayName": "API key",
          "description": "Your email-validation.org API key from the dashboard. Paste the key alone, without \"Bearer\".",
          "tooltip": "Provide your email-validation.org API key",
          "constraints": {
            "tabIndex": 2,
            "clearText": false,
            "required": "true"
          }
        }
      },
      "region": {
        "type": "string",
        "uiDefinition": {
          "displayName": "API host",
          "description": "Where your requests go. The EU host validates and stores in the EU; keys and credits are the same. A bulk job stays on the host that created it.",
          "tooltip": "Choose the API host",
          "constraints": {
            "tabIndex": 3,
            "required": "true",
            "allowedValues": [
              {
                "text": "api.email-validation.org",
                "value": "https://api.email-validation.org"
              },
              {
                "text": "api-eu.email-validation.org (EU data residency)",
                "value": "https://api-eu.email-validation.org"
              }
            ]
          }
        }
      }
    },
    "iconBrandColor": "#0A1226",
    "capabilities": ["actions"],
    "policyTemplateInstances": [
      {
        "templateId": "setheader",
        "title": "Send the API key as a bearer token",
        "parameters": {
          "x-ms-apimTemplateParameter.name": "Authorization",
          "x-ms-apimTemplateParameter.value": "Bearer @connectionParameters('api_key')",
          "x-ms-apimTemplateParameter.existsAction": "override",
          "x-ms-apimTemplate-policySection": "Request"
        }
      },
      {
        "templateId": "dynamichosturl",
        "title": "Send requests to the chosen API host",
        "parameters": {
          "x-ms-apimTemplateParameter.urlTemplate": "@connectionParameters('region','https://api.email-validation.org')"
        }
      }
    ],
    "publisher": "email-validation.org",
    "stackOwner": "email-validation.org"
  }
}
