We have a RESTful API that allows for creation of users by POSTing to a particular endpoint, api/v1/users
In the system, when a user is created, an email is sent to the user with content along the lines of "{Authenticated user} just added you to the super cool system and you can now do all sorts of things"
However, in some cases, when a user is created via the API, we don't WANT to send that email to them. Say it's some sort of import process or something - the developer has their data already, and does not want to send any such email.
The debate in our office is the following:
Viewpoint A: "This is an example of how RESTful web services fall down. Instead of POSTing to an endpoint for creating a thing, instead there should be command endpoints for each function that can be performed by the system, so each thing you can do is represented by a command, and if any metadata about that command is necessary, you can add it"
Viewpoint B: "The fact that you don't want thing x to happen when thing y is created means there are either two types of thing y, or thing y has a status which, if different, causes different things to happen when it is created. Therefore you can still adhere to strict RESTful principles"
Can this situation be reconciled with pure RESTful principles? Isn't the metadata a pollution of the "user" entity, and therefore an argument for there being commands for each thing you can do within the system? (Perhaps you can see which side of the argument I fall on...)