Blocks API Reference
This reference documents the Blocks HTTP APIs behind the blocks CLI and the @seliseblocks/client SDK. It covers Authentication, IAM, Data Gateway, Storage, Localization, and Notification.
You do not need to call these endpoints directly. Use the blocks CLI for configuration and the @seliseblocks/client SDK in application code. Blocks Skills route coding agents through those two surfaces. This page is for reading the underlying contracts and for clients on platforms the SDK does not cover.
Base URL
https://api.seliseblocks.com
The application can override this with VITE_BLOCKS_API_URL.
Common headers
Most requests include the project key:
x-blocks-key: YOUR_PROJECT_KEY
Content-Type: application/json
Find the project key in Blocks OS. Browser requests to authenticated endpoints must also include cookies (credentials: "include" in fetch). Never expose privileged credentials beyond the access model intended for your client.
Services
| Service | Base path | Purpose |
|---|---|---|
| Authentication | /iam/v4 | OIDC login, callback, session refresh, activation, and logout |
| IAM | /iam/v4/iam | Current user, organizations, users, roles, and permissions |
| Data | /data/v4 | Schema discovery and generated GraphQL operations |
| Storage | /data/v4/Files and /logic/v4/Storage | Storage configurations, uploads, file listing, and downloads |
| Localization | /localization/v4 | Project languages and UI localization resources |
| Notification | /notifications | Notification request shape previewed by the example app |
The examples reflect the calls in blocks-construct, including its pagination defaults and payload shapes. Ellipses and uppercase placeholders must be replaced with values from your project.