Authentication
Access to the Melody API is scoped to your organization. Every request that controls a device is authenticated with a short-lived session token derived from your organization Developer Key (Melody Key).Getting access
Your Organization ID and Developer Key are issued to you by Melody. Contact support to request them — organization and key management is handled by the Melody team.Flow
1
Link a device to your organization
The device displays a 6-digit OTP. Submit it with your Developer Key in the Response:The Device Key is stable — the same device always yields the same key.
X-Org-Key header to link the device and receive its Device Key.2
Create a session token
Exchange your Developer Key for a short-lived session token. Optionally scope it to specific devices with Response:
device_keys; omit the field to allow every device linked to your organization.3
Control the device
Call any
/device/* endpoint with the session token and the target Device Key.Token summary
Session tokens are short-lived (default 15 minutes, configurable per organization). Create a new one when it expires.