MatterDeviceUpdate desired shadow

Update desired shadow

Sets desired shadow state and pushes to AWS IoT Core. An organization API key may send any desired write. A user's token (the mobile app) may send only to a device in the user's devices (GET /users/{id}/devices, deviceType matter), and only a Scenario Engine command (scenario_upsert, scenario_remove, scenario_set_status); the scenario's creator is the token's user.

curl -X POST "https://api.spkey.co/matter-devices/example_string/UpdateDesiredShadow" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "desired": {},
  "requestedByUserId": "example_string"
}'
{
  "success": true,
  "aggregateId": "example_string",
  "version": 3.14,
  "event": "null"
}
POST
/matter-devices/{id}/UpdateDesiredShadow
POST
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
idstring
Required

Matter Device ID

Content-Typestring
Required

The media type of the request body

Options: application/json
desiredobject
Required

Desired shadow state to push to device

requestedByUserIdstring

App user the write is made for. Recorded on the event only, never written to the shadow. For a Scenario Engine command, the creator of the scenario: SpacetimeDB shows it to that user. With a user's token it may be left out (the token's user is used) and must otherwise be that user; with an organization API key it names the user, or is left out.

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

idstring
Required

Matter Device ID

Body

application/json
desiredobject
Required

Desired shadow state to push to device

requestedByUserIdstring

App user the write is made for. Recorded on the event only, never written to the shadow. For a Scenario Engine command, the creator of the scenario: SpacetimeDB shows it to that user. With a user's token it may be left out (the token's user is used) and must otherwise be that user; with an organization API key it names the user, or is left out.

Responses

successboolean
Required
aggregateIdstring
Required
versionnumber
Required
eventobject,null
Required