> 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://developer.deel.com/api/stable/llms.txt
> - Beta: https://developer.deel.com/api/beta/llms.txt
> - Deprecated: https://developer.deel.com/api/deprecated/llms.txt

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

# Upload employee compliance document

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

Uploads a file against the specified `document_id` to complete a compliance document that still needs one for an EOR employee. Use it after finding the document with GET /eor/workers/compliance-documents. If the file is already in File Service, send a JSON body with its reference instead of sending the bytes again; otherwise send the file as `multipart/form-data`.

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

Reference: https://developer.deel.com/api/eor-worker-endpoints/eor-worker-compliance/upload-eor-worker-compliance-document

## 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.letsdeel.com/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

- `document_id` (string, required) — Unique identifier for a compliance document in Deel.

### Body (application/json)

This endpoint expects an object.

- `data` (EorWorkersComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaData, required)

## Response

### 200

Successful operation.

- `data` (EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

Bad request. The file is missing, a file item is malformed (for example it has no file_id or one_time_secret), or the document_id format is invalid.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 401 Unauthorized Error

Authentication failed. Bearer token is missing, expired, or invalid.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 403 Forbidden Error

Forbidden. The worker does not have permission to upload to this compliance document, the document cannot be submitted in its current state, or the requirement is obsolete.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 404 Not Found Error

The compliance document specified by document_id was not found.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 422 Unprocessable Entity Error

Unprocessable entity. The file could not be stored: its file_id is unknown or its one_time_secret is wrong or already used, it is larger than 10 MB, its type is not PNG, JPG, JPEG, HEIC or PDF, its content does not match its type, or its storage reference could not be verified.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 500 Internal Server Error

Internal server error. The file upload failed or an unexpected error occurred.

- `errors` (list of EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

## Types

### EorWorkersComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaData

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

### EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaData

- `success` (boolean, required) — Indicates whether the file upload was successful.

### EorWorkersComplianceDocumentsDocumentIdPostResponsesContentApplicationJsonSchemaErrorsItems

- `message` (string, required) — Human-readable error message.

### EorWorkersComplianceDocumentsDocumentIdPostRequestBodyContentApplicationJsonSchemaDataFilesItems

- `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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
import requests

url = "https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id"

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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
const url = 'https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id';
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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
package main

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

func main() {

	url := "https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id"

	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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id")

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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id")
  .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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id', [
  '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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/eor/workers/compliance-documents/:document_id");
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 eor-worker-compliance_uploadEORWorkerComplianceDocument_example (application/json)
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/eor/workers/compliance-documents/:document_id")! 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()
```