Skip to main content

HubSpot web hooks message models

Models for messages that HubSpot sends as web hook calls to your integrations, written as msgspec models.

Why

It's easier to operate on objects with parsed properties, and the models themselves are missing from HubSpot client.

How

Incoming messages are lists of events, each of which is either related to a single object or an association between objects.

Message can be parsed with the following code:

import msgspec.json
from hubspot_webhook_model import Message

data: bytes # request body
model = msgspec.json.decode(data, type=Message)

Request signatures should be verified using the raw body

Caveats

  1. Messages contain events related to a single event, which can be user action or one of the internal HubSpot mechanisms. They are typically related to a single object, but not always.
  2. Events in a message are not ordered. propertyChange enevts may appear before creation events.
  3. The model only works with the new style generic webhook subscriptions.
  4. Only a subset of objects is included. Feel free to create Pull Requests with additional models as needed.

Release files for hubspot-webhook-model 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hubspot-webhook-model 0.2.0
File Size Uploaded
hubspot_webhook_model-0.2.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hubspot-webhook-model 0.2.0
File Interpreter ABI Platform
hubspot_webhook_model-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.9 kB

Release files / hubspot_webhook_model-0.2.0.tar.gz

Download URL hubspot_webhook_model-0.2.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dee55a2a5db8d64f78a48414649910339477d48c37637d1fc01656221aac58ed
BLAKE2b-256 checksum
How to use checksums
7bbfafa62d146fe2f3df7173620f5661fc073a57331e65e8765e96adf527e708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.25

Release files / hubspot_webhook_model-0.2.0-py3-none-any.whl

Download URL hubspot_webhook_model-0.2.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
566731d94d4ca6f68ba28f609ffc84eb928e8a10236c544c3a369c24b6bb10a2
BLAKE2b-256 checksum
How to use checksums
059006286e115cc6ec32b56750e576ff96af0c6fe40e8544d6b7b6cefa676c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.25

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page