arazzo: 1.0.1 info: title: Hunter Verify Existing Email summary: Verify a known email and upsert it into Hunter as a lead with its verification status. description: >- A re-verification flow for addresses you already hold. The Email Verifier checks deliverability of a supplied email, and the flow branches on the returned status: valid and accept_all addresses are upserted as leads so the record reflects the latest verification, while invalid and other terminal statuses end the workflow so undeliverable addresses are not promoted. Using upsert means re-running the flow updates the existing lead by email match rather than creating duplicates. Every request inlines the api_key query parameter. version: 1.0.0 sourceDescriptions: - name: emailVerifierApi url: ../openapi/hunter-email-verifier-api-openapi.yml type: openapi - name: leadsApi url: ../openapi/hunter-leads-api-openapi.yml type: openapi workflows: - workflowId: verify-existing-email summary: Verify a known email and upsert it as a lead when deliverable. description: >- Verifies a supplied email address and, when the status is deliverable (valid or accept_all), upserts a lead carrying that status by email match. inputs: type: object required: - apiKey - email properties: apiKey: type: string description: Your Hunter API key, passed as the api_key query parameter. email: type: string description: The email address to verify and upsert. firstName: type: string description: Optional first name to store on the upserted lead. lastName: type: string description: Optional last name to store on the upserted lead. steps: - stepId: verifyEmail description: >- Verify deliverability of the supplied email and branch on whether the status indicates a usable address. operationId: emailVerifier parameters: - name: email in: query value: $inputs.email - name: api_key in: query value: $inputs.apiKey successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/data/status score: $response.body#/data/score onSuccess: - name: deliverable type: goto stepId: upsertLead criteria: - context: $response.body condition: $.data.status == "valid" || $.data.status == "accept_all" type: jsonpath - name: undeliverable type: end criteria: - context: $response.body condition: $.data.status != "valid" && $.data.status != "accept_all" type: jsonpath - stepId: upsertLead description: >- Upsert a lead by email match, recording the supplied name and the verification score from the deliverable address. operationId: upsertLead parameters: - name: api_key in: query value: $inputs.apiKey requestBody: contentType: application/json payload: email: $inputs.email first_name: $inputs.firstName last_name: $inputs.lastName confidence_score: $steps.verifyEmail.outputs.score successCriteria: - condition: $statusCode == 200 outputs: leadId: $response.body#/data/id outputs: verificationStatus: $steps.verifyEmail.outputs.status leadId: $steps.upsertLead.outputs.leadId