Connect any REST API
Create GET, POST, PUT or DELETE requests to any external REST API and use the response on your site.
The REST API app lets you define named requests to any HTTP(S) endpoint. Each request has a method, URL, query params, headers and an optional body, and is stored per site. Requests run on the Divhunt server, not in the visitor's browser. The response (JSON) can then be shown in the builder as a data source or exposed as a global variable.
How it works
- Admin page: Applications > REST API (route /rest). Home lists requests grouped in four columns by method: GET, POST, PUT, DELETE.
- Each request has: Name (max 70 chars), Request Method (GET=1, POST=2, PUT=3, DELETE=4; anything else falls back to GET), URL/Endpoint (max 300 chars), Key, Source toggle, Variable, Cache, Body Format (RAW or JSON), Body Data, Request Params (key/value list), Request Headers (key/value list), Properties (key/value list), Conditions.
- Params and headers drop rows where key or value is empty. If no header is set, Content-Type: application/json is sent by default.
- URL, params, headers and body values are processed as Divhunt variables, so $properties->get('x') style expressions are resolved before sending.
- Execution: PHP curl with an 8 second timeout and JSON response format. If the response is not JSON the request still succeeds with the message 'Expected JSON, got <type>'.
- Run API button in the request editor executes the request and shows the response in a Monaco panel ('CURL Response Preview'); a second panel shows a generated cURL command ('CURL Request Preview').
- Remove soft-deletes the request after a confirm.
- Access: the sidebar item and quick settings entry only show for clients with the builder.developer permission (or *) whose organization owns the site.
When to use it
- Show a list of jobs from an external ATS API on a careers page
- Pull product or pricing data from an internal API
- Display data from a public API such as weather or exchange rates
- Send data to a third-party endpoint with POST
Limitations
- Request timeout is 8 seconds
- URL max 300 characters, name max 70
- IP addresses and localhost are not allowed as hosts
- Responses are expected as JSON
Availability
- Works in Designer.
- Included in every plan.
- Limits: Timeout 8 s; name 70 chars; URL 300 chars; variable 70 chars; key 70 chars
How to use it.
- Install the REST API application from Applications
- Open REST API from the admin sidebar
- Create a request, pick the method and enter the URL
- Add params, headers and body as needed
- Click Run API to test and check the response preview
Questions.
Do API calls run in the browser?
Which HTTP methods are supported?
Can I send a JSON body?
Related features.
Secure API authorization
Send API keys and tokens as request headers that are added on the server and never shipped to the visitor's browser.
REST API caching
Cache REST API responses for 1 minute up to 1 month so pages load fast and the external API is called less.
Visually connect API data in the builder
Turn any REST request into a data source and bind elements to it in the builder, with repeat, filters, sort and pagination.
API response as global variable
Load a REST API response on every page load and use it anywhere on the site as a variable.
Dynamic request properties
Define properties on a request and change them per element in the builder to adjust the URL, params or body.
Browse other features
Designer
Bring your ideas to life with our visual website builder. Drag and drop with ease, or dive into coding when needed.
→AI Studio
Describe it and AI builds it. Every change lands in the same project you can open in the Designer.
→MCP
Connect Claude Code, Cursor or any MCP client and build whole sites with your own agent.
→CMS
Create, organize, and manage your dynamic content with the maximum freedom and flexibility of our visual CMS.
→SEO
Divhunt delivers ultra-fast & structured sites that are good for ranking by default, while offering complete control for customization.
→REST API
Easily link to any REST API endpoint with instant preview and expand your site’s functionality smoother than ever before.
→Plugins
Divhunt offers an open platform for creating plugins to upgrade features, add new capabilities, and simplify building better sites.
→Localization
Localize everything from static pages and CMS content to URLs and metadata, in up to 15 languages with no add-on.
→Interactions
Visually create animations and interactions with a simple, intuitive timeline. Build smooth, engaging experiences without code.
→Custom Files
Manage JS and CSS files with a structure developers love, combining folders and clean organization.
→Memberships
Create plans, decide who sees what and connect it all to your CMS. Build courses, communities or client portals.
→