Woocommerce hook run after an Order been created through REST API

I’m building a plugin that needs to update data after order creation! I have succeeded in doing that on the website but not in the REST API

What I have done is using woocommerce_thankyou that working fine after checkout through the website but not the REST API too!!

So how to do the same function below after Creating an Order through WooCommerce REST API!!