Create a new plan.
Rate limit: 5 requests/sec (learn more about rate limits here).
To use this endpoint, select Write Routes under the Driver Workflow 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/hub/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Weekly Plan - Week 15",
"shiftStartTime": "2024-04-15T09:00:00Z"
}
'{
"data": {
"createdAt": "2024-04-10T10:30:00Z",
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"id": "950e8400-e29b-41d4-a716-446655440005",
"name": "Weekly Plan - Week 15",
"shiftStartTime": "2024-04-15T09:00:00Z",
"updatedAt": "2024-04-10T10:30:00Z"
}
}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.
Request body for creating a hub plan
The ID of the hub the plan belongs to
"550e8400-e29b-41d4-a716-446655440000"
The name of the plan
"Weekly Plan - Week 15"
The shift start time for the plan in RFC 3339 format. If not provided, defaults to 9:00 AM on the next business day in the hub's timezone.
"2024-04-15T09:00:00Z"
OK response.
Plan object
Show child attributes
curl --request POST \
--url https://api.samsara.com/hub/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Weekly Plan - Week 15",
"shiftStartTime": "2024-04-15T09:00:00Z"
}
'{
"data": {
"createdAt": "2024-04-10T10:30:00Z",
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"id": "950e8400-e29b-41d4-a716-446655440005",
"name": "Weekly Plan - Week 15",
"shiftStartTime": "2024-04-15T09:00:00Z",
"updatedAt": "2024-04-10T10:30:00Z"
}
}