Refactoring of the endpoints for sending