{
  "openapi": "3.1.0",
  "info": {
    "title": "Verifly ChatGPT Email Verification Action",
    "version": "1.0.0",
    "description": "Use Verifly from ChatGPT or a Custom GPT to verify emails, clean email lists, and extract email addresses from text."
  },
  "servers": [
    {
      "url": "https://verifly.email/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/verify": {
      "get": {
        "operationId": "verifyEmail",
        "summary": "Verify one email address",
        "description": "Checks one email address and returns deliverability and risk signals.",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Email address to verify."
          }
        ],
        "responses": {
          "200": {
            "description": "Email verification result"
          },
          "400": {
            "description": "Invalid request or malformed email/list input"
          },
          "401": {
            "description": "Missing or invalid bearer API key"
          },
          "402": {
            "description": "Insufficient credits for a credit-consuming verification operation"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Unexpected server error"
          }
        },
        "x-openai-isConsequential": true
      }
    },
    "/verify/batch": {
      "post": {
        "operationId": "verifyEmailBatch",
        "summary": "Verify up to 100 email addresses",
        "description": "Checks a small batch of email addresses and returns verification results.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailBatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch verification results"
          },
          "400": {
            "description": "Invalid request or malformed email/list input"
          },
          "401": {
            "description": "Missing or invalid bearer API key"
          },
          "402": {
            "description": "Insufficient credits for a credit-consuming verification operation"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Unexpected server error"
          }
        },
        "x-openai-isConsequential": true
      }
    },
    "/clean": {
      "post": {
        "operationId": "cleanEmailList",
        "summary": "Clean an email list",
        "description": "Verifies and cleans a list so ChatGPT can summarize usable, risky, and invalid addresses.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailBatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clean-list result"
          },
          "400": {
            "description": "Invalid request or malformed email/list input"
          },
          "401": {
            "description": "Missing or invalid bearer API key"
          },
          "402": {
            "description": "Insufficient credits for a credit-consuming verification operation"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Unexpected server error"
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/extract": {
      "post": {
        "operationId": "extractEmails",
        "summary": "Extract email addresses from text",
        "description": "Extracts email addresses from pasted text before verification or cleaning.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extracted email addresses"
          },
          "400": {
            "description": "Invalid request or malformed email/list input"
          },
          "401": {
            "description": "Missing or invalid bearer API key"
          },
          "402": {
            "description": "Insufficient credits for a credit-consuming verification operation"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Unexpected server error"
          }
        },
        "x-openai-isConsequential": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use a Verifly API key as a bearer token."
      }
    },
    "schemas": {
      "EmailBatch": {
        "type": "object",
        "properties": {
          "emails": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "emails"
        ]
      },
      "ExtractRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text or CSV content that may contain email addresses."
          },
          "options": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "text"
        ]
      }
    }
  }
}
