BlockMe API
Use the REST API to sync block lists and settings, upload per-device usage, or let an AI assistant help manage your focus system. Create and revoke keys under Dashboard → API keys.
Authentication
Authorization: Bearer bm_your_api_key
Extension login creates a device-bound key. General keys can manage configuration and read usage, while device-bound keys can also upload usage.
Revision-safe configuration sync
GET /api/v1/sync returns the current revision, groups, whitelist, and settings. Send that revision as baseRevision with PUT. A stale write returns 409 REVISION_CONFLICT; fetch, merge, and retry rather than silently overwriting another device.
GET https://blockmemotherfocus.apercallc.com/api/v1/sync Authorization: Bearer $BLOCKME_API_KEY
PUT https://blockmemotherfocus.apercallc.com/api/v1/sync
{"baseRevision":12,"settings":{"enabled":true,"strictSubdomains":false},"blockedGroups":[{"name":"Deep Work","enabled":true,"sites":["youtube.com","reddit.com"]}],"whitelist":["music.youtube.com"]}Multi-device usage
POST /api/v1/usage upserts the calling device’s daily total for each domain. Retries are idempotent and another device’s totals remain independent. GET /api/v1/usage?days=7 returns account-wide totals aggregated across devices. DELETE clears cloud usage for every device.
POST https://blockmemotherfocus.apercallc.com/api/v1/usage
{"entries":[{"domain":"github.com","date":"2026-07-21","durationMs":3600000}]}AI assistant prompt
You can manage my BlockMe account at https://blockmemotherfocus.apercallc.com/api/v1. Keep my bearer key secret. GET /sync before proposing changes. Preserve unknown groups and sites. PUT only after I approve and include the returned baseRevision. On a 409 conflict, fetch the latest state, explain the conflict, merge safely, and ask before retrying. Use GET /usage?days=7 for usage summaries.
Limits
Sync accepts up to 100 groups and 1,000 sites per group. Usage accepts 5,000 rows per request and caps each device/domain/day at 24 hours.