Contract replace for API