How to add collision event programmatically

take a look at this page How to Detect Collisions with Unity.Physics ?

check out the Unity.Physic.Material

new Unity.Physics.Material{
                    CollisionResponse = CollisionResponsePolicy.CollideRaiseCollisionEvents
                }