Title: Update endpoint
Last modified: August 31, 2016

---

# Update endpoint

 *  [qgoutte](https://wordpress.org/support/users/qgoutte/)
 * (@qgoutte)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/update-endpoint/)
 * Hello
    I try to create an endpoint to update usermeta but when I use a POST or
   PUT method I have an Error 404 “rest no route”. But when I use a GET method it’s
   return my “OK”
 * I don’t understand why my PUT method don’t works.
 *     ```
       add_action( 'rest_api_init', function () {
           register_rest_route( 'wp/v2', '/usersubscriptions/(?P<id>\d+)', array(
               'methods' => 'PUT',
               'callback' => 'update_subscriptions',
           ) );
       } );
   
       function update_subscriptions($update){
           update_user_meta( $data['id'], "last_name", $update);
           return 'OK';
       }
       ```
   
 * [https://wordpress.org/plugins/rest-api/](https://wordpress.org/plugins/rest-api/)

The topic ‘Update endpoint’ is closed to new replies.

 * ![](https://ps.w.org/rest-api/assets/icon-256x256.png?rev=1346297)
 * [WordPress REST API (Version 2)](https://wordpress.org/plugins/rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rest-api/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [qgoutte](https://wordpress.org/support/users/qgoutte/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/update-endpoint/)
 * Status: not resolved