Skip to content

Deel: Create an immigration case

Deel immigration.createClientCase: arguments, response, policy and SDK examples.

← Immigration operations · Get started

Operation deel.immigration_createclientcase

Provider route: POST /immigration/client/cases. 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["immigration"]["createClientCase"]>[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.immigration.createClientCase(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.immigration.create_client_case(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectOptional
body.dataModelOptionalExpand Create an immigration case — request body — body data

Referenced models: Create an immigration case — 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 an immigration case — 201 response body

Referenced models: Create an immigration case — 201 response body

4 more schemas are linked from the tables above, on the schema pages.

Create an immigration case — request body — body data
FieldTypePresenceDescription and constraints
$JSONRoot
$ (oneOf 1)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: RIGHT TO WORK
$ (oneOf 2)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: EOR VISA
$ (oneOf 3)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: SPONSORED VISA
$ (oneOf 4)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: PRE HIRE EOR VISA
$ (oneOf 5)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: PRE HIRE SPONSORSHIP VISA
$ (oneOf 6)ModelAlternativeExpand Create an immigration case — request body — body / data / case_type: BUSINESS VISA

Referenced models: Create an immigration case — request body — body / data / case_type: RIGHT TO WORK, Create an immigration case — request body — body / data / case_type: EOR VISA, Create an immigration case — request body — body / data / case_type: SPONSORED VISA, Create an immigration case — request body — body / data / case_type: PRE HIRE EOR VISA, Create an immigration case — request body — body / data / case_type: PRE HIRE SPONSORSHIP VISA, Create an immigration case — request body — body / data / case_type: BUSINESS VISA

Create an immigration case — 201 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Create an immigration case — 201 response body — data
The immigration case data returned after successful creation

Referenced models: Create an immigration case — 201 response body — data

Create an immigration case — request body — body / data / case_type: RIGHT TO WORK
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: RIGHT_TO_WORK
contract_idstringRequired within parentThe contract object identifier. Required for document reviews and visa applications
Maximum length: 20
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
Create an immigration case — request body — body / data / case_type: EOR VISA
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: EOR_VISA
contract_idstringRequired within parentThe contract object identifier. Required for document reviews and visa applications
Maximum length: 20
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
visa_type_idstringOptionalThe id of visa type that is being applied for. Identifies the type of the visa.
Format: uuid
Create an immigration case — request body — body / data / case_type: SPONSORED VISA
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: SPONSORED_VISA
contract_idstringRequired within parentThe contract object identifier. Required for document reviews and visa applications
Maximum length: 20
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
entity_idstringRequired within parentThe unique identifier of the entity sponsoring the visa. Required for sponsored visa applications
Format: uuid
visa_type_idstringOptionalThe id of visa type that is being applied for. Identifies the type of the visa.
Format: uuid
Create an immigration case — request body — body / data / case_type: PRE HIRE EOR VISA
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: PRE_HIRE_EOR_VISA
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
team_idstringRequired within parentThe unique identifier of the team for which the pre-hire visa case is being created
Format: uuid
visa_type_idstringOptionalThe id of visa type that is being applied for. Identifies the type of the visa.
Format: uuid
Create an immigration case — request body — body / data / case_type: PRE HIRE SPONSORSHIP VISA
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: PRE_HIRE_SPONSORSHIP_VISA
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
entity_idstringOptionalThe unique identifier of the entity sponsoring the visa. Required for sponsored visa applications
Format: uuid
team_idstringRequired within parentThe unique identifier of the team for which the pre-hire sponsorship visa case is being created
Format: uuid
visa_type_idstringOptionalThe id of visa type that is being applied for. Identifies the type of the visa.
Format: uuid
Create an immigration case — request body — body / data / case_type: BUSINESS VISA
FieldTypePresenceDescription and constraints
$objectRoot
case_typestringRequired within parentThe type of immigration case to be created. Determines the workflow and requirements
One of: BUSINESS_VISA
contract_idstringOptionalThe contract object identifier. If not provided, team_id is required and employee_details must include first_name, last_name, and email.
Maximum length: 20
country_codestringRequired within parentISO 3166-1 alpha-2 country code where the immigration case needs to be processed
Maximum length: 2
employee_detailsModelRequired within parentExpand Create an immigration case — request body — body / data / case_type: BUSINESS VISA employee details
Employee information. Citizenships and residence attributes are always required for business visa cases. The remaining fields are only required when no contract_id is present.
entity_idstringOptionalThe unique identifier of the entity sponsoring the visa. Required for sponsored visa applications
Format: uuid
team_idstringOptionalThe id of the team for which the employee will be added to. Required if contract_id is not provided
Format: uuid
travel_informationModelRequired within parentExpand Create an immigration case — request body — body / data / case_type: BUSINESS VISA travel information
Travel details for the business visa
visa_type_idstringRequired within parentThe id of visa type that is being applied for. Identifies the type of the visa
Format: uuid

Referenced models: Create an immigration case — request body — body / data / case_type: BUSINESS VISA employee details, Create an immigration case — request body — body / data / case_type: BUSINESS VISA travel information

Create an immigration case — 201 response body — data
FieldTypePresenceDescription and constraints
$objectRootThe immigration case data returned after successful creation
closure_noteJSONOptional
closure_note (anyOf 1)stringAlternativeOptional note explaining why the case was closed
Maximum length: 400
closure_note (anyOf 2)nullAlternativeOptional note explaining why the case was closed
Maximum length: 400
closure_reasonJSONOptional
closure_reason (anyOf 1)stringAlternativeStandardized reason for case closure
closure_reason (anyOf 2)nullAlternativeStandardized reason for case closure
created_atstringRequired within parentTimestamp when the case was created
Format: date-time
idstringRequired within parentUnique identifier for the case
Format: uuid
processModelRequired within parentExpand Create an immigration case — 201 response body — data process
Details about the current immigration process associated with the case
statusstringRequired within parentCurrent status of the case
Known values: OPEN, CLOSED, ON_HOLD
updated_atstringRequired within parentTimestamp when the case was last updated
Format: date-time

Referenced models: Create an immigration case — 201 response body — data process

SDK function policy ID: deel.immigration_createclientcase. Catalog operation: immigration_createclientcase. 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: ["immigration:write"]

Pinned headers: {"X-Version": "2026-01-01"}

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.