Blocks API Reference
This reference documents the Blocks APIs used by the blocks-construct example application. It covers Authentication, IAM, Data Gateway, Storage, Localization, and Notification.
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 |
note
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.