Choose busy calendars

PUT
/v1/calendar/availability

Chooses which calendars count as busy when a booking page works out whether the person is free. The choice replaces the old one; the default is the main calendar only. Names and ids both work.

Requires an API key with the calendar:use scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Request Body

application/json
  1. body
calendarIds*array<>

The calendars to check, by name or id. At least one: an empty choice would make everything look free.

Items1 <= items <= 25
connectionId?string

Only needed when more than one calendar account is connected.

Length1 <= length <= 64

Response Body

The calendars after the change

application/json
  1. response
calendars*array<>
summary*string
Example Request
curl -X PUT https://api.vlayers.ai/v1/calendar/availability \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "calendarIds": [      "Main",      "Sales agent"    ]  }'
Example Response
{  "calendars": [    {      "connectionId": "0192f5c0-1a2b-7c3d-8e4f-5a6b7c8d9e01",      "account": "[email protected]",      "app": "Google Calendar",      "id": "[email protected]",      "name": "Sales agent",      "main": false,      "agentCalendar": true,      "mailbox": "[email protected]",      "countsForAvailability": true    }  ],  "summary": "From now on I check Main, Sales agent when working out if you're free."}