Creates a new trailer asset.
Rate limit: 100 requests/min (learn more about rate limits here).
To use this endpoint, select Write Trailers under the Trailers category when creating or editing an API token. Learn More.
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.
curl --request POST \
--url https://api.samsara.com/fleet/trailers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Trailer-123",
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"enabledForMobile": true,
"externalIds": {},
"licensePlate": "7TYP290",
"notes": "These are my trailer notes",
"tagIds": [
"Dolor autem sit odio.",
"Laudantium dolores eos reprehenderit et."
],
"trailerSerialNumber": "8V8WD530FLN016251"
}
'{
"data": {
"id": "494123",
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"enabledForMobile": true,
"externalIds": {},
"installedGateway": {
"model": "VG34",
"serial": "GFRV-43N-VGX"
},
"licensePlate": "7TYP290",
"name": "Trailer-123",
"notes": "These are my trailer notes",
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
],
"trailerSerialNumber": "8V8WD530FLN016251"
}
}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 human-readable name of the Trailer. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. By default, this name is the serial number of the Samsara Asset Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time.
"Trailer-123"
A list of attributes to assign to the trailer.
Show child attributes
Indicates if the trailer is visible on the Samsara mobile apps.
true
A map of external ids
Show child attributes
The license plate of the Trailer. By default: empty. Can be set or updated through the Samsara Dashboard or the API at any time.
12"7TYP290"
These are generic notes about the Trailer. Empty by default. Can be set or updated through the Samsara Dashboard or the API at any time.
255"These are my trailer notes"
An array of IDs of tags to associate with this trailer. If your access to the API is scoped by one or more tags, this field is required to pass in.
[
"Dolor autem sit odio.",
"Laudantium dolores eos reprehenderit et."
]The serial number of the trailer.
"8V8WD530FLN016251"
OK response.
Show child attributes
curl --request POST \
--url https://api.samsara.com/fleet/trailers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Trailer-123",
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"enabledForMobile": true,
"externalIds": {},
"licensePlate": "7TYP290",
"notes": "These are my trailer notes",
"tagIds": [
"Dolor autem sit odio.",
"Laudantium dolores eos reprehenderit et."
],
"trailerSerialNumber": "8V8WD530FLN016251"
}
'{
"data": {
"id": "494123",
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"enabledForMobile": true,
"externalIds": {},
"installedGateway": {
"model": "VG34",
"serial": "GFRV-43N-VGX"
},
"licensePlate": "7TYP290",
"name": "Trailer-123",
"notes": "These are my trailer notes",
"tags": [
{
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
],
"trailerSerialNumber": "8V8WD530FLN016251"
}
}