How do I mass add/delete groups in a board using the API?

Aloha,

I am looking for a way to mass add/delete groups in a board using the api.

Can someone give me an example of how this would look adding and deleting 5 groups.

Thank you!!!