Create an asset with optional configuration parameters.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
To use this endpoint, select Write Equipment under the Equipment category when creating or editing an API token. Learn More.
curl --request POST \
--url https://api.samsara.com/industrial/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customMetadata": {
"manufacturer": "Samsara",
"serialNumber": "123ABC"
},
"location": {
"formattedAddress": "350 Rhode Island St, San Francisco CA, 94103",
"latitude": 37.765363,
"longitude": -122.403098
},
"locationDataInputId": "12345",
"locationType": "point",
"parentId": "123abcde-4567-8910-1112-fghi1314jklm",
"runningStatusDataInputId": "67890",
"tagIds": [
"123"
]
}
'{
"data": {
"id": "123abcde-4567-8910-1112-fghi1314jklm",
"isRunning": true,
"name": "<string>",
"customMetadata": {
"manufacturer": "Samsara",
"serialNumber": "123ABC"
},
"dataOutputs": [
{
"dataGroup": "Control Pressure",
"dataInput": {
"dataGroup": "Pressure",
"id": "123456",
"lastPoint": {
"time": "2020-01-27T07:06:25Z",
"value": 1992.0506
},
"name": "Digital Input 1",
"units": "PSI"
},
"deviceId": "123",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Digital Output 1"
}
],
"location": {
"formattedAddress": "350 Rhode Island St, San Francisco CA, 94103",
"latitude": 37.765363,
"longitude": -122.403098
},
"locationDataInput": {
"id": "<string>"
},
"locationType": "point",
"parentAsset": {
"id": "123abcde-4567-8910-1112-fghi1314jklm",
"name": "<string>"
},
"runningStatusDataInput": {
"id": "12345"
},
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The asset to create
The asset creation arguments
The name of the asset.
The custom fields of an asset.
Show child attributes
{
"manufacturer": "Samsara",
"serialNumber": "123ABC"
}For locationType "point", latitude and longitude are required. For "address", formattedAddress must be provided, and lat/long can be optionally included for displaying a dot on the assets map. For "dataInput", this object should not be passed in.
Show child attributes
Required if locationType is "dataInput". Specifies the id of a location data input which will determine the asset's location. The data input will be moved to the new asset.
"12345"
The format of the location. This field is required if a location is provided. Valid values: point, address, dataInput.
point, address, dataInput The id of the parent asset that the asset belongs to.
"123abcde-4567-8910-1112-fghi1314jklm"
The asset's isRunning status will be true when the associated data input's value is 1. Data input cannot be of location format. The data input will be moved to the new asset.
"67890"
The ids of the tags that the asset should belong to.
Newly created asset object
Asset
Show child attributes
curl --request POST \
--url https://api.samsara.com/industrial/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customMetadata": {
"manufacturer": "Samsara",
"serialNumber": "123ABC"
},
"location": {
"formattedAddress": "350 Rhode Island St, San Francisco CA, 94103",
"latitude": 37.765363,
"longitude": -122.403098
},
"locationDataInputId": "12345",
"locationType": "point",
"parentId": "123abcde-4567-8910-1112-fghi1314jklm",
"runningStatusDataInputId": "67890",
"tagIds": [
"123"
]
}
'{
"data": {
"id": "123abcde-4567-8910-1112-fghi1314jklm",
"isRunning": true,
"name": "<string>",
"customMetadata": {
"manufacturer": "Samsara",
"serialNumber": "123ABC"
},
"dataOutputs": [
{
"dataGroup": "Control Pressure",
"dataInput": {
"dataGroup": "Pressure",
"id": "123456",
"lastPoint": {
"time": "2020-01-27T07:06:25Z",
"value": 1992.0506
},
"name": "Digital Input 1",
"units": "PSI"
},
"deviceId": "123",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Digital Output 1"
}
],
"location": {
"formattedAddress": "350 Rhode Island St, San Francisco CA, 94103",
"latitude": 37.765363,
"longitude": -122.403098
},
"locationDataInput": {
"id": "<string>"
},
"locationType": "point",
"parentAsset": {
"id": "123abcde-4567-8910-1112-fghi1314jklm",
"name": "<string>"
},
"runningStatusDataInput": {
"id": "12345"
},
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
]
}
}