Search code examples
restrestful-url

Restful URL design for register


I have Users collection which is accessible in '/users'. It has implemented with CRUD. My question is, for registering a new user, do I really need to create URL '/register'? Basically it violates Restful concept (register is a verb) but I tempt to since I need to do something else.


Solution

  • Use

    POST /users
    

    with a User representation in the body to register a user.

    In general, a POST to a collection resource is used to create a new resource in the collection.