You will need to add the id to your model url like so.
url: function() {
if(this.id) {
return 'http://api.myapi.com/user/' + this.id;
}
return 'http://api.myapi.com/user';
}
And then when you instantiate the user model you can pass it an id like this.
var user = new UserModel({id: 1});
Then when you do user.fetch()
it will get 'http://api.myapi.com/user/1'
Also by not passing an id
to UserModel
Backbone will send a POST request to 'http://api.myapi.com/user'