Add user


Use this endpoint to create a new user. To get available access roles, use the List container roles endpoint.

By default, the user will be created in the same container as the user associated with the API key used with the request.

curl -X POST \ \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "first_name": "Jill",
    "last_name": "Valentine",
    "email": "",
    "telephone": "555-555-5555",
    "job_title": "S.T.A.R.S. Alpha Team",
    "username": "jill.valentine",
    "container": {
        "id": 93288
    "access_roles": [
            "id": 5
import requests

url = ""

payload = "{\n    \"first_name\": \"Jill\",\n    \"last_name\": \"Valentine\",\n    \"email\": \"\",\n    \"telephone\": \"555-555-5555\",\n    \"job_title\": \"S.T.A.R.S. Alpha Team\",\n    \"username\": \"jill.valentine\",\n    \"container\": {\n        \"id\": 93288\n    },\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)

package main

import (

func main() {

	url := ""

	payload := strings.NewReader("{\n    \"first_name\": \"Jill\",\n    \"last_name\": \"Valentine\",\n    \"email\": \"\",\n    \"telephone\": \"555-555-5555\",\n    \"job_title\": \"S.T.A.R.S. Alpha Team\",\n    \"username\": \"jill.valentine\",\n    \"container\": {\n        \"id\": 93288\n    },\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)


var request = require("request");

var options = { method: 'POST',
  url: '',
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
   { first_name: 'Jill',
     last_name: 'Valentine',
     email: '',
     telephone: '555-555-5555',
     job_title: 'S.T.A.R.S. Alpha Team',
     username: 'jill.valentine',
     container: { id: 93288 },
     access_roles: [ { id: 5 } ] },
  json: true };

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

201 Created
    "id": 1538858

Request parameters

Name Req/Opt Type Description
username required string Username for the profile.
Valid characters: a–z A–Z 0–9 @ - _ + .
first_name required string First name of the user.
Character limit: 128
last_name required string Last name of the user.
Character limit: 128
email required string Email address of the user.
Accepts only valid email addresses.
Character limit: 255
job_title optional string Job title of the user.
Required for user to be an EV approver.
Character limit: 64
telephone optional string Telephone number of the user.
Required for user to be an EV approver.
Character limit: 64
container required object Details of the user container.
.. id required int ID of the container the user will be created under.
access_roles required array Container for access role ID.
.. id required int ID of the access role to assign the user.
See Glossary – Access roles
container_id_assignments required array List of container IDs the user will be assigned to. If set, this will override any default containers the user can view.
is_saml_sso_only optional bool If true, the user can only log in to CertCentral via SAML SSO.
Default: false

Response parameters

Name Type Description
id int ID of the created user.