Documentation
Lockit API & MCP
Manage shared resources in your organisation programmatically: create them, lock them and release them. Every call follows the same rules as Slack and posts the same notifications.
Overview
Base URL
https://api.lockitbot.com/api/lockyAuthentication. Every request must include your API key in the header:
X-API-KEY: lockit_****************************Create a key in Slack: open the Lockit app's Home tab and click Create API Key. Keys are available on paid plans.
Keep your API key secret. Never expose it in frontend code or public repositories.
List all resources
GET/resources
Returns every resource in your organisation with its status, holder and lock end time.
Example
curl -H "X-API-KEY: lockit_****************************" \
https://api.lockitbot.com/api/locky/resourcesGet resource details
GET/resources/{name}
Details of one resource by name.
Example
curl -H "X-API-KEY: lockit_****************************" \
https://api.lockitbot.com/api/locky/resources/dbExample response
{
"name": "db",
"status": "locked",
"lockedBy": "user@email.com",
"lockedTill": "2026-10-30T18:00:00Z",
"lockedTillHuman": "2026-10-30 18:00:00 UTC",
"createdBy": "admin@email.com",
"defaultLockDays": null,
"defaultLockHours": 2,
"defaultLockMinutes": null
}Create resource
POST/resources
Creates a new resource in your organisation. The free plan allows 2.
Body · application/json
{
"name": "<your-resource-name>",
"description": "<resource-description>",
"userEmail": "<email of the user creating it>"
}Example
curl -X POST \
-H "X-API-KEY: lockit_****************************" \
-H "Content-Type: application/json" \
-d '{"name":"db","description":"Production database","userEmail":"user@email.com"}' \
https://api.lockitbot.com/api/locky/resourcesLock resource
POST/resources/{name}/lock
Locks a resource for a user.
duration is in minutes (60 = 1 hour). Leave it out to use the resource's default, then the workspace default.
userEmail must belong to a member of your Slack workspace.
Body · application/json
{
"userEmail": "email of the user requesting the lock",
"duration": 60
}Example
curl -X POST \
-H "X-API-KEY: lockit_****************************" \
-H "Content-Type: application/json" \
-d '{"userEmail":"user@email.com","duration":60}' \
https://api.lockitbot.com/api/locky/resources/db/lockExample response
Resource db has been successfully locked and acquired by youRelease resource
POST/resources/{name}/release
Releases the lock on a resource.
Example
curl -X POST \
-H "X-API-KEY: lockit_****************************" \
https://api.lockitbot.com/api/locky/resources/db/releaseDelete resource
DELETE/resources/{name}
Deletes the resource.
userEmail is the user performing the deletion, used for auditing and permission checks.
Body · application/json
{
"userEmail": "user@email.com"
}Example
curl -X DELETE https://api.lockitbot.com/api/locky/resources/db \
-H "X-API-KEY: lockit_****************************" \
-H "Content-Type: application/json" \
-d '{"userEmail":"user@email.com"}'Example response
Resource db has been successfully deletedSet a resource's default lock length
POST/resources/{name}/default-duration
How long a lock on this resource lasts when nobody picks a duration. The three fields are added together.
Body · application/json
{
"defaultLockDays": 0,
"defaultLockHours": 2,
"defaultLockMinutes": 0
}Example
curl -X POST \
-H "X-API-KEY: lockit_****************************" \
-H "Content-Type: application/json" \
-d '{"defaultLockHours":2}' \
https://api.lockitbot.com/api/locky/resources/db/default-durationSet the workspace default lock length
POST/config/default-duration
The fallback for every resource without its own default.
Body · application/json
{
"defaultLockDays": 1,
"defaultLockHours": 0,
"defaultLockMinutes": 0
}Example
curl -X POST \
-H "X-API-KEY: lockit_****************************" \
-H "Content-Type: application/json" \
-d '{"defaultLockDays":1}' \
https://api.lockitbot.com/api/locky/config/default-durationMCP server
Lock resources from your AI assistant
Claude Code, Cursor, VS Code, Windsurf and other MCP clients can check, lock and release Lockit resources with the same API key as the REST API.
- Endpoint:
https://api.lockitbot.com/api/locky/mcp(streamable HTTP) - Auth:
Authorization: Bearer <lockit-api-key>(anX-API-KEYheader also works) - Optional:
X-Lockit-User: you@company.comsets whose name locks are taken under
A key with read scope only gets the read tools; use a write key to lock and release.
Claude Code
claude mcp add --transport http lockit https://api.lockitbot.com/api/locky/mcp \
--header "Authorization: Bearer $LOCKIT_API_KEY" \
--header "X-Lockit-User: you@company.com"Cursor (~/.cursor/mcp.json) · VS Code (.vscode/mcp.json, key “servers”)
{
"mcpServers": {
"lockit": {
"url": "https://api.lockitbot.com/api/locky/mcp",
"headers": {
"Authorization": "Bearer <lockit-api-key>",
"X-Lockit-User": "you@company.com"
}
}
}
}Claude.ai and Claude Desktop custom connectors need OAuth, which the server doesn't offer yet. Use Claude Code or a client that supports custom headers.
Tools
| Tool | Scope | What it does |
|---|---|---|
| lockit_list_resources | read | Every resource with status, holder and lock end time |
| lockit_get_resource | read | One resource, plus description and default lock length |
| lockit_lock_resource | write | Lock for a user. duration_minutes / _hours / _days are added together |
| lockit_release_resource | write | Release a lock |
| lockit_create_resource | write | New resource (free plan: 2 resources) |
| lockit_delete_resource | write | Delete a resource; its creator is told in Slack |
| lockit_set_resource_default_duration | write | Default lock length for one resource |
| lockit_set_workspace_default_duration | write | Workspace-wide default lock length |
Try prompts like “is staging-db free?”, “lock staging-db for 3 hours for me” or “who has qa-env and until when?”.