Ajouter un domaine


Use this endpoint to add a domain and associate it with an organization.

You must specify at least one validation type for the domain. Use the Get validation types endpoint to get available validation types.

curl -X POST \
  https://www.digicert.com/services/v2/domain \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "name": "example.com",
    "organization": {
        "id": 112233
    "validations": [
            "type": "ov"
        	"type": "ev"
    "dcv_method": "email"
import requests

url = "https://www.digicert.com/services/v2/domain"

payload = "{\n    \"name\": \"example.com\",\n    \"organization\": {\n        \"id\": 112233\n    },\n    \"validations\": [\n        {\n            \"type\": \"ov\"\n        },\n        {\n        \t\"type\": \"ev\"\n        }\n    ],\n    \"dcv_method\": \"email\"\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"

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

package main

import (

func main() {

	url := "https://www.digicert.com/services/v2/domain"

	payload := strings.NewReader("{\n    \"name\": \"example.com\",\n    \"organization\": {\n        \"id\": 112233\n    },\n    \"validations\": [\n        {\n            \"type\": \"ov\"\n        },\n        {\n        \t\"type\": \"ev\"\n        }\n    ],\n    \"dcv_method\": \"email\"\n}")

	req, _ := http.NewRequest("POST", 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)


var request = require("request");

var options = { method: 'POST',
  url: 'https://www.digicert.com/services/v2/domain',
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
   { name: 'example.com',
     organization: { id: 112233 },
     validations: [ { type: 'ov' }, { type: 'ev' } ],
     dcv_method: 'email' },
  json: true };

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

201 Created (email)
    "id": 123356,
    "validation_emails": {
        "name_scope": "example.com",
        "base_emails": [
        "whois_emails": [
201 Created (dns-txt-token)
    "id": 123356,
    "dcv_token": {
        "token": "{{random_token}}",
        "status": "pending",
        "expiration_date": "2019-03-02T17:21:39+00:00"
201 Created (dns-cname-token)
    "id": 123356,
    "dcv_token": {
        "token": "{{random_token}}",
        "status": "pending",
        "expiration_date": "2019-03-02T17:22:05+00:00",
        "verification_value": "dcv.digicert.com"
201 Created (http-token)
    "id": 671903,
    "dcv_token": {
        "token": "{{random_token}}",
        "status": "pending",
        "expiration_date": "2019-03-02T17:22:48+00:00",
        "http_token_url": "http://example.com/.well-known/pki-validation/{{random_filename}}.txt"

Request parameters

Name Req/Opt Type Description
name required string Domain name to submit
organization required object The organization of the domain.
.. id required int Organization ID.
validations required array List of validation types for the domain.
.. type required string Validation type identifier.
See Glossary – Validation types
dcv_method optional string Domain control validation method to use.
Allowed values: See Glossary – DCV methods
Default: email
locale optional string Locale 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.

Response parameters

Name Type Description
id int ID of the added domain.
validation_emails object Email addresses used when sending DCV emails.
Only returned for email DCV method.
.. name_scope string Domain scope used for WHOIS record and constructed email addresses.
.. base_emails array List of constructed email addresses.
.. whois_emails array List of email addresses on WHOIS record.
dcv_token object DCV token details.
Only returned for dns-txt-token, dns-cname-token, and http-token DCV methods.
.. token string Random value to use for DCV validation.
.. status string DCV status.
Possible values: pending, active
.. expiration_date string Timestamp for when the token expires.
Format: UTC timezone and ISO 8601 date
.. http_token_url string Filename of the text file and where it should be placed on the web server.
Only returned for http-token DCV method.