In medical statistics, the logistic model is a popular choice for the analysis of the dependence between a response variable and one or more explanatory variables. The response variable is the log odds and it is a linear function of explanatory variables. This type of modelling is restrictive, as the behaviour of the log odds can be best represented by a smooth non-linear function. Thus, we use a representation B-spline, where the number and location of knots are seen as free variables, is used to improve the fitting. For a piecewise linear spline, knots are points where the slope is changing in the shape of the function. Therefore, a quick change of slope allows to interpret the knot location as a threshold value. The use of MCMC simulation techniques is a very important computational tool in Bayesian statistics. These methods belong to a class of algorithms for sampling from target distributions on a space of fixed dimension. The Reversible Jump Markov Chain Monte Carlo (RJMCMC) algorithm, allows simulations from target distributions on spaces of varying dimension. One of the main purposes of the present investigation is to use this RJMCMC method for modelling the log odds by a B-spline representation with an unknown number of knots at unknown locations. The method is illustrated with simulations and a real data set from an in vitro fertilization program.