---
title: "Bulk update departments"
method: PATCH
path: "/v3/departments/bulk"
tags: ["Departments"]
---

# Bulk update departments

`PATCH /v3/departments/bulk`

## Request

- Base URL: `https://harvest.greenhouse.io`
- URL: `https://harvest.greenhouse.io/v3/departments/bulk`
- Auth: OAuth 2
  - Authorization code: `https://auth.greenhouse.io/authorize`
  - Client credentials
  - Token URL: `https://auth.greenhouse.io/token` scopes: `harvest:departments:update`

Asynchronously update many departments in a single request. Each item in `data` accepts the same fields as `PATCH /v3/departments/{id}` and must include the department's `id`. The request returns `202 Accepted` with a `bulk_action_uuid`; poll `/v3/bulk_requests/{bulk_action_uuid}` for status and per-record success/failure files.

## Request body

- object
  - `callback_url` string: Optional HTTPS URL Greenhouse will POST to when every row in `data` has finished. Omit to poll `GET /v3/bulk_requests/{bulk_action_uuid}` instead.
  - `data` object[], required: Array of single-resource update payloads to process. Each item must include the integer `id` of the record to update and otherwise match the schema of the matching non-bulk PATCH endpoint; rows are validated and executed independently.
    - `name` string, required: New display name for the department. Required.
    - `parent_id` integer, nullable: Id of an existing department to set as the new parent. Set to `null` to remove the parent. Use `parent_id` when you already have the Greenhouse id; use `external_parent_id` to reference the parent by its external id instead.
    - `external_id` string, nullable: Partner-supplied identifier for the department, typically the matching id from an HRIS or other external system. Set to `null` to clear the existing `external_id`.
    - `external_parent_id` string, nullable: `external_id` of an existing department to set as the new parent. Set to `null` to remove the parent. Useful when you only have external ids on hand; ignored if `parent_id` is also supplied.
    - `id` integer, required

## Response `202`

Accepted

- object
  - `bulk_action_uuid` string: UUID assigned to the new bulk request. Use this with `GET /v3/bulk_requests/{bulk_action_uuid}` to monitor progress and retrieve per-row results.
  - `status` string: Initial lifecycle state of the new bulk request, typically `building` immediately after creation. See the bulk request response schema for the full set of values.
  - `status_url` string: Relative path that returns the current status of the bulk request. Append this to your Harvest base URL to fetch the latest state.

## Other responses

- `401`: Unauthorized
- `413`: Payload is larger than 10MB
- `422`: Validation Error
- `429`: Client has more than 5 active jobs

---

[API](https://skmtc.dev/greenhouse/apis/harvest-api.md) - [All operations](https://skmtc.dev/greenhouse/apis/harvest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/greenhouse/apis/harvest-api/revisions/822822e3f771?raw)
