Skip to content
Username & Password

Update user

Rotate the password on an existing username/password user.

PUT /v1/org/{organizationId}/contexts/sign-in/{contextId}/modules/up/update

Updates an existing username/password user. Use this to rotate passwords or correct a mis-provisioned account.

ParameterInTypeRequiredDescription
organizationIdPathstringYesOrganization ID.
contextIdPathstringYesSign-In Context ID.
x-auth-tokenHeaderstringYesContext API key.
usernameBodystringYesUsername of the user to update. Must already exist in the Context.
passwordBodystringYesNew password. Must satisfy the Context’s password policy.

Request example

cURL
curl -X PUT "$API_BASE_URL/v1/org/$ORG_ID/contexts/sign-in/$CTX_ID/modules/up/update" \
-H "x-auth-token: $NETGRAPH_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "alice.smith",
"password": "N3w-P@ssw0rd"
}'
FieldTypeDescription
usernamestringThe user’s username.
passwordstringThe updated password.

Response example

200
{
"username": "alice.smith",
"password": "N3w-P@ssw0rd"
}

Next