Add a webhook to a device.

        externalId can be used as opaque data that
        is tied to your company, and passed back in each webhook event
        response.

def postWebhook(self, dev_id, external_id, url, event_types):
        """Add a webhook to a device.

        externalId can be used as opaque data that
        is tied to your company, and passed back in each webhook event
        response.
        """
        path = 'notification/webhook'
        payload = {'device': {'id': dev_id}, 'externalId': external_id,
                   'url': url, 'eventTypes': event_types}
        return self.rachio.post(path, payload)