---
title: "Create custom field department"
method: POST
path: "/v3/custom_field_departments"
tags: ["Custom Field Departments"]
---

# Create custom field department

`POST /v3/custom_field_departments`

## Request

- Base URL: `https://harvest.greenhouse.io`
- URL: `https://harvest.greenhouse.io/v3/custom_field_departments`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://auth.greenhouse.io/authorize`
    - Client credentials
    - Token URL: `https://auth.greenhouse.io/token` scopes: `harvest:custom_field_departments:create`
  - HTTP bearer

Restrict a custom field's visibility to one additional department. Each call adds one (custom_field_id, department_id) pair; repeat the call for each department the field should appear under. Once any custom_field_department rows exist for a field, it stops being visible to departments outside the list.

## Request body

- object
  - `custom_field_id` integer, required: Id of the custom field to scope. The field becomes visible only on jobs, offers, or candidates whose department matches one of the field's `custom_field_departments` rows.
  - `department_id` integer, required: Id of the department to grant visibility to. Must belong to the same organization as the custom field.

## Response `201`

Successful

- object
  - `id` integer
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `custom_field_id` integer: Id of the custom field whose visibility is being scoped. References a `/v3/custom_fields` row.
  - `department_id` integer: Id of the department the custom field is restricted to. References a `/v3/departments` row.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Content

---

[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)
