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/locky

Authentication. 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/resources

Get 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/db

Example 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/resources

Lock 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/lock

Example response

Resource db has been successfully locked and acquired by you

Release 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/release

Delete 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 deleted

Set 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-duration

Set 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-duration

MCP 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> (an X-API-KEY header also works)
  • Optional: X-Lockit-User: you@company.com sets 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

ToolScopeWhat it does
lockit_list_resourcesreadEvery resource with status, holder and lock end time
lockit_get_resourcereadOne resource, plus description and default lock length
lockit_lock_resourcewriteLock for a user. duration_minutes / _hours / _days are added together
lockit_release_resourcewriteRelease a lock
lockit_create_resourcewriteNew resource (free plan: 2 resources)
lockit_delete_resourcewriteDelete a resource; its creator is told in Slack
lockit_set_resource_default_durationwriteDefault lock length for one resource
lockit_set_workspace_default_durationwriteWorkspace-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?”.