Skip to main content
POST
/
device
/
otp
/
confirm
/
v2
Confirm OTP and Link Device to Organization
curl --request POST \
  --url https://api.getmelody.io/device/otp/confirm/v2 \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Key: <x-org-key>' \
  --data '
{
  "otp": "123456"
}
'
{
  "device_key": "alpha-bravo-charlie-delta"
}

Headers

X-Org-Key
string
required

Melody Key (Developer Key) that identifies your organization

Example:

"MToxMjM0NTY3OC1hYmNkLTEyMzQtNTY3OC1hYmNkZWYxMjM0NTY"

Body

application/json
otp
string
required

The 6-digit one-time password displayed on the device.

Example:

"123456"

Response

Device linked successfully

Response containing a Device Key (public device identifier). The Device Key is a stable identifier for the device, consisting of 4 BIP39 words.

device_key
string
required

The Device Key in BIP39 word format. Format: 4 words separated by dashes (e.g., "alpha-bravo-charlie-delta"). This key is deterministic - the same device always produces the same key.

Pattern: ^[a-z]+-[a-z]+-[a-z]+-[a-z]+$
Example:

"alpha-bravo-charlie-delta"