I'm aware of the event emitted from CreatePost.php
$this->_eventManager->dispatch(
'customer_register_success',
['account_controller' => $this, 'customer' => $customer]
);
but this is only for frontend new customer event, I have to find the best area to enter some code that runs only once when a new customer is created.
Edit: customer can be created thru frontend, API, admin page. And I need to catch all.
Edit 2: I'm trying to find the last event when a customer is created or edited, I have to run a reindex command after.
Thanks in advance.