Difference between revisions of "DKIM (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
Line 2: Line 2:
  
 
== v1 - Current ==
 
== v1 - Current ==
 +
 +
=== Authentication and Authorization ===
 +
''Authentication''
 +
Users of this API must be successfully authenticated.  See [http://api-wiki.apps.rackspace.com/api-wiki/index.php?title=Rest_API#Authentication Rest API - Authentication] for instructions.
 +
 +
''Authorization''
 +
Authenticated users must have access to both the customer ID and the domain name that they provide.
 +
  
 
=== Enable DKIM or Rotate Keys ===
 
=== Enable DKIM or Rotate Keys ===
  
 
''URL'':  
 
''URL'':  
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/customers/{customer_id}/domains/{domain_name}/dkim/enable</nowiki>
+
  [POST] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/enable</nowiki>
  
  
Line 32: Line 40:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST'/dkimstatus/enable'
+
POST '/customers/customer_id/domains/domain_name/dkim/enable'
 
</pre>
 
</pre>
  
Line 50: Line 58:
 
''URL'':  
 
''URL'':  
  
  [GET] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/customers/{customer_id}/domains/{domain_name}/dkim/status</nowiki>
+
  [GET] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/status</nowiki>
  
  
Line 76: Line 84:
 
''Examples'':
 
''Examples'':
 
<pre>
 
<pre>
GET '/domains/example.com?hostedBy=external'
+
GET '/customers/customer_id/domains/domain_name/dkim/status'
 
</pre>
 
</pre>
  
Line 96: Line 104:
 
''URL'':
 
''URL'':
  
  [DELETE] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/customers/{customer_id}/domains/{domain_name}/dkim/disable)</nowiki>
+
  [DELETE] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/disable</nowiki>
  
  
Line 122: Line 130:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
DELETE '/dkimstatus/disable',
+
DELETE '/customers/customer_id/domains/domain_name/dkim/disable',
 
</pre>
 
</pre>
  
Line 129: Line 137:
 
''URL'':  
 
''URL'':  
  
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/customers/{customer_id}/domains/{domain_name}/dkim/verification</nowiki>
+
  [POST] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/verification</nowiki>
  
  
Line 156: Line 164:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST '/dkimstatus/verification',
+
POST '/customers/customer_id/domains/domain_name/dkim/verification',
 
{
 
{
 
   "hostedBy": "external",
 
   "hostedBy": "external",

Revision as of 06:08, 7 February 2019

v1 - Current

Authentication and Authorization

Authentication Users of this API must be successfully authenticated. See Rest API - Authentication for instructions.

Authorization Authenticated users must have access to both the customer ID and the domain name that they provide.


Enable DKIM or Rotate Keys

URL:

[POST] https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/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
customer_id string ID of customer who owns domain_name
domain_name string Domain to act on


Example:

POST '/customers/customer_id/domains/domain_name/dkim/enable'


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://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/status


Description:

Returns the status of DKIM configuration for a domain.


Parameters:

Field Name Data Type Description
customer_id string ID of customer who owns domain_name
domain_name string Domain to act on


Examples:

GET '/customers/customer_id/domains/domain_name/dkim/status'


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://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/disable


Description:

Disables DKIM for a domain by revoking all existing certificates.


Parameters:

Field Name Data Type Description
customer_id string ID of customer who owns domain_name
domain_name string Domain to act on


Example:

DELETE '/customers/customer_id/domains/domain_name/dkim/disable',

Complete and Verify Enabling DKIM or Rotating Domain Keys

URL:

[POST] https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim/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
customer_id string ID of customer who owns domain_name
domain_name string Domain to act on


Example:

POST '/customers/customer_id/domains/domain_name/dkim/verification',
{
  "hostedBy": "external",
  "verificationSuccessful": false,
  "reason": "dnsKey mismatch",
  "subdomain": "20170209._domainkey",
  "dnsKey": "v=DKIM22; k=rsa; p=IAmABadKey",
  "expectedDnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"
}