Is it possible to dynamically add joints to objects?

So my buddy and I started on our project and are making good progress. Basically when you collect an object it attaches to the player in a chain which we achieved but would like to add hinge joints between the balls so they can move because as of now they are locked in position.

*edit Sorry if I am not clear this is my first time messing with unity and I am trying and learning.

gameObject.AddComponent();