Skip to main content
POST
/
device
/
hdc
/
command
Send Haptic Direct Control Command
curl --request POST \
  --url https://api.getmelody.io/device/hdc/command \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "position": 50,
  "time": 1
}
'

Authorizations

Authorization
string
header
required

Device Token for SDK operations. Obtain via: GET /api/haptics/device/device_token Format: {device_id}-{1|2}-{random} Note: ApiToken (from POST /device/otp/confirm) can also be used for most SDK endpoints.

Body

application/json

User can set position & velocity or position & time it will take to get the receiver there. One of the velocity or time must be specified.

position
number
required

The position of the stroker. Range: [0, 10000).

Example:

50

time
number
required

The time in milliseconds that takes to get stroker into specified position.

Example:

1

Response

200

OK