HubSpot Licensing Integration
In short: both directions work with the HubSpot tools you already have. A HubSpot workflow sends a webhook when a company becomes a customer, and your receiver creates the NetLicensing licensee and license. In the other direction, a NetLicensing notification reaches your receiver, which writes the license status to company properties through the HubSpot API, so sales and support see it on the record.
HubSpot has no NetLicensing app. For NetLicensing’s own CRM extension, see Zoho CRM; for another webhook-based CRM, see Pipedrive.
HubSpot to NetLicensing: the Send a webhook action
The workflow action Send a webhook (in the Data ops section of the workflow editor) sends an HTTP request when a record reaches that step. HubSpot’s page on workflow webhooks lists it as available with Data Hub Professional or Enterprise. To set it up you need Edit permission for workflows (or Super Admin), and Publish permission to turn the workflow on.
What you can set:
| Setting | Options |
|---|---|
| Method | POST (send data) or GET (retrieve data) |
| URL | Must start with https://. You can add query parameters |
| Authentication | API key (you choose the key name and send it in a request header or in the query parameters) or Include request signature in header (needs your HubSpot App ID) |
Request body (POST) | Include all [object] properties, or Customize request body: your own keys, each filled from a HubSpot property or from a static value |
| Rate limit | Optional: maximum executions per time frame (seconds, minutes or hours); off by default |
HubSpot’s workflow page documents the webhook for contact-based workflows and says that webhooks in other workflow types return only the most recent value of a property (the history is for contact-based workflows only). Use Customize request body to send only what your receiver needs. The example below uses a company-based workflow that starts when a company becomes a customer. A deal-based workflow works the same way if you prefer to start from a won deal.
The Test action panel runs the webhook with a record you pick and shows the request and the response without changing HubSpot records. You can also point the action at a throwaway URL from a service such as webhook.site to see exactly what HubSpot sends.
Map HubSpot events to NetLicensing
| Workflow trigger (your choice) | Body you send | What your receiver does in NetLicensing |
|---|---|---|
| A company becomes a customer | action=grant, the company’s record id and name, plus static productNumber and licenseTemplateNumber | Create the licensee, then create the license (IDs as numbers) |
| The customer relationship ends (a second workflow) | action=revoke, the company’s record id, plus static licenseTemplateNumber | Deactivate the license: update license with active=false |
Which property marks a customer is your choice (for example the company’s lifecycle stage); HubSpot’s page does not prescribe one.
Check that the request comes from HubSpot
The simplest check is the API key option: pick a header name and a long random value in the action, and have your receiver compare the header with the same value. HubSpot does not show the key in test requests.
The other option, Include request signature in header, needs a HubSpot app (the action asks for your App ID). The signature is a SHA-256 value built with the app’s secret; see HubSpot’s request validation guide for the versions of the signature and how to verify them.
Retries and duplicates
HubSpot retries a failed webhook for up to three days, starting one minute after the failure, at increasing intervals with at most eight hours between tries. It does not retry after a 4xx answer, except 429: then it retries and respects a Retry-After header (HubSpot records it in milliseconds). So:
- answer
2xxonce the work is done, including the case where NetLicensing says the license already exists (a repeat create returns HTTP400withDuplicateEntityException); - answer
5xxwhen NetLicensing was not reachable, so HubSpot tries again; - use the HubSpot record ids as NetLicensing numbers, so a retry can never create a second license.
Use the answer in the workflow (GET webhook)
A GET webhook retrieves data from your service. After a test, you choose which fields of the response to keep as outputs; choose only fields present in every response, because an action that uses a missing output fails. The response must be a JSON object to select multiple outputs. Later actions that use the data panel can read these outputs under Action data. HubSpot’s page does not list which actions accept them, so check the data panel of the action you want.
NetLicensing to HubSpot: write the license status to the company
NetLicensing can send a notification on LICENSE_CREATED, WARNING_LEVEL_CHANGED and other events. Your receiver validates the customer and updates properties of the company record with the HubSpot API:
- Endpoint.
PATCH https://api.hubapi.com/crm/objects/2026-09/companies/{companyId}with a body{"properties": {...}}. HubSpot’s API uses date-based versions (2026-09is the latest in the current reference); HubSpot keeps the older/crm/v3/reference in a legacy section. - Token. Send
Authorization: Bearer <token>. For a simple integration, HubSpot suggests a service key, created in Development > Keys > Service keys and limited by scopes. Give it the scopecrm.objects.companies.write. Service keys can only make REST API requests: they cannot authenticate webhooks. - Properties. Company data lives in company properties: default properties and custom ones you create. List the existing ones with a
GETrequest to the company properties endpoint. Create custom properties for the values you want to store, for examplenetlicensing_valid,netlicensing_expiresandnetlicensing_warning_level. - Which company. Use the HubSpot company record id inside the NetLicensing licensee
number(for examplehs-company-456), as the example does. The notification carries the licensee number, so the receiver reads the company id from it.
Use dryRun=true when the receiver validates, so the lookup does not change anything in NetLicensing.
Example: the calls
Text version of this diagram (click to expand)
- HubSpot → Your receiver: Send a webhook (grant)
- Your receiver: check API key header
- Your receiver → NetLicensing: POST /licensee (number=hs-company-<id>)
- Your receiver → NetLicensing: POST /license (number=hs-license-<id>-<tpl>)
- Your receiver → HubSpot: 2xx
The values below are illustrative. Code samples are Python, using only the standard library.
1. HubSpot calls your receiver
In the action: method POST, your HTTPS URL, authentication API key with the name X-Webhook-Key in the request header, and Customize request body with these keys (the first two filled from the company’s properties, the rest static):
POST /hooks/hubspot HTTP/1.1
Content-Type: application/json
X-Webhook-Key: <the long random value you set in the action>
{
"action": "grant",
"companyId": "456",
"companyName": "Acme Ltd",
"productNumber": "PQVJQ5F7H",
"licenseTemplateNumber": "EUJK1BXQ52"
}
2. Your receiver checks the key and calls NetLicensing
import base64, hmac, json, os, urllib.error, urllib.parse, urllib.request
NLIC = "https://go.netlicensing.io/core/v2/rest"
def netlicensing(path, form):
"""POST a form-encoded body. Returns (HTTP status, list of info ids from the response)."""
auth = base64.b64encode(f"apiKey:{os.environ['NETLICENSING_API_KEY']}".encode()).decode()
req = urllib.request.Request(
NLIC + path,
data=urllib.parse.urlencode(form).encode(),
headers={"Authorization": f"Basic {auth}", "Accept": "application/json"},
)
try:
with urllib.request.urlopen(req, timeout=10) as resp:
status, raw = resp.status, resp.read()
except urllib.error.HTTPError as err:
status, raw = err.code, err.read()
infos = (json.loads(raw).get("infos") or {}).get("info", []) if raw else []
return status, [i.get("id") for i in infos]
def ok_or_duplicate(status, info_ids):
return status == 200 or (status == 400 and "DuplicateEntityException" in info_ids)
def handle(headers, body):
"""Returns the HTTP status to send back to HubSpot."""
sent = headers.get("X-Webhook-Key", "")
if not hmac.compare_digest(sent, os.environ["HUBSPOT_WEBHOOK_KEY"]):
return 401
p = json.loads(body)
licensee = f"hs-company-{p['companyId']}"
license_number = f"hs-license-{p['companyId']}-{p['licenseTemplateNumber']}"
if p["action"] == "grant":
calls = [
("/licensee", {"productNumber": p["productNumber"], "number": licensee,
"name": p["companyName"]}),
("/license", {"number": license_number, "licenseeNumber": licensee,
"licenseTemplateNumber": p["licenseTemplateNumber"]}),
]
elif p["action"] == "revoke":
calls = [(f"/license/{license_number}", {"active": "false"})]
else:
return 400 # HubSpot does not retry a 4xx
for path, form in calls:
status, info_ids = netlicensing(path, form)
if not ok_or_duplicate(status, info_ids) and not (path.startswith("/license/") and status == 200):
return 502 # HubSpot retries failed webhooks
return 200
We ran this receiver against the live NetLicensing API with a test customer: the first grant answered 200, repeating it answered 200 (the duplicate was recognized), and revoke answered 200.
3. The NetLicensing calls it makes
NLIC=https://go.netlicensing.io/core/v2/rest
AUTH="apiKey:$NETLICENSING_API_KEY" # API key with ROLE_APIKEY_OPERATION
# Company becomes a customer: the HubSpot company id becomes the licensee number
curl --user $AUTH --header "Accept: application/json" \
--data "productNumber=PQVJQ5F7H&number=hs-company-456&name=Acme%20Ltd" \
$NLIC/licensee
# One license per company and plan
curl --user $AUTH --header "Accept: application/json" \
--data "number=hs-license-456-EUJK1BXQ52&licenseeNumber=hs-company-456&licenseTemplateNumber=EUJK1BXQ52" \
$NLIC/license
# The relationship ends
curl --user $AUTH --header "Accept: application/json" \
--data "active=false" \
$NLIC/license/hs-license-456-EUJK1BXQ52
PQVJQ5F7H and EUJK1BXQ52 stand for your product and license template numbers. A create with a number that already exists returns HTTP 400 with DuplicateEntityException, which is why a repeated webhook is harmless.
4. NetLicensing to HubSpot: write the status back
# Validate without changing anything
curl --user "apiKey:$NETLICENSING_LICENSEE_KEY" --header "Accept: application/json" \
--data "dryRun=true" \
https://go.netlicensing.io/core/v2/rest/licensee/hs-company-456/validate
# Write the result to the company (service key with crm.objects.companies.write)
curl --request PATCH "https://api.hubapi.com/crm/objects/2026-09/companies/456" \
--header "Authorization: Bearer $HUBSPOT_SERVICE_KEY" \
--header "Content-Type: application/json" \
--data '{ "properties": { "netlicensing_valid": "true", "netlicensing_expires": "2027-11-20" } }'
The validation response has one ProductModuleValidation item per product module with a valid property, and expires for time-based models. Read it the way the Auth0 guide does.
Sources
- HubSpot: Trigger webhooks in workflows
- HubSpot: Validating requests
- HubSpot: Companies API guide and Update a company
- HubSpot: Make API requests using a service key
- HubSpot: API versioning and base URL
You run this integration yourself; NetLicensing does not host a HubSpot connector. The HubSpot details on this page are based on the sources above, and the NetLicensing calls it relies on were tested against the live API. HubSpot changes its platform often, so verify the details against the linked pages before you go live. Back to CRM and Sales.