Skip to content

Deel: Create a file upload

Deel files.registerFileUpload: arguments, response, policy and SDK examples.

← Files operations · Get started

Operation deel.files_registerfileupload_v2026_08_05

Provider route: POST /files. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["files"]["registerFileUpload"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.files.registerFileUpload(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_deel import DeelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.files.register_file_upload(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
headersobjectOptionalAdditional keys: not allowed
headers.x-upload-methodstringOptionalOne of: multipart
bodyobjectOptional
body.dataModelRequired within parentExpand Create a file upload — request body — body data

Referenced models: Create a file upload — request body — body data

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a file upload — 201 response body

Referenced models: Create a file upload — 201 response body

Create a file upload — request body — body data
FieldTypePresenceDescription and constraints
$objectRoot
expirynumberOptionalPresigned URL expiry in seconds.
Format: double
filenamestringRequired within parentOriginal filename with extension; used to detect the content type.
is_attachmentbooleanOptionalWhether the file should be served as an attachment (download) rather than inline.
sizenumberOptionalActual file size in bytes (max 1GB). Drives the server-side multipart decision when x-upload-method: multipart is set.
Format: double
Create a file upload — 201 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Create a file upload — 201 response body — data

Referenced models: Create a file upload — 201 response body — data

Create a file upload — 201 response body — data
FieldTypePresenceDescription and constraints
$objectRoot
file_idstringRequired within parentUnique file identifier.
Format: uuid
one_time_secretstringRequired within parentOne-time secret for claiming ownership. Pass to domain endpoints when ready to claim the file.
upload_idstringOptionalS3 multipart upload ID. Present only when the server selected multipart — pass to POST /rest/files/{fileid}/complete.
upload_partsarrayRequired within parentPresigned upload targets (always present). Single-part: one presigned POST form with fields. Multipart: multiple presigned PUT URLs without fields.
upload_parts[]ModelEach itemExpand Create a file upload — 201 response body — data upload parts item

Referenced models: Create a file upload — 201 response body — data upload parts item

Create a file upload — 201 response body — data upload parts item
FieldTypePresenceDescription and constraints
$objectRoot
fieldsModelOptionalExpand Create a file upload — 201 response body — data upload parts item fields
Form fields to submit with the presigned POST form. Present for the single-part POST upload; absent for multipart PUT parts.
numberJSONOptional
number (anyOf 1)numberAlternativePart number (1-indexed).
Format: double
number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
sizeJSONOptional
size (anyOf 1)numberAlternativeMaximum bytes for this part.
Format: double
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringOptionalPresigned upload URL for this part.

Referenced models: Create a file upload — 201 response body — data upload parts item fields

Create a file upload — 201 response body — data upload parts item fields
FieldTypePresenceDescription and constraints
$objectRootForm fields to submit with the presigned POST form. Present for the single-part POST upload; absent for multipart PUT parts.

SDK function policy ID: deel.files_registerfileupload_v2026_08_05. Catalog operation: files_registerfileupload_v2026_08_05. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["files:write", "worker:write"]

Pinned headers: {"X-Version": "2026-08-05"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.