What you can connect
Payment processors
Databases and backends
Third-party services
Your own APIs
Before you start
You need one of the following:- A Postman API key and workspace
- A working cURL command
- A Postman collection export file (
postman.json) - A Swagger or OpenAPI spec (JSON or YAML)
base_url or accessToken.
Open the APIs panel
Click the... button in the preview toolbar and select APIs.


Opening the APIs panel from the toolbar
Import APIs
In the APIs panel, open the Select an API dropdown and click Add APIs to open the import dialog. Pick one of four import methods.Postman key (workspace import)
Postman key (workspace import)
- Click your avatar in the Postman header, then click Settings.
- Go to API keys and click Generate API Key.
- Enter a name and copy the key.
- In Add APIs, select the Postman tab.
- Paste your Postman Key.
- Select the workspace.
- Click Submit, then select the collections or folders you want to add.
- Click Add APIs.


Postman key and workspace selection
cURL (single request import)
cURL (single request import)
- In Add APIs, select the cURL tab.
- Paste the full cURL command.
- Click Add API.


cURL import tab
Upload JSON (Postman export file)
Upload JSON (Postman export file)
- In Add APIs, select Upload JSON.
- Drag and drop or upload your
postman.json. - Click Submit.


Upload JSON tab
Swagger (OpenAPI import)
Swagger (OpenAPI import)
- In Add APIs, select Swagger.
- Drag and drop or upload your Swagger JSON or YAML file.
- Click Submit.


Swagger upload tab
Integrate an API into a UI element
This connects an endpoint to a screen element so Rocket generates code tied to a real component.Select a route and API
In the APIs panel, choose the route (the screen or page path, for example/dashboard or /settings) where the API should run, and select the API from the Select an API dropdown. Then click Integrate API.


Route picker, API dropdown, and Integrate API button
Click a UI element
After clicking Integrate API, element selection activates. A tag bar appears at the top of the preview showing the available elements. Click the UI element where you want to attach the API.

Element selection bar in API integration mode


Clicking an element in the preview to attach the API
Configure the trigger
After selecting the element, the When to call this API? dialog opens. Fill in:- When should this API run (the trigger, e.g. “On page load”, “On click of Submit button”)
- Pre API call Instructions (validation, auth checks, token refresh)
- Post API call Instructions (store response, handle errors, navigate on failure)


When to call this API configuration dialog
- Validate required variables exist (base URLs, IDs, query params)
- Check auth state (token exists, not expired)
- Refresh token here if possible
- Store response data into a named state variable your UI can bind to
- Cache successful responses to improve performance
- Handle error states with clear user feedback
- Navigate when needed (e.g. redirect to login on 401)
Edit an API response
To update a mock or expected response for an API, open the Add/Edit API Response dialog for that endpoint and paste the updated JSON, then click Update.

Add/Edit API Response dialog
Troubleshooting
The API picker is empty
The API picker is empty
Integration asks for attributes you did not expect
Integration asks for attributes you did not expect
accessToken to reference your stored token value and confirm the request uses the correct auth scheme (e.g. Authorization: Bearer <token>).Calls run but the UI does not update
Calls run but the UI does not update

