Difference between revisions of "DKIM (Rest API)"

From Rackspace Email & Apps API
Jump to: navigation, search
(Initial commit.)
 
 
(6 intermediate revisions by the same user not shown)
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/DkimServiceApi/v1/domains</nowiki>
+
  [POST] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>
{
 
  "domainName": "example.com",
 
  "hostedBy": "external",
 
  "accountNumber": "123456789",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
  
  
 
''Description'':
 
''Description'':
  
Enables DKIM or rotates keys by generating a new certificate for message signing. Process needs to be completed using DKIM verification route.
+
Enables DKIM or rotates keys by generating a new certificate for message signing. Process needs to be completed using DKIM verification route (below).
  
  
Line 29: Line 30:
 
!''Description''
 
!''Description''
 
|-
 
|-
| domainName
+
| customer_id
| string
 
| The domain on which to act
 
|-
 
| hostedBy
 
 
| string
 
| string
| Can be set to '''external''' or '''internal'''
+
| ID of customer who owns domain_name
 
|-
 
|-
| accountNumber
+
| domain_name
 
| string
 
| string
| Account number the domain is under
+
| Domain to act on
|-
 
| 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 61: Line 42:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST'/domains',
+
POST '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'
{
 
  "domainName": "example.com",
 
  "hostedBy": "external",
 
  "accountNumber": "123456789",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
 
</pre>
 
</pre>
  
Line 77: Line 49:
 
<pre>
 
<pre>
 
{
 
{
   "domainName": "example.com",
+
   "HostedBy": "external",
  "hostedBy": "external",
+
   "Status": "pendingVerification",
   "dkimStatus": "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"
 
}
 
}
 
</pre>
 
</pre>
 +
  
 
=== Get Domain's Current DKIM Status ===
 
=== Get Domain's Current DKIM Status ===
Line 91: Line 61:
 
''URL'':  
 
''URL'':  
  
  [GET] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains/(domain)?hostedBy=(hostedBy)</nowiki>
+
  [GET] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>
  
  
 
''Description'':
 
''Description'':
  
Returns the status of DKIM configuration for a single domain.
+
Returns the status of DKIM configuration for a domain.
  
  
Line 105: Line 75:
 
!''Description''
 
!''Description''
 
|-
 
|-
| domain
+
| customer_id
 
| string
 
| string
| The domain on which to act
+
| ID of customer who owns domain_name
 
|-
 
|-
| hostedBy
+
| domain_name
 
| string
 
| string
| Can be set to '''external''' or '''internal'''
+
| Domain to act on
 
|}
 
|}
  
Line 117: Line 87:
 
''Examples'':
 
''Examples'':
 
<pre>
 
<pre>
GET '/domains/example.com?hostedBy=external'
+
GET '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'
 
</pre>
 
</pre>
  
Line 124: Line 94:
 
<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 103:
 
</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://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>
  
  
Line 152: Line 122:
 
!''Description''
 
!''Description''
 
|-
 
|-
| domain
+
| customer_id
| string
 
| The domain on which to act
 
|-
 
| hostedBy
 
| string
 
| Can be set to '''external''' or '''internal'''
 
|-
 
| adminEmail
 
| string
 
| Email address of the administrator configuring DKIM for the domain
 
|-
 
| firstName
 
 
| string
 
| string
| First name of the administrator configuring DKIM for the domain
+
| ID of customer who owns domain_name
 
|-
 
|-
| lastname
+
| domain_name
 
| string
 
| string
| Last name of the administrator configuring DKIM for the domain
+
| Domain to act on
|-
 
| whiteLabel
 
| string
 
| Send white labeled email to administrator.  Can be '''true''' or '''false'''
 
 
|}
 
|}
  
Line 180: Line 134:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
delete'/domains/example.com?hostedBy=external&adminEmail=admin@gmail.com&firstName=Site&lastName=Admin&whiteLabel=true',
+
DELETE '/v2/customers/123123123/domains/not-a-real-domain.com/dkim',
 
</pre>
 
</pre>
 +
  
 
=== Complete and Verify Enabling DKIM or Rotating Domain Keys ===
 
=== Complete and Verify Enabling DKIM or Rotating Domain Keys ===
Line 187: Line 142:
 
''URL'':  
 
''URL'':  
  
  [POST] <nowiki>https://dkimadminapicp.mlsrvr.com/DkimServiceApi/v1/domains/(domain)/verification</nowiki>
+
  [POST] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim/verification</nowiki>
{
 
  "hostedBy": "external",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
  
  
Line 209: Line 157:
 
!''Description''
 
!''Description''
 
|-
 
|-
| domain
+
| customer_id
 
| string
 
| string
| The domain on which to act
+
| ID of customer who owns domain_name
 +
|-
 +
| domain_name
 +
| string
 +
| Domain to act on
 
|}
 
|}
  
Line 217: Line 169:
 
''Example'':
 
''Example'':
 
<pre>
 
<pre>
POST '/domains/example.com/verification',
+
POST '/v2/customers/123123123/domains/not-a-real-domain.com/dkim/verification'
{
 
  "hostedBy": "external",
 
  "adminEmail": "administrator@example.com",
 
  "firstName": "Jane",
 
  "lastName": "Dow",
 
  "whiteLabel": false
 
}
 
 
</pre>
 
</pre>

Latest revision as of 12:11, 10 July 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://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim


Description:

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


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 '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'


Status Code 200 Result Example:

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


Get Domain's Current DKIM Status

URL:

[GET] https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim


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 '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'


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://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim


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 '/v2/customers/123123123/domains/not-a-real-domain.com/dkim',


Complete and Verify Enabling DKIM or Rotating Domain Keys

URL:

[POST] https://api.emailsrvr.com/v2/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 '/v2/customers/123123123/domains/not-a-real-domain.com/dkim/verification'