Exodus 21:2-7

2 aWhen you buy a Hebrew slave,
Or servant; the Hebrew term  ‘ebed designates a range of social and economic roles; also verses 5, 6, 7, 20, 21, 26, 27, 32 (see Preface)
he shall serve six years, and in the seventh he shall go out free, for nothing.
3If he comes in single, he shall go out single; if he comes in married, then his wife shall go out with him. 4If his master gives him a wife and she bears him sons or daughters, the wife and her children shall be her master’s, and he shall go out alone. 5But cif the slave plainly says, ‘I love my master, my wife, and my children; I will not go out free,’ 6then his master shall bring him to dGod, and he shall bring him to the door or the doorpost. And his master shall bore his ear through with an awl, and he shall be his slave forever.

7“When a man esells his daughter as a slave, she shall not go out as the male slaves do.
Copyright information for ESV