Skip to main content
PUT
/
api
/
sys
/
sensors
Update Sensor
curl --request PUT \
  --url https://spaces.nexudus.com/api/sys/sensors \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": 123,
  "BusinessId": 123,
  "Name": "<string>",
  "Reference": "<string>",
  "SensorType": 123,
  "DataStrategy": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
Updates an existing Sensor record. You must include the Id of the record to update along with all required fields.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the Sensor-Edit role.

Enums

ValueName
1PresenceDetection
2PeopleCounter
3Temperature
4Humidity
5Light
6Noise
7CO2
8VolatileOrganicCompounds
9HarmfulParticulates
10Touch
11Water
12AtmosphericPressure
13Power
14OpenClosed
99Other
ValueName
1Polling
2Endpoint
3DisruptiveTechnologies
4Pressac

Request Body

Required Fields

Id
integer
required
The Id of the Sensor record to update.
BusinessId
integer
required
ID of the business linked to this record.
Name
string
required
The name value for this sensor.
Reference
string
required
The reference value for this sensor.
SensorType
integer
required
The sensor type value for this sensor.
DataStrategy
integer
required
The data strategy value for this sensor.

Optional Fields

Desks
integer[]
List of desks linked to this record.
AddedDesks
integer[]
The added desks value for this sensor.
RemovedDesks
integer[]
The removed desks value for this sensor.
Resources
integer[]
List of resources linked to this record.
AddedResources
integer[]
The added resources value for this sensor.
RemovedResources
integer[]
The removed resources value for this sensor.
CannedResponseId
integer
ID of the canned response linked to this record.
Unit
string
The unit value for this sensor.
Active
boolean
Whether this sensor is currently active.
PayloadDataPath
string
The payload data path value for this sensor.
ActionTriggerFunction
string
The action trigger function value for this sensor.
ValueFunction
string
The value function value for this sensor.
ActionSendEmailAlert
boolean
Whether action send email alert is enabled.
AlertEmailAddress
string
The alert email address value for this sensor.
WebhookUrl
string
The webhook url value for this sensor.
ActionUpdateDeskAvailability
boolean
Whether action update desk availability is enabled.
ActionUpdateResourceAvailability
boolean
Whether action update resource availability is enabled.
ActionUpdateBookingOccupancy
boolean
Whether action update booking occupancy is enabled.
ActionSendCustomerEmailAlert
boolean
Whether action send customer email alert is enabled.
ActionBookingStart
boolean
Whether action booking start is enabled.
ActionBookingTerminate
boolean
Whether action booking terminate is enabled.
ActionCheckInOrOut
boolean
Whether action check in or out is enabled.
ActionMakeHttpRequest
boolean
Whether action make http request is enabled.
ShowInNowDashboard
boolean
Whether show in now dashboard is enabled.
ShowInPortal
boolean
Whether show in portal is enabled.
SharedSecret
string
The shared secret value for this sensor.
ApiKey
string
The api key value for this sensor.
Username
string
The username value for this sensor.
Password
string
The password value for this sensor.

Code Examples

curl -X PUT \
  "https://spaces.nexudus.com/api/sys/sensors" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "Name": "",
    "Reference": "",
    "SensorType": 0,
    "DataStrategy": 0,
    "Id": 87654321
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the update.
Value
object
Contains the Id of the updated record.
WasSuccessful
boolean
true if the sensor was updated successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "Sensor was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}