# Delete an agent calendar

Source: https://docs.vlayers.ai/reference/calendar/remove-calendar

`POST /v1/calendar/calendars/remove` · scope `calendar:use`

Permanently deletes a calendar that was made for an agent, with all its meetings. A calendar the person already had is never deleted from here. Without `confirm: true` it is refused with a sentence that names what would be lost.

Requires an API key with the `calendar:use` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `calendarId` | body | string | yes | The calendar to delete, one made for an agent (the list marks those). |
| `confirm` | body | boolean | yes | Set to `true` only after the person said yes to permanently deleting the calendar and its meetings. |
| `connectionId` | body | string | no | Only needed when more than one calendar account is connected. |

## Request

cURL:

```bash
curl -X POST https://api.vlayers.ai/v1/calendar/calendars/remove \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "calendarId": "c_agent@group.calendar.google.com",
    "confirm": true
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.calendar.remove({
  calendarId: 'c_agent@group.calendar.google.com',
  confirm: true
});
console.log(summary);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.calendar.remove(
    calendar_id="c_agent@group.calendar.google.com",
    confirm=True,
)
print(result.summary)
```

## Response `200`

```json
{
  "removed": "c_agent@group.calendar.google.com",
  "summary": "Deleted the calendar \"Sales agent\" and its meetings."
}
```
