AdminClear a sensor's learned Matter device type

Clear a sensor's learned Matter device type

Deletes the sticky Descriptor (29/0) device type learned for this device — one endpoint with ?endpoint=N, otherwise every endpoint it has. The device re-learns from its next shadow that carries 29/0. Use this when a sensor reports the opposite of reality (a contact sensor stuck reading "open", a leak detector that never alarms), which is what a stale or wrong row causes. Deleting nothing returns 200 with alreadyDeleted=true — the row being absent is the requested end state. Requires dual auth: X-Admin-API-Key + JWT.

curl -X DELETE "https://api.spkey.co/admin/sensor-device-type/John Doe?endpoint=null" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "success": true,
  "thingName": "John Doe",
  "endpoint": "null",
  "deleted": 3.14,
  "alreadyDeleted": true
}
DELETE
/admin/sensor-device-type/{thingName}
DELETE
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
thingNamestring
Required

AWS IoT thing name — identical to the Matter device UUID / aggregate id.

Min length: 1
query
endpointintegernull

Clear only this endpoint. Omit to clear every endpoint of the device — on a bridge that un-learns every other sensor on it too.

Min: 0
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

thingNamestring
Required

AWS IoT thing name — identical to the Matter device UUID / aggregate id.

Query Parameters

endpointinteger,null

Clear only this endpoint. Omit to clear every endpoint of the device — on a bridge that un-learns every other sensor on it too.

Responses

successboolean
Required
Allowed values:true
thingNamestring
Required
endpointnumber,null
Required
deletednumber
Required

Rows removed.

alreadyDeletedboolean
Required

True when nothing was there to remove — a successful end state, not a 404 (CLAUDE.md D1 rule 3).