curl -X POST https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"nonce_d":"0123456789abcdef0123456789abcdef"}'
const response = await fetch(
'https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BOTA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ nonce_d: deviceNonce }),
},
);
const grant = await response.json();
{
"grant_blob": "AQIDBA...",
"expires_at": "2026-08-19T06:15:00.000Z"
}
Devices
Create Deprovision Grant
Create a nonce-bound BLE grant for clearing device pairing state
POST
/
devices
/
{id}
/
deprovision-grant
curl -X POST https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"nonce_d":"0123456789abcdef0123456789abcdef"}'
const response = await fetch(
'https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BOTA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ nonce_d: deviceNonce }),
},
);
const grant = await response.json();
{
"grant_blob": "AQIDBA...",
"expires_at": "2026-08-19T06:15:00.000Z"
}
Create the short-lived authorization blob used by the mobile SDK to clear a
device’s local pairing state and stored device token. This operation is
non-destructive: it does not erase recordings and is not a factory reset.
Pass
Authentication
Requires an API key withdevices:write scope. Call this
endpoint from your backend, never directly from a mobile app.
Prerequisites
- The device was bound with
pk_d. - The app is connected over BLE and has subscribed to the current auth nonce.
- For nonce-bound firmware, send that nonce as
nonce_d.
curl -X POST https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"nonce_d":"0123456789abcdef0123456789abcdef"}'
const response = await fetch(
'https://api.bota.dev/v1/devices/dev_abc123/deprovision-grant',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BOTA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ nonce_d: deviceNonce }),
},
);
const grant = await response.json();
Request Body
string
Current device auth nonce as 16 bytes encoded as 32 lowercase hexadecimal
characters. Required by current nonce-bound firmware; omission exists only
for legacy compatibility.
Response
{
"grant_blob": "AQIDBA...",
"expires_at": "2026-08-19T06:15:00.000Z"
}
grant_blob to the SDK deprovision operation immediately. Only after the
device confirms success should your backend call
POST /devices/{id}/unbind.
For a factory reset, use
POST /devices/{id}/reset
and acknowledge the exact command after the physical wipe. Do not substitute
deprovision plus unbind for factory reset.Was this page helpful?

