Some Capsule CRM API integration code I've been messing with