v1

latestOpenAPI 3.1.02026-07-2496304466.3 KB
Accounts: General

Create Authenticator

post/accounts/{account_id}/authenticators

Path parameters

account_idstring required

An account identifier.

Headers

LMG-Data-Privacy-Access-Principalstring required
LMG-Data-Privacy-Access-Justificationstring required

Request body

namestring required

Name for the authenticator being registered. When binding to a specific device, it may be a good idea to use the device's model name, like iPhone14,1. This will help when the user has more than one authenticator registered for an account. NOTE: At the moment, there is no way to register a second authenticator, but this feature will be added in the future.

public_keystring required

Base64-url encoded form of the public key. See our guide on strong customer authentication for more details on the formats supported.

client_credential_idstring required

Client side credential identifier of when the key pair was generated. This identifier will be used to indicate the authenticator that created a signature.

recovery_codestring

When resetting the authenticator, use this property to provide the recovery code from lemon.markets. The format is a six-digit string like "123456".

Example request

{
  "client_credential_id": "adfd5154-c39c-41c5-a88d-f3e6a2aded9e",
  "name": "Happy 🍋",
  "public_key": "pSJYIO1qxZIy0bSkO0djjJtdFFVU5K0v1l76XJQba8DNw3xXAQIgAQMmIVggh3uzl_vqfplJX8P3T-rdhEbkO_XX5dDkuGjFO0kRr5w=",
  "verification": {
    "nonce": "<base64-url encoded random data>",
    "signature": "<base64-url encoded signature for `nonce` using `public_key`>"
  }
}

Response

Successful Response

idstring required

An authenticator identifier.

created_atstring date-time required

A timestamp representing the point in time when the authenticator was registered.

public_keystring required

The base64-url encoded form of the authenticator's public key. See the guide on strong customer authentication for more information about the format.

client_credential_idstring required

A client-side (read: on-device) identifier for the public key of the authenticator. Use this identifier to indicate the private key used to create a signature in the two-step verification process or to match the authenticator in a list of authenticated devices. NOTE: All authenticators associated with a single account must have different values in client_credential_id.

namestring required

Example response

{
  "client_credential_id": "adfd5154-c39c-41c5-a88d-f3e6a2aded9e",
  "created_at": "2023-07-28T14:10:33.858446+00:00",
  "id": "sca_8f993645e0954d8ab35198c4c7875fcd",
  "name": "Happy 🍋",
  "public_key": "pSJYIO1qxZIy0bSkO0djjJtdFFVU5K0v1l76XJQba8DNw3xXAQIgAQMmIVggh3uzl_vqfplJX8P3T-rdhEbkO_XX5dDkuGjFO0kRr5w="
}