# Disconnect a calendar

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

`POST /v1/calendar/disconnect` · scope `calendar:use`

Disconnects a calendar account from VoiceLayer. The person's meetings stay in their calendar; booking pages that use the account stop working until it is connected again. Without `confirm: true` it is refused with a sentence that says what stops.

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

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `connectionId` | body | string | no | Only needed when more than one calendar account is connected. |
| `confirm` | body | boolean | yes | Set to `true` only after the person said yes to disconnecting. |

## Request

cURL:

```bash
curl -X POST https://api.vlayers.ai/v1/calendar/disconnect \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm": true
  }'
```

TypeScript:

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

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.calendar.disconnect({ confirm: true });
console.log(summary);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.calendar.disconnect(confirm=True)
print(result.summary)
```

## Response `200`

```json
{
  "disconnected": "0192f5c0-1a2b-7c3d-8e4f-5a6b7c8d9e01",
  "summary": "Disconnected Google Calendar. Your meetings are still in your calendar; ask for a connect link to connect again."
}
```
