# Update a department

> Update a specific department.

PATCH

/departments/{id}/

Updates a department within the organization by ID.

#### Helpful resources

-   [Create and manage departments](https://developer.rippling.com/documentation/rest-api/guides/departments)
-   [Introduction to Departments](https://help.rippling.com/article?articleId=1500002734321)

### Required Scopes

-   departments.read-write
    

### Request

Path Parameters

**id** id required

ID of the resource to patch

-   application/json

**Body**

**name** string

The name of the department.

**parent\_id** string

The parent department.

**reference\_code** string

Reference code of the department.

## Responses

-   200
-   400
-   401
-   403
-   404

Successful response

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**\_\_meta** object

**redacted\_fields** object\[\]

Array \[

**name** string

The name for the redacted field

**reason** string

The reason for the redaction

\]

**id** string required

Identifier field

**created\_at** string required

Record creation date

**updated\_at** string required

Record update date

**name** string required

The name of the department.

**parent\_id** string

The parent department.

**parent** object nullable

The parent department.

-   Matches one or more of these formats:
    
    1.  **Format 1**
        
    2.  **Format 2**
        
        **value** object nullable
        
        **Possible values:** \[null\]
        

**reference\_code** string

Reference code of the department.

**department\_hierarchy\_id** string\[\]

The identifier of departments in the department hierarchy ordered from parent department to child department.

**department\_hierarchy** object\[\] nullable

List of departments in the department hierarchy. Refer department\_hierarchy\_ids for department hierarchy order.

Expandable field

```json
{
  "__meta": {
    "redacted_fields": [
      {
        "name": "date_of_birth",
        "reason": "Insufficient entitlements"
      }
    ]
  },
  "id": "string",
  "created_at": "string",
  "updated_at": "string",
  "name": "string",
  "parent_id": "string",
  "parent": {},
  "reference_code": "string",
  "department_hierarchy_id": [
    "string"
  ],
  "department_hierarchy": [
    "string"
  ]
}
```

The request failed validation. The response body describes the error.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**detail** string

A human-readable explanation of why the request failed.

```json
{
  "detail": "string"
}
```

Authentication is required or the supplied credentials are invalid.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

-   Matches one or more of these formats:
    
    1.  **Format 1**
        
        **ok** boolean required
        
        Whether the request succeeded. Always false for an authentication error.
        
        **Possible values:** \[false\]
        
        **error** string required
        
        A human-readable explanation of why authentication failed.
        
    2.  **Format 2**
        
        **detail** string required
        
        A human-readable explanation of the authentication error.
        

**Format 1**

```json
{
  "ok": false,
  "error": "Incorrect authentication credentials."
}
```

**Format 2**

```json
{
  "detail": "string"
}
```

The caller is not authorized to perform this action.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**detail** string

A human-readable explanation of why the request failed.

```json
{
  "detail": "string"
}
```

The requested resource was not found.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**detail** string

A human-readable explanation of why the request failed.

```json
{
  "detail": "string"
}
```

Source: https://developer.rippling.com/documentation/rest-api/reference/update-departments

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
