---
title: "[beta] Create a tachograph file upload."
method: POST
path: "/fleet/tachograph/file-uploads"
tags: ["Beta APIs"]
---

# \[beta\] Create a tachograph file upload.

`POST /fleet/tachograph/file-uploads`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/tachograph/file-uploads`
- Auth: HTTP bearer

Reserve a tachograph file upload and return a presigned URL. Upload the file bytes directly to the URL with the returned headers. The driver or device the file belongs to is resolved from the file contents after upload.

**Uploading the file**

Once you have the `uploadUrl` and `requiredHeaders` from the response, PUT the raw file bytes directly to the URL — do not send the request through the Samsara API servers:

```bash
curl -X PUT "<uploadUrl>" \
  -H "Content-Type: <value from requiredHeaders>" \
  -H "Content-MD5: <value from requiredHeaders>" \
  -H "Content-Length: <value from requiredHeaders>" \
  --data-binary @/path/to/file.ddd
```

Every header listed in `requiredHeaders` must be sent verbatim — they are part of the URL signature, and the upload is rejected with a `403` if any header is missing or has a different value.

**Retrieving uploaded files**

A successful response to this request reserves the upload; it does not indicate that a file has been received or processed. Uploaded files are processed asynchronously after the PUT completes. Once a file has been processed, it can be retrieved through the standard tachograph file endpoints:

- **Driver-card files** — `GET /fleet/drivers/tachograph-files/history`
- **Vehicle-unit files** — `GET /fleet/vehicles/tachograph-files/history`

Files that cannot be processed — for example files that are corrupt, are not valid tachograph files, or cannot be matched to a driver or vehicle in your organization — are not retrievable through these endpoints.

 <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 Tachograph (EU)** under the Compliance 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

- TachographFileUploadsPostTachographFileUploadRequestBody: Request body for reserving a tachograph file upload.
  - `contentMd5` string, required: Base64-encoded MD5 digest of the file bytes (base64(md5(bytes))). Used as the Content-MD5 integrity check enforced by object storage on upload.
  - `contentType` 'application/octet-stream', required: The MIME content type of the file. The upload is sent to object storage as raw bytes. Valid values: `application/octet-stream`
  - `fileSizeBytes` integer, required: The size of the file in bytes. Enforced as the Content-Length on upload. Maximum 10 MB (10485760 bytes).
  - `fileType` 'driverCard' | 'vehicleUnit', required: The kind of tachograph file being uploaded. The driver or device the file belongs to is resolved from the file contents, not from this field. Valid values: `driverCard`, `vehicleUnit`

## Response `200`

OK response.

- TachographFileUploadsPostTachographFileUploadResponseBody
  - `data` TachographFileUploadResponseBody, required: A reserved tachograph file upload with a presigned URL to upload the file bytes to.
    - `expiresAtTime` string, date-time, required: RFC 3339 timestamp when the presigned upload URL expires.
    - `requiredHeaders` TachographUploadRequiredHeaderResponseBody[], required: The HTTP headers that must be included on the upload PUT request.
      - `name` string, required: The header name.
      - `value` string, required: The header value.
    - `uploadUrl` string, required: The presigned URL to upload the file bytes to with an HTTP PUT. Upload the raw bytes directly to this URL with the required headers.

## 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)
