---
title: "[beta] Create a Data Sharing Agreement"
method: POST
path: "/fleet/asset-sharing/agreements"
tags: ["Beta APIs"]
---

# \[beta\] Create a Data Sharing Agreement

`POST /fleet/asset-sharing/agreements`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/asset-sharing/agreements`
- Auth: HTTP bearer

Creates a new Data Sharing Agreement (DSA) in pending status. When the flexible operating model is enabled, either the provider or recipient can create an agreement, and the authenticated caller determines createdByParty. The provider owns the assets, and the two organizations must differ. providerOrganizationId defaults to the caller; recipient callers supply the provider ID and providerOrganizationName. Provider callers supply recipientOrganizationName. payer selects the party whose Asset Sharing license supports the agreement and defaults to the creator. Without the flexible operating model, only the provider can create and pay. Use providerDataPackages and recipientDataPackages to declare which categories of data flow to each side, and operator to indicate which organization operates the assets (where the gateways live).

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

To use this endpoint, select **Write Asset Sharing** under the Asset Sharing 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.

## Request body

- AssetSharingAgreementsCreateAssetSharingAgreementRequestBody: Request body for creating a Data Sharing Agreement.
  - `operator` 'provider' | 'recipient', required: Defines where the gateways will be located. Valid values: `provider`, `recipient`
  - `payer` 'provider' | 'recipient': Party whose Asset Sharing license supports the agreement. Defaults to the creator when the flexible operating model is enabled. Otherwise, the provider pays; omit this field or specify provider. Specifying recipient requires the flexible operating model to be enabled. Valid values: `provider`, `recipient`
  - `providerDataPackages` string[], required: List of data packages the provider will see.
  - `providerOrganizationId` string: ID of the organization that owns the assets. Defaults to the caller's organization. Recipient-initiated agreements require the flexible operating model to be enabled.
  - `providerOrganizationName` string: Display name for the provider. Required when the caller is the recipient; the caller's own organization name is resolved automatically.
  - `recipientDataPackages` string[], required: List of data packages the recipient will see.
  - `recipientOrganizationId` string, required: The ID of the recipient organization.
  - `recipientOrganizationName` string: Display name for the recipient. Required when the caller is the provider; the caller's own organization name is resolved automatically.

## Response `200`

OK response.

- AssetSharingAgreementsCreateAssetSharingAgreementResponseBody
  - `data` AssetSharingAgreementResponseObjectResponseBody, required: Data Sharing Agreement response object.
    - `acceptedAtTime` string: Time the agreement was accepted, in RFC 3339 format.
    - `acceptedByUserId` string: User ID who accepted the agreement (visible only to the accepting organization).
    - `canceledAtTime` string: Time the agreement was canceled, in RFC 3339 format.
    - `canceledByParty` 'provider' | 'recipient': Party that canceled the agreement. Valid values: `provider`, `recipient`
    - `canceledByUserId` string: User ID who canceled the agreement (visible only to the canceling party).
    - `createdAtTime` string, required: Time the agreement was created, in RFC 3339 format.
    - `createdByParty` 'provider' | 'recipient' | 'unknown', required: Party that created the agreement, determined from the authenticated caller. Older agreements default to provider. Returns unknown if the party cannot be determined. Valid values: `provider`, `recipient`, `unknown`
    - `createdByUserId` string: User ID who created the agreement (visible only to the creating organization).
    - `deletedByUserId` string: User ID who soft-deleted the agreement (visible only to the deleting organization).
    - `id` string, required: Unique identifier for the agreement.
    - `operator` 'provider' | 'recipient', required: Defines where the gateways will be located. Valid values: `provider`, `recipient`
    - `payer` 'provider' | 'recipient' | 'unknown', required: Party whose Asset Sharing license supports the agreement. Older agreements default to provider. Returns unknown if the party cannot be determined. Valid values: `provider`, `recipient`, `unknown`
    - `providerDataPackages` string[], required: List of data packages the provider will see.
    - `providerOrganizationId` string, required: ID of the organization that owns the assets shared under the agreement.
    - `recipientDataPackages` string[], required: List of data packages the recipient will see.
    - `recipientOrganizationId` string, required: ID of the organization that rents the assets from the provider.
    - `rejectedAtTime` string: Time the agreement was rejected, in RFC 3339 format.
    - `rejectedByUserId` string: User ID who rejected the agreement (visible only to the rejecting organization).
    - `status` 'pending' | 'accepted' | 'rejected' | 'canceled', required: The status of the agreement. Valid values: `pending`, `accepted`, `rejected`, `canceled`
    - `updatedAtTime` string, required: Time the agreement was last updated, in RFC 3339 format.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request 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)
