Skip to navigation

Request input

Operations receive input in three places: path and query parameters as flags, the request body through --input, and file uploads through --file. The action-level --help lists which of these an operation uses.

Parameters as flags

Each path or query parameter becomes a flag named after the parameter. Path parameters are always required.

deel jobs status --job_id 7f3c... # path parameter
deel jobs list --limit 20 --cursor eyJ... # query parameters

Array-typed query parameters are repeatable. Pass the flag once per value; the CLI sends them as repeated query keys.

deel <command> --ids a1 --ids b2 # -> ?ids=a1&ids=b2

Request bodies with --input

--input accepts one value in four interchangeable forms. The CLI detects the form from the value.

FormDetectionExample
ShorthandContains = and does not start with { or [--input type=BONUS,amount=500
Inline JSONStarts with { or [--input '{"type":"BONUS","amount":500}'
FileStarts with file://--input file://body.json
stdinExactly -cat body.json | deel ... --input -
deel adjustments create --invoice \
--input type=BONUS,amount=500,contract_id=C123,description="Q3 bonus",date_submitted=2026-09-01

The data wrapper

Many Deel operations wrap the request body in a top-level data object. The CLI adds the wrapper automatically, so --input takes the inner fields directly. If the value you pass already has a single data key, it is sent unchanged.

Shorthand grammar

Shorthand is a compact form for building JSON objects on the command line. It uses the same key=value grammar as other cloud CLIs.

SyntaxResult
key=valueA scalar property
a=1,b=2Several properties, separated by commas
meta={source=api,ref=123}A nested object
ids=[a,b,c]A list
tags=approved urgentA list from space-separated scalars
note=a\,bEscape ,, =, or a space with a backslash
--input 'tags=approved urgent,meta={source=api,ref=123},amount=500'
# -> {"tags":["approved","urgent"],"meta":{"source":"api","ref":123},"amount":500}

Type coercion and validation

Shorthand values are strings on the command line. Before sending the request, the CLI coerces each top-level field to the type the command declares and validates enumerations:

  • Fields typed number or integer are converted; a non-numeric value exits with input.type.
  • Fields typed boolean accept true, false, and 1.
  • Fields with an enumeration must match one of the allowed values; anything else exits with input.enum and lists the allowed values.

The same coercion applies to inline JSON, so "amount": "500" is accepted and sent as a number. Nested values inside shorthand objects and lists are coerced heuristically (true, false, and numeric strings become booleans and numbers).

Array bodies

Bulk operations take a JSON array. Pass it as inline JSON, a file, or stdin; shorthand cannot express a top-level array.

deel adjustments create-bulk --invoice --input file://adjustments.json
adjustments.json
[
{
"external_id": "bonus-2026-09-alice",
"request": {
"type": "BONUS",
"amount": 500,
"contract_id": "C123",
"description": "Q3 bonus",
"date_submitted": "2026-09-01"
}
}
]

Commands with a batch size limit check it before sending and exit with usage.max_items when the array is too long. The bulk adjustment commands accept at most 50 items per request.

File uploads with --file

Operations that accept multipart/form-data take files through --file field=@path. Text fields still go through --input.

deel <command> --input first_name=Ada,last_name=Lovelace --file cv=@/path/to/cv.pdf

--file is repeatable, both across fields and within one field. Passing --file cv=@a.pdf --file cv=@b.pdf attaches both files under cv. The content type is inferred from the file extension.

Some commands accept both JSON and multipart. They default to JSON; add --form to send multipart instead. The action-level --help marks these commands with an “also accepts multipart” section.

Next steps