Skip to main content
Softr’s REST API data source allows you to connect to almost any platform, database, or service. If Softr doesn’t natively support your data source, you can likely still integrate it using the REST API connector. With the REST API connector, you can:
  • Import real estate listings from Zillow, inventory from Shopify, or invoices from Stripe
  • Connect to public APIs (for example, APIsList, Public APIs, or RapidAPI)
  • Integrate new CRMs and productivity tools
  • Fetch and create data using any standard HTTP REST API
Rest API is available on all plans, including Free.
REST API is not a supported data source for the Users of your application.

1. Connect a REST API to Softr

You connect a REST API once per workspace. Then you can use it in all your apps.
1

Open Integrations

  1. In the Softr Studio dashboard, click Integrations in the left menu.
  2. Click Connect new.
The Integrations page of the dashboard, with the Connect new button
  1. In the Select an integration window, click Rest API.
The Select an integration window, with Rest API selected
2

Connect your account

Fill in the Connect your account window:
  1. Provider: Enter a name for the API, for example “Stripe”. You’ll see this name in your list of integrations.
  2. Authentication type: Select API key or OAuth. The API’s own documentation tells you which one it uses.
  3. Base URL: Enter the root address of the API, for example https://api.stripe.com. The base URL is optional. The Vibe Coding block needs it.
  4. Fill in the fields of your authentication type (see below).
  5. Click Continue.
The Connect your account window for a Stripe API key
API key
  • Select Bearer token when the API expects Authorization: Bearer <key>. Then paste the key in API key.
  • Select Custom header when the API expects the key in another header. Enter the header name in Header, then paste the key in API key.
The blue box shows the exact header that Softr sends with every request.OAuth
  1. Copy the OAuth Redirect URL and add it to the OAuth app settings of the API.
  2. Enter the Authorization URL, the Access token URL, the Client ID, the Client secret, and the Scopes from the API’s documentation.
  3. Click Continue, then sign in to the API in the window that opens.
The Connect your account window with OAuth selected
OAuth advanced settingsSome APIs need extra parameters in the OAuth requests. The API’s documentation lists them. To add them, turn on Advanced settings before you click Continue. Then click Add Parameter in the group that the API names:
  • Authorize parameters: Softr adds them to the authorization URL, where the person signs in.
  • Access token parameters: Softr sends them when it gets the first access token.
  • Refresh token parameters: Softr sends them when it refreshes an expired access token.
For example, Google returns a refresh token only when the authorization URL has access_type=offline and prompt=consent. Without a refresh token, the connection stops working when the first access token expires.
OAuth advanced settings with the access_type and prompt authorize parameters for Google
Important: Each API works differently. This page shows how Softr’s REST API connection works. It isn’t a step-by-step guide for one specific API.If you need help with an API beyond the scope of this page, reach out to one of our Certified Softr Experts. They can guide you or build it for you.
3

Add API resources (endpoints)

A resource is one API call that you save and reuse in your apps, for example “Invoices” or “Customers by email”. Resources support the GET and POST methods.
  1. On the Integrations page, click the … menu of your REST API integration.
  2. Click Edit resources.
The menu of a REST API integration, with Edit resources
  1. In the Resources window, click Add.
The Resources window of the Stripe integration, with five resources
You can also add a resource from a block. In the block’s Source tab, open the Resource dropdown and click Add resource.
  1. Fill in the resource:
  • Name: A name that helps you find the resource in the list.
  • HTTP method: GET for most endpoints. Select POST only when the API’s documentation uses POST to return data (see Body).
  • URL: The endpoint that Softr calls, for example https://api.stripe.com/v1/invoices.
  1. Click Execute to send a test request to the API.
A new resource with its name, HTTP method, URL, and the Execute button
  1. When the test request succeeds, click Save.
Softr saves a resource only after a successful Execute. When you change the request (URL, headers, URL params, placeholders, body, or pagination), click Execute again.
You’ll often need the optional sections and the schema too. Read the sections below before you save.

2. Configure the optional sections

Below the Execute button, the resource has more sections. Turn on a section with its toggle. Every API is different, so you may need all of these sections or none of them. Check the API’s documentation.

Headers

The Headers section always shows the authentication header of the integration. Click Add to add a header that only this resource needs.
The Headers and URL params sections of a resource

URL params

Use URL params to add query parameters to the URL. Add each parameter as a name and a value. You can also type them in the URL field, but this section keeps them easier to read and change. Find the parameter names and values in the API’s documentation. In the example above, the customer parameter tells the Stripe invoices endpoint to return the invoices of one customer:
The customer parameter in the Stripe documentation for listing invoices
A parameter value can be static or dynamic. The customer changes with the person who is logged in. Thus the example uses the placeholder {LOGGED_IN_USER:StripeID}. Softr replaces it with the StripeID field of the logged-in user.

Placeholders

Placeholders send dynamic data to the API, based on the logged-in user, the page, or the filters and search of a block. Write a placeholder in curly braces, for example {placeholderName}, in the URL, the URL params, or the body. Softr doesn’t replace placeholders in headers. You can use four kinds of dynamic placeholders:
  • {LOGGED_IN_USER:<FIELD NAME>}: Sends a field of the logged-in user. {LOGGED_IN_USER:EMAIL} and {LOGGED_IN_USER:NAME} send the email and the name of the user.
  • {recordId}: Sends the ID of the record that the page shows (the recordId in the page URL).
  • {URL_PARAM:<PARAMETER NAME>}: Sends the value of a parameter in the page URL.
  • {filter.<FIELD NAME FROM API>}: Sends the value of a search or filter in a block.
When a request has placeholders, the Placeholders section lists them. Enter a sample value for each one, so that Execute can test the request. Your live app doesn’t use these sample values.
The Placeholders section with a sample value for the logged-in user's Stripe ID
Use a {filter.<FIELD NAME FROM API>} placeholder to filter or search the API from a block. In the example below, the Customers by email resource sends the search text to Stripe in the email URL param. When the block has no search or filter value, Softr removes a URL param whose value is only a filter placeholder, so the API returns all the records.
A resource that sends the filter.email placeholder in a URL param

Use the filter placeholder to filter by dynamic values against the API.

Then turn on the search bar of the block in its Content tab:
The List block settings with the search bar turned on

Turn on the search bar of the block so that people can search the API.

Softr treats anything inside {} as a placeholder.{LOGGED_IN_USER:<FIELD NAME>} sends data of the logged-in user in the API request.
{filter.<FIELD NAME FROM API>} filters by a dynamic value, if the API supports it.
{recordId} sends the current record in the API request.
{URL_PARAM:<PARAMETER NAME>} sends a parameter of the page URL in the API request.

Body

The Body section shows when the HTTP method is POST. Some APIs use POST to return data, for example search endpoints, GraphQL APIs, or previews. Write the body as JSON. Use the API’s documentation to know which keys to send. In this example, the Upcoming invoice resource gets a preview of the next Stripe invoice of the logged-in user:
The Body section of a POST resource that previews the next Stripe invoice
A REST API data source is read-only. Softr calls a resource each time a block loads its data, so never use a resource to create, change, or delete data. To send data to an API, use the Call API action on a block button, or the Call API action in Softr Workflows.

Pagination

Most APIs return a limited number of records per request. Use the Pagination section to tell Softr how to get the next page of results. Softr uses cursor pagination:
  • Response parameter - cursor: Where the cursor of the next page is in the response (Body or Header), and its name. Turn on Transformer function if you need JavaScript to read the cursor.
  • Request parameter - cursor: Where Softr sends the cursor in the next request, and the parameter name.
  • Request parameter - limit: The parameter that sets the number of records per page, and its value.
In the Stripe example, Softr sends the ID of the last invoice as starting_after, and asks for 25 invoices per page with limit.
The Pagination section with the cursor and limit parameters for Stripe

Transformer

Use the Transformer section to change the API response with JavaScript. A transformer can extract a nested list from the response, or calculate a new field. AI tools are good at writing these functions. In the Stripe example, return response.data; keeps only the list of invoices in the data key of the response.
The Transformer section with return response.data

3. Check the response and the schema

When you click Execute and the request succeeds, three tabs show below the sections: Schema, Transformed JSON, and Raw JSON. Scroll down to see them. Schema The Schema tab lists the fields of the response. Softr Studio shows these fields when you set up a block. Each field has four settings:
  1. Key: The name of the field in the response.
  2. Type: How Softr shows and filters the field. The types are TEXT, NUMBER, BOOLEAN, DATE, DATETIME, TIMESTAMP, OBJECT, ARRAY, EMAIL, and URL.
  3. Enabled: Clear this checkbox to hide the field in Softr Studio.
  4. Is ID field: Turn on this toggle for the field that identifies each record. When no field is the ID field, Softr shows a warning.
The Schema tab with the Key, Type, Enabled, and Is ID field settings
Transformed JSON The Transformed JSON tab shows the response after your transformer runs. The Schema tab is built from this JSON.
The Transformed JSON tab with the list of Stripe invoices
Raw JSON The Raw JSON tab shows the response exactly as the API sent it. Check this tab first: it shows which transformer you need, if any. In the Stripe example, the invoices are in the data key, so the transformer returns response.data.
The Raw JSON tab with the full Stripe response

FAQs

No. A REST API data source is read-only: blocks can show its data, but the Add record and Edit record buttons aren’t available. To send data to an API, use the Call API action on a block button, or the Call API action in Softr Workflows.
Select API key or OAuth when you connect the API. Softr adds the authentication header to every request.
Yes! You can add multiple REST API connections and use them across different blocks.