The LithoBlocks API lets you manage templates, entities, and organizations programmatically with scope-based authorization. Use it to create and update templates, compile messages, manage entities, and administer your organization. The API supports both compile (get JSON blocks and send from your own system) and send (LithoBlocks posts via its Slack app with full platform features); see Compile vs send for when to use which.
Base URL
- Production:
https://api.lithoblocks.com
- Development:
http://localhost:8787
Authentication
All endpoints use LithoBlocks API keys with Bearer authentication.
Getting an API key
- Log into your LithoBlocks organization dashboard
- Go to API Keys in your account settings
- Create an API key and select the scopes you need
- Copy the key (it is shown only once)
Using your API key
Send the key in the Authorization header:
Authorization: Bearer lb_live_sk_example_key_here
Scopes and roles
Scopes are tied to your organization role:
- All roles:
templates:read, messages:create, entities:read
- Member+:
templates:write, entities:write
- Admin+:
organizations:admin, users:admin
When creating an API key, you can only select scopes your role allows. Use the minimum scopes needed for your use case.
Never share API keys or commit them to version control. Store them in environment variables and rotate them regularly.
Organization isolation
All API access is scoped to your organization. You can only access resources in the organization where the API key was created. Cross-organization access is not supported.
Endpoints
The LithoBlocks API section in the sidebar lists all endpoints generated from the OpenAPI specification. Use the playground on each endpoint page to try requests with your API key.
Next steps