Add/update a domain
Post /settings/domains
Parameters:
| Name | Description | Type | Mandatory |
|---|---|---|---|
| sending | Domain name with extension | String | Yes |
| tracking | Tracking domain | String | Yes |
| Email where send domain confirmation | String | Yes |
Response:
Return confirmation that the domain is added and the DNS record needed to validate the domain.
| Name | Description | Type |
|---|---|---|
| id | Domain id | String |
| sending | Domain name | String |
| tracking | Tracking domain name | String |
| createdAt | Datetime on timestamp format | Int |
| updatedAt | Datetime on timestamp format | Int |
| verifiedDkim | If the DKIM is validated or not | Boolean |
| verifiedSpf | If the SPF is validated or not | Boolean |
| verifiedMx | If the MX record is validated or not | Boolean |
| verifiedA | If the A record is validated or not | Boolean |
| verifiedTracking | If the Tracking with CNAME record is validated or not | Boolean |
| verifiedDomain | If the domain is verified with email confirmation | Boolean |
| default | If the domain is used as default or not | Boolean |
Programming language:
Request exemple:
{
"sending": "example.com",
"tracking": "link.example.com",
"email" : "email@example.com"
}
Response exemple:
{
"sending": "example.com",
"tracking": "link.example.com",
"id": "55e80030be1cd6e38c0dd5d9",
"accountId": "558ba57199325a268857c230",
"createdAt": 1441267761,
"updatedAt": 1443516927,
"verifiedDkim": true,
"verifiedSpf": true,
"verifiedTracking": true,
"verifiedMx": true,
"verifiedA": true,
"verifiedDomain": true,
"default": false
}
Code example:
curl -X POST -d '{"sending":"example.com","tracking":"link.example.com","email":"email@example.com"}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/settings/domains
require 'vendor/autoload.php';
$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');
try {
$result = $tipimail->getSettingsService()->getDomainsService()->save('example.com', 'link.example.com', 'email@example.com');
var_dump($result);
}
catch(Tipimail\Exceptions\TipimailException $e) {
echo 'Exception received :', $e->getMessage(), "\n";
}