Change DCV method

PUT https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method
Use this endpoint to set the domain control validation (DCV) method for a domain.

DCV emails

By default, changing the DCV method to email from any other method automatically sends DCV emails to the email addresses returned in the validation_emails array.

  • To change the DCV method to email without sending any DCV emails, set the value of the send_dcv_email_flag request parameter to false in your JSON payload.
  • If the domain is already configured to use email as the DCV method, submitting email as the DCV method does not cause new DCV emails to be sent. To resend DCV emails, use the Resend DCV email endpoint.

Example requests and responses

curl -X PUT \
  'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
	"dcv_method": "<dcv_method>"
}'
import requests

url = "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method"

payload = "{\n\t\"dcv_method\": \"<dcv_method>\"\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method"

	payload := strings.NewReader("{\n\t\"dcv_method\": \"<dcv_method>\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: { dcv_method: '<dcv_method>' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
{
  "validation_emails": {
    "name_scope": "example.net",
    "base_emails": [
      "webmaster@example.net",
      "administrator@example.net",
      "postmaster@example.net",
      "admin@example.net",
      "hostmaster@example.net"
    ]
  }
}
{
    "dcv_token": {
        "token": "<random_value>",
        "status": "pending",
        "expiration_date": "2018-11-18T20:35:32+00:00",
        "verification_value": "dcv.digicert.com"
    }
}
{
    "dcv_token": {
        "token": "<random_value>",
        "status": "pending",
        "expiration_date": "2018-11-18T20:38:45+00:00",
        "http_token_url": "http://example.com/.well-known/pki-validation/<random_file_name>.txt"
    }
}
{
    "dcv_token": {
        "token": "<random_value>",
        "status": "pending",
        "expiration_date": "2018-11-18T20:40:43+00:00"
    }
}
// Submitting the same dcv_method already set for the domain returns an empty JSON object
{}

Path parameters

NameReq/OptDescription
domain_idrequiredDomain ID.

Request parameters

NameReq/OptTypeDescription
dcv_methodrequiredstringDCV method to use for the domain.
Allowed values: See Glossary – DCV methods
localeoptionalstringLocale code for the language of the DCV emails. Ignored if dcv_method is not email.
Allowed values: See Glossary – Locale codes.
Default: If the request does not include a valid locale code, we send the DCV emails in English.
send_dcv_email_flagoptionalbooleanIf true (default) and you change the dcv_method to email from any other method, DigiCert automatically sends DCV emails to the email addresses returned in the validation_emails array. Otherwise, false.
If the domain is already configured to use email as the DCV method, passing true for the send_dcv_email_flag parameter does not cause new DCV emails to be sent. To resend DCV emails, use the Resend DCV email endpoint.
email_arrayoptionalarray of stringsWhen dcv_method is email, limit who receives verification DCV emails to addresses in this list. Ignored for other DCV methods.
Each email address must be a valid constructed email address for the domain or an approved DNS-based email contact from the domain’s DNS TXT record. Other email addresses are ignored.
Your CertCentral account settings* configure the addresses you can choose from when limiting verification DCV email recipients. If none of the emails you provide are configured to receive verification DCV emails, or if you omit the email_array parameter from your request, DigiCert sends emails to all constructed email addresses and DNS TXT record emails for the domain.
*To view your account settings, in the left main menu, go to Settings > Preferences. Then, on the Preferences page, expand Advanced Settings, and look under Send Verification DCV Emails to.

Response parameters

NameTypeDescription
validation_emailsobjectEmail addresses used when sending DCV emails. Only returned when changing the DCV method to email.
.. name_scopestringDomain scope used for constructed email addresses and DNS-based contacts.
.. base_emailsarray of stringsList of constructed email addresses.
.. email_arrayarray of stringsComplete list of email addresses you can choose from when limiting who receives DCV emails for the domain. Configure this list in your CertCentral account.*
The email_array response parameter is only returned if you changed the default settings for which email addresses can receive verification DCV emails for your account.
*To view your account settings, in the left main menu, go to Settings > Preferences. Then, on the Preferences page, expand Advanced Settings, and look under Send Verification DCV Emails to.
dcv_tokenstringObject containing information about the DCV method change.
.. tokenstringRandom value used to prove control over domain.
.. statusstringStatus of the domain verification.
.. expiration_datestringTimestamp of when the DCV token will expire.
Format: UTC timezone and ISO 8601 date
.. verification_valuestringValue for the DNS record target host field Only returned if DCV method is dns-cname-token.
.. http_token_urlstringFilename and location for the .txt file. Only returned if DCV method is http-token.