Creating custom HTTP request templates

Modified on Tue, 5 May at 7:44 PM

Creating custom HTTP request templates

HTTP request templates let you send lead data to external APIs and automatically update lead fields based on the response — used for outbound webhooks, third-party integrations, and custom data flows.

TL;DR

Access: Campaign settings → HTTP & Webhooks → + Create. Set: method (GET/POST/PUT/PATCH/DELETE), URL, headers, body — all support Hubhus placeholders. Optionally add a JSON map to write response values back to lead fields using HubhusProperty=ResponseJsonKey syntax. Test via the built-in tester before using in automations. Requires response status 2xx + valid JSON for maps to apply.

Get started in 3 steps

1

Create the HTTP request template

Go to Campaign settings → HTTP & Webhooks → + Create. Set: Method (GET, POST, PUT, PATCH, DELETE), URL (supports placeholders like %lead.id%), Request headers (e.g. Content-Type: application/json, Authorization), Request body (JSON payload with Hubhus placeholders). Enable URL encode placeholder values if placeholders appear in the URL path. Set a timeout appropriate for the external API response time.

2

Add a JSON map (optional)

A JSON map writes response values back to lead fields. After creating the template, click + New JSON map. Write one mapping per line: HubhusProperty=ResponseJsonKey. Use dot notation for nested JSON (key1.key2) and array indices (successes.0.lead_id). Hubhus properties: {{field-slug}} for custom fields, %lead_status_slug%, %assigned_person_email%. Map only applies when response is 2xx + valid JSON.

3

Test before using in production

Use the built-in tester: select the template, enter a Lead ID, review the generated request (URL, headers, body), and click Submit request. Inspect the response: status code, headers, body (formatted JSON), and any JSON map results. Fix issues before wiring the template into automation rules. Use Show all possible keys in the JSON map tester to discover available response paths.

Read more

JSON map example

For this API response:

{ "keyA": 123, "key1": { "key2": "new-status" }, "successes": [{"lead_id": 456}] }

Map syntax:

{{external-id}}=keyA
%lead_status_slug%=key1.key2
{{created-lead-id}}=successes.0.lead_id

Triggering HTTP requests

HTTP request templates are used in:

  • Automation rules — trigger automatically based on lead events
  • Action buttons — trigger manually from the lead profile page

Common searches

HTTP request • webhook • outbound API • JSON map • external integration • API call • REST request

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article