Plans

Create a new plan

Create a new plan.

<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Write Routes under the Driver Workflow category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

post/hub/plan

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Request body

hubIdstring required

The ID of the hub the plan belongs to

namestring required

The name of the plan

sessionConfigurationIdstring

The ID of a saved session configuration (preset) to apply when creating the plan. When provided, the preset's optimization settings and route constructions are applied to the new plan, replacing any defaults.

shiftStartTimestring 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 request

{
  "hubId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Weekly Plan - Week 15",
  "sessionConfigurationId": "750e8400-e29b-41d4-a716-446655440099",
  "shiftStartTime": "2024-04-15T09:00:00Z"
}

Response

OK response.

Example response

{
  "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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.