Skip to main content

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.

Building an app or using a coding agent?

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​

ServiceBase pathPurpose
Authentication/iam/v4OIDC login, callback, session refresh, activation, and logout
IAM/iam/v4/iamCurrent user, organizations, users, roles, and permissions
Data/data/v4Schema discovery and generated GraphQL operations
Storage/data/v4/Files and /logic/v4/StorageStorage configurations, uploads, file listing, and downloads
Localization/localization/v4Project languages and UI localization resources
Notification/notificationsNotification 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.