To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /sendmail/sendgridtemplate HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SendGridMailTemplateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceInterface">
<APIKey>String</APIKey>
<From xmlns:d2p1="http://schemas.datacontract.org/2004/07/SendGrid.Helpers.Mail">
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</From>
<Personalizations xmlns:d2p1="http://schemas.datacontract.org/2004/07/SendGrid.Helpers.Mail">
<d2p1:Personalization>
<d2p1:Bccs>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Bccs>
<d2p1:Ccs>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Ccs>
<d2p1:CustomArgs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:CustomArgs>
<d2p1:From>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:From>
<d2p1:Headers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:Headers>
<d2p1:SendAt>0</d2p1:SendAt>
<d2p1:Subject>String</d2p1:Subject>
<d2p1:Substitutions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:Substitutions>
<d2p1:TemplateData />
<d2p1:Tos>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Tos>
</d2p1:Personalization>
</Personalizations>
<Subject>String</Subject>
<TemplatesId>String</TemplatesId>
</SendGridMailTemplateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />