1. Create a sandbox
In the app, open Sandbox and choose Create sandbox. An organization admin does this once. It takes a few minutes to fill: about 800 items, 200 suppliers and 20 locations, with purchase orders, sales orders, product passports and sensor reads.2. Create a test key
Open API keys and create a key with the environment Test and the scoperead. Copy it: it starts with ic_test_ and is shown once. A test key reaches the sandbox and nothing else.
3. SDKs
There is an SDK for TypeScript and JavaScript (Node 18 or newer) and one for Python (3.9 or newer). Neither has dependencies. The SDK packages are being released to the public registries. Until the install commands are shown here, do not install a package of these names from anywhere else. Make the calls with cURL, as in the next steps; the TypeScript and Python samples on this site apply unchanged once the SDK is installed.4. Make the first call
Put the key inINSIGHTCHAIN_API_KEY. Every sample on this site reads it from there.
X-InsightChain-Sandbox: true.
5. Page through a list
A list answers one page:data, has_more and next_cursor. For the next page, send next_cursor as cursor; stop when has_more is false. In an SDK, each list method has a companion that walks every page for you.
6. Handle an error
A call that fails answers the error object: the API’scode, which is stable, and the request_id, with the HTTP status. An SDK throws an error that carries all three. Every code is in the error reference.
7. Go live
Create a live key on the API keys page and swap it in. The base URL, the routes and your code stay the same.What a sandbox does not do
A sandbox holds the demo data plus what you push. It raises no alerts, and some reads that depend on your history answer empty. Routes that use AI have a budget of 25 calls a day. A webhook registered with a test key receives test events only.Next
- Recipes: one job each, with the scopes, the steps and what comes back.
- The API reference tab: every route, its scope and its parameters.
- Errors: the error object and every code.
- Connect an AI client: the same operations as tools for an assistant.
- Changelog: every change a caller can see.
- Postman collection: import the file into Postman, then set the collection variables
apiKey(your key) andbaseUrl(alreadyhttps://api.insightchain.ai/v1). - openapi.json: the API description the SDKs are generated from.
- Status: whether the API is up right now.