Deletes a label. [See the docs here](https://developer.todoist.com/rest/v2/#delete-a-personal-label)
1
import { TodoistApi } from '@doist/todoist-api-typescript'
2
import { v9 as Todoist } from 'todoist'
3
4
type Todoist = {
5
Token: string
6
}
7
8
export async function main(
9
resource: Todoist,
10
label: {
11
id: string
12
requestId?: string
13
14
) {
15
const api = new TodoistApi(resource.Token)
16
const labelResponse = await api.deleteLabel(label.id, label.requestId)
17
return labelResponse
18
19