Edit user
2 minute read
PUT
Use this endpoint to update a user’s profile information. To change a user’s role, use the Change user role endpoint.https://www.digicert.com/services/v2/user/{{user_id}}
Items to note
If you do not include the job_title or phone_number in your edit user request, those values will be removed from the user’s profile.
Example requests and responses
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"
}'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)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))
}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 | optional | string | Username to update user profile. Valid characters: a–z, A–Z, 0–9, @, -, _, + |
| first_name | optional | string | First name to update user profile. Character limit: 128 |
| last_name | optional | string | Last name to update user profile. Character limit: 128 |
| 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 Note: If not included in your request, the job_title value will be removed from the user’s profile. |
| telephone | optional | string | Telephone number to update user profile. Required for user to be EV approver. Character limit: 64 Note: If not included in your request, the telephone value will be removed from the user’s profile. |
| is_saml_sso_only | optional | string | If true, the user can only log in to CertCentral via SAML SSO.Note: Enabling this option does not revoke or disable active API keys that belong to the user. |
Was this page helpful?
Provide feedback