{% extends "layout.html" %} {% block content %}
// src/routes/init.py
pause_active_subscriptions(hubspot_client=hubspot, app_id=app_id)
target_url = url_for("webhooks.handle", _external=True)
configure_target_url(hubspot_client=hubspot, app_id=app_id, target_url=target_url)
subscriptions = [
{"event_type": "contact.propertyChange", "property_name": "firstname"},
{"event_type": "contact.creation"},
{"event_type": "contact.deletion"},
]
for subscription in subscriptions:
create_or_activate_subscription(
hubspot_client=hubspot,
app_id=app_id,
**subscription,
)