# How to Run a cURL Command on iPhone

Updated: November 24, 2026

- [Actions](https://sindresorhus.com/actions.md): Additional actions for the Shortcuts app. Price: Free. Platforms: macOS, iOS, visionOS. Get it from: [App Store](https://apps.apple.com/app/id1586435171). Requires macOS, iOS, or visionOS 26 or later. Size: 13 MB on Mac, 29 MB on iPhone and iPad. Free older versions for macOS 15, 14, 13, and 12: [download](https://sindresorhus.com/actions#older-versions). US App Store rating: 4.8/5 (706 ratings).

URL: https://sindresorhus.com/guides/run-curl-iphone

iPhone has no Terminal, so it has no `curl` command. The free [Actions](https://sindresorhus.com/actions.md) app adds a “Run cURL Command” action to the Shortcuts app. Paste a curl command, like one that you copied from the developer tools of a browser or from the documentation of an API, and run the shortcut.

## With Actions

1. Install [Actions](https://sindresorhus.com/actions.md), and open it once.
1. In the Shortcuts app, make a new shortcut, and add the [“Run cURL Command”](https://sindresorhus.com/actions#:~:text=Run%20cURL%20Command) action.
1. Paste the command in the action, like `curl -X POST 'https://httpbin.org/post' -H 'Content-Type: application/json' -d '{"name":"John"}'`.
1. 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.

## 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’s instructions](https://support.apple.com/guide/shortcuts/apd58d46713f/ios)

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.
