Skip to main content

Introduction

Welcome to the Haptics Docs API! You can use our API to access Haptics SDK endpoints for controlling compatible haptic devices. All API requests must include the header:
Content-Type: application/json
unless explicitly specified otherwise.

🌐 Base URL

All requests are sent to a single production endpoint:
EnvironmentBase URLDescription
Productionhttps://api.getmelody.ioLive Haptics SDK API

🔑 Authentication & Security

The Haptics SDK API uses JWT bearer authentication. Authenticate your requests using:
Authorization: Bearer <YOUR_JWT_TOKEN>
Content-Type: application/json
  • Authorization must use the Bearer scheme.
  • Requests with missing or invalid tokens will return 401 Unauthorized for protected endpoints.

📡 Making Requests

The API supports standard REST semantics:
MethodPurpose
GETQuery device or session state
POSTSend real‑time motion commands, start/stop modes, upload scripts, generate OTP
PUT/PATCHUpdate device or session configuration
DELETEStop playback, clear sessions, or disconnect

Example request

curl -X GET "https://api.getmelody.io/device/info" \
  -H "Authorization: Bearer <YOUR_JWT_TOKEN>" \
  -H "Content-Type: application/json"
All responses return JSON that follows the schemas declared in OpenAPI document such as DeviceInfo, HapticPoint, etc.

🧱 Core API Domains

📦 Device Information

  • Inspect device details
  • Query active session state
  • Update device configuration
  • Set communication mode (BLE or WiFi)

🎛️ Haptic Direct Control

  • Send time‑based motion commands
  • Move device to a target position within a defined time
  • Suitable for custom timeline-driven engines

📈 Haptic Points Stream (HPS)

  • Stream timestamped motion points
  • Automatic velocity smoothing
  • Ideal for real‑time high‑frequency control

🎵 Haptic Script Control (Melody Playback)

  • Built for video‑to‑sensation scripting
  • Upload/assign motion scripts
  • Controls: start, stop, pause, seek
  • Server orchestrates timeline playback

🔁 Haptic Loop Control

  • Define motion min/max range
  • Movement loops automatically
  • Lightweight continuous patterns

🔐 One‑Time Password (OTP)

  • Secure short‑lived pairing secrets
  • Generate and confirm OTP during device binding

🛠️ Maintenance & Debug

  • Remote maintenance commands
  • Diagnostics and device status inspection
  • Debug or log retrieval if implemented and permitted by device

For full endpoint, schema, and parameter details, jump into the HapticsConnect API Reference — each tab includes deeper context, practical examples, and detailed request/response insights.