> For the complete documentation index, see [llms.txt](https://pollz.gitbook.io/pollz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pollz.gitbook.io/pollz/api-reference/polloptions/renameoption.md).

# renameOption()

**`renameOption(optionId: number, name: string): Promise<{ id: number; name: string; }>`**

Rename a poll option.

**Parameters:**

* `optionId` (number): The ID of the option to be renamed.
* `name` (string): The new name for the option.

**Returns:**

* A `Promise` resolving to an object containing the ID and the new name of the renamed option.

**Example:**

```javascript
const updatedOption = await pollOptions.renameOption(1, 'Updated Option');
console.log('Poll Option Renamed:', updatedOption);
```
