# Request Reset Password

The `requestResetPassword` mutation allows users to send a password request based on a given email. As a result of the executing of this mutation, a code will be returned, use it in the [`resetPassword`](https://docs.suggestic.com/graphql/query/mutations/user-profile/reset-password) mutation to successfully reset the password.&#x20;

## Required Arguments

| Argument | Type   | Description                               |
| -------- | ------ | ----------------------------------------- |
| `email`  | String | User's email which password will be reset |

## Available Fields

| Field               | Type    | Description                                                                                                                                                                                                                                                        |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `success`           | Boolean | <p>True if the reset password has been created</p><p>False if the reset password has not been created</p>                                                                                                                                                          |
| `message`           | String  | Description of the result                                                                                                                                                                                                                                          |
| `resetPasswordCode` | Number  | Code to be used in the [`resetPassword`](https://docs.suggestic.com/graphql/query/mutations/user-profile/reset-password) mutation through the code argument to reset the password. Unused password reset code will expire 24 hours after the request has been sent |

## Examples

The following examples request a reset password code.

### Graphql example

{% tabs %}
{% tab title="Mutation" %}

```graphql
 mutation {
 requestResetPassword(email: "user@mail.com") {
    success
    message
    resetPasswordCode
  }
  }
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "requestResetPassword": {
      "success": true,
      "message": "Reset password code created",
      "resetPasswordCode": "ZWE3MWQ0ZjktZDJkYS00NGMzLWE1NjQtNjE3NTUyNTJlY2I4OjVyNy00MzYyYzdkNGRmNGM1NzMwNTlmOA=="
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Curl Example

{% tabs %}
{% tab title="Curl " %}

```java
curl --location --request POST 'https://production.suggestic.com/graphql' \
--header 'Authorization: Token <API-Token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation {\n    requestResetPassword(email: \"user@mail.com\") {\n        success message resetPasswordCode\n    }\n}","variables":{}}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/mutations/user-profile/request-reset-password.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
