Quick Start

From zero to your first reservation in under 5 minutes.

1

Sign up and get your API key

Go to cooplocker.com and sign in with Google. Your API key is displayed on the dashboard immediately after sign-up — no email confirmation, no waiting.

Copy your key. Every API call needs it in the X-Api-Key header.

2

Make your first reservation

Reserve a named resource for a requester. The resource name is any string you choose — it doesn't need to be pre-registered.

curl -X POST https://cooplocker.com/api/v1/Reservation/reserve \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"requester":"my-app","resource":"my-first-lock"}]'

A successful response:

{
  "results": [
    {
      "resource": "my-first-lock",
      "requester": "my-app",
      "status": "RESERVED",
      "releaseToken": "a3f8c2d1-..."
    }
  ]
}
Tip: Save the releaseToken — you need it to release the reservation. If you set a ttlSeconds, the lock auto-expires and you don't need to release manually.
3

Check your active reservations

List all active reservations for your tenant at any time:

curl https://cooplocker.com/api/v1/Reservation \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "reservations": [
    {
      "resource": "my-first-lock",
      "requester": "my-app",
      "reservedAt": "2026-05-13T12:00:00Z",
      "expiresAt": null
    }
  ]
}
4

Release the reservation

Pass the releaseToken from step 2:

curl -X POST https://cooplocker.com/api/v1/Reservation/unreserve \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"requester":"my-app","resource":"my-first-lock","releaseToken":"a3f8c2d1-..."}]'
{
  "results": [
    { "resource": "my-first-lock", "requester": "my-app", "status": "UNRESERVED" }
  ]
}
5

Try a conflict

Reserve the same resource with a different requester while it's still held:

curl -X POST https://cooplocker.com/api/v1/Reservation/reserve \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"requester":"another-app","resource":"my-first-lock"}]'
{
  "results": [
    {
      "resource": "my-first-lock",
      "requester": "another-app",
      "status": "ALREADY_HELD"
    }
  ]
}

ALREADY_HELD means the resource is taken. Your application should handle this by retrying, backing off, or reporting a conflict — whichever fits your use case.

What's next?

Now that you have the basics down, explore the rest of the docs: