Difference between revisions of "DKIM (Rest API)"
 (Fix URLs)  | 
				|||
| Line 16: | Line 16: | ||
''URL'':    | ''URL'':    | ||
| − |   [POST] <nowiki>https://  | + |   [POST] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>  | 
''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 42: | Line 42: | ||
''Example'':  | ''Example'':  | ||
<pre>  | <pre>  | ||
| − | POST '/customers/  | + | POST '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'  | 
</pre>  | </pre>  | ||
| Line 49: | Line 49: | ||
<pre>  | <pre>  | ||
{  | {  | ||
| − |    "  | + |    "HostedBy": "external",  | 
| − |    "  | + |    "Status": "pendingVerification",  | 
   "subdomain": "20170209._domainkey",  |    "subdomain": "20170209._domainkey",  | ||
   "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"  |    "dnsKey": "v=DKIM1; k=rsa; p=DNSKeyGoesHere"  | ||
| Line 61: | Line 61: | ||
''URL'':    | ''URL'':    | ||
| − |   [GET] <nowiki>https://  | + |   [GET] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>  | 
| Line 87: | Line 87: | ||
''Examples'':  | ''Examples'':  | ||
<pre>  | <pre>  | ||
| − | GET '/customers/  | + | GET '/v2/customers/123123123/domains/not-a-real-domain.com/dkim'  | 
</pre>  | </pre>  | ||
| Line 108: | Line 108: | ||
''URL'':  | ''URL'':  | ||
| − |   [DELETE] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim  | + |   [DELETE] <nowiki>https://cp.rackspace.com/customers/{customer_id}/domains/{domain_name}/dkim</nowiki>  | 
| Line 134: | Line 134: | ||
''Example'':  | ''Example'':  | ||
<pre>  | <pre>  | ||
| − | DELETE '/customers/  | + | DELETE '/v2/customers/123123123/domains/not-a-real-domain.com/dkim',  | 
</pre>  | </pre>  | ||
| Line 142: | Line 142: | ||
''URL'':    | ''URL'':    | ||
| − |   [POST] <nowiki>https://  | + |   [POST] <nowiki>https://api.emailsrvr.com/v2/customers/{customer_id}/domains/{domain_name}/dkim/verification</nowiki>  | 
| Line 169: | Line 169: | ||
''Example'':  | ''Example'':  | ||
<pre>  | <pre>  | ||
| − | POST '/customers/  | + | POST '/v2/customers/123123123/domains/not-a-real-domain.com/dkim/verification'  | 
</pre>  | </pre>  | ||
Revision as of 11:09, 10 July 2019
Contents
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://cp.rackspace.com/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'