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.
Request
Section titled “Request”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | Path | string | Yes | Organization ID. |
contextId | Path | string | Yes | Sign-In Context ID. |
x-auth-token | Header | string | Yes | Context API key. |
username | Body | string | Yes | Username of the user to update. Must already exist in the Context. |
password | Body | string | Yes | New password. Must satisfy the Context’s password policy. |
Request example
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" }'Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
username | string | The user’s username. |
password | string | The updated password. |
Response example
{ "username": "alice.smith", "password": "N3w-P@ssw0rd"}