Sign inBlogSupportContact
Integrations

Call any saved API from a WordPress macro

Trigger Stripe, Slack, HubSpot, your own microservice. Point, click, send. Token substitution in URL, headers, body. Response fields flow into the next macro step.

5 min read May 2026 send api

Your WordPress site needs to talk to other services. The pattern is always the same.

When an order completes, send the data to HubSpot. When a user registers, post a message to Slack. When a form is submitted, trigger a Zapier webhook. The pattern is identical every time: make an HTTP request with some headers, a body, and handle the response.

The canonical WordPress answer is wp_remote_post. But that means writing PHP for each integration, scattering API keys across plugins and code files, and having no record of what was sent or what came back when something breaks.

What most people do instead

Write custom PHP with wp_remote_postEach integration becomes a snippet. API keys in plaintext. No logs. Debugging means adding error_log() calls.
Subscribe to Zapier or MakePer-task pricing. Data leaves your stack. Requires third-party webhook endpoints.
Install a plugin per integrationOne for Slack, one for HubSpot, one for Mailchimp. Each with its own admin page and update cycle.

A better way: save APIs once, call from macros

Configure every endpoint once in the APIs module — method, URL, headers, body, response field mapping. Then the send api command calls any saved API by ID. Inside a macro step, token substitution fills in the dynamic values from trigger data or upstream step results.

Macro Builder
Slack #orders webhook
200 OK in 340ms
POST https://hooks.slack.com/...
Body: {"text":"New order #1247 for $89.00"}
Response mapped: step1.ts, step1.channelavailable to next step

Response field mapping is the unlock. In the APIs module, map any JSONPath from the response to a field name. The next macro step can reference {{step1.stripe_charge_id}}, {{step1.user_id}} — whatever you mapped — and chain further actions.

How it works

The APIs module stores the full configuration: URL, method, headers, body template, and response-field mapping. The send api command is the macro-step invoker. It looks up the API by id, substitutes {{dynamic tags}} from trigger context or upstream chain results, sends the HTTP request, and pipes mapped response fields into the chain for downstream steps.

1
Save the API in the APIs moduleURL, headers, body template with {{tokens}}, JSONPath→field response mapping
2
Add "send api" as a macro stepPick the saved API from a dropdown. Tokens auto-resolve at run time from trigger/chain data.
3
Use mapped response fields downstreamReference {{step1.any_mapped_field}} in subsequent steps. Chain keeps growing.
ParameterValue
-api_idID of a saved API from the APIs module
Supported methodsGET, POST, PUT, PATCH, DELETE
Token substitutionIn URL, headers, and body — uses {{tokens}} from trigger context and chain results
Response handlingJSONPath field mapping — map any response key to a named chain field
LoggingEvery call logged with request + response in the APIs Logs table
Can be used in

Real example

You want: when a WooCommerce order is paid, push the order data to HubSpot as a deal, post a notification to the #orders Slack channel, and record the HubSpot deal ID on the order for future reference.

You build a macro with three send api steps. Step 1 calls your saved "HubSpot Create Deal" API with the order total and customer email from trigger context — it returns the deal ID, mapped to step1.hubspot_deal_id. Step 2 calls the "Slack #orders" webhook with a message. Step 3 updates WooCommerce order meta with step1.hubspot_deal_id.

The trigger is "woocommerce_order_paid". You set it, walk away, and every paid order now synchronizes automatically across three services.

Goes further with TrueCommander

Ready?

Replace Zapier with a macro.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.