Quick Actions are standalone scripts that aren’t tied to any specific request. You run them manually from the actions panel whenever you need them. They’re ideal for workflows that span multiple requests — like logging in and saving a token, seeding test data, or resetting state between test runs.Documentation Index
Fetch the complete documentation index at: https://docs.getpostchi.com/llms.txt
Use this file to discover all available pages before exploring further.
File location
Store Quick Actions as.action.js files inside your project’s actions/ folder:
Available context
Postchi injects these variables into every Quick Action:| Variable | Type | Description |
|---|---|---|
env | object | All active environment variables and secrets as string key-value pairs. Read-only. |
fetch | function | The global fetch function. |
setEnvironmentVariable(key, value) | function | Saves a variable to the active environment in environments.cenv. |
setSecret(key, value) | function | Saves a secret to the active environment in secrets.cenv. |
executeRequest(relativePath) | function | Executes a request file from your requests/ folder by relative path. Returns a ScriptResponse. |
executeRequest return value
executeRequest returns a ScriptResponse object:
| Property | Type | Description |
|---|---|---|
status | number | HTTP status code |
headers | object | Response headers as { name: value } pairs |
body | string | null | Response body as a string, or null |
The path you pass to
executeRequest is relative to your requests/ folder — for example, 'auth/login.chttp' resolves to requests/auth/login.chttp.Examples
Log in and save the auth token
Fetch an external value and save it
Chain multiple requests
Running a Quick Action
Open the actions panel
Click the Actions section in the sidebar to see all
.action.js files in your project.