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
error_log() calls.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.
{"text":"New order #1247 for $89.00"}step1.ts, step1.channelResponse 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.
{{tokens}}, JSONPath→field response mapping{{step1.any_mapped_field}} in subsequent steps. Chain keeps growing.| Parameter | Value |
|---|---|
-api_id | ID of a saved API from the APIs module |
| Supported methods | GET, POST, PUT, PATCH, DELETE |
| Token substitution | In URL, headers, and body — uses {{tokens}} from trigger context and chain results |
| Response handling | JSONPath field mapping — map any response key to a named chain field |
| Logging | Every 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.