Integrations

API Requests

Create reusable HTTP requests that campaign workflows can run to fetch JSON before later steps render or execute.

API Requests let Leadpush call an external HTTP API from a campaign workflow and store the JSON response for later steps. An endpoint stores the reusable request configuration, and a campaign workflow Fetch API Data action decides when to run it and where to store the response.

What API Requests can do

Use API request endpoints when a campaign workflow needs data from:

  • a customer profile service
  • a product catalog or entitlement API
  • a billing, subscription, or plan system
  • an enrichment service
  • an internal decisioning or personalization API

API request endpoints are different from webhooks. Webhooks push Leadpush events to another system. API Requests pull JSON from another system while a campaign workflow is running.

Setup flow

Create an endpoint

Create an API request endpoint with a name, method, URL template, optional headers, optional query parameters, optional body template, timeout, and enabled state.

Add template variables

Use workspace, contact, campaign, workflow, node, and previous workflow output variables in the URL, headers, query parameters, or body.

Test the endpoint

Send a test request from the endpoint table or from a Fetch API Data action. Confirm the response is a JSON object or array.

Add a campaign action

In a campaign workflow, add a Fetch API Data action, choose the endpoint, and set an output key such as customer_profile.

Use the response later

Later workflow steps and templates can reference the stored response with paths such as {{ workflow.customer_profile.plan }}.

Request support

FeatureSupport
MethodsGET, POST, PUT, PATCH, and DELETE
URLTemplate-rendered external URL
HeadersOptional key-value templates
Query parametersOptional key-value templates
BodyOptional template, usually JSON
ResponseJSON object or JSON array
TimeoutConfigurable per endpoint, up to the workspace limit shown in the UI
Response sizeLimited by the workspace setting shown on the API Requests page

If a body is configured and no Content-Type header is provided, Leadpush adds Content-Type: application/json.

Guides in this section

Troubleshooting