Skip to content

Deel: Create an immigration case for a worker

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

← Immigration operations · Get started

Operation deel.immigration_createcase_v2026_11_04

Provider route: POST /immigration/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"]["createCase"]>[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.createCase(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_case(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
headersobjectRequired within parentAdditional keys: not allowed
headers.X-BetastringRequired within parentDefault: true
One of: true
bodyobjectOptional
body.dataModelRequired within parentExpand Create an immigration case for a worker — request body — body data
The case to open, chosen by work_type.

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

Referenced models: Get a case — 201 response body

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

Create an immigration case for a worker — request body — body data
FieldTypePresenceDescription and constraints
$JSONRootThe case to open, chosen by work_type.
discriminator: {"propertyName": "work_type"}
$ (oneOf 1)objectAlternativeOpens an eligibility check for a work permit or a business visa. Send contract_id for a worker of your organization, or worker_invitation for a business visa of someone not on Deel yet.
$ (oneOf 1).work_typestringRequired within parentDiscriminator value: ELIGIBILITY_CHECK
One of: ELIGIBILITY_CHECK
$ (oneOf 2)objectAlternativeOpens a right to work check with the worker's nationality from the contract.
$ (oneOf 2).contract_idstringRequired within parentThe contract of the worker the case is for.
Maximum length: 50
Pattern: ^[A-Za-z0-9_-]+$
$ (oneOf 2).countrystringRequired within parentISO 3166-1 alpha-2 code of the destination country.
Maximum length: 2
$ (oneOf 2).work_typestringRequired within parentDiscriminator value: RIGHT_TO_WORK
One of: RIGHT_TO_WORK
Get a case — 201 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Get a case — 201 response body — data

Referenced models: Get a case — 201 response body — data

Get a case — 201 response body — data
FieldTypePresenceDescription and constraints
$objectRoot
applicantJSONRequired within parentThe worker the case is for.
applicant (anyOf 1)ModelAlternativeExpand Get a case — 201 response body — data applicant The worker the case is for
applicant (anyOf 2)nullAlternative
business_tripJSONRequired within parentThe business trip of a business visa case. Null for other cases.
business_trip (anyOf 1)ModelAlternativeExpand Get a case — 201 response body — data business trip end date, reason, start date
business_trip (anyOf 2)nullAlternative
case_typeModelRequired within parentExpand Get a case — 201 response body — data case type
The case type the case was opened with.
citizenshipsarrayRequired within parentISO 3166-1 alpha-2 codes of the worker citizenships known to the case.
citizenships[]stringEach item
closed_atJSONRequired within parent
closed_at (anyOf 1)stringAlternativeUTC timestamp when the case was closed. Null while the case is not closed.
Format: date-time
closed_at (anyOf 2)nullAlternativeUTC timestamp when the case was closed. Null while the case is not closed.
Format: date-time
closureJSONRequired within parentWhy the case was closed. Null while the case is not closed.
closure (anyOf 1)ModelAlternativeExpand Get a case — 201 response body — data closure note, reason
closure (anyOf 2)nullAlternative
contract_idJSONRequired within parent
contract_id (anyOf 1)stringAlternativeThe contract the case was opened for.
contract_id (anyOf 2)nullAlternativeThe contract the case was opened for.
contract_typeJSONRequired within parent
contract_type (anyOf 1)stringAlternativeType of contract behind the case, for example EOR, COR, CONTRACTOR, DIRECT_EMPLOYEE, PWAC. New values may be added.
contract_type (anyOf 2)nullAlternativeType of contract behind the case, for example EOR, COR, CONTRACTOR, DIRECT_EMPLOYEE, PWAC. New values may be added.
converted_to_case_idJSONRequired within parent
converted_to_case_id (anyOf 1)stringAlternativeThe case this case was converted into, when it was.
converted_to_case_id (anyOf 2)nullAlternativeThe case this case was converted into, when it was.
country_codestringRequired within parentISO 3166-1 alpha-2 code of the destination country.
created_atstringRequired within parentUTC timestamp when the case was created.
Format: date-time
estimated_completion_dateJSONRequired within parent
estimated_completion_date (anyOf 1)stringAlternativeDate the case is expected to be completed.
Format: date
estimated_completion_date (anyOf 2)nullAlternativeDate the case is expected to be completed.
Format: date
filing_typeJSONRequired within parentWhether the case is an initial filing, a renewal or another filing.
filing_type (anyOf 1)stringAlternativeWhether the case is an initial filing, a renewal or another filing.
Known values: INITIAL, RENEWAL, CHANGE_OF_EMPLOYER, REFILING
filing_type (anyOf 2)nullAlternative
full_statusstringRequired within parentStatus of the case including how a closed case ended.
Known values: OPEN, ON_HOLD, CLOSED_POSITIVELY, CLOSED_NEGATIVELY, CLOSED_NEUTRALLY
idstringRequired within parentThe unique identifier of the case.
Format: uuid
is_onboardingbooleanRequired within parentWhether the case is part of the worker onboarding.
parent_case_idJSONRequired within parent
parent_case_id (anyOf 1)stringAlternativeThe case of the main applicant when this is a dependent case.
parent_case_id (anyOf 2)nullAlternativeThe case of the main applicant when this is a dependent case.
reference_idJSONRequired within parent
reference_id (anyOf 1)stringAlternativeHuman-readable reference of the case. Null for cases opened before references existed.
reference_id (anyOf 2)nullAlternativeHuman-readable reference of the case. Null for cases opened before references existed.
sponsoring_entity_idJSONRequired within parent
sponsoring_entity_id (anyOf 1)stringAlternativeLegal entity sponsoring the visa when the client sponsors it.
sponsoring_entity_id (anyOf 2)nullAlternativeLegal entity sponsoring the visa when the client sponsors it.
sponsorshipJSONRequired within parentWho sponsors the visa. Null when unknown or not applicable.
sponsorship (anyOf 1)stringAlternativeWho sponsors the visa. Null when unknown or not applicable.
Known values: DEEL, CLIENT, NO_SPONSORSHIP
sponsorship (anyOf 2)nullAlternative
statusstringRequired within parentCurrent status of the case.
Known values: OPEN, CLOSED, ON_HOLD
updated_atstringRequired within parentUTC timestamp when the case was last updated.
Format: date-time
visa_categoryJSONRequired within parentVisa category of the case. Null when the case is not about a visa.
visa_category (anyOf 1)stringAlternativeVisa category of the case. Null when the case is not about a visa.
Known values: BUSINESS_VISA, WORK_PERMIT_VISA
visa_category (anyOf 2)nullAlternative
visa_management_feeJSONRequired within parentThe monthly visa management fee that applies to the case after it is completed. Null when no fee applies to the case or it could not be determined.
visa_management_fee (anyOf 1)ModelAlternativeExpand Get a case — 201 response body — data / visa_management_fee / fee_type: FULL IMMIGRATION MANAGEMENT FEE
visa_management_fee (anyOf 2)nullAlternative
visa_typeJSONRequired within parentThe visa type of the case. Null while none is chosen.
visa_type (anyOf 1)ModelAlternativeExpand Get a case — 201 response body — data visa type id, name
visa_type (anyOf 2)nullAlternative
work_typestringRequired within parentThe kind of immigration work the case covers.

Referenced models: Get a case — 201 response body — data case type, Get a case — 201 response body — data visa type id, name, Get a case — 201 response body — data applicant The worker the case is for, Get a case — 201 response body — data business trip end date, reason, start date, Get a case — 201 response body — data closure note, reason, Get a case — 201 response body — data / visa_management_fee / fee_type: FULL IMMIGRATION MANAGEMENT FEE

Get a case — 201 response body — data case type
FieldTypePresenceDescription and constraints
$objectRootThe case type the case was opened with.
idstringRequired within parentThe unique identifier.
namestringRequired within parentThe display name.
Get a case — 201 response body — data visa type id, name
FieldTypePresenceDescription and constraints
$objectRootThe visa type of the case. Null while none is chosen.
idstringRequired within parentThe unique identifier.
namestringRequired within parentThe display name.
Get a case — 201 response body — data applicant The worker the case is for
FieldTypePresenceDescription and constraints
$objectRootThe worker the case is for.
nameJSONRequired within parent
name (anyOf 1)stringAlternativeFull name of the worker.
name (anyOf 2)nullAlternativeFull name of the worker.
worker_idstringRequired within parentThe unique identifier of the worker.

SDK function policy ID: deel.immigration_createcase_v2026_11_04. Catalog operation: immigration_createcase_v2026_11_04. 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-11-04"}

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 how our website, product, and documentation are used.

Performance diagnostics

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

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

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