Here is the program I run: var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjectId = Schema.ObjectId; //Have also tried Schema.Types.ObjectId, mongoose.ObjectId mongoose.connect('mongodb://user:password@server:port/database'); app.get('/myClass/:Id/childClass/create', function(request, result) { var id = new ObjectId(request.params.Id); ...