Is there a way to programmatically add or remove someone from a channel?

Is there a way to programmatically add or remove someone from a channel?

We have a schedule of workers and would like to add or remove them to a channel based on their schedule. Is this possible?