Make an agent calendar

POST
/v1/calendar/calendars

Makes a separate calendar for an agent inside the person's own Google or Outlook account. It counts when checking whether the person is free, and bookings for the agent's mailbox land on it. A Google account connected before this existed is asked to sign in again to approve one more permission: the refusal carries the link.

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
name*string

A name people will recognise, for example Sales agent.

Length1 <= length <= 100
timeZone*string

Where the agent works, as an IANA name such as America/Chicago.

Length1 <= length <= 64
forMailbox?string

The agent's email address, so meetings booked for that mailbox land on this calendar. One calendar per mailbox.

Lengthlength <= 320
connectionId?string

Only needed when more than one calendar account is connected.

Length1 <= length <= 64

Response Body

The new calendar

application/json
  1. response
calendar*
summary*string
Example Request
curl -X POST https://api.vlayers.ai/v1/calendar/calendars \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "Sales agent",    "timeZone": "America/Chicago",    "forMailbox": "[email protected]"  }'
Example Response
{  "calendar": {    "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": "Made a calendar called \"Sales agent\" in Google Calendar for [email protected]. It counts when I check if you're free, and you can rename or edit it in Google Calendar like any other."}