Test and troubleshoot API requests
Validate endpoint responses before campaigns depend on them, then use execution details to diagnose workflow failures.
Testing confirms that Leadpush can render the request, reach the external API, and receive a JSON response that campaign workflows can store.
Test from the API Requests page
Use this test when the endpoint can run without campaign-specific context.
Open the endpoint list
From the dashboard, choose a workspace, open Integrations, then open API Requests.
Select Test endpoint
Open the endpoint row actions and choose Test endpoint.
Review the latest test
The latest test panel shows the HTTP status, latency, and JSON response when the request succeeds.
Fix and retry
If the test fails, update the endpoint URL, headers, query parameters, body, or timeout, then send another test.
Endpoint table tests are best for endpoints that use workspace-level variables or static request values. If the endpoint needs a contact, campaign, or previous workflow output, test it from a campaign Fetch API Data action.
Test from a campaign action
Use the action-level test when the endpoint needs workflow context.
Open the Fetch API Data action
Open the campaign workflow action that will run the endpoint.
Add preview context
Optionally enter a contact ID and workflow outputs JSON. Workflow outputs must be a JSON object.
Send the test
Select Send Test to run the endpoint with the preview context.
Inspect the response
Review the returned HTTP status, latency, and JSON response. Adjust the endpoint or preview context until the response matches what later steps expect.
Example workflow outputs JSON:
{
"source": {
"id": "acct_123",
"region": "us-east"
}
}
That preview context lets endpoint templates use variables such as {{ workflow.source.id }}.
Troubleshooting reference
| Symptom | What to check |
|---|---|
| Endpoint is disabled | Enable the endpoint before running it from a workflow. |
| URL is rejected | Confirm the rendered URL is a valid external URL accepted by Leadpush. |
| Authentication fails | Check headers, tokens, and external API permissions. Prefer authentication headers over query string secrets. |
| Request times out | Increase the timeout up to the workspace limit or make the external API respond faster. |
| HTTP error response | Leadpush treats non-successful HTTP responses as failures. Inspect the external API response and fix the request. |
| Response is too large | Return only the fields needed by later workflow steps or reduce the response size below the workspace limit. |
| Response is not JSON | Return a JSON object or JSON array. Empty responses, plain text, and scalar JSON values are invalid. |
| Template variable is empty | Confirm the variable is available in the current test or workflow context. |
| Later workflow step fails | Inspect the execution step detail and confirm the later step references the correct output key and JSON field path. |
Production checklist
- Use stable endpoint names so workflow editors can identify the right endpoint.
- Keep endpoints disabled until authentication and response shape are verified.
- Return only the JSON fields needed by later steps.
- Set timeouts low enough to avoid slow campaign execution.
- Add realistic mock responses before using campaign simulations.
- Review execution details after launch to confirm the response shape matches later templates.