Import using cURL

Paste any cURL command and Optraflow will parse it into a fully configured API request — headers, auth, body, and all.

The cURL importer lets you paste any cURL command directly into Optraflow and have it converted into a fully populated request — method, URL, headers, authentication, and request body included.

Supports Linux bash, Windows cmd.exe, and PowerShell cURL formats including line continuations (\ and ^).

How to import a cURL command

  1. 1

    Open the Request Builder

    Navigate to Request Builder from the left sidebar in your workspace.

  2. 2

    Click "Import cURL"

    Find the Import button in the top-right of the request panel and select "Import from cURL".

  3. 3

    Paste your cURL command

    Paste the full cURL command into the text area. Multi-line commands with backslash continuations are fully supported.

  4. 4

    Review

    Optraflow will pre-populate the method, URL, headers, auth, and body. Review each field and verify by executing it. You can save it to a collection.

Supported formats

bash·linux.sh
curl -X POST https://api.example.com/v1/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..." \
  -d '{"name": "Alice", "email": "alice@example.com"}'

What gets parsed

cURL flagWhat Optraflow maps it to
-X, --requestHTTP method (GET, POST, PUT, PATCH, DELETE)
-H, --headerRequest headers — including Authorization
-d, --data, --data-rawRequest body (JSON, form, raw string)
--data-urlencodeURL-encoded form body
-u, --userBasic auth (username:password)
--oauth2-bearerBearer token auth
-b, --cookieCookie header
-k, --insecureSSL verification toggle
--compressedAccept-Encoding: gzip header

Auth detection

Optraflow automatically detects and maps authentication from the Authorization header into the dedicated auth fields:

  • Authorization: Bearer <token> → Bearer Token auth
  • Authorization: Basic <base64> → Basic auth (decoded to username/password)
  • -u username:password → Basic auth
  • API key headers (e.g. X-API-Key) → API Key auth with detected key name

Auth tokens and the request body

After import, auth values are written directly into the authorization panel — not left as raw header strings. This means they work correctly with Auto Auth and pre-request token refresh.

Troubleshooting

IssueLikely causeFix
Import button is non clickableNo cURL command pastedPaste a valid curl command starting with curl
Body not populatedSingle quotes stripped by Windows cmdUse the Windows cmd.exe format with escaped double quotes
Auth not detectedNon-standard header nameManually set auth in the Authorization tab after import
URL shows as localhostcURL was copied from a local dev sessionUpdate the URL to point to your target environment
Line continuation not parsedMixed OS line endings in the commandClean the command in a plain text editor before pasting

Common import issues and how to fix them

Next steps