Subaccount Custom Bounce Domain Authentication

Bounce Domain

The Custom Bounce Domain is how SPF is implemented with SocketLabs. 

Setup

Before you can set up a bounce domain with the API, that domain needs to exist and have CNAME set up to point to tracking.socketlabs.com. You can re-use the CNAME record created for custom bounce domain to set up your engagement tracking domain.

Endpoint

https://api.socketlabs.com/v2/subaccount/:subaccountId/bounce

Path Variables

  • subaccountId (number, required)

Attributes

Property Name Data Type Details
domain string Domain or subdomain you want to set up for custom bounce domain handling.
isDefault boolean If this is set as the default, any mail that is sent that does not match a custom bounce domain in the account will fall back to using this domain. If no defaults are set in your account, email-od. com is used as the default value. 

Example Request

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, “https: //api.socketlabs.com/v2/subaccount/:subaccountID/bounce”);
    request.Headers.Add(“Authorization”, “Bearer < token > ”);
    var content = new StringContent(@” {
      “
      domain”: “exmaple.com”,
      “isDefault”: true
    }”, null, “application / json”); request.Content = content;
    var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());

Example Response

{
    "data": {
      "domain": "example.com",
        "isDefault": true,
        "createdOn": "2014-10-22T10:52:10.868Z",
        "updatedOn": "1961-08-02T17:41:38.631Z"
    }
}

You’ve got SPF enabled, so now it’s time to set up subaccount DKIM authentication.

Other Resources