> 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 Organization Secure Vault Files

POST https://api.letsdeel.com/rest/organizations/secure-vault/files
Content-Type: application/json

Uploads one or more files to the Organization Secure Vault root. Files are stored in the organization's "Other Files" folder. To upload into a specific folder, use the folder-scoped upload endpoint instead. Upload the file contents to the File Service first, then reference each file here by its `file_id` and `one_time_secret`.

 **Token scopes**: `organizations:write`

Reference: https://developer.deel.com/api/reference/endpoints/documents/upload-organization-secure-vault-files-v-2026-08-05

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

### Body (application/json)

This endpoint expects an object.

- `data` (OrganizationsSecureVaultFilesPostRequestBodyContentApplicationJsonSchemaData, required) — The files to attach to the Organization Secure Vault.

## Response

### 201

Files uploaded successfully.

- `data` (OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaData, required) — Result of the upload.

## Errors

### 400 Bad Request Error

Bad request — invalid or missing parameters.

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

### 401 Unauthorized Error

Unauthorized — missing or invalid authentication token.

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

### 403 Forbidden Error

Forbidden — the token lacks access to this resource.

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

### 404 Not Found Error

Not found.

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

### 422 Unprocessable Entity Error

Unprocessable entity — a file has an unsupported type or its content does not match its extension.

- `errors` (list of OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaErrorsItems, required)

### 500 Internal Server Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

## Types

### OrganizationsSecureVaultFilesPostRequestBodyContentApplicationJsonSchemaData

The files to attach to the Organization Secure Vault.

- `files` (list of OrganizationsSecureVaultFilesPostRequestBodyContentApplicationJsonSchemaDataFilesItems, required) — Files previously uploaded to the File Service. Allowed types: pdf, jpg, jpeg, png, doc, docx, csv, xls, xlsx, txt, xml, zip, mov, mp4.

### OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaData

Result of the upload.

- `file_ids` (list of string, required) — Public UUIDs of the created Organization Secure Vault files, in upload order.
- `folder` (OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaDataFolder, optional, nullable) — Folder the files were stored in. When no folder is given, files land in the organization's "Other Files" folder.

### OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaErrorsItems

- `message` (string, required) — Human-readable explanation
- `code` (string, optional) — Machine-readable error code
- `field` (string, optional, nullable) — Field that caused the error, if applicable.

### ApiErrorRequest

- `method` (string, optional) — The HTTP method of the failed request
- `url` (string, optional) — The relative URL of the failed request
- `status` (double, optional) — The status code of the response
- `api_req_id` (string, optional) — The request ID of the failed request
- `docs` (string, optional) — A link to the official documentation for the requested endpoint resource
- `source` (string, optional) — The source handler which produced the returned error
- `code` (double, optional) — The code of the source handler which produced the returned error

### ApiError

- `message` (string, optional) — A description of the returned error
- `path` (string, optional) — The JSON path where input validation failed

### OrganizationsSecureVaultFilesPostRequestBodyContentApplicationJsonSchemaDataFilesItems

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

### OrganizationsSecureVaultFilesPostResponsesContentApplicationJsonSchemaDataFolder

Folder the files were stored in. When no folder is given, files land in the organization's "Other Files" folder.

- `id` (string, optional, nullable) — Public UUID of the folder.
- `name` (string, optional, nullable) — Folder name.

## Examples

**Request**

```json
{
  "data": {
    "files": [
      {
        "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
        "content_type": "application/pdf",
        "one_time_secret": "a1b2c3d4e5f6",
        "original_filename": "nda.pdf"
      }
    ]
  }
}
```

**Response**

```json
{
  "data": {
    "file_ids": [
      "c106a26a-21bb-5538-8bf2-57095d1976c1"
    ],
    "folder": {
      "id": "f2d1b0c4-8a3e-4c11-9f77-2b6c5e1a90d3",
      "name": "Other Files"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/organizations/secure-vault/files"

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

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

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/organizations/secure-vault/files';
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":"a1b2c3d4e5f6","original_filename":"nda.pdf"}]}}'
};

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

```go
package main

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

func main() {

	url := "https://api.letsdeel.com/rest/organizations/secure-vault/files"

	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\": \"a1b2c3d4e5f6\",\n        \"original_filename\": \"nda.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
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/organizations/secure-vault/files")

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\": \"a1b2c3d4e5f6\",\n        \"original_filename\": \"nda.pdf\"\n      }\n    ]\n  }\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/organizations/secure-vault/files")
  .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\": \"a1b2c3d4e5f6\",\n        \"original_filename\": \"nda.pdf\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/organizations/secure-vault/files', [
  'body' => '{
  "data": {
    "files": [
      {
        "file_id": "c106a26a-21bb-5538-8bf2-57095d1976c1",
        "content_type": "application/pdf",
        "one_time_secret": "a1b2c3d4e5f6",
        "original_filename": "nda.pdf"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/organizations/secure-vault/files");
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\": \"a1b2c3d4e5f6\",\n        \"original_filename\": \"nda.pdf\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
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": "a1b2c3d4e5f6",
        "original_filename": "nda.pdf"
      ]
    ]]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/organizations/secure-vault/files")! 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()
```