Return the correct status code for created