Token Metadata API

Locksmith provides facilities to host and retrieve token metadata associated with Locks and its key holders.

Get Key Metadata (NFT Metadata)

GET https://locksmith-host/api/key/:lockAddress/:keyId

This endpoint returns metadata associated with an associated key.

Path Parameters

Query Parameters

Headers

{
  "name": "Blue Checkmark",
  "description": "A blue checkmark for all of your social web accounts! Unlock is a protocol for memberships. https://unlock-protocol.com/",
  "image": "https://assets.unlock-protocol.com/nft-images/blue-checkmark.png",
  "attributes": [
    {
      "trait_type": "Expiration",
      "value": 4720101493,
      "display_type": "date"
    }
  ]
}

Get Key Holder Metadata for a Key Holders

GET https://locksmith-host/api/key/:address/keyHolderMetadata

Provides lock owners with key holder provided metadata in bulk

Path Parameters

Query Parameters

Headers

[{
    tokenAddress: lockAddress,
    userAddress: lockOwningAddress,
      data: {
        protected: {
            hidden: 'metadata',
        },
        public: {
            mock: 'values',
        },
      },
}]

Update Lock

PUT https://locksmith-host/api/key/:address

Allows Lock owners with the ability to update default metadata to be shared with all keys of a given Lock.

Path Parameters

Headers

Request Body

Update a Key

PUT https://locksmith-host/api/key/:address/:keyId

Provides lock owners with the ability to update metadata associated with specific keys.

Path Parameters

Headers

Request Body

Update a User

PUT https://locksmith-host/api/key/:address/user/:userAddress

Key holders are allowed to update metadata associated with keys of a given lock in support of downstream use cases. Lock owners will have access to protected information provided by key holders.

Path Parameters

Headers

Request Body

Last updated