Docs

API Step

Published July 25, 2026

Use the API Step when a quiz needs to talk to an external system while the participant moves through the flow. It can send quiz answers, lead fields, tags, variables, or scores to tools like CRMs and webhooks, or fetch data from another service and store response values for later copy, logic, and outcomes.

Unlike question blocks, the API Step runs in the background and does not render as a participant-facing prompt.

Best used for

CRM or webhook handoff

Send participant data to another tool after key answers or lead fields have been collected.

Quote or eligibility checks

Call an external service to verify whether a participant qualifies for a price, offer, or next step.

Data enrichment

Use quiz data to request additional context from another system before completion.

External scoring

Send answers to an outside scoring model and capture the returned score or category.

Creating records

Create contacts, deals, tickets, form submissions, or internal records from quiz responses.

Fetching values for later steps

Capture returned IDs, statuses, recommendations, or labels into variables for later copy and routing.

When to choose another step

Agent Step

Use Agent Step when the flow needs AI reasoning, generated text, structured outputs, or adaptive conversation.

Lead Capture

Use Lead Capture when the only goal is to collect contact details inside the quiz.

Completion CTA

Use a tracked completion CTA when the only goal is to measure a final button click.

Logic & Branching

Use Jump Logic when the route can be decided from existing quiz answers without calling an external service.

Setup flow

  1. Add an API Step in Build Flow where the request should run.
  2. Choose the request method and HTTPS endpoint URL.
  3. Add any required headers, query parameters, and body content.
  4. Use placeholders for quiz values that should be sent with the request.
  5. Click Send to test the request and inspect the response shape.
  6. Map response paths into variables if later logic, copy, or outcome content depends on them.
  7. Enable a failure destination when the quiz needs a fallback path if the request fails.
  8. Preview the flow and confirm later steps behave correctly with captured variables.

Settings reference

Request method

Supports GET, POST, PUT, PATCH, and DELETE depending on what the external service expects.

HTTPS endpoint URL

The external HTTPS URL the server-side request calls. Placeholders can be used when the URL needs quiz data.

Headers

Adds request headers such as Authorization, Content-Type, or custom integration headers.

Query parameters

Adds URL parameters without manually building the full query string.

Body mode

Uses no body or raw body content, such as JSON or plain text.

Placeholders

Injects captured quiz values into the URL, headers, query parameters, or raw body.

Capture response

Maps values from the API response into quiz variables for later use.

Failure destination

Pro
Routes participants to a specific fallback destination when the API request fails.

Data flow

API Step connects quiz data to external systems and can bring external data back into the quiz.

1. Quiz data becomes placeholders

Answers, tags, variables, lead fields, and total score can be inserted into request templates.

2. The request runs server-side

The API call is made from QuizFlow Labs infrastructure, not from the participant's browser.

3. Response values become variables

Captured response paths can be stored as quiz variables.

4. Variables power later behavior

Captured variables can influence later copy, Jump Logic, Agent Steps, outcome content, or handoff context.

Placeholders

Use placeholders in endpoint URLs, headers, query parameters, and raw body values:

  • {{variable_key}}
  • {{total_score}}

Example raw JSON body:

{
  "name": "{{full_name}}",
  "email": "{{email}}",
  "score": "{{total_score}}"
}

Use clean variable keys and test interpolation before publishing. If a request depends on lead data, make sure the Lead Capture step appears before the API Step.

Test with Send

Use Send in the builder to test the request configuration. If the body includes placeholders, the builder asks for test values first so you can validate interpolation before running.

After a test run, review:

  • Status code
  • Response body
  • Response headers
  • JSON paths available for capture mappings

Capture response values

Use Capture response to map API response fields into quiz variables.

Path format starts with response, for example:

  • response.records[0].id
  • response.data.user.email
  • response.score
  • response.recommendation.slug

Captured values can be reused in later steps, Jump Logic, Agent Steps, and outcome content.

Failure strategy

Not every API call needs to block the quiz.

  • Continue silently when the API call is non-critical and the participant experience should not depend on the result.
  • Capture response values when later copy or routing depends on the returned data.
  • Define a failure destination when the quiz needs a clear fallback path.
  • Use helpful recovery copy when an external service is unavailable.
  • Test failure behavior before publishing when the API call is part of qualification, pricing, booking, or fulfillment.

Security notes

  • API Step requests run server-side.
  • Credentials and sensitive headers are not exposed to participants.
  • Sensitive headers are redacted in diagnostics.
  • Send only the data the external service needs.
  • Avoid including unnecessary personal data in webhook payloads.
  • Use HTTPS endpoints. API Step does not send requests to non-HTTPS endpoints.

Troubleshooting

Can participants see the API call?
No. API Step runs server-side and does not render as a participant-facing prompt.
Where can placeholders be used?
Use placeholders in endpoint URLs, headers, query parameters, and raw body values when the request needs quiz data.
What response path format should I use?
Start response capture paths with response, such as response.data.id or response.records[0].email.
What happens if the request fails?
If no failure destination is configured, the quiz can continue to the next step. If a failure destination is configured, the participant is routed to that fallback path.

API response quick checks

  • 400 Bad Request: validate query parameters, body shape, and required fields.
  • 401 Authentication required: verify the auth header format.
  • 403 Invalid permissions: verify token scope, permissions, or workspace access.
  • 404 Not Found: confirm the endpoint URL and route path.
  • 409 Conflict: check whether the external service already has a matching record.
  • 422 Invalid request body: validate JSON shape, field names, and required values.
  • 429 Rate limited: reduce request frequency or check external service limits.
  • 500+ Server error: test the external service directly and use a fallback route if needed.

Checklist:

  1. Confirm Authorization: Bearer <token> format when bearer auth is required.
  2. Confirm Content-Type: application/json when sending JSON.
  3. Validate raw JSON syntax.
  4. Confirm placeholders use {{variable_key}}.
  5. Confirm required lead fields or variables are collected before this step.
  6. Re-test in Postman or cURL when you need parity checks.

Tips

  • Place API Step after the quiz has collected the data the request needs.
  • Keep payloads focused and avoid sending unnecessary personal data.
  • Use capture mappings only for values the flow will actually use.
  • Add failure routing for critical requests.
  • Test successful and failed responses before publishing.
  • Document external endpoint ownership so future editors know who maintains the integration.
Share