Runs onWrit CloudDesktopSelf-hosted
On this page
API call
The api_call step performs an HTTP request from inside the live page, so it carries the session's cookies — often faster and more robust than driving the UI, especially against endpoints discovered from the site's own network traffic.
In a workflow, this is a step object with "type": "api_call". Steps run in order, and each step can read the outputs of the steps before it. See the full workflows reference for the 30+ step types.
Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.
Fields
| Field | Type | Description |
|---|---|---|
url required | string | The endpoint URL (placeholders supported). |
method | string | GET, POST, PUT, PATCH, or DELETE. |
headers | map | Request headers; reference {{vault:name}} secrets, never inline them. |
body | json | Request body for write methods; {{extracted:key}} values from earlier steps resolve here. |
Example
A single api_call step as it appears in a workflow's steps array:
{
"type": "api_call",
"config": {
"method": "GET",
"url": "https://example.com/api/products?page={{page}}",
"headers": { "Authorization": "Bearer {{vault:api_token}}" }
}
} How it behaves
- Runs as an in-page request, so the logged-in session from earlier steps is reused.
- Response values can be named and chained into later steps as
{{extracted:key}}. - Only call endpoints on services you are authorized to use.
Where it runs
The api_call step executes wherever the run executes. On your local or BYO agent there is no compute charge and the agent can reach intranet-only systems; on Writ cloud the run is metered by running time (~$0.12 per browser-hour, from your plan’s included usage wallet.
What next
- Workflows - the full step vocabulary and the workflow object.
- Recorder - capture steps by clicking through a site.
- Managed endpoints - turn the workflow into a REST endpoint, or an MCP tool.