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.
Choose an optional contact
Select a workspace contact when the endpoint uses variables such as {{ contact._id }} or {{ contact.external_id }}. Custom attributes are available directly under contact; the existing contact.attributes.external_id form also remains supported. Leave the contact empty for endpoints that only use static or workspace-level values.
Send and review the test
Select Send test. The test panel shows the rendered URL, HTTP status, latency, and JSON response when the request succeeds.
Review request history
Select the endpoint name to open its overview. Request History keeps live workflow calls and manual tests for 30 days, including the rendered request, response, latency, and any error.
Use Search request URLs to find a request by any part of its rendered URL, such as a contact ID injected into the path. URL search can be combined with the outcome and source filters.
To permanently remove an individual history entry, open its row actions, select Delete, and confirm. Deleting history requires workspace write access and does not delete the endpoint, contact, or workflow.
Fix and retry
If the test fails, update the endpoint URL, headers, query parameters, body, or timeout, then send another test.
Endpoint table tests can use static values, workspace variables, and the selected contact's attributes. If the endpoint needs campaign or previous workflow output context, test it from a campaign Fetch API Data action.
Request history excludes campaign simulations and actions configured to always use a mock response because those actions do not send an external HTTP request. Stored request and response details are encrypted at rest. Authentication values and sensitive legacy header or query values are redacted before tests, logs, and execution details are created.
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.
Open the test sheet
Select Test endpoint to open the same test sheet used from the endpoint overview.
Add preview context
Optionally select a workspace contact and enter workflow outputs JSON. Workflow outputs must be a JSON object.
Send the test
Select Send test to run the currently selected 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 | Confirm the endpoint uses the correct authentication type, Basic username, API key name and location, and external API permissions. Replace the stored secret if it may have expired. |
| 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 endpoint request history and execution details after launch to confirm the response shape matches later templates.