# changeUserPassword

> Required permission: UserWrite

Source: https://docs.gastrogate.io/docs/api/mutations/changeUserPassword

```graphql
changeUserPassword(
  userId: ID!
  oldPassword: String!
  newPassword: String!
): Void
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `userId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `oldPassword` | [`String`](https://docs.gastrogate.io/docs/api/types/String.md)! |  |
| `newPassword` | [`String`](https://docs.gastrogate.io/docs/api/types/String.md)! |  |

## Returns

[`Void`](https://docs.gastrogate.io/docs/api/types/Void.md)

## Example

```graphql
mutation ChangeUserPassword($userId: ID!, $oldPassword: String!, $newPassword: String!) {
  changeUserPassword(userId: $userId, oldPassword: $oldPassword, newPassword: $newPassword)
}
```

```bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { changeUserPassword(...) { __typename } }"}'
```
