> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://docs.deel.wtf/api/stable/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.deel.wtf/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.deel.wtf/_mcp/server.

# Submit files for one compliance document of a worker contract

POST https://api.letsdeel.com/rest/workers/contracts/{contract_id}/compliance-documents/{document_id}
Content-Type: application/json

Submits one or more files against a compliance document of one of the authenticated worker contracts. Upload the bytes to the File Service first, then reference each file here by `file_id` and its `one_time_secret`; the Files endpoints of this API issue both. Side effects: the files replace whatever was previously submitted against the requirement, and the previous version is archived when document versioning is enabled for the organization. Supported for Global Payroll and independent contractor contracts. Any other contract type is not supported.

 **Token scopes**: `worker:write`

Reference: https://docs.deel.wtf/api/reference/endpoints/workers/submit-worker-contract-compliance-document-files-v-2026-08-25

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.deel.training/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Path parameters

- `contract_id` (string, required) — Public id of the worker contract the documents belong to.
- `document_id` (string, required) — Public UUID of the compliance document requirement, as returned in `id` by the list endpoint.

### Body (application/json)

This endpoint expects an object.

- `data` (WorkersContractsContractIdComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaData, required)

## Response

### 204

Files submitted successfully. No response body — read the document back through the list or the single document endpoint to confirm the filenames, where `submission_status` can read `REVIEWING` until the submission is final.

## Errors

### 400 Bad Request Error

Bad request — an unusable `file_id` or `one_time_secret`, or a file type outside pdf, png, jpg, jpeg and heic. Multipart bodies and raw storage keys are not accepted.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, required) — Errors that occurred while processing the request.

### 401 Unauthorized Error

Unauthorized — the access token is missing, expired or invalid.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, required) — Errors that occurred while processing the request.

### 403 Forbidden Error

Forbidden — the requirement is not open for submission, the worker does not hold this contract, or the token lacks the required scope.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, required) — Errors that occurred while processing the request.

### 404 Not Found Error

Not found — `document_id` is not part of the contract.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, required) — Errors that occurred while processing the request.

### 412 Precondition Failed Error

The files could not be stored against the requirement. Nothing was submitted, so the request can be retried.

- `any`

### 422 Unprocessable Entity Error

Unprocessable entity — the contract is neither a Global Payroll nor an independent contractor contract, so compliance documents are not available on this endpoint.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, required) — Errors that occurred while processing the request.

### 429 Too Many Requests Error

Too many submissions from this worker in a short window. Submissions are rate limited per authenticated worker: back off and retry rather than looping.

- `any`

### 500 Internal Server Error

Operation failed.

- `errors` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

## Types

### WorkersContractsContractIdComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaData

- `files` (list of WorkersContractsContractIdComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaDataFilesItems, required) — Files to submit against the requirement. Allowed types: pdf, png, jpg, jpeg, heic.

### WorkersContractsContractIdComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems

- `code` (string, optional) — Machine-readable error code
- `message` (string, optional) — Human-readable explanation of the error

### WorkersContractsContractIdComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaDataFilesItems

- `file_id` (string, required) — File Service file id.
- `content_type` (string, required) — MIME type of the file.
- `one_time_secret` (string, required) — File Service one-time secret for that file.
- `original_filename` (string, required) — Original filename, extension included.

## Examples

**Request**

```json
{
  "data": {
    "files": [
      {
        "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
        "content_type": "application/pdf",
        "one_time_secret": "example-one-time-secret-value",
        "original_filename": "passport_scan.pdf"
      }
    ]
  }
}
```

**SDK Code**

```python Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
import requests

url = "https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1"

payload = { "data": { "files": [
            {
                "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
                "content_type": "application/pdf",
                "one_time_secret": "example-one-time-secret-value",
                "original_filename": "passport_scan.pdf"
            }
        ] } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
const url = 'https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"files":[{"file_id":"c106a26a-21bb-5538-8bf2-57095d1976c1","content_type":"application/pdf","one_time_secret":"example-one-time-secret-value","original_filename":"passport_scan.pdf"}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1"

	payload := strings.NewReader("{\n  \"data\": {\n    \"files\": [\n      {\n        \"file_id\": \"c106a26a-21bb-5538-8bf2-57095d1976c1\",\n        \"content_type\": \"application/pdf\",\n        \"one_time_secret\": \"example-one-time-secret-value\",\n        \"original_filename\": \"passport_scan.pdf\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"files\": [\n      {\n        \"file_id\": \"c106a26a-21bb-5538-8bf2-57095d1976c1\",\n        \"content_type\": \"application/pdf\",\n        \"one_time_secret\": \"example-one-time-secret-value\",\n        \"original_filename\": \"passport_scan.pdf\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"files\": [\n      {\n        \"file_id\": \"c106a26a-21bb-5538-8bf2-57095d1976c1\",\n        \"content_type\": \"application/pdf\",\n        \"one_time_secret\": \"example-one-time-secret-value\",\n        \"original_filename\": \"passport_scan.pdf\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1', [
  'body' => '{
  "data": {
    "files": [
      {
        "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
        "content_type": "application/pdf",
        "one_time_secret": "example-one-time-secret-value",
        "original_filename": "passport_scan.pdf"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"files\": [\n      {\n        \"file_id\": \"c106a26a-21bb-5538-8bf2-57095d1976c1\",\n        \"content_type\": \"application/pdf\",\n        \"one_time_secret\": \"example-one-time-secret-value\",\n        \"original_filename\": \"passport_scan.pdf\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Workers_submitWorkerContractComplianceDocumentFiles-v2026-08-25_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": ["files": [
      [
        "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
        "content_type": "application/pdf",
        "one_time_secret": "example-one-time-secret-value",
        "original_filename": "passport_scan.pdf"
      ]
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/workers/contracts/37nex2x/compliance-documents/c106a26a-21bb-5538-8bf2-57095d1976c1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```