Docs

Quickstart

Create a token, list your locks and create a lock that checkout enforces.

When you finish, you have an API token and a new lock that is live at checkout.

You need a store on a paid plan or in its 14-day trial. Every request goes to https://app.shopbird.app/api/v1.

Create a token

  1. In Shopbird, open Settings > API access.
  2. Create a token. Give it a name and the scopes locks:read and locks:write.
  3. Copy the token. It starts with sb_live_, and Shopbird shows it only once.

List your locks

Send the token in the Authorization header.

curl https://app.shopbird.app/api/v1/locks \
  -H "Authorization: Bearer sb_live_…"

You see your locks, newest first:

{
  "data": [
    { "id": "…", "name": "VIP collection", "enabled": true, "version": 3 }
  ],
  "next_cursor": null
}

Create a lock

Lock one product. Add ?wait=true so the response waits until checkout enforces the lock.

curl -X POST "https://app.shopbird.app/api/v1/locks?wait=true" \
  -H "Authorization: Bearer sb_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-lock-1" \
  -d '{
    "name": "Moon ring early access",
    "targets": [{ "type": "product", "resource_id": "gid://shopify/Product/123" }],
    "audience_ids": ["<audience id>"]
  }'

You get 201 and the new lock. "status": "synced" means checkout enforces it now.

{
  "id": "…",
  "name": "Moon ring early access",
  "enabled": true,
  "targets": [{ "type": "product", "resource_id": "gid://shopify/Product/123", "title": "" }],
  "audience_ids": ["<audience id>"],
  "version": 1,
  "sync": { "generation": 42, "status": "synced" }
}

If status is "pending", the lock is saved and Shopbird keeps syncing it. See Changes and checkout.