# Resend Registration Code

`PUT /auth/registration/code`

Sends the user a new registration code. The previous registration code will be marked invalid. If the user has already completed their registration no action will be taken

{% hint style="info" %}

* Request headers required. See [Request Headers](https://docs-legacy.dfns.co/d/advanced-topics/authentication/request-headers) 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 Registration Errors](https://github.com/dfns/dfns-api-docs/blob/m/getting-started/errors.md#user-registration-errors) for user registration 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/registration/resendregistrationemail.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.
