If subaccounts have not been enabled by your account representative, you will receive access_denied|missing_permission
error.
Use this endpoint to create a new subaccount.
When creating a managed account, the API key is shown only this one time in the api_key
parameter of the response body. It will never be shown again. If it is lost, you must contact support at https://www.digicert.com/contact-us/ to get a new one.
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}}"
}
Name | Req/Opt | Type | Description |
---|---|---|---|
account_type | required | string |
Specify type of subaccount to create. See Glossary – Subaccount types Allowed values: retail , enterprise , reseller , managed
|
allowed_grandchildren | required | array |
List of account types that can be created under the account. See Glossary – Subaccount types Allowed values: retail , enterprise , reseller
|
account_manager_user_id | optional | integer | ID of an existing user that will manage the subaccount. |
bill_parent | optional | boolean |
If true , DigiCert bills the parent account (your account) for orders from the subaccount. If false , DigiCert bills the subaccount directly.Default: false
|
enforce_bill_parent | optional | boolean |
If 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_name | optional | string |
Friendly name to help identify subaccounts with identical or similar names. This name is only visible to the parent account. Maximum length: 64 characters |
user | required | object | Details about the new subaccount user to create. |
.. first_name | required | string | First name of the subaccount user. |
.. last_name | required | string | Last name of the subaccount user. |
required | string |
Email address of the subaccount user. The account creation email will be sent to this address. |
|
.. username | optional | string |
Username used to sign in to the subaccount. If omitted, the email value will be used as the username.
|
.. job_title | optional | string | Job title of the subaccount user. |
.. telephone | optional | string | Telephone number of the subaccount user. |
.. disable_renewal_notifications | optional | boolean |
Specify if this account will receive renewal notifications. Default: false
|
organization | required | object | Details about the subaccount's primary organization |
.. name | required | string | Legal name of the organization. |
.. assumed_name | optional | string |
Public name of the organization. Also called DBA name. |
.. address | required | string | Address of the organization. |
.. address2 | optional | string | |
.. zip | required | string | Postal code of the organization. |
.. city | required | string | City where the organization is located. |
.. state | required | string | State where the organization is located. |
.. country | required | string | Country where the organization is located. |
.. telephone | optional | string | Organization telephone number. |
max_allowed_multi_year_plan_length | optional | integer |
Maximum Multi-year Plan length for orders the subaccount creates. Range: 1 -6 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_renewal | optional | boolean |
If true , subaccount can renew orders created by the parent account.Default: false
|
Name | Type | Description |
---|---|---|
id | integer | Account ID of the subaccount. |
account_type | string | Account type of the subaccount. |
account_manager_user_id | integer | User ID of the subaccount manager. |
bill_parent | boolean | Specifies if parent account is billed for certificate orders. |
organization | object | Details about the subaccount's primary organization. |
.. id | integer | Organization ID. |
.. status | string |
Organization status. Possible values: active , inactive
|
.. name | string | Legal name of the organization. |
.. assumed_name | string |
Public name of the organization. Also called DBA name. |
.. display_name | string |
Full name of the organization. Constructed using name + assumed_name. |
.. is_active | boolean | Active status of the organization. |
.. address | string | Address of the organization. |
.. address2 | string | |
.. zip | string | Postal code of the organization. |
.. city | string | City where the organization is located. |
.. state | string | State where the organization is located. |
.. country | string | Country where the organization is located. |
.. telephone | string | Organization telephone number. |
.. container | object | Primary container the organization is attached to. |
.. .. id | integer | Container ID. |
.. .. parent_id | integer | ID of the container's parent. |
.. .. name | string | Name of the container. |
.. .. is_active | boolean | Active status of the organization. |
user | object | Details about the new subaccount user. |
.. id | integer | User ID. |
.. username | string | Username used to sign in to the subaccount. |
.. account_id | integer | Account ID of the new subaccount. |
.. first_name | string | First name of the user. |
.. last_name | string | Last name of the user. |
string | Email address of the user. | |
.. job_title | string | Job title of the user. |
.. telephone | string | Telephone number of the user. |
.. type | string |
User type. Possible values: standard
|
api_key | string |
Generated API key for the subaccount. Only returned if subaccount_type is managed .
|
child_name | string |
Friendly name to help identify subaccounts with identical or similar names. Only returned if the subaccount has a child_name .
|
max_allowed_multi_year_plan_length | integer | Maximum Multi-year Plan length (in years) for orders the subaccount creates. |
allow_parent_order_renewal | boolean |
If true , subaccount can renew orders created by the parent account. Otherwise, false .
|