Locksmith Admin API
Last updated
Was this helpful?
Locksmith's Admin API can be used to query Locksmith to get information about your locks, keys, and settings. As a REST API, it closely resembles Shopify's own REST Admin API.
Locksmith's Admin API is not intended for use in themes or user-facing browser experiences. For that, use Locksmith's Storefront API. Any client-side browser Javascript calling the Admin API will encounter CORS errors.
We maintain a 1-to-1 relationship with Shopify's API versions. Any current and valid Shopify API versions are also current and valid Locksmith versions.
Read more about Shopify's versioning philosophy.
For simplicity, the use of unstable as the version when calling this API will work for most use-cases.
There are two required headers:
x-shopify-shop-domain
Must be of the format "example.myshopify.com"
x-locksmith-access-token
Must be an enabled access token, generated in your Locksmith settings.
Using cURL, one might access the API this way:
curl \
--header "x-shopify-shop-domain: example.myshopify.com" \
--header "x-locksmith-access-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
https://uselocksmith.com/api/unstable/shop.jsonAll requests should be prefixed with https://uselocksmith.com/api/:version
POST /input-lists/:id/sync
Requests an input list sync for the input list indicated by the ID
POST /install
Requests a full Locksmith installation to the currently published theme
GET /locks.json
Returns an array of all locks in your Locksmith account
GET /locks/:id.json
Returns data for a single lock in your Locksmith account
POST /lock/
Creates a lock (single- or multi-resource). See full documentation.
DELETE /locks/:id
Deletes the lock indicated by the ID
POST /locks/:lock_id/resources
Attaches a resource to an existing lock. See documentation.
PATCH /locks/:lock_id/resources/:lock_resource_id
Updates a resource attached to a lock
DELETE /locks/:lock_id/resources/:lock_resource_id
Detaches a resource from a lock
GET /shop.json
Returns Locksmith's entire configuration for your store
Do not rely upon data keys that are prefixed with an underscore (e.g. "_foobar"). They are subject to change or removal at any time.
To access this API, generate an access token. You can find these toward the end of your settings area:

Use the "Add access token" link to add your first token.
Once created, an access token may be edited to enable/disable it, or to change its name. It may also be deleted.
Last updated
Was this helpful?
Was this helpful?