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.
\ and ^).How to import a cURL command
- 1
Open the Request Builder
Navigate to Request Builder from the left sidebar in your workspace.
- 2
Click "Import cURL"
Find the Import button in the top-right of the request panel and select "Import from cURL".
- 3
Paste your cURL command
Paste the full cURL command into the text area. Multi-line commands with backslash continuations are fully supported.
- 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
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 flag | What Optraflow maps it to |
|---|---|
| -X, --request | HTTP method (GET, POST, PUT, PATCH, DELETE) |
| -H, --header | Request headers — including Authorization |
| -d, --data, --data-raw | Request body (JSON, form, raw string) |
| --data-urlencode | URL-encoded form body |
| -u, --user | Basic auth (username:password) |
| --oauth2-bearer | Bearer token auth |
| -b, --cookie | Cookie header |
| -k, --insecure | SSL verification toggle |
| --compressed | Accept-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 authAuthorization: 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
| Issue | Likely cause | Fix |
|---|---|---|
| Import button is non clickable | No cURL command pasted | Paste a valid curl command starting with curl |
| Body not populated | Single quotes stripped by Windows cmd | Use the Windows cmd.exe format with escaped double quotes |
| Auth not detected | Non-standard header name | Manually set auth in the Authorization tab after import |
| URL shows as localhost | cURL was copied from a local dev session | Update the URL to point to your target environment |
| Line continuation not parsed | Mixed OS line endings in the command | Clean the command in a plain text editor before pasting |
Common import issues and how to fix them
