API Step

Make an HTTP request to an external system and extract data from the response.

The API step makes an HTTP request to any external endpoint and optionally extracts data from the response into lead fields for use in downstream steps.

The API step configuration panel with method, URL, JSON body, and field extraction.

Configuration

Method and URL

Select the HTTP method (GET, POST, or PUT) and enter the full endpoint URL.

The URL supports variables — you can dynamically construct URLs using lead data. For example:

Headers

Add request headers as key/value pairs. Common uses:

  • Authorization: Bearer your-api-key

  • Content-Type: application/json

Click Add header to add rows and the trash icon to remove them.

Body

For POST and PUT requests, enter the request body as JSON. The editor provides:

  • Syntax highlighting — JSON keys, strings, and values are color-coded

  • Inline validation — errors are underlined with a description

  • Format button — auto-formats and pretty-prints your JSON

The body also supports variables via the Insert menu (⚡). For example:

Field Extraction

After the API call completes, Spara can extract values from the response and save them as lead fields. These extracted fields are then available as workflow-scoped variables in downstream steps.

Add one or more Fields:

Field
Description

Name

The field name (e.g., intent_score). Use snake_case.

Description

Tell the AI what this field represents and where to find it in the response.

Spara uses the description to intelligently extract the correct value from the API response, even if the response structure is nested or complex.

Example: Enrich a Lead

Downstream steps can then use {{ job_seniority }} and {{ linkedin_url }} in their content.

Last updated