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 .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

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

{
	result: 
	{
		checks: 
		{
			additional: 
			{
				hasKnownBounces: False,
				hasSpamReports: False,
				hasSuspectedBounces: False,
				spamReportCreated: 0001-01-01
			},
			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
	}
}