> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://developer.deel.com/api/stable/llms.txt
> - Beta: https://developer.deel.com/api/beta/llms.txt
> - Deprecated: https://developer.deel.com/api/deprecated/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.deel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.deel.com/_mcp/server.

# Create a payroll group for a legal entity

POST https://api.letsdeel.com/rest/payroll-groups
Content-Type: application/json

Creates an active Global Payroll group for a legal entity, with its regular payroll calendars generated from the first pay period start date and the employee pay date. Take `team_id` from GET /teams; the first payroll group of a legal entity sets up Global Payroll on that team. Names are unique among the active groups of the legal entity. Send an `Idempotency-Key` header so a retried request does not create a second group.

 **Token scopes**: `global-payroll:write`

 **Beta**: this version requires the `X-Beta: true` request header and its contract may change before it is promoted to stable. It is scheduled to become stable on 2027-03-03.

Reference: https://developer.deel.com/api/reference/endpoints/global-payroll/post-payroll-groups-v-2026-12-03

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Headers

- `X-Beta` (enum, required, default: true) — Opts in to the beta version of this endpoint. Must be `true`.
  - Allowed values: `true`

### Body (application/json)

This endpoint expects an object.

- `data` (PayrollGroupsPostRequestBodyContentApplicationJsonSchemaData, required) — The payroll group to create.

## Response

### 201

OK

- `data` (PayrollGroupsPostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

400

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: The request breaks a field rule, or the legal entity cannot run Global Payroll in its country.)
- `data` (any, optional)

### 401 Unauthorized Error

401

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: The request carries no caller organization the gateway could resolve.)
- `data` (any, optional)

### 403 Forbidden Error

403

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: The caller is not authorized to create payroll groups for this legal entity or team.)
- `data` (any, optional)

### 404 Not Found Error

404

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: Legal entity or team not found.)
- `data` (any, optional)

### 409 Conflict Error

409

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: An active payroll group of the legal entity already has this name.)
- `data` (any, optional)

### 500 Internal Server Error

500

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: Internal server error.)
- `data` (any, optional)

### 502 Bad Gateway Error

502

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: Unable to create the payroll group upstream.)
- `data` (any, optional)

### 503 Service Unavailable Error

503

- `code` (string, required)
- `status` (double, required)
- `defined` (boolean, required)
- `message` (string, required, default: The payroll group is not ready yet, try again.)
- `data` (any, optional)

## Types

### PayrollGroupsPostRequestBodyContentApplicationJsonSchemaData

The payroll group to create.

- `name` (string, required) — Name of the payroll group. It must be unique among the legal entity's active payroll groups.
- `team_id` (string, required) — ID of the team that owns the payroll group, as returned by GET /teams. The caller needs permission to create payroll groups on this team. On a legal entity's first payroll group, Global Payroll is set up on this team.
- `legal_entity_id` (string, required) — Public ID of the legal entity the payroll group is for. The legal entity must belong to your organization.
- `employee_pay_date` (enum, required) — When employees are paid in each pay period. LAST_DAY_OF_CYCLE: on the last day of the period. BEFORE_CYCLE_ENDS: `days_shift` days before the period ends. AFTER_CYCLE_ENDS: `days_shift` days after the period ends. FIXED_DAY_OF_MONTH: on day `fixed_day` of the month, MONTHLY only.
  - Allowed values: `LAST_DAY_OF_CYCLE`, `BEFORE_CYCLE_ENDS`, `AFTER_CYCLE_ENDS`, `FIXED_DAY_OF_MONTH`
- `regular_cycle_cadence` (enum, required) — How often regular payroll runs. WEEKLY: every week. BIWEEKLY: every two weeks. FOUR_WEEKLY: every four weeks. BIMONTHLY: twice a month, also called semi-monthly. MONTHLY: once a month. QUARTERLY: every three months.
  - Allowed values: `WEEKLY`, `BIWEEKLY`, `MONTHLY`, `BIMONTHLY`, `FOUR_WEEKLY`, `QUARTERLY`
- `first_pay_period_start_date` (string, required) — First day of the first regular pay period, in YYYY-MM-DD format. Calendars are generated from this date. A QUARTERLY payroll group must start on the 1st of a month.
- `fixed_day` (integer, optional) — Day of the month employees are paid. Required with FIXED_DAY_OF_MONTH; not allowed otherwise.
- `days_shift` (integer, optional) — Number of days between the end of the pay period and the pay date. Required with BEFORE_CYCLE_ENDS and AFTER_CYCLE_ENDS; not allowed otherwise.

### PayrollGroupsPostResponsesContentApplicationJsonSchemaData

- `id` (string, required) — Unique identifier of the payroll group.
- `name` (string, required) — Human-readable name of the payroll group.
- `calendars` (list of PayrollGroupsPostResponsesContentApplicationJsonSchemaDataCalendarsItems, required) — The REGULAR payroll calendars generated for the payroll group, one per pay period.
- `is_active` (boolean, required) — Whether the payroll group is currently active.
- `regular_cycle_cadence` (enum, required) — Frequency at which regular payroll cycles are run for this group.
  - Allowed values: `WEEKLY`, `BIWEEKLY`, `MONTHLY`, `BIMONTHLY`, `FOUR_WEEKLY`, `QUARTERLY`

### PayrollGroupsPostResponsesContentApplicationJsonSchemaDataCalendarsItems

- `id` (string, required) — Unique identifier of the calendar.
- `values` (map from string to PayrollGroupsPostResponsesContentApplicationJsonSchemaDataCalendarsItemsValues, required) — Map of calendar milestone keys to their scheduled date-time values. A calendar holds only the milestones its payroll uses. Possible keys: - `START`: Start date of the payroll cycle. - `END`: End date of the payroll cycle. - `CYCLE_SUBMISSION`: Deadline to submit payroll inputs for the cycle. - `CYCLE_PUBLISHING`: Date the processed payroll is published for review. - `CYCLE_APPROVAL`: Deadline to approve the payroll (for EOR, the payments package). - `PAYROLL_FUNDING`: Date the payroll funding invoice is issued. - `FUNDING_PAYMENT_RECEIPT`: Date the funding payment must be received. - `INVOICE_PUBLISHING`: Date the payroll invoices are published. - `PAYMENT_RELEASE`: Date the salary payments are released. - `PAYSLIPS_PUBLISHING`: Date the payslips are published. - `SALARY_PAY`: Date the employees are paid. - `TIME_SHEETS_CUT_OFF`: Cut-off date for timesheets to be included in the cycle. - `LATE_STARTERS_CUTOFF`: Cut-off date for new hires to be included in the cycle. - `SOFT_G2N_UPLOAD`: Date the gross-to-net (G2N) report is uploaded. - `FINAL_BATCH_REPORTS`: Date the final batch reports are delivered.
- `calendar_type` (string, required) — Type of the calendar, e.g. REGULAR.

### PayrollGroupsPostResponsesContentApplicationJsonSchemaDataCalendarsItemsValues

- `value` (string, required) — ISO-8601 date-time value for this calendar key.

## Examples

**Request**

```json
{
  "data": {
    "name": "UK Salaried Staff",
    "team_id": "8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18",
    "legal_entity_id": "3fe30c6d-e07a-471e-ac9d-9b5e03a78925",
    "employee_pay_date": "LAST_DAY_OF_CYCLE",
    "regular_cycle_cadence": "MONTHLY",
    "first_pay_period_start_date": "2027-01-01"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "019ed109-aff0-777c-a0bc-b24e9f5eb6df",
    "name": "Monthly Payroll",
    "calendars": [
      {
        "id": "019ed109-b234-777c-a0bd-54060d27425a",
        "values": {
          "CYCLE_APPROVAL": {
            "value": "2026-01-22T00:00:00.000Z"
          },
          "CYCLE_PUBLISHING": {
            "value": "2026-01-20T00:00:00.000Z"
          },
          "CYCLE_SUBMISSION": {
            "value": "2026-01-16T00:00:00.000Z"
          },
          "END": {
            "value": "2026-01-31T00:00:00.000Z"
          },
          "FINAL_BATCH_REPORTS": {
            "value": "2026-02-03T00:00:00.000Z"
          },
          "FUNDING_PAYMENT_RECEIPT": {
            "value": "2026-01-27T00:00:00.000Z"
          },
          "INVOICE_PUBLISHING": {
            "value": "2026-01-21T00:00:00.000Z"
          },
          "LATE_STARTERS_CUTOFF": {
            "value": "2026-01-15T00:00:00.000Z"
          },
          "PAYMENT_RELEASE": {
            "value": "2026-01-28T00:00:00.000Z"
          },
          "PAYROLL_FUNDING": {
            "value": "2026-01-23T00:00:00.000Z"
          },
          "PAYSLIPS_PUBLISHING": {
            "value": "2026-01-29T00:00:00.000Z"
          },
          "SALARY_PAY": {
            "value": "2026-01-30T00:00:00.000Z"
          },
          "SOFT_G2N_UPLOAD": {
            "value": "2026-01-19T00:00:00.000Z"
          },
          "START": {
            "value": "2026-01-01T00:00:00.000Z"
          },
          "TIME_SHEETS_CUT_OFF": {
            "value": "2026-01-15T00:00:00.000Z"
          }
        },
        "calendar_type": "REGULAR"
      }
    ],
    "is_active": true,
    "regular_cycle_cadence": "MONTHLY"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/payroll-groups"

payload = { "data": {
        "name": "UK Salaried Staff",
        "team_id": "8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18",
        "legal_entity_id": "3fe30c6d-e07a-471e-ac9d-9b5e03a78925",
        "employee_pay_date": "LAST_DAY_OF_CYCLE",
        "regular_cycle_cadence": "MONTHLY",
        "first_pay_period_start_date": "2027-01-01"
    } }
headers = {
    "X-Beta": "true",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/payroll-groups';
const options = {
  method: 'POST',
  headers: {
    'X-Beta': 'true',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"data":{"name":"UK Salaried Staff","team_id":"8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18","legal_entity_id":"3fe30c6d-e07a-471e-ac9d-9b5e03a78925","employee_pay_date":"LAST_DAY_OF_CYCLE","regular_cycle_cadence":"MONTHLY","first_pay_period_start_date":"2027-01-01"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/payroll-groups"

	payload := strings.NewReader("{\n  \"data\": {\n    \"name\": \"UK Salaried Staff\",\n    \"team_id\": \"8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18\",\n    \"legal_entity_id\": \"3fe30c6d-e07a-471e-ac9d-9b5e03a78925\",\n    \"employee_pay_date\": \"LAST_DAY_OF_CYCLE\",\n    \"regular_cycle_cadence\": \"MONTHLY\",\n    \"first_pay_period_start_date\": \"2027-01-01\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Beta", "true")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/payroll-groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Beta"] = 'true'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"name\": \"UK Salaried Staff\",\n    \"team_id\": \"8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18\",\n    \"legal_entity_id\": \"3fe30c6d-e07a-471e-ac9d-9b5e03a78925\",\n    \"employee_pay_date\": \"LAST_DAY_OF_CYCLE\",\n    \"regular_cycle_cadence\": \"MONTHLY\",\n    \"first_pay_period_start_date\": \"2027-01-01\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/payroll-groups")
  .header("X-Beta", "true")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"name\": \"UK Salaried Staff\",\n    \"team_id\": \"8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18\",\n    \"legal_entity_id\": \"3fe30c6d-e07a-471e-ac9d-9b5e03a78925\",\n    \"employee_pay_date\": \"LAST_DAY_OF_CYCLE\",\n    \"regular_cycle_cadence\": \"MONTHLY\",\n    \"first_pay_period_start_date\": \"2027-01-01\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/payroll-groups', [
  'body' => '{
  "data": {
    "name": "UK Salaried Staff",
    "team_id": "8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18",
    "legal_entity_id": "3fe30c6d-e07a-471e-ac9d-9b5e03a78925",
    "employee_pay_date": "LAST_DAY_OF_CYCLE",
    "regular_cycle_cadence": "MONTHLY",
    "first_pay_period_start_date": "2027-01-01"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Beta' => 'true',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/payroll-groups");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Beta", "true");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"name\": \"UK Salaried Staff\",\n    \"team_id\": \"8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18\",\n    \"legal_entity_id\": \"3fe30c6d-e07a-471e-ac9d-9b5e03a78925\",\n    \"employee_pay_date\": \"LAST_DAY_OF_CYCLE\",\n    \"regular_cycle_cadence\": \"MONTHLY\",\n    \"first_pay_period_start_date\": \"2027-01-01\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Beta": "true",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    "name": "UK Salaried Staff",
    "team_id": "8b0f6a4e-2d71-4c39-9a51-6f0e3c2b7d18",
    "legal_entity_id": "3fe30c6d-e07a-471e-ac9d-9b5e03a78925",
    "employee_pay_date": "LAST_DAY_OF_CYCLE",
    "regular_cycle_cadence": "MONTHLY",
    "first_pay_period_start_date": "2027-01-01"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/payroll-groups")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```