Import cURL Commands in the Agent Studio API Call Tool

What Is the Import cURL Feature?

The Import cURL option in the Agent Studio API Call Tool allows you to paste a cURL command and automatically convert it into a fully configured API request within your CRM. This feature simplifies the process of integrating external APIs into your AI agents by pre-populating essential request details.

Benefits of Using Import cURL

Using Import cURL offers several advantages:

  • Speed up setup: Quickly transform a cURL command into a configured API call without manual data entry.
  • Reduce errors: Minimize mistakes by avoiding the need to copy and paste individual components like headers and request bodies.
  • Improve workflow: Easily move from API documentation or testing tools directly into Agent Studio.
  • Enable flexible editing: Review and adjust the imported configuration before finalizing.

Where to Find Import cURL

The Import cURL feature is located within the configuration panel of the API Call Tool in Agent Studio. You can access Agent Studio by navigating to AI Agents > Agent Studio, then either create a new agent or open an existing one. The API Call Tool can be added to nodes such as:

  • AI Agent nodes, where it functions as a tool the agent can use.
  • Sequential nodes, where it runs as a defined step in a processing sequence.

What Import cURL Populates Automatically

When you paste a cURL command, the tool extracts and fills in the following details:

  • HTTP method (e.g., GET, POST)
  • Endpoint URL
  • Headers
  • Request body

It also recognizes common body formats like JSON, HTML, XML, text, and form data, and supports cURL patterns such as redirects, basic authentication, multiline bodies, and line continuations.

Reviewing Imported Settings

Always review the imported configuration before saving or testing. Check the following:

  • Instructions: Ensure the description of the API call’s purpose is accurate.
  • Variable Name: Confirm where the API response will be stored.
  • API Endpoint: Verify the HTTP method and URL.
  • Headers: Review required headers like authorization or content type.
  • Request Body: Check the payload format and content.
  • Authentication: Validate that tokens or credentials are secure and correctly placed.
  • Variables: Add dynamic variables if the request should use contact, conversation, or runtime data.

Two-Way Sync with cURL

The Import cURL modal supports two-way synchronization, meaning it can reconstruct the current API call configuration back into a cURL command. This allows you to review, edit, or troubleshoot the request in a familiar format. Reopening the modal after configuration shows the current settings as a cURL command, which is useful for verification, comparison with external docs, or making quick adjustments.

How to Set Up Import cURL

To use Import cURL:

  1. Open Agent Studio and add or edit an API Call Tool within your agent’s flow.
  2. In the tool’s configuration panel, locate and select the Import cURL option.
  3. Paste your cURL command into the provided field.
  4. Review the automatically populated fields for accuracy.
  5. Make any necessary adjustments to headers, body, or variables.
  6. Save the configuration and test the API call before publishing your agent.