Difference between revisions of "DKIM (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Initial commit.)
 
Line 6: Line 6:
  
 
''URL'':  
 
''URL'':  
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains</nowiki>
+
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/dkimstatus/enable</nowiki>
{
 
  "domainName": "example.com",
 
  "hostedBy": "external",
 
  "accountNumber": "123456789",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
  
  
Line 61: Line 52:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST'/domains',
+
POST'/domains'
{
 
  "domainName": "example.com",
 
  "hostedBy": "external",
 
  "accountNumber": "123456789",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
 
</pre>
 
</pre>
  
Line 77: Line 59:
 
<pre>
 
<pre>
 
{
 
{
  "domainName": "example.com",
 
 
   "hostedBy": "external",
 
   "hostedBy": "external",
   "dkimStatus": "pendingVerification",
+
   "tatus": "pendingVerification",
  "selector": "20170209",
 
 
   "subdomain": "20170209._domainkey",
 
   "subdomain": "20170209._domainkey",
  "publicKey": "-----BEGIN PUBLIC KEY-----PublicKeyGoesHere-----END PUBLIC KEY-----",
 
 
   "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"
 
   "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"
 
}
 
}
Line 91: Line 70:
 
''URL'':  
 
''URL'':  
  
  [GET] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains/(domain)?hostedBy=(hostedBy)</nowiki>
+
  [GET] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/status</nowiki>
  
  
 
''Description'':
 
''Description'':
  
Returns the status of DKIM configuration for a single domain.
+
Returns the status of DKIM configuration for a domain.
  
  
Line 124: Line 103:
 
<pre>
 
<pre>
 
{
 
{
  "domainName": "example.com",
 
 
   "hostedBy": "external",
 
   "hostedBy": "external",
   "dkimStatus": "pendingVerification",
+
   "status": "pendingVerification",
 
   "selector": "20170209",
 
   "selector": "20170209",
 
   "subdomain": "20170209._domainkey",
 
   "subdomain": "20170209._domainkey",
Line 134: Line 112:
 
</pre>
 
</pre>
  
=== Turn off DKIM for a Domain ===
+
=== Disable DKIM on a Domain ===
  
 
''URL'':
 
''URL'':
  
  [DELETE] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains/(domain)?hostedBy=(hostedBy)&adminEmail=(adminEmail)&firstName=(firstName)&lastName=(lastName)&whiteLabel=(whiteLabel)</nowiki>
+
  [DELETE] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/disable)</nowiki>
  
  
Line 159: Line 137:
 
| string
 
| string
 
| Can be set to '''external''' or '''internal'''
 
| Can be set to '''external''' or '''internal'''
|-
 
| adminEmail
 
| string
 
| Email address of the administrator configuring DKIM for the domain
 
|-
 
| firstName
 
| string
 
| First name of the administrator configuring DKIM for the domain
 
|-
 
| lastname
 
| string
 
| Last name of the administrator configuring DKIM for the domain
 
|-
 
| whiteLabel
 
| string
 
| Send white labeled email to administrator.  Can be '''true''' or '''false'''
 
 
|}
 
|}
  
Line 180: Line 142:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete'/domains/example.com?hostedBy=external&adminEmail=admin@gmail.com&firstName=Site&lastName=Admin&whiteLabel=true',
+
DELETE '/dkimstatus/disable',
 
</pre>
 
</pre>
  
Line 187: Line 149:
 
''URL'':  
 
''URL'':  
  
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains/(domain)/verification</nowiki>
+
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/verification</nowiki>
{
 
  "hostedBy": "external",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
  
  
Line 217: Line 172:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST '/domains/example.com/verification',
+
POST '/dkimstatus/verification',
 
{
 
{
 
   "hostedBy": "external",
 
   "hostedBy": "external",
   "adminEmail": "administrator@example.com",
+
   "verificationSuccessful": false,
   "firstName": "Jane",
+
  "reason": "dnsKey mismatch",
   "lastName": "Dow",
+
   "subdomain": "20170209._domainkey",
   "whiteLabel": false
+
   "dnsKey": "v=DKIM22; k=rsa; p=IAmABadKey",
 +
   "expectedDnsKey": "v=DKIM1; k=rsa; p=DNSKEY"
 
}
 
}
 
</pre>
 
</pre>

Revision as of 06:24, 7 February 2019

v1 - Current

Enable DKIM or Rotate Keys

URL:

[POST] https://dkimadminapicp.mlsrvr.com/dkimstatus/enable


Description:

Enables DKIM or rotates keys by generating a new certificate for message signing. Process needs to be completed using DKIM verification route.


Parameters:

Field Name Data Type Description
domainName string The domain on which to act
hostedBy string Can be set to external or internal
accountNumber string Account number the domain is under
adminEmail string Email address of the administrator configuring DKIM for the domain
firstName string First name of the administrator configuring DKIM for the domain
lastname string Last name of the administrator configuring DKIM for the domain
whiteLabel string Send white labeled email to administrator. Can be true or false


Example:

POST'/domains'


Status Code 200 Result Example:

{
  "hostedBy": "external",
  "tatus": "pendingVerification",
  "subdomain": "20170209._domainkey",
  "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"
}

Get Domain's Current DKIM Status

URL:

[GET] https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/status


Description:

Returns the status of DKIM configuration for a domain.


Parameters:

Field Name Data Type Description
domain string The domain on which to act
hostedBy string Can be set to external or internal


Examples:

GET '/domains/example.com?hostedBy=external'


Status Code 200 Result Example:

{
  "hostedBy": "external",
  "status": "pendingVerification",
  "selector": "20170209",
  "subdomain": "20170209._domainkey",
  "publicKey": "-----BEGIN PUBLIC KEY-----PublicKeyGoesHere-----END PUBLIC KEY-----",
  "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"
}

Disable DKIM on a Domain

URL:

[DELETE] https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/disable)


Description:

Disables DKIM for a domain by revoking all existing certificates.


Parameters:

Field Name Data Type Description
domain string The domain on which to act
hostedBy string Can be set to external or internal


Example:

DELETE '/dkimstatus/disable',

Complete and Verify Enabling DKIM or Rotating Domain Keys

URL:

[POST] https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/dkimstatus/verification


Description:

Verifies that a DNS record has been created with the selector/public key for DKIM as been added for a domain. If the record has been successfully verified, the certificate is enabled, and any other existing certificates are deleted.


Parameters:

Field Name Data Type Description
domain string The domain on which to act


Example:

POST '/dkimstatus/verification',
{
  "hostedBy": "external",
  "verificationSuccessful": false,
  "reason": "dnsKey mismatch",
  "subdomain": "20170209._domainkey",
  "dnsKey": "v=DKIM22; k=rsa; p=IAmABadKey",
  "expectedDnsKey": "v=DKIM1; k=rsa; p=DNSKEY"
}