HelpfulAI ACP (agent communications)

Calendar

Serverhttps://mqqsoutginqsajeuttyp.supabase.co/functions/v1

Appointment calendars, delegated calendar setup, and agent calendars (agentcalendar.one).


Approve or dismiss an agent's calendar request

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-approve

A company admin's click. The request moves proposed to approved through the caller's RLS client, then the calendar is ordered as that admin: the native identity, the CalDAV principal and calendar, the read share and the calendar routing row. A re-click answers the settled state (202 creating, or 200 completed with store_calendar_href).

Approve or dismiss an agent's calendar request › Request Body

requestId
​Uuid · uuid · required
action
​string · enum · required
Enum values:
approve
cancel

Approve or dismiss an agent's calendar request › Responses

The click was recorded, or the request had already completed.

requestId
​string · uuid · required
approved
​boolean · const
Const value:
cancelled
​boolean · const
Const value:
status
​string
store_calendar_href
​string | null
result_code
​string | null

The free slots of one day on an agent calendar

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-availability

From the native booking core (the calendar's slot rules minus confirmed bookings); on a delegated_google calendar (#5340) the Google calendar's busy time (freeBusy) is removed too, and a Google token that is revoked or lacks the calendar scope is 409 google_reconnect_required / google_scope_missing (fail closed). Name the owner with exactly one of avatar_type or external_agent_id; the organization is the key's.

The free slots of one day on an agent calendar › query Parameters

day
​string · date · required
avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

The free slots of one day on an agent calendar › Responses

The day's free slots.

day
​string · date
​object[]

List bookings on an agent calendar in a window (at most 92 days)

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-bookings

List bookings on an agent calendar in a window (at most 92 days) › query Parameters

from
​Instant · date-time · required

ISO 8601 instant with an offset.

to
​Instant · date-time · required

ISO 8601 instant with an offset.

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

List bookings on an agent calendar in a window (at most 92 days) › Responses

The bookings overlapping the window.

​Booking[]

Book a slot on an agent calendar

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-bookings

A developer key's booking is charged one credit (refunded when the core refuses); the avatar's own (service lane) is not. Idempotency-Key is required: a retry with the same key and slot answers 200 replayed: true and charges nothing again. The booking is projected onto the agent's CalDAV calendar (projection_state) and booking.created is sent to the owner's webhook. On a delegated_google calendar (#5340) it is projected into the Google calendar instead (same states; a Google-side edit is conflict, never overwritten), and a slot Google shows busy is 409 slot_taken before any charge.

Book a slot on an agent calendar › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Book a slot on an agent calendar › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 200 · required

Book a slot on an agent calendar › Request Body

start_at
​Instant · date-time · required

ISO 8601 instant with an offset.

end_at
​Instant · date-time · required

ISO 8601 instant with an offset.

Book a slot on an agent calendar › Responses

A replay of the same Idempotency-Key.

​Booking · required
replayed
​boolean
projection_state
​ProjectionState · enum

Where the booking stands on the agent's CalDAV calendar (ADR-003): conflict means the event was changed or deleted there by someone else; the booking still holds and the event is not overwritten until reviewed.

Enum values:
pending
projected
failed
conflict

Move a booking (revision-guarded)

PATCH
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-bookings

A stale expected_revision is 409 stale_revision with details.current_revision; a taken slot is 409 slot_taken.

Move a booking (revision-guarded) › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Move a booking (revision-guarded) › Request Body

booking_id
​Uuid · uuid · required
expected_revision
​integer · min: 1 · required

The booking's current revision; a stale one is 409 stale_revision.

start_at
​Instant · date-time · required

ISO 8601 instant with an offset.

end_at
​Instant · date-time · required

ISO 8601 instant with an offset.

Move a booking (revision-guarded) › Responses

Moved.

​Booking · required
replayed
​boolean
projection_state
​ProjectionState · enum

Where the booking stands on the agent's CalDAV calendar (ADR-003): conflict means the event was changed or deleted there by someone else; the booking still holds and the event is not overwritten until reviewed.

Enum values:
pending
projected
failed
conflict

Cancel a booking (revision-guarded)

DELETE
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-bookings

Cancel a booking (revision-guarded) › query Parameters

booking_id
​Uuid · uuid · required
expected_revision
​integer · min: 1 · required
avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Cancel a booking (revision-guarded) › Responses

Cancelled.

​Booking · required
replayed
​boolean
projection_state
​ProjectionState · enum

Where the booking stands on the agent's CalDAV calendar (ADR-003): conflict means the event was changed or deleted there by someone else; the booking still holds and the event is not overwritten until reviewed.

Enum values:
pending
projected
failed
conflict

Read one event on the agent's calendar

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-events

Answers the VCALENDAR text (managed, CalDAV) or the Google event's fields (delegated_google, #5340, routed to the Google calendar) and its ETag (also in the ETag header).

Read one event on the agent's calendar › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

uid
​string · maxLength: 200
from
​Instant · date-time

List: range start (required without uid).

ISO 8601 instant with an offset.

to
​Instant · date-time

List: range end (required without uid).

ISO 8601 instant with an offset.

cursor
​string · maxLength: 500
limit
​integer · min: 1 · max: 200
Default: 50

Read one event on the agent's calendar › Responses

The event, or a page of the range's events.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: uid
type = object · requires: events, next_cursor
Properties for Variant 1:
A managed calendar answers `ics`; a delegated Google calendar (#5340) answers `event`.
uid
​string · required
ics
​string

The VCALENDAR text the store holds (managed).

​object

The Google event's fields (delegated_google).

etag
​string | null

Create an event on the agent's own CalDAV calendar

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-events

Create an event on the agent's own CalDAV calendar › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Create an event on the agent's own CalDAV calendar › Request Body

summary
​string · minLength: 1 · maxLength: 500 · required
start_at
​Instant · date-time · required

ISO 8601 instant with an offset.

end_at
​Instant · date-time · required

ISO 8601 instant with an offset.

description
​string | null · maxLength: 8000

Create an event on the agent's own CalDAV calendar › Responses

Created (uid is evt-<uuid>; on a delegated Google calendar evt + 32 hex, a Google event id).

uid
​string · required
etag
​string | null

Replace an event (If-Match its ETag)

PATCH
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-events

Without If-Match 428; a moved ETag 412. A booking's projection (a uuid UID; on Google bk + 32 hex) is 409 booking_event.

Replace an event (If-Match its ETag) › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Replace an event (If-Match its ETag) › Headers

If-Match
​string · required

Replace an event (If-Match its ETag) › Request Body

uid
​string · minLength: 1 · maxLength: 200 · required
summary
​string · minLength: 1 · maxLength: 500 · required
start_at
​Instant · date-time · required

ISO 8601 instant with an offset.

end_at
​Instant · date-time · required

ISO 8601 instant with an offset.

sequence
​integer · min: 0 · required

RFC 5545 SEQUENCE; bump it on every change.

description
​string | null · maxLength: 8000

Replace an event (If-Match its ETag) › Responses

Replaced.

uid
​string · required
etag
​string | null

Delete an event (If-Match its ETag)

DELETE
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-events

Delete an event (If-Match its ETag) › query Parameters

uid
​string · maxLength: 200 · required
avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Delete an event (If-Match its ETag) › Headers

If-Match
​string · required

Delete an event (If-Match its ETag) › Responses

Deleted.

uid
​string
deleted
​boolean · const
Const value:

The private ICS feed of one shared agent calendar (subscribe in Google, Apple, Outlook)

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-feed/{feed_token}.ics

The acf_… token minted by agent-calendar-shares is the last path segment (calendar clients cannot send a header or a JWT; Supabase routes the sub-path to the function). The token is stored only as its SHA-256 and names one calendar; a revoked share, an unknown token or a calendar that is no longer active answers 404. The body is one RFC 5545 VCALENDAR (METHOD:PUBLISH) of the calendar's events from 30 days back to 365 days ahead, without cancelled events or alarms. Read-only: any other method is 405. ETag is a strong validator over the body; If-None-Match answers 304. Rate-limited per client address and per token (429 with Retry-After).

The private ICS feed of one shared agent calendar (subscribe in Google, Apple, Outlook) › path Parameters

feed_token
​string · pattern: ^acf_[A-Za-z0-9_-]{4… · required

The private feed token (acf_ + 43 base64url characters) from an agent-calendar-shares create; the URL ends <feed_token>.ics.

The private ICS feed of one shared agent calendar (subscribe in Google, Apple, Outlook) › Headers

If-None-Match
​string

The private ICS feed of one shared agent calendar (subscribe in Google, Apple, Outlook) › Responses

The calendar.

string

The feed's validators without its body

HEAD
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-feed/{feed_token}.ics

The feed's validators without its body › path Parameters

feed_token
​string · pattern: ^acf_[A-Za-z0-9_-]{4… · required

The private feed token (acf_ + 43 base64url characters) from an agent-calendar-shares create; the URL ends <feed_token>.ics.

The feed's validators without its body › Responses

The feed's headers (ETag, Last-Modified).

No data returned

Who may book on an agent calendar

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-grants

The key's user must be a company admin or manager (checked in SQL).

Who may book on an agent calendar › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Who may book on an agent calendar › Responses

Current staff grants.

​Grant[]

Grant or change a staff member's booking rights

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-grants

Grant or change a staff member's booking rights › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Grant or change a staff member's booking rights › Request Body

user_id
​Uuid · uuid · required
can_create
​boolean · required
can_move
​boolean · required
can_cancel
​boolean · required

Grant or change a staff member's booking rights › Responses

The grant now in force.

grant
​object

Revoke a staff member's booking rights

DELETE
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-grants

Revoke a staff member's booking rights › query Parameters

user_id
​Uuid · uuid · required
avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

Revoke a staff member's booking rights › Responses

Revoked.

revoked
​boolean · const
Const value:
user_id
​string · uuid

Re-drive booking projections and detect external edits on agent calendars

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-projector

Service-only scheduled pass. For each active agent calendar's upcoming bookings: a pending or failed projection is written again; a projected one is read back, and an event changed or deleted on the store by someone else becomes conflict (never overwritten) and sends booking.conflict to the owner's webhook.

Re-drive booking projections and detect external edits on agent calendars › Request Body

Re-drive booking projections and detect external edits on agent calendars › Responses

The pass summary.

calendars
​integer
examined
​integer
projected
​integer
failed
​integer
conflicts
​integer
calendarFailures
​integer

The exact calendar an agent's calendar approval card offers

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-quote

The avatar worker's service-role call for a recorded proposed request. Computes and checks the calendar the admin's click would get; creates nothing.

The exact calendar an agent's calendar approval card offers › Request Body

request_id
​Uuid · uuid · required

The exact calendar an agent's calendar approval card offers › Responses

The quote (available: false names its reason).

calendar_href
​string | null · required

/dav/cal/<account>/agent on the calendar store; null for delegated_google (#5340: the Google calendar is chosen after the admin's consent).

provider
​string · enum · required
Enum values:
managed
delegated_google
available
​boolean · required
display_name
​string · required
reason
​string · enum

provider_not_orderable is no longer answered (#5340 orders delegated_google); it stays for requests recorded before.

Enum values:
calendar_limit_reached
unknown_avatar
unknown_owner
unknown_external_agent
payment_not_confirmed
provider_not_orderable
unknown_provider
store_unconfigured

Release the calendars of organizations unpaid past the 7-day grace

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-release-scheduler

Service-only daily pass. Default-off: 423 until AGENT_CALENDAR_RELEASE_ENABLED=1 is in the Vault platform store (vendor), because a release destroys the calendar's store principal.

Release the calendars of organizations unpaid past the 7-day grace › Request Body

Release the calendars of organizations unpaid past the 7-day grace › Responses

The pass summary.

examined
​integer
graceStarted
​integer
graceCleared
​integer
released
​integer
failed
​integer

The calendar's live shares (never a token)

GET
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-shares

Three callers: a developer key (owner in the query), the avatar worker's service key (organization_id, the owner, and requested_by, a company admin), or a signed-in company admin's Supabase JWT from the staff workspace (organization_id + identity_id).

The calendar's live shares (never a token) › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

requested_by
​Uuid · uuid

Service lane: the session's signed-in user; must be a company admin.

identity_id
​Uuid · uuid

Staff lane: the calendar's native identity (with organization_id).

The calendar's live shares (never a token) › Responses

Live shares, newest first.


Share the calendar with an email address

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-shares

Mints a private ICS feed URL (returned here once, and emailed; stored only as a SHA-256) and emails the subscribe links (Google Calendar, webcal:// for Apple Calendar and Outlook, and the https URL). With caldav_account (the recipient's own store login, local@domain) the calendar's WebDAV ACL also grants that principal read. Sharing again with the same email rotates the URL (the old one answers 404). A failed email keeps the share (email_status: failed). At most 20 new shares per calendar an hour (429).

Share the calendar with an email address › query Parameters

avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

requested_by
​Uuid · uuid

Service lane: the session's signed-in user; must be a company admin.

identity_id
​Uuid · uuid

Staff lane: the calendar's native identity (with organization_id).

Share the calendar with an email address › Request Body

email
​string · email · maxLength: 320 · required
caldav_account
​string | null · email · maxLength: 320

The recipient's own login on the calendar store (local@domain), granted CalDAV read.

Share the calendar with an email address › Responses

Shared. The feed URLs appear only in this answer and the email.

​object
rotated
​integer · min: 0

How many earlier shares to this email were revoked.


Revoke a share (its feed URL answers 404 from then on)

DELETE
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-shares

A share with CalDAV access also leaves the calendar's ACL; if the store cannot be reached that is 503 acl_not_updated (the feed is already revoked) and a repeat DELETE retries it.

Revoke a share (its feed URL answers 404 from then on) › query Parameters

share_id
​Uuid · uuid · required
avatar_type
​string · pattern: ^[a-z][a-z0-9_]{1,63…

The calendar's owner when it is a roster avatar (exactly one of this or external_agent_id).

external_agent_id
​string · uuid

The calendar's owner when it is an external agent (exactly one of this or avatar_type).

organization_id
​string · uuid

The service lane (the avatar worker, bearer = the service-role key) names its subject organization here; required on that lane, ignored for a developer key (the key's organization is used).

requested_by
​Uuid · uuid
identity_id
​Uuid · uuid

Revoke a share (its feed URL answers 404 from then on) › Responses

Revoked.

id
​string · uuid
revoked
​boolean · const
Const value:

Where an agent's own calendar stands

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/agent-calendar-status

The avatar worker's service-role read. Never the credential.

Where an agent's own calendar stands › Request Body

organization_id
​Uuid · uuid · required
avatar_type
​string · required

A roster avatar type, or an external agent's subject agent:<uuid>.

Where an agent's own calendar stands › Responses

The live calendar's state and readiness.

state
​string · enum
Enum values:
reserved
provisioning
active
releasing
failed
provider
​string · enum
Enum values:
managed
delegated_google
calendar_href
​string | null
ready
​boolean
​object
last_error
​string | null

Redeem a signed, short-lived appointment cancellation proof

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/appointment-calendar-action

Public. The signed claims, never request fields, select the calendar and event.

Redeem a signed, short-lived appointment cancellation proof › Request Body

proof
​string · minLength: 1 · maxLength: 4096 · required

Redeem a signed, short-lived appointment cancellation proof › Responses

Cancelled.

An action result. Calendar actions never send a message, so they echo `noSend`.
noSend
​boolean · const
Const value:

Selected Google appointment calendar (no-send setup, sync, staff follow-up, reschedule, cancel)

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/appointment-calendar

One action per call. A signed-in staff member calls with their JWT; the avatar worker may call with the service key for staff_queue, link_contact, dismiss, available_slots, issue_reschedule_proof and reschedule, naming the staff member in actorUserId. Every action re-checks membership, the receptionist and its owner's connected Google Calendar. Nothing here sends a message (noSend: true).

Selected Google appointment calendar (no-send setup, sync, staff follow-up, reschedule, cancel) › Request Body

action
​string · enum · required
Enum values:
list_calendars
select_calendar
sync
staff_queue
link_contact
dismiss
communication_reconcile
communication_status
organizationId
​Uuid · uuid · required
receptionistId
​Uuid · uuid · required
actorUserId
​Uuid · uuid

Service lane only; the staff member acted for.

calendarId
​string · maxLength: 512

select_calendar.

eventId
​Uuid · uuid

link_contact, dismiss.

contactId
​string · pattern: ^people/[A-Za-z0-9_-…

link_contact.

Selected Google appointment calendar (no-send setup, sync, staff follow-up, reschedule, cancel) › Responses

The action's result. Shape depends on action.

An action result. Calendar actions never send a message, so they echo `noSend`.
noSend
​boolean · const
Const value:

Connect an installed Employee, or an approved agent calendar, to a Google Calendar

POST
https://mqqsoutginqsajeuttyp.supabase.co/functions/v1
/delegated-calendar-setup

operation selects the step: read status, list_connections, list_calendars on one connection, select_calendar, or replace_calendar (swap a revoked or changed selection). Errors carry the contract code (calendar/forbidden, calendar/conflict, calendar/invalid, calendar/unavailable, calendar/unsupported) as both error and code.

#5340: an agent calendar ordered with provider: delegated_google completes here after the approving admin's Google consent (the existing oauth-connect flow): agent_calendar_connections, agent_calendar_calendars, then agent_calendar_bind, keyed by the approved request. Their refusals carry their own codes (see AgentCalendarBind).

Connect an installed Employee, or an approved agent calendar, to a Google Calendar › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · operation="status" · requires: organizationId, employeeId
type = object · operation="list_connections" · requires: organizationId, employeeId
type = object · operation="list_calendars" · requires: organizationId, employeeId, connectionId
type = object · operation="select_calendar" · requires: organizationId, employeeId, connectionId +1 more
type = object · operation="replace_calendar" · requires: organizationId, employeeId, previousIdentityId +2 more
type = object · operation="agent_calendar_connections" · requires: organizationId, requestId
type = object · operation="agent_calendar_calendars" · requires: organizationId, requestId, connectionId
type = object · operation="agent_calendar_bind" · requires: organizationId, requestId, connectionId +1 more
Properties for Variant 1:
operation
​const · required
Const value: status
organizationId
​Uuid · uuid · required
employeeId
​Uuid · uuid · required

Connect an installed Employee, or an approved agent calendar, to a Google Calendar › Responses

The operation's result.

An action result. Calendar actions never send a message, so they echo `noSend`.
noSend
​boolean · const
Const value: