Quickstart

Signup to first API call in five minutes.

By the end of this page you'll have made a curl request and a TypeScript request to the Inventra API, and you'll know how the rest of the docs are organized.

1. Login to the panel

Sign in at app.inventra.sh to find details about your organization. An organization groups everything for one website: API keys, blocks, blog posts, team members.

2. Get your API key

From your organization's dashboard, go to Settings → API key.

Store the key and organization id as an environment variable in your integrating application.

INVENTRA_API_KEY=inventra_xxx
INVENTRA_ORG_ID=org_xxx

3. Your first API call (curl)

curl "https://www.inventra.sh/api/organizations/$INVENTRA_ORG_ID/blocks" \
  -H "x-api-key: $INVENTRA_API_KEY"

You'll get back a JSON response shaped like this:

{
  "items": [
    {
      "id": "blk_1",
      "slug": "homepage-hero",
      "name": "Homepage Hero",
      "fields": [
        { "key": "title", "type": "text", "value": "Grow with content" }
      ],
      "status": "published"
    }
  ]
}

4. Your first SDK call (TypeScript)

npm add inventra # or yarn/pnpm/bun
import { Inventra } from 'inventra';

const inventra = new Inventra({
  apiKey: process.env.INVENTRA_API_KEY!,
  orgId: process.env.INVENTRA_ORG_ID!
});

const blocks = await inventra.blocks.list();
console.log(blocks);

Same data as the curl call, but typed. Framework integrations (inventra/react, inventra/next) are separate imports.

5. Next steps