CPU.Notifications

<back to all web services

ValidateEmail

The following routes are available for this service:
POST/ValidateEmail
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CPU.Notifications.ServiceModel;
using CPU.SendGridAPI;

namespace CPU.Notifications.ServiceModel
{
    public partial class ValidateEmail
    {
        public virtual string? Email { get; set; }
        public virtual string? Source { get; set; }
    }

}

namespace CPU.SendGridAPI
{
    public partial class Additional
    {
        public virtual bool HasKnownBounces { get; set; }
        public virtual bool HasSpamReports { get; set; }
        public virtual bool HasSuspectedBounces { get; set; }
        public virtual DateTime? SpamReportCreated { get; set; }
    }

    public partial class Checks
    {
        public virtual Additional? Additional { get; set; }
        public virtual Domain? Domain { get; set; }
        public virtual LocalPart? LocalPart { get; set; }
    }

    public partial class Domain
    {
        public virtual bool HasMxOrARecord { get; set; }
        public virtual bool HasValidAddressSyntax { get; set; }
        public virtual bool IsSuspectedDisposableAddress { get; set; }
    }

    public partial class EmailValidation
    {
        public virtual Result? Result { get; set; }
    }

    public partial class LocalPart
    {
        public virtual bool IsSuspectedRoleAddress { get; set; }
    }

    public partial class Result
    {
        public virtual Checks? Checks { get; set; }
        public virtual string? Email { get; set; }
        public virtual string? Host { get; set; }
        public virtual string? Ip_Address { get; set; }
        public virtual string? Local { get; set; }
        public virtual float Score { get; set; }
        public virtual string? Source { get; set; }
        public virtual string? Suggestion { get; set; }
        public virtual string? Verdict { get; set; }
    }

}

C# ValidateEmail DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ValidateEmail HTTP/1.1 
Host: cpmwebservices-t.clarkpud.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"email":"String","source":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"result":{"checks":{"additional":{"hasKnownBounces":false,"hasSpamReports":false,"hasSuspectedBounces":false,"spamReportCreated":"\/Date(-62135596800000-0000)\/"},"domain":{"hasMxOrARecord":false,"hasValidAddressSyntax":false,"isSuspectedDisposableAddress":false},"localPart":{"isSuspectedRoleAddress":false}},"email":"String","host":"String","ip_Address":"String","local":"String","score":0,"source":"String","suggestion":"String@String","verdict":"String"}}