> ## Documentation Index
> Fetch the complete documentation index at: https://api.monument.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate email verification code

> Validates the code matches what was sent. On success, creates a lead pre-associated with the tenant.



## OpenAPI

````yaml /openapi/shopping-openapi.json post /shopping/{portfolio}/v1/facilities/tenant/validate-preexisting
openapi: 3.0.0
info:
  title: Monument Shopping API
  description: Monument Shopping API
  version: '1.0'
  contact: {}
servers:
  - url: https://public-api.prd.monument.io
    description: Production
  - url: https://public-api.stg.monument.io
    description: Staging
security: []
tags:
  - name: Facilities
    description: Facility listing, details, and configuration
  - name: Leads
    description: Lead creation, updates, status, and pre-existing tenant validation
  - name: Shopping Cart
    description: Cart operations and access plans
  - name: Unit Groups
    description: Unit group details and taxes
  - name: Units
    description: Unit and gate access code retrieval
  - name: Payments
    description: Payment profiles and processor information
  - name: Brands
    description: Branding configuration and brand-scoped facilities
  - name: Coverages
    description: Coverage options and private coverage info
  - name: Leases
    description: Lease signing redirects
  - name: Organizations
    description: Portfolio organization information
  - name: Lead Marketing Sources
    description: Marketing source listing
paths:
  /shopping/{portfolio}/v1/facilities/tenant/validate-preexisting:
    post:
      tags:
        - Facilities
        - Leads
      summary: Validate email verification code
      description: >-
        Validates the code matches what was sent. On success, creates a lead
        pre-associated with the tenant.
      operationId: PublicApiFacilitiesController_validateEmailCode
      parameters:
        - name: portfolio
          required: true
          in: path
          schema:
            type: string
        - in: header
          required: true
          name: x-api-key
          schema:
            example: monument-2230012-2312321
            description: >-
              Api key required to authenticate your request. Please reach out to
              monument for a key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateEmailCodeRequestDto'
      responses:
        '201':
          description: Result of a successful verification attempt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateEmailCodeResponse'
components:
  schemas:
    ValidateEmailCodeRequestDto:
      type: object
      properties:
        email:
          type: string
        validationCode:
          type: string
        unitGroupUuid:
          type: string
          format: uuid
        facilityUuid:
          type: string
          format: uuid
        leadUuid:
          type: string
          format: uuid
      required:
        - email
        - validationCode
        - unitGroupUuid
        - facilityUuid
    ValidateEmailCodeResponse:
      type: object
      properties:
        valid:
          type: boolean
        expired:
          type: boolean
        personalInfo:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TenantPersonalInfo'
        createdLead:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CreateLeadResponse'
      required:
        - valid
        - expired
    TenantPersonalInfo:
      type: object
      properties:
        personUuid:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        addressLine1:
          type: string
          nullable: true
        addressLine2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
        country:
          type: string
        zip:
          type: string
          nullable: true
        businessName:
          type: string
          nullable: true
        taxId:
          type: string
          nullable: true
        isSmsEnrolled:
          type: boolean
        phoneType:
          type: string
        idType:
          type: string
        idCode:
          type: string
        idState:
          type: string
          nullable: true
        idCountry:
          type: string
          nullable: true
        idIssueDate:
          type: string
          nullable: true
        idExpirationDate:
          type: string
          nullable: true
        accountType:
          type: string
        haveAlternateContact:
          type: boolean
          nullable: true
        alternateContactFirstName:
          type: string
          nullable: true
        alternateContactLastName:
          type: string
          nullable: true
        alternateContactPhone:
          type: string
          nullable: true
        alternateContactRelationship:
          type: string
          nullable: true
        alternateContactAddressLine1:
          type: string
          nullable: true
        alternateContactAddressLine2:
          type: string
          nullable: true
        alternateContactCity:
          type: string
          nullable: true
        alternateContactState:
          type: string
          nullable: true
        alternateContactZip:
          type: string
          nullable: true
        haveMilitary:
          type: boolean
        militaryBranch:
          type: string
          nullable: true
        dateOfBirth:
          format: date-time
          type: string
          nullable: true
        startDateOfService:
          format: date-time
          type: string
          nullable: true
        commanderOfficer:
          type: string
          nullable: true
        officerEmail:
          type: string
          nullable: true
        dateDesiredMoveIn:
          format: date-time
          type: string
          nullable: true
        leadStatus:
          type: string
          nullable: true
          enum:
            - OPEN
            - CONVERTED
            - LOST
            - PENDING
            - RESERVED
            - WAITLISTED
        haveVehicle:
          type: boolean
        haveLienHolder:
          type: boolean
        isPreviousTenant:
          type: boolean
        vehicleType:
          type: string
        vehicleMake:
          type: string
        vehicleModel:
          type: string
        vinNumber:
          type: string
        licensePlate:
          type: string
        lienHolderName:
          type: string
        lienHolderAddress:
          type: string
        facilityUuid:
          type: string
        unitGroupUuid:
          type: string
        leadUuid:
          type: string
        leadSourceUuid:
          type: string
        leadMarketingSourceUuid:
          type: string
          nullable: true
        beneficiary:
          $ref: '#/components/schemas/BeneficiaryDto'
      required:
        - personUuid
        - firstName
        - lastName
        - email
        - phone
        - addressLine1
        - addressLine2
        - city
        - state
        - country
        - zip
        - phoneType
        - idType
        - idCode
        - accountType
    CreateLeadResponse:
      type: object
      properties:
        leadUuid:
          type: string
          format: uuid
          description: Unique identifier for the lead created
        verifyToken:
          type: string
          nullable: true
          description: >-
            Temporary verification token needed to update the created lead while
            the lead is shopping
      required:
        - leadUuid
        - verifyToken
    BeneficiaryDto:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        relationship:
          type: string
        email:
          type: string
        phone:
          type: string

````