Create subaccount

POST https://www.digicert.com/services/v2/account
Use this endpoint to create a new subaccount.

Items to note

If subaccounts have not been enabled by your account representative, you will receive access_denied|missing_permission error.

Example requests and responses

curl -X POST \
  https://www.digicert.com/services/v2/account \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
  "account_type": "retail",
  "allowed_grandchildren": [
    "retail",
    "enterprise",
    "reseller"
  ],
  "account_manager_user_id": 12345,
  "user": {
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com",
    "username": "john.smith@example.com",
    "job_title": "Statistician",
    "telephone": "111-222-333-4444",
    "disable_renewal_notifications": true
  },
  "organization": {
    "name": "Example Company, LLC",
    "address": "123 Fake Street",
    "address2": "Suite 321",
    "zip": "93090",
    "city": "Toledo",
    "state": "Ohio",
    "country": "US",
    "telephone": "111-222-333-4445"
  }
}'
import requests

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

payload = "{\n  \"account_type\": \"retail\",\n  \"allowed_grandchildren\": [\n    \"retail\",\n    \"enterprise\",\n    \"reseller\"\n  ],\n  \"account_manager_user_id\": 12345,\n  \"user\": {\n    \"first_name\": \"John\",\n    \"last_name\": \"Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"username\": \"john.smith@example.com\",\n    \"job_title\": \"Statistician\",\n    \"telephone\": \"111-222-333-4444\"\n  },\n  \"organization\": {\n    \"name\": \"Example Company, LLC\",\n    \"address\": \"123 Fake Street\",\n    \"address2\": \"Suite 321\",\n    \"zip\": \"93090\",\n    \"city\": \"Toledo\",\n    \"state\": \"Ohio\",\n    \"country\": \"US\",\n    \"telephone\": \"111-222-333-4445\"\n  }\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("POST", 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/account"

	payload := strings.NewReader("{\n  \"account_type\": \"retail\",\n  \"allowed_grandchildren\": [\n    \"retail\",\n    \"enterprise\",\n    \"reseller\"\n  ],\n  \"account_manager_user_id\": 12345,\n  \"user\": {\n    \"first_name\": \"John\",\n    \"last_name\": \"Smith\",\n    \"email\": \"john.smith@example.com\",\n    \"username\": \"john.smith@example.com\",\n    \"job_title\": \"Statistician\",\n    \"telephone\": \"111-222-333-4444\"\n  },\n  \"organization\": {\n    \"name\": \"Example Company, LLC\",\n    \"address\": \"123 Fake Street\",\n    \"address2\": \"Suite 321\",\n    \"zip\": \"93090\",\n    \"city\": \"Toledo\",\n    \"state\": \"Ohio\",\n    \"country\": \"US\",\n    \"telephone\": \"111-222-333-4445\"\n  }\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)

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

}
var request = require("request");

var options = { method: 'POST',
  url: 'https://www.digicert.com/services/v2/account',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { account_type: 'retail',
     allowed_grandchildren: [ 'retail', 'enterprise', 'reseller' ],
     account_manager_user_id: 12345,
     user: 
      { first_name: 'John',
        last_name: 'Smith',
        email: 'john.smith@example.com',
        username: 'john.smith@example.com',
        job_title: 'Statistician',
        telephone: '111-222-333-4444' },
     organization: 
      { name: 'Example Company, LLC',
        address: '123 Fake Street',
        address2: 'Suite 321',
        zip: '93090',
        city: 'Toledo',
        state: 'Ohio',
        country: 'US',
        telephone: '111-222-333-4445' } },
  json: true };

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

  console.log(body);
});
{
  "id": 1122334,
  "account_type": "retail",
  "account_manager_user_id": 12345,
  "organization": {
    "id": 3344556,
    "status": "active",
    "name": "Example Company, LLC",
    "display_name": "Example Company, LLC",
    "is_active": true,
    "address": "123 Fake Street",
    "zip": "93090",
    "city": "Toledo",
    "state": "Ohio",
    "country": "us",
    "telephone": "111-222-333-4445",
    "container": {
      "id": 112234,
      "parent_id": 0,
      "name": "Example Company, LLC",
      "is_active": true
    }
  },
  "user": {
    "id": 45321,
    "username": "john.smith@example.com",
    "account_id": 12121,
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com",
    "job_title": "Statistician",
    "telephone": "111-222-333-4444",
    "type": "standard"
  }
}
{
  "id": 1122334,
  "account_type": "managed",
  "account_manager_user_id": 12345,
  "organization": {
    "id": 3344556,
    "status": "active",
    "name": "Example Company, LLC",
    "display_name": "Example Company, LLC",
    "is_active": true,
    "address": "123 Fake Street",
    "zip": "93090",
    "city": "Toledo",
    "state": "Ohio",
    "country": "us",
    "telephone": "111-222-333-4445",
    "container": {
      "id": 112234,
      "parent_id": 0,
      "name": "Example Company, LLC",
      "is_active": true
    }
  },
  "user": {
    "id": 45321,
    "username": "john.smith@example.com",
    "account_id": 12121,
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@example.com",
    "job_title": "Statistician",
    "telephone": "111-222-333-4444",
    "type": "standard"
  },
  "api_key": "{{api_key}}"
}

Request parameters

NameReq/OptTypeDescription
account_typerequiredstringSpecify type of subaccount to create. See Glossary – Subaccount types.
Allowed values: retail, enterprise, reseller, managed
allowed_grandchildrenrequiredarrayList of account types that can be created under the account. See Glossary – Subaccount types.
Allowed values: retail, enterprise, reseller
account_manager_user_idoptionalintegerID of an existing user that will manage the subaccount.
bill_parentoptionalbooleanIf true, DigiCert bills the parent account (your account) for orders from the subaccount. If false, DigiCert bills the subaccount directly.
Default: false
enforce_bill_parentoptionalbooleanIf true, the subaccount can only create bill-to-parent child accounts. If false, the subaccount can create subaccounts with either billing configuration: bill self or bill-to-parent.
Default: false
Note: When bill_parent is true, we ignore this parameter.
child_nameoptionalstringFriendly name to help identify subaccounts with identical or similar names. This name is only visible to the parent account.
Maximum length: 64 characters
userrequiredobjectDetails about the new subaccount user to create.
.. first_namerequiredstringFirst name of the subaccount user.
.. last_namerequiredstringLast name of the subaccount user.
.. emailrequiredstringEmail address of the subaccount user. The account creation email will be sent to this address.
.. usernameoptionalstringUsername used to sign in to the subaccount. If omitted, the email value will be used as the username.
.. job_titleoptionalstringJob title of the subaccount user.
.. telephoneoptionalstringTelephone number of the subaccount user.
.. disable_renewal_notificationsoptionalbooleanSpecify if this account will receive renewal notifications.
Default:
false
organizationrequiredobjectDetails about the subaccount’s primary organization
.. namerequiredstringLegal name of the organization.
.. assumed_nameoptionalstringPublic name of the organization. Also called DBA name.
.. addressrequiredstringAddress of the organization.
.. address2optionalstring
.. ziprequiredstringPostal code of the organization.
.. cityrequiredstringCity where the organization is located.
.. staterequiredstringState where the organization is located.
.. countryrequiredstringCountry where the organization is located.
.. telephoneoptionalstringOrganization telephone number.
max_allowed_multi_year_plan_lengthoptionalintegerMaximum Multi-year Plan length for orders the subaccount creates.
Range: 1-3 years. Cannot exceed the maximum Multi-year Plan length of the parent account.
Default: If not provided, the subaccount inherits the maximum length from the parent account.
* Note: Enterprise License Agreement (ELA) and Flat Fee contracts only support 1- and 2-year Multi-year Plans. When you provide a value greater than the length allowed for your account, we return an error.
allow_parent_order_renewaloptionalbooleanIf true, subaccount can renew orders created by the parent account.
Default:
false
enable_ica_selectionoptionalbooleanIf true, intermediate CA selection is enabled for the subaccount.
Default:
false
Learn more about configuring the ICA certificate chain feature for your public certificates.
custom_order_validityoptionalstringSet to 1 to enable custom order validity or 0 to disable it. If enabled, you can specify a custom validity period for orders. If disabled, the default validity options will be available.
Default:0

Response parameters

NameTypeDescription
idintegerAccount ID of the subaccount.
account_typestringAccount type of the subaccount.
account_manager_user_idintegerUser ID of the subaccount manager.
bill_parentbooleanSpecifies if parent account is billed for certificate orders.
organizationobjectDetails about the subaccount’s primary organization.
.. idintegerOrganization ID.
.. statusstringOrganization status.
Possible values: active, inactive
.. namestringLegal name of the organization.
.. assumed_namestringPublic name of the organization. Also called DBA name.
.. display_namestringFull name of the organization. Constructed using name + assumed_name.
.. is_activebooleanActive status of the organization.
.. addressstringAddress of the organization.
.. address2string
.. zipstringPostal code of the organization.
.. citystringCity where the organization is located.
.. statestringState where the organization is located.
.. countrystringCountry where the organization is located.
.. telephonestringOrganization telephone number.
.. containerobjectPrimary container the organization is attached to.
.. .. idintegerContainer ID.
.. .. parent_idintegerID of the container’s parent.
.. .. namestringName of the container.
.. .. is_activebooleanActive status of the organization.
userobjectDetails about the new subaccount user.
.. idintegerUser ID.
.. usernamestringUsername used to sign in to the subaccount.
.. account_idintegerAccount ID of the new subaccount.
.. first_namestringFirst name of the user.
.. last_namestringLast name of the user.
.. emailstringEmail address of the user.
.. job_titlestringJob title of the user.
.. telephonestringTelephone number of the user.
.. typestringUser type. Possible values: standard
api_keystringGenerated API key for the subaccount. Only returned if subaccount_type is managed.
child_namestringFriendly name to help identify subaccounts with identical or similar names. Only returned if the subaccount has a child_name.
max_allowed_multi_year_plan_lengthintegerMaximum Multi-year Plan length (in years) for orders the subaccount creates.
allow_parent_order_renewalbooleanIf true, subaccount can renew orders created by the parent account. Otherwise, false.
enable_ica_selectionbooleanIf true, intermediate CA selection is enabled for the subaccount. Otherwise, false.