# Create Global Payroll Contract — Deel

> Create a Global Payroll (GP) contract in Deel to add an employee to your domestic payroll system. Use this when the employee works in a country where your company already has a legal entity. employment_type must be one of: Full-time…

- Key: `deel-create-gp-contract`
- Type: Action (Write)
- Version: 0.0.2
- App: Deel (`deel`) — https://pipedream.com/apps/deel.md
- This page (HTML): https://pipedream.com/apps/deel/actions/create-gp-contract
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/deel/actions/create-gp-contract/create-gp-contract.mjs

## Description

Create a Global Payroll (GP) contract in Deel to add an employee to your domestic payroll system. Use this when the employee works in a country where your company already has a legal entity. `employment_type` must be one of: `Full-time`, `Part-time` (case-sensitive). `compensation_scale` must be one of: `YEAR`, `MONTH` (uppercase). `address_country` must be an ISO 3166-1 alpha-2 code (e.g., `US`, `DE`). `client_team_id` and `client_legal_entity_id` are required — retrieve from your Deel organization settings. For US-based employees: `work_location_state` (2-letter state code, e.g., `OR`), `work_location_is_wfh`, and (if not WFH) `work_location_name` (office name) are required. [See the documentation](https://developer.deel.com/api/reference/endpoints/gp-hiring/create-gp-contract)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `clientTeamId` | `string` | Yes | The ID of the client team (department) for this contract. Retrieve from your Deel organization settings. |
| `clientLegalEntityId` | `string` | Yes | The ID of the client legal entity (company) for this contract. Retrieve from your Deel organization settings. |
| `jobTitle` | `string` | Yes | The employee's job title (e.g., Software Engineer). |
| `employeeFirstName` | `string` | Yes | The employee's first (given) name. |
| `employeeLastName` | `string` | Yes | The employee's last (family) name. |
| `employeeEmail` | `string` | Yes | The employee's personal email address (e.g., jane.doe@gmail.com). |
| `employeeWorkEmail` | `string` | Yes | The employee's work email address. |
| `addressStreet` | `string` | Yes | The employee's street address. |
| `addressCity` | `string` | Yes | The employee's city. |
| `addressZip` | `string` | Yes | The employee's ZIP or postal code. |
| `addressCountry` | `string` | Yes | ISO 3166-1 alpha-2 country code of the employee's address (e.g., US, DE). |
| `employmentType` | `string` | Yes | One of: Full-time, Part-time (case-sensitive). |
| `startDate` | `string` | Yes | The employment start date in ISO 8601 format (e.g., 2026-09-01). |
| `holidaysAllowance` | `integer` | Yes | Number of annual holiday days. |
| `holidaysStartDate` | `string` | Yes | The date from which holiday allowance accrues, in ISO 8601 format. |
| `compensationSalary` | `string` | Yes | The salary amount per the chosen compensation scale (e.g., 95000 for annual). |
| `compensationScale` | `string` | Yes | Pay period for the salary. One of: YEAR, MONTH (uppercase). |
| `compensationCurrency` | `string` | Yes | ISO 4217 currency code for the salary (e.g., USD, EUR). |
| `workLocationState` | `string` | No | 2-letter US state code for the employee's work location (e.g., OR, CA). Required for US employees. |
| `workLocationIsWfh` | `boolean` | No | Whether the employee works from home. Set to true for remote employees. Required for US employees. |
| `workLocationName` | `string` | No | Name of the office location (e.g., Springfield HQ). Required when Work From Home is false for US employees. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "deel",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "deel-create-gp-contract",
  arguments: {
    clientTeamId: "Client Team ID",
    clientLegalEntityId: "Client Legal Entity ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "deel-create-gp-contract",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    deel: { authProvisionId: "apn_xxxxxxx" },
    clientTeamId: "Client Team ID",
    clientLegalEntityId: "Client Legal Entity ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "deel-create-gp-contract",
    "configured_props": {
      "deel": { "authProvisionId": "apn_xxxxxxx" },
      "clientTeamId": "Client Team ID",
      "clientLegalEntityId": "Client Legal Entity ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/deel.md · All apps: https://pipedream.com/apps
