Edit user

PUT
https://www.digicert.com/services/v2/user/{{user_id}}

Use this endpoint to update a user's profile information.

To change a user's role, use the Change user role endpoint.

cURL
curl -X PUT \
  https://www.digicert.com/services/v2/user/{{user_id}} \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
  "username": "john.smith@digicert.com",
  "first_name": "John",
  "last_name": "Smith",
  "email": "john.smith@digicert.com",
  "job_title": "Senior Admin",
  "telephone": "1-555-555-5555"
}'
Python
import requests

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

payload = "{\n  \"username\": \"john.smith@digicert.com\",\n  \"first_name\": \"John\",\n  \"last_name\": \"Smith\",\n  \"email\": \"john.smith@digicert.com\",\n  \"job_title\": \"Senior Admin\",\n  \"telephone\": \"1-555-555-5555\"\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

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

print(response.text)
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

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

	payload := strings.NewReader("{\n  \"username\": \"john.smith@digicert.com\",\n  \"first_name\": \"John\",\n  \"last_name\": \"Smith\",\n  \"email\": \"john.smith@digicert.com\",\n  \"job_title\": \"Senior Admin\",\n  \"telephone\": \"1-555-555-5555\"\n}")

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

}
NodeJS
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.digicert.com/services/v2/user/{{user_id}}',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { username: 'john.smith@digicert.com',
     first_name: 'John',
     last_name: 'Smith',
     email: 'john.smith@digicert.com',
     job_title: 'Senior Admin',
     telephone: '1-555-555-5555' },
  json: true };

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

  console.log(body);
});
204 No Content
// empty

Request parameters

Name Req/Opt Type Description
username required string Username to update user profile.
Valid characters: a–z A–Z 0–9 @ - _ +
first_name required string First name to update user profile.
Character limit: 128
last_name required string Last name to update user profile.
Character limit: 128
email required string Email address to update user profile.
Accepts only valid email addresses.
Character limit: 255
job_title optional string Job title to update user profile.
Required for user to be EV approver.
Character limit: 64
telephone optional string Telephone number to update user profile.
Required for user to be EV approver.
Character limit: 64