Skip to main content
POST
/
hub
/
plan
Create a new plan
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.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for creating a hub plan

hubId
string
required

The ID of the hub the plan belongs to

Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
required

The name of the plan

Example:

"Weekly Plan - Week 15"

shiftStartTime
string<date-time>

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.

Example:

"2024-04-15T09:00:00Z"

Response

OK response.

data
object
required

Plan object