Creating custom HTTP request templates
HTTP request templates let you send data to external APIs and automatically update leads based on the response. This guide explains how to create templates, configure JSON maps, and test your integrations.
On this page
Jump to any section using the links below
Where to access
Navigate to Campaign settings → HTTP & Webhooks to create and manage HTTP request templates.
Creating an HTTP request template
Click + Create to open the template editor. Configure the following fields:
- Friendly template name – A descriptive name for your template (e.g., "Send to quote system")
- HTTP method – Choose GET, POST, PUT, PATCH, or DELETE
- Request timeout – Maximum time to wait for a response
- URL encode placeholder values – Enable if placeholders in the URL should be encoded
- URL – The endpoint URL (supports placeholders like %lead.id%)
- Request header – HTTP headers such as Content-Type or Authorization
- Request body – The data to send (supports placeholders)
What is a JSON map?
A JSON map automatically updates Hubhus lead data based on values returned in the API response. When an HTTP request succeeds, the JSON map reads the response and writes specified values back to lead fields.
Creating a JSON map
After creating an HTTP request template, you can add a JSON map to it. Configure these fields:
- Descriptive name – A name for this mapping
- Active – Enable or disable the map
- JSON property map – Define which response values update which Hubhus fields
JSON map syntax
Each line in the JSON map defines a property relationship:
HubhusProperty=ResponseJsonKey
When the HTTP request succeeds, the lead's Hubhus property is automatically updated to the value from the response.
Accessing nested JSON
- Dot notation – Use dots to access nested keys:
key1.key2.key3 - Array indices – Use numbers starting at 0:
key1.0.key3
Requirements for JSON maps
For a JSON map to work, the following must be true:
- The HTTP response must have status code 2xx (success)
- The response body must be JSON encoded
- The JSON must contain the key defined in the map
- The value must fulfill requirements of the field being updated
Example 1: Multiple field updates
For this response body:
{
"keyA": 123,
"keyB": "Details here",
"key1": {
"key2": "new-status",
"key3": "email@example.com"
}
}The JSON map would be:
{{external-id-field}}=keyA
{{details-field}}=keyB
%lead_status_slug%=key1.key2
%assigned_person_email%=key1.key3Result:
- Field "External ID field" is set to
123 - Field "Details field" is set to
Details here - Lead status is changed to "New status"
- Assigned person is set to the person with email
email@example.com
Example 2: Reading from an array
For this response body:
{
"successes_total": 1,
"rejections_total": 0,
"successes": [
{
"idx": 0,
"lead_id": 123456
}
]
}The JSON map would be:
{{created-lead-id-field}}=successes.0.lead_idResult: Field "Created Lead ID field" is set to 123456
Available Hubhus properties
Use these properties on the left side of the JSON map:
| Property | Description |
|---|---|
| {{field-slug}} | Set value of a custom field |
| @select[field_slug,slug] | Set value of a select field |
| %lead_status_slug% | Set lead status |
| %assigned_person_email% | Set assigned person by email |
The exact field slugs available depend on your campaign's custom fields.
Testing your HTTP request
Before using a template in production, test it:
- Select an HTTP request template from the dropdown
- Enter a Lead ID to test with (use the arrows to browse leads)
- Review the generated Request details (method, URL, headers, body)
- Click Submit request
Viewing request history
After submitting a request, you can view the response details:
- Duration of request – How long the request took
- Response status code – HTTP status (200 = success)
- Response header – Headers returned by the API
- Response body, formatted – The JSON response with expandable sections
- Successes/Rejections – Summary of processed items
Testing your JSON map
Use the Test JSON map section when creating a map:
- Paste a sample response in Response JSON example
- Click Analyze now
- Click Show all possible keys in the JSON example to see available paths
- Use these paths in your JSON property map
Summary
HTTP request templates let you integrate Hubhus with any external API. Define the request URL, method, and body using placeholders, then use JSON maps to automatically update lead data based on the response. Always test your templates before using them in automation rules to ensure the integration works as expected.
? Common searches
http request setup • webhook configuration • api integration • json mapping • external api connection
? Also known as
webhook • outbound API • REST call • external integration • API request
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article