Updated
How to Run a cURL Command on iPhone
By Sindre Sorhus, who makes the Actions app
With Actions
- Install Actions, and open it once.
- In the Shortcuts app, make a new shortcut, and add the “Run cURL Command” action.
- Paste the command in the action, like
curl -X POST 'https://.httpbin.org/ post' -H 'Content-Type: application/ json' -d '{"name":"John"}' - Add the “Show Content” action, and run the shortcut.
The result is the response, with its status code, its headers, and its body. You can use each part in the next actions, like an “If” action on the status code.
The action supports the common options, like -X, -H, -d, -u, -L, -m, -A, -G, -I, and --compressed. It ignores -s, -v, and -o. Another option gives an error, as it could change the request, and --data-binary @file does not work. On iPhone, iOS stops an action of an app after about 30 seconds, so a large upload can fail.
Get Actions
Additional actions for the Shortcuts app
Free
- Requires
- iOS 26 or later
- Privacy
- No personal data collected
- Updated
- June 2026
- US App Store rating
- 4.8/5 (706 ratings)
Without an app
The built-in “Get Contents of URL” action of Shortcuts sends a request too. Tap “Show More” in the action to choose the method, like “POST”, and to add headers. For “POST”, “PUT”, and “PATCH”, the action also has “Request Body”, which can be JSON, a form, or a file. Apple
It works, but you must put each part of the command in its own field. The “Run cURL Command” action is faster when you already have a curl command.
