Title: rest_pre_insert_application_password
Published: December 9, 2020
Last modified: May 20, 2026

---

# apply_filters( ‘rest_pre_insert_application_password’, stdClass $prepared, WP_REST_Request $request )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#wp--skip-link--target)

Filters an application password before it is inserted via the REST API.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#parameters)󠁿

 `$prepared`stdClass

An object representing a single application password prepared for inserting or updating
the database.

`$request`[WP_REST_Request](https://developer.wordpress.org/reference/classes/wp_rest_request/)

Request object.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'rest_pre_insert_application_password', $prepared, $request );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L594)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L594-L594)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_REST_Application_Passwords_Controller::prepare_item_for_database()](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/prepare_item_for_database/)`wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php` |

Prepares an application password for a create or update operation.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/rest_pre_insert_application_password/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.6.0](https://developer.wordpress.org/reference/since/5.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Frest_pre_insert_application_password%2F)
before being able to contribute a note or feedback.