Deel: Create an engagement
Deel contractors.createEngagement: arguments, response, policy and SDK examples.
← Contractors operations · Get started
Operation deel.contractors_createengagement_v2026_01_01
Provider route: POST /engagements. 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["contractors"]["createEngagement"]>[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.contractors.createEngagement(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.contractors.create_engagement(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
headers | object | Required within parent | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Format: uuid |
headers.X-Beta | string | Required within parent | Default: true One of: true |
body | object | Optional | |
body.data | Model | Required within parent | Expand Create an engagement — request body — body data POST /rest/contracts data (legal_entity_id/team_id flattened - a nested id property is rejected as a server-generated field; job_title omitted - undocumented for that endpoint), plus client_signature and actions. See each field below for whether it is required. |
Referenced models: Create an engagement — 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 engagement — 201 response body |
Referenced models: Create an engagement — 201 response body
Schemas
Section titled “Schemas”Create an engagement — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | POST /rest/contracts data (legal_entity_id/team_id flattened - a nested id property is rejected as a server-generated field; job_title omitted - undocumented for that endpoint), plus client_signature and actions. See each field below for whether it is required. |
actions | Model | Optional | Expand Create an engagement — request body — body data actions Which of the sign/invite steps to run. Not part of POST /rest/contracts. |
client | Model | Required within parent | Expand Create an engagement — request body — body data client Same as POST /rest/contracts data.client, flattened to legal_entity_id/team_id - the gateway rejects a nested id property as a server-generated field. |
client_signature | string | Optional | Same as POST /rest/contracts/{contract_id}/signatures data.client_signature. Required when actions.should_sign_as_client is true (the default). Minimum length: 2 |
compensation_details | Model | Required within parent | Expand Create an engagement — request body — body data compensation details Same as POST /rest/contracts data.compensation_details - see that endpoint for the full shape per contract type (the cadence field is `frequency` for ongoing_time_based, `scale` for pay_as_you_go_time_based, and the invoicing cycle is either `payment_policy_id` or the individual frequency/cycle_end/cycle_end_type/payment_due_type/payment_due_days fields). |
contract_template_id | JSON | Optional | Same as POST /rest/contracts data.contract_template_id. Null uses the default Deel contract template. |
contract_template_id (oneOf 1) | Model | Alternative | Expand Create an engagement — request body — body data contract template id value |
contract_template_id (oneOf 2) | null | Alternative | |
country_code | string | Optional | Same as POST /rest/contracts data.country_code. ISO 3166-1 alpha-2 code of the worker's country. Deel uses it to pick its standard contractor agreement when the contract is created. Omit it to create the contract without a country. Maximum length: 2 Minimum length: 2 Pattern: ^[A-Z]{2}$ |
external_id | string | Optional | Same as POST /rest/contracts data.external_id. Client's own reference for this engagement. Maximum length: 255 |
locale | string | Optional | Same as POST /rest/contracts/{contract_id}/invite data.locale. Only used when actions.should_invite_worker is true (the default). Default: en One of: en, es, fr, de, it, pt, pl, nn, nl, da, deAT, fi, sv, nlBE, ja |
message | string | Optional | Same as POST /rest/contracts/{contract_id}/invite data.message. Only used when actions.should_invite_worker is true (the default). |
notice_period | number | Optional | Same as POST /rest/contracts data.notice_period. Format: double |
scope_of_work | string | Optional | Same as POST /rest/contracts data.scope_of_work. |
start_date | string | Required within parent | Same as POST /rest/contracts data.start_date. Format: date Pattern: ^\d{4}-\d{2}-\d{2}$ |
title | string | Required within parent | Same as POST /rest/contracts data.title. |
type | string | Required within parent | Same as POST /rest/contracts data.type. Only these 4 types are creatable there - `milestones` is a legacy read-only type. One of: ongoing_time_based, pay_as_you_go_time_based, payg_tasks, payg_milestones |
worker | Model | Required within parent | Expand Create an engagement — request body — body data worker Same as POST /rest/contracts data.worker. Required here (optional there) - an engagement always onboards a worker. |
Referenced models: Create an engagement — request body — body data actions, Create an engagement — request body — body data client, Create an engagement — request body — body data compensation details, Create an engagement — request body — body data contract template id value, Create an engagement — request body — body data worker
Create an engagement — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Create an engagement — 201 response body — data |
Referenced models: Create an engagement — 201 response body — data
Create an engagement — request body — body data actions
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Which of the sign/invite steps to run. Not part of POST /rest/contracts. |
should_invite_worker | boolean | Optional | Whether to invite the worker to sign, once the contract is signed by the client. Requires actions.should_sign_as_client to also be true - inviting without a client-signed contract is rejected. Default: true |
should_sign_as_client | boolean | Optional | Whether to apply client_signature to the contract after creating it. Default: true |
Create an engagement — request body — body data client
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Same as POST /rest/contracts data.client, flattened to legal_entity_id/team_id - the gateway rejects a nested id property as a server-generated field. |
legal_entity_id | Model | Required within parent | Expand Create an engagement — request body — body data client legal entity id Existing legal entity id. |
team_id | Model | Required within parent | Expand Create an engagement — request body — body data client team id Existing team id. Required in V1 - org-default-team resolution is not yet implemented. |
Referenced models: Create an engagement — request body — body data client legal entity id, Create an engagement — request body — body data client team id
Create an engagement — request body — body data compensation details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Same as POST /rest/contracts data.compensation_details - see that endpoint for the full shape per contract type (the cadence field is `frequency` for ongoing_time_based, `scale` for pay_as_you_go_time_based, and the invoicing cycle is either `payment_policy_id` or the individual frequency/cycle_end/cycle_end_type/payment_due_type/payment_due_days fields). |
Create an engagement — request body — body data contract template id value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Same as POST /rest/contracts data.contract_template_id. Null uses the default Deel contract template. |
$ (oneOf 1) | number | Alternative | Format: double |
$ (oneOf 2) | string | Alternative |
Create an engagement — request body — body data worker
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Same as POST /rest/contracts data.worker. Required here (optional there) - an engagement always onboards a worker. |
expected_email | string | Required within parent | Worker's email address, used to send the invite when actions.should_invite_worker is true. Format: email |
first_name | string | Required within parent | Worker's first name. Maximum length: 255 |
last_name | string or null | Optional | Worker's last name. Maximum length: 255 |
Create an engagement — 201 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
created_at | string | Optional | The created contract's own created_at, passed through from its create-contract response. Absent if the create step has not yet succeeded. Format: date-time |
engagement_created_at | string | Required within parent | When the engagement was created. Distinct from the contract's own created_at field above. Format: date-time |
engagement_status | string | Required within parent | Current step of the engagement orchestration. Distinct from the contract's own status field above. Known values: draft, contract_created, client_signed, worker_invited |
engagement_updated_at | string | Required within parent | When the engagement was last updated. Format: date-time |
id | string | Optional | The created contract's own id, passed through from its create-contract response. Absent if the create step has not yet succeeded. |
pending_actions | array | Required within parent | Orchestration steps not yet completed. Empty when every requested action succeeded. Distinct from the payable-gating requirements[] planned for a later phase. |
pending_actions[] | string | Each item | Known values: create_contract, sign_contract, invite_worker |
Create an engagement — request body — body data client legal entity id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Existing legal entity id. |
$ (oneOf 1) | string | Alternative | |
$ (oneOf 2) | number | Alternative | Format: double |
Create an engagement — request body — body data client team id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Existing team id. Required in V1 - org-default-team resolution is not yet implemented. |
$ (oneOf 1) | string | Alternative | |
$ (oneOf 2) | number | Alternative | Format: double |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.contractors_createengagement_v2026_01_01. Catalog operation: contractors_createengagement_v2026_01_01. 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: ["contracts:write"]
Pinned headers: {"X-Version": "2026-01-01"}