Developers
API keys
An API key lets scripts, CI jobs and AI assistants use Lockit through the REST API and MCP server.
Before you start
- API keys are on paid plans. See Plans and billing.
- Keys are created in Slack. Discord and Microsoft Teams workspaces can't create keys yet.
Create a key
- Open the Lockit App Home in Slack.
- Click Create API Key.
- Copy the key and store it somewhere safe, such as your CI's secret store or a password manager.
Read and write scope
Each key has one of two scopes:
| Scope | Can do |
|---|---|
| read | List resources and see who holds them |
| write | Everything read can, plus create, lock, release and delete resources, and set default lock durations |
Give each script the smallest scope it needs. A dashboard only needs read; a CI job that locks an environment needs write.
Use the key
REST API: send it in the X-API-KEY header.
curl -H "X-API-KEY: $LOCKIT_API_KEY" \
https://api.lockitbot.com/api/locky/resources
MCP server: send it as a bearer token, Authorization: Bearer <key>. See
MCP server quick start.
Treat a key like a password. Keep it out of frontend code, public repositories and chat messages. Anyone with a write key can lock and delete your resources.
Acting as a person
Locks belong to people. API calls that lock, create or delete take a
userEmail, and Lockit matches it to a member of your Slack workspace. The email
must belong to someone in the workspace.