Automation and API
MikroLens exposes an HTTP API for automation and integrations. Use it when product signals, work updates, or planning data need to connect with internal tools.
The OpenAPI schema is served from /openapi.json and is also stored at api/src/openapi/schema.json.
API Identities
Section titled “API Identities”API identities are managed in Settings. Each identity has access policy settings and receives a bearer token at creation or rotation time.
Use the token as an authorization bearer:
curl http://127.0.0.1:3000/api/bootstrap \ -H "Authorization: Bearer mikrolens_live_..."Store API identity tokens like passwords. MikroLens only stores token hashes after provisioning.
API identities can read snapshots and create or update records through bearer auth where the OpenAPI contract allows it. Settings administration routes are intended for authenticated users unless the contract says otherwise.
Webhooks
Section titled “Webhooks”Webhook endpoints can be created from Settings or through /api/webhooks. MikroLens stores delivery attempts and the webhook worker retries failed deliveries according to the configured retry policy.
Supported event subscriptions include work item, signal, state change, and document events. Use work-item.*, signal.*, or document.* when an endpoint should receive all events for that group.
Useful backend settings:
MIKROLENS_WEBHOOK_BATCH_SIZEMIKROLENS_WEBHOOK_CONCURRENCYMIKROLENS_WEBHOOK_MAX_ATTEMPTSMIKROLENS_WEBHOOK_POLL_INTERVAL_MSMIKROLENS_WEBHOOK_TIMEOUT_MSMIKROLENS_WEBHOOK_STALE_CLAIM_MSMIKROLENS_WEBHOOK_WORKER_ID
Contract-First Integrations
Section titled “Contract-First Integrations”Prefer generating integration clients from /openapi.json when possible. The schema includes bearer auth for human MikroAuth sessions and API identity automation tokens.