changePassword
Requires an authenticated session.
Changes the signed-in user's password. A user who already has a password must give the current one; a user without one, for example after an OTP or SSO sign-up, sets one. Every other session of the user ends and the current one stays.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation ChangePassword($input: ChangePasswordInput!) {
changePassword(input: $input) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ChangePassword($input: ChangePasswordInput!) {\n changePassword(input: $input) {\n id\n postalCode\n name\n firstName\n lastName\n status\n directPermissions {\n id\n name\n createdAt\n action\n description\n direct\n }\n }\n}",
"variables": {
"input": {
"newPassword": "string"
}
}
}
EOF
Variables:
{
"input": {
"newPassword": "string"
}
}
Response:
{
"data": {
"changePassword": {
"id": "id",
"postalCode": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"status": "ACTIVE",
"directPermissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
}
changePassword(
input: ChangePasswordInput!
): User!
Arguments
changePassword.input ● ChangePasswordInput! non-null input
The current password, when the user has one, and the new password.
Type
User object
A user of the organization.