---
title: "Generate timesheet upload url"
method: POST
path: "/time-tracking/timesheets/upload-url"
tags: ["timeTracking"]
---

# Generate timesheet upload url

`POST /time-tracking/timesheets/upload-url`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/time-tracking/timesheets/upload-url`
- Auth: HTTP bearer

Accepts timesheet file metadata and returns a pre-signed `upload_url` together with a new timesheet record `id`. Currently limited to EOR contracts.

 **Token scopes**: `time-tracking:write`

## Request body

- object
  - `data` TimeTrackingTimesheetsUploadUrlPostRequestBodyContentApplicationJsonSchemaData, required
    - `end_date` string, date, required: End date of the timesheet period. Must be equal to or later than start_date.
    - `file_name` string, required: Name of the timesheet file. Must end with .csv extension.
    - `start_date` string, date, required: Start date of the timesheet period. Must be equal to or earlier than end_date.
    - `contract_id` string, required: Id of the worker's contract associated with the timesheet

## Response `201`

Timesheet created successfully. Returns upload URL, upload form fields, and timesheet ID.

- TimeTrackingGetTimeTrackingTimesheetsUploadUrlResponse201
  - `data` TimeTrackingTimesheetsUploadUrlPostResponsesContentApplicationJsonSchemaData, required
    - `id` string, uuid, required: Unique identifier for the created timesheet
    - `created_at` string, date-time, required: Timestamp when the timesheet was created
    - `updated_at` string, date-time, required: Timestamp when the timesheet was last updated
    - `upload_url` string, uri, required: Pre-signed S3 URL for uploading the timesheet file
    - `upload_fields` object, required: Form fields required for the multipart POST upload to S3. Include these fields alongside the file in the upload request.

## Other responses

- `400`: Bad request. Validation or business rule violation (e.g., non-EOR contract, invalid date range).
- `401`: Operation failed.
- `403`: Operation failed.
- `404`: Resource not found.
- `422`: Unprocessable entity. Business logic constraint violation.
- `500`: Operation failed.

---

[API](https://skmtc.dev/deel/apis/endpoints-3.md) - [All operations](https://skmtc.dev/deel/apis/endpoints-3/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/endpoints-3/revisions/4585b4e41a87?raw)
