> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/department/_setname.md).

# \_setName

Set the name for a given department

### Parameters

#### id

The ID of the department which will have the name set.

#### val

The name you wish to set for the department

### Example

```
FM_api('Department_setName', ['id' => '4', 'val' => 'plumbing'])
```

#### On Success

```
{"ok":1}
```
