Skip to main content
POST
/
industrial
/
assets
Create an asset
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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The asset to create

The asset creation arguments

name
string
required

The name of the asset.

customMetadata
object

The custom fields of an asset.

Example:
{
"manufacturer": "Samsara",
"serialNumber": "123ABC"
}
location
object

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.

locationDataInputId
string

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.

Example:

"12345"

locationType
enum<string>

The format of the location. This field is required if a location is provided. Valid values: point, address, dataInput.

Available options:
point,
address,
dataInput
parentId
string

The id of the parent asset that the asset belongs to.

Example:

"123abcde-4567-8910-1112-fghi1314jklm"

runningStatusDataInputId
string

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.

Example:

"67890"

tagIds
string[]

The ids of the tags that the asset should belong to.

Response

Newly created asset object

data
object

Asset