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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Optional | |
body.data | Model | Optional | Expand Create an immigration case — request body — body data |
Referenced models: Create an immigration case — request body — body data
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create an immigration case — 201 response body |
Referenced models: Create an immigration case — 201 response body
Schemas
Section titled “Schemas”4 more schemas are linked from the tables above, on the schema pages.
Create an immigration case — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (oneOf 1) | Model | Alternative | Expand Create an immigration case — request body — body / data / case_type: RIGHT TO WORK |
$ (oneOf 2) | Model | Alternative | Expand Create an immigration case — request body — body / data / case_type: EOR VISA |
$ (oneOf 3) | Model | Alternative | Expand Create an immigration case — request body — body / data / case_type: SPONSORED VISA |
$ (oneOf 4) | Model | Alternative | Expand Create an immigration case — request body — body / data / case_type: PRE HIRE EOR VISA |
$ (oneOf 5) | Model | Alternative | Expand Create an immigration case — request body — body / data / case_type: PRE HIRE SPONSORSHIP VISA |
$ (oneOf 6) | Model | Alternative | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: RIGHT_TO_WORK |
contract_id | string | Required within parent | The contract object identifier. Required for document reviews and visa applications Maximum length: 20 |
country_code | string | Required within parent | ISO 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: EOR_VISA |
contract_id | string | Required within parent | The contract object identifier. Required for document reviews and visa applications Maximum length: 20 |
country_code | string | Required within parent | ISO 3166-1 alpha-2 country code where the immigration case needs to be processed Maximum length: 2 |
visa_type_id | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: SPONSORED_VISA |
contract_id | string | Required within parent | The contract object identifier. Required for document reviews and visa applications Maximum length: 20 |
country_code | string | Required within parent | ISO 3166-1 alpha-2 country code where the immigration case needs to be processed Maximum length: 2 |
entity_id | string | Required within parent | The unique identifier of the entity sponsoring the visa. Required for sponsored visa applications Format: uuid |
visa_type_id | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: PRE_HIRE_EOR_VISA |
country_code | string | Required within parent | ISO 3166-1 alpha-2 country code where the immigration case needs to be processed Maximum length: 2 |
team_id | string | Required within parent | The unique identifier of the team for which the pre-hire visa case is being created Format: uuid |
visa_type_id | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: PRE_HIRE_SPONSORSHIP_VISA |
country_code | string | Required within parent | ISO 3166-1 alpha-2 country code where the immigration case needs to be processed Maximum length: 2 |
entity_id | string | Optional | The unique identifier of the entity sponsoring the visa. Required for sponsored visa applications Format: uuid |
team_id | string | Required within parent | The unique identifier of the team for which the pre-hire sponsorship visa case is being created Format: uuid |
visa_type_id | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
case_type | string | Required within parent | The type of immigration case to be created. Determines the workflow and requirements One of: BUSINESS_VISA |
contract_id | string | Optional | The 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_code | string | Required within parent | ISO 3166-1 alpha-2 country code where the immigration case needs to be processed Maximum length: 2 |
employee_details | Model | Required within parent | Expand 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_id | string | Optional | The unique identifier of the entity sponsoring the visa. Required for sponsored visa applications Format: uuid |
team_id | string | Optional | The id of the team for which the employee will be added to. Required if contract_id is not provided Format: uuid |
travel_information | Model | Required within parent | Expand Create an immigration case — request body — body / data / case_type: BUSINESS VISA travel information Travel details for the business visa |
visa_type_id | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The immigration case data returned after successful creation |
closure_note | JSON | Optional | |
closure_note (anyOf 1) | string | Alternative | Optional note explaining why the case was closed Maximum length: 400 |
closure_note (anyOf 2) | null | Alternative | Optional note explaining why the case was closed Maximum length: 400 |
closure_reason | JSON | Optional | |
closure_reason (anyOf 1) | string | Alternative | Standardized reason for case closure |
closure_reason (anyOf 2) | null | Alternative | Standardized reason for case closure |
created_at | string | Required within parent | Timestamp when the case was created Format: date-time |
id | string | Required within parent | Unique identifier for the case Format: uuid |
process | Model | Required within parent | Expand Create an immigration case — 201 response body — data process Details about the current immigration process associated with the case |
status | string | Required within parent | Current status of the case Known values: OPEN, CLOSED, ON_HOLD |
updated_at | string | Required within parent | Timestamp when the case was last updated Format: date-time |
Referenced models: Create an immigration case — 201 response body — data process
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}