Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Unlock Locksmith Applications Transfer API
version: '2'
description: Locksmith provides backend functionality for enabling ticketing, metadata storage, and notification hooks.
license:
name: MIT
servers:
- url: https://locksmith.unlock-protocol.com
description: Production Server
- url: https://staging-locksmith.unlock-protocol.com
description: Staging Server
tags:
- name: Transfer
paths:
/v2/transfer/{network}/locks/{lockAddress}/keys/{keyId}:
post:
operationId: createTransferCode
security:
- User: []
description: Create a transfer code to transfer an airdropped key to an email address.
parameters:
- $ref: '#/components/parameters/Network'
- $ref: '#/components/parameters/LockAddress'
- $ref: '#/components/parameters/KeyId'
responses:
200:
description: Successfully created transfer code and sent an email to the recipient.
content:
application/json:
schema:
type: object
required:
- owner
- lock
- token
- deadline
- transferCode
properties:
owner:
type: string
lock:
type: string
token:
type: string
deadline:
type: number
transferCode:
type: string
description: Part of the transfer code that is required to be used with the part sent to the recipient.
404:
description: Key not found.
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
401:
$ref: '#/components/responses/401.NotAuthenticated'
tags:
- Transfer
/v2/transfer/done:
post:
operationId: transferDone
security:
- User: []
description: Finalize the transfer of a key to a recipient. This is to copy over any locksmith related data to the recipient's account.
requestBody:
content:
application/json:
schema:
type: object
required:
- transferSignature
- owner
- lock
- token
- network
- deadline
properties:
transferSignature:
type: string
description: The signature of the transfer code sent to the recipient.
owner:
type: string
lock:
type: string
token:
type: string
network:
type: number
deadline:
type: number
responses:
200:
description: Successfully transferred key to recipient.
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
403:
description: Transfer not authorized by locksmith
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
404:
description: Key not found.
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
401:
$ref: '#/components/responses/401.NotAuthenticated'
tags:
- Transfer
components:
parameters:
LockAddress:
in: path
name: lockAddress
required: true
description: Lock address.
schema:
type: string
Network:
in: path
name: network
required: true
description: Network id.
schema:
type: integer
KeyId:
in: path
name: keyId
required: true
description: Key Id.
schema:
type: string
responses:
401.NotAuthenticated:
description: User is not authenticated.
content:
application:
schema:
$ref: '#/components/schemas/GenericServerError'
schemas:
GenericServerError:
type: object
properties:
message:
type: string
default: There was an error in fullfiling the request.
securitySchemes:
User:
type: http
scheme: bearer
bearerFormat: JWT
Application:
type: apiKey
name: api-key
in: query