---
title: "Create an assignment"
method: POST
path: "/fleet/carrier-proposed-assignments"
tags: ["Carrier Proposed Assignments"]
---

# Create an assignment

`POST /fleet/carrier-proposed-assignments`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/carrier-proposed-assignments`
- Auth: HTTP bearer

Creates a new assignment that a driver can later use. Each driver can only have one future assignment. 

 **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.

To use this endpoint, select **Write Carrier-Proposed Assignments** under the Assignments 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>

## Request body

- CreateCarrierProposedAssignmentRequest: New assignment for a driver.
  - `activeTime` string: Time after which this assignment will be active and visible to the driver on the mobile app. Not setting it makes it active now. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
  - `driverId` string, required: ID for the driver for the driver that this assignment is for. This can be either a unique Samsara ID or an external ID for the driver.
  - `shippingDocs` string: Shipping Documents that this assignment will propose to the driver.
  - `trailerIds` string[]: IDs of trailers to propose. This can be either a unique Samsara IDs or an external IDs for the trailers. (forbidden if trailerNames is set)
  - `trailerNames` string[]: Names of trailers to propose. (forbidden if trailerIds is set)
  - `vehicleId` string, required: ID for the vehicle to propose. This can be either a unique Samsara ID or an external ID for the vehicle.

## Response `200`

Return the created assignment

- CarrierProposedAssignmentResponse: A carrier-proposed assignment response object.
  - `data` CarrierProposedAssignment, required: A carrier proposed assignment object
    - `acceptedTime` string: Time when the driver accepted this assignment in the mobile app. Will be omitted if the driver hasn't accepted this assignment. RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
    - `activeTime` string, required: Time after which this assignment will be active and visible to the driver on the mobile app. Not setting it makes it active now. UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
    - `driver` CarrierProposedAssignmentDriver: A minified driver object.
      - `id` string: ID of the driver.
      - `name` string: Name of the driver.
      - `externalIds` CarrierProposedAssignmentDriverAllOf2ExternalIds: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.
    - `firstSeenTime` string: Time when the driver first saw this assignment in the mobile app. Will be omitted if the driver hasn't seen this assignment yet. RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
    - `id` string, required: Samsara ID for the assignment.
    - `rejectedTime` string: Time when the driver rejected this assignment in the mobile app. Will be omitted if the driver hasn't rejected this assignment. RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
    - `shippingDocs` string: Shipping Documents that this assignment will propose to the driver.
    - `trailers` CarrierProposedAssignmentTrailer[]: Trailers that this assignment will propose to the driver.
      - `id` string: ID of the trailer.
      - `name` string: Name of the trailer.
      - `externalIds` CarrierProposedAssignmentDriverAllOf2ExternalIds: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.
    - `vehicle` CarrierProposedAssignmentVehicle: A minified vehicle object.
      - `ExternalIds` object: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.
      - `id` string: ID of the vehicle.
      - `name` string: Name of the vehicle.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
