# Send Recovery Code Email

`PUT /auth/recover/user/code`

Sends the user a recovery verification code. This code is used as a second factor to verify the user initiated the recovery request.

{% hint style="info" %}

* Request headers required. See [Request Headers](/d/advanced-topics/authentication/request-headers.md) for more information.
  {% endhint %}

## Required Permissions

None

## Request body <a href="#request-body" id="request-body"></a>

|                                               |          |                                                    |
| --------------------------------------------- | -------- | -------------------------------------------------- |
| `username` <mark style="color:red;">\*</mark> | `String` | email of the user                                  |
| `orgId` <mark style="color:red;">\*</mark>    | `String` | globally unique ID of the organization of the user |

### Example

```json
{
  "username": "jdoe@example.co",
  "orgId": "or-34513-nip9c-8bppvgqgj28dbodrc"
}
```

## Responses

{% hint style="info" %}

* See [Common Errors](https://github.com/dfns/dfns-api-docs/blob/m/getting-started/errors.md#common-errors) for common errors.
* See [User Recovery Errors](https://github.com/dfns/dfns-api-docs/blob/m/getting-started/errors.md#user-recovery-errors) for user recovery specific errors.
  {% endhint %}

{% tabs %}
{% tab title="200" %}
**Success** - generic success message

```json
{
    "message": "success"
}
```

{% 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-legacy.dfns.co/d/api-docs/authentication/user-recovery/createuserrecoverycode.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.
