Add user

POST https://www.digicert.com/services/v2/user
Use this endpoint to create a new user. To get available access roles, use the List container roles endpoint.

Example requests and responses

curl -X POST \
  https://www.digicert.com/services/v2/user \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "first_name": "Jill",
    "last_name": "Valentine",
    "email": "jill.valentine@pd.racoon-city.gov",
    "telephone": "555-555-5555",
    "job_title": "S.T.A.R.S. Alpha Team",
    "username": "jill.valentine",
    "access_roles": [
        {
            "id": 5
        }
    ]
}'
import requests

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

payload = "{\n    \"first_name\": \"Jill\",\n    \"last_name\": \"Valentine\",\n    \"email\": \"jill.valentine@pd.racoon-city.gov\",\n    \"telephone\": \"555-555-5555\",\n    \"job_title\": \"S.T.A.R.S. Alpha Team\",\n    \"username\": \"jill.valentine\",\n    \"access_roles\": [\n        {\n            \"id\": 5\n        }\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/user"

	payload := strings.NewReader("{\n    \"first_name\": \"Jill\",\n    \"last_name\": \"Valentine\",\n    \"email\": \"jill.valentine@pd.racoon-city.gov\",\n    \"telephone\": \"555-555-5555\",\n    \"job_title\": \"S.T.A.R.S. Alpha Team\",\n    \"username\": \"jill.valentine\",\n    \"access_roles\": [\n        {\n            \"id\": 5\n        }\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/user',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { first_name: 'Jill',
     last_name: 'Valentine',
     email: 'jill.valentine@pd.racoon-city.gov',
     telephone: '555-555-5555',
     job_title: 'S.T.A.R.S. Alpha Team',
     username: 'jill.valentine',
     access_roles: [ { id: 5 } ] },
  json: true };

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

  console.log(body);
});

201 Created

{
    "id": 1538858
}

Request parameters

NameReq/OptTypeDescription
usernamerequiredstringUsername for the profile.
Valid characters:a–z, A–Z, 0–9, @, -, _, +, .
first_namerequiredstringFirst name of the user.
Character limit: 128
last_namerequiredstringLast name of the user.
Character limit: 128
emailrequiredstringEmail address of the user. Accepts only valid email addresses.
Character limit: 255
job_titleoptionalstringJob title of the user. Required for user to be an EV approver.
Character limit: 64
telephoneoptionalstringTelephone number of the user. Required for user to be an EV approver.
Character limit: 64
containeroptionalobjectDetails of the user container.
Note: The container request parameter exists for a legacy use case. To restrict a user’s access to one or more divisions, use the container_id_assignments array, instead.
.. idoptionalintID of the container the user will be created under.
access_rolesrequiredarrayContainer for access role ID.
.. idrequiredintID of the access role to assign the user.
See Glossary – Access roles.
container_id_assignmentsrequiredarrayList of container IDs (divisions) the user will be assigned to. If set, this will override any default containers the user can view.
is_saml_sso_onlyoptionalboolIf true, the user can only log in to CertCentral via SAML SSO.
Default:
false

Response parameters

NameTypeDescription
idintID of the created user.