Astrocal Calendars API
The Calendars API from Astrocal — 7 operation(s) for calendars.
The Calendars API from Astrocal — 7 operation(s) for calendars.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/astrocal-dev:astrocal-dev-calendars-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Astrocal Calendars API
version: 1.0.0
description: Scheduling API for AI agents and developers
servers:
- url: https://api.astrocal.dev
description: Production
- url: https://api.astrocal.dev
description: Local development
security:
- BearerAuth: []
tags:
- name: Calendars
paths:
/v1/calendars/google/callback:
get:
tags:
- Calendars
summary: Google OAuth callback
description: Handles the OAuth callback from Google. Exchanges the authorization code for tokens, stores the encrypted connection, and redirects.
parameters:
- schema:
type: string
required: false
name: code
in: query
- schema:
type: string
required: false
name: state
in: query
- schema:
type: string
required: false
name: error
in: query
responses:
'302':
description: Redirect to success or error page, including when rate limited
'400':
description: Invalid state token
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1CalendarsGoogleCallback
x-operation-id-source: derived
/v1/calendars/microsoft/callback:
get:
tags:
- Calendars
summary: Microsoft OAuth callback
description: Handles the OAuth callback from Microsoft. Exchanges the authorization code for tokens with PKCE, stores the encrypted connection, and redirects.
parameters:
- schema:
type: string
required: false
name: code
in: query
- schema:
type: string
required: false
name: state
in: query
- schema:
type: string
required: false
name: error
in: query
- schema:
type: string
required: false
name: error_description
in: query
responses:
'302':
description: Redirect to success or error page, including when rate limited
'400':
description: Invalid state token
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1CalendarsMicrosoftCallback
x-operation-id-source: derived
/v1/calendars/google/connect:
get:
tags:
- Calendars
summary: Initiate Google Calendar OAuth flow
description: Returns a Google OAuth authorization URL. This flow must be initiated from the Astrocal dashboard, which binds the authorization request to your browser session.
parameters:
- schema:
type: string
format: uuid
description: The org member whose calendar is being connected
required: true
description: The org member whose calendar is being connected
name: member_id
in: query
- schema:
type: string
format: uri
required: false
name: redirect_uri
in: query
responses:
'200':
description: Authorization URL generated
content:
application/json:
schema:
type: object
properties:
authorization_url:
type: string
required:
- authorization_url
'400':
description: Flow was not initiated from the Astrocal dashboard
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'404':
description: Member not found or does not belong to org
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1CalendarsGoogleConnect
x-operation-id-source: derived
/v1/calendars/microsoft/connect:
get:
tags:
- Calendars
summary: Initiate Microsoft Calendar OAuth flow
description: Returns a Microsoft OAuth authorization URL with PKCE. This flow must be initiated from the Astrocal dashboard, which binds the authorization request to your browser session.
parameters:
- schema:
type: string
format: uuid
description: The org member whose calendar is being connected
required: true
description: The org member whose calendar is being connected
name: member_id
in: query
- schema:
type: string
format: uri
required: false
name: redirect_uri
in: query
responses:
'200':
description: Authorization URL generated
content:
application/json:
schema:
type: object
properties:
authorization_url:
type: string
required:
- authorization_url
'400':
description: Flow was not initiated from the Astrocal dashboard
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'404':
description: Member not found or does not belong to org
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1CalendarsMicrosoftConnect
x-operation-id-source: derived
/v1/calendars/caldav/connect:
post:
tags:
- Calendars
summary: Connect a CalDAV calendar
description: Connects a CalDAV calendar (Apple iCloud, Fastmail, Nextcloud, or custom) using password-based authentication. Verifies credentials before storing.
requestBody:
content:
application/json:
schema:
type: object
properties:
member_id:
type: string
format: uuid
description: The org member whose calendar is being connected
preset:
type: string
enum:
- apple
- fastmail
- nextcloud
- custom
server_url:
type: string
maxLength: 2048
format: uri
username:
type: string
minLength: 1
password:
type: string
minLength: 1
required:
- member_id
- preset
- username
- password
responses:
'201':
description: CalDAV calendar connected
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
provider:
type: string
calendar_id:
type: string
account_email:
type: string
member_id:
type: string
format: uuid
member_name:
type: string
nullable: true
description: The owning member's email address, or null when unknown
connected_at:
type: string
status:
type: string
enum:
- active
- needs_reauth
last_sync_at:
type: string
nullable: true
sync_status:
type: string
enum:
- connected
- expired
- error
sync_error:
type: string
nullable: true
upcoming_booking_count:
type: integer
minimum: 0
provider_metadata:
type: object
nullable: true
properties:
preset:
type: string
server_url:
type: string
auth_method:
type: string
calendar_url:
type: string
required:
- preset
- server_url
- auth_method
required:
- id
- provider
- calendar_id
- account_email
- member_id
- member_name
- connected_at
- status
- last_sync_at
- sync_status
- sync_error
- upcoming_booking_count
'400':
description: Invalid credentials, unreachable server, or insecure URL
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: postV1CalendarsCaldavConnect
x-operation-id-source: derived
/v1/calendars:
get:
tags:
- Calendars
summary: List connected calendars
description: Returns all calendar connections for the authenticated organization. Tokens are never exposed.
responses:
'200':
description: Calendar connections
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
provider:
type: string
calendar_id:
type: string
account_email:
type: string
member_id:
type: string
format: uuid
member_name:
type: string
nullable: true
description: The owning member's email address, or null when unknown
connected_at:
type: string
status:
type: string
enum:
- active
- needs_reauth
last_sync_at:
type: string
nullable: true
sync_status:
type: string
enum:
- connected
- expired
- error
sync_error:
type: string
nullable: true
upcoming_booking_count:
type: integer
minimum: 0
provider_metadata:
type: object
nullable: true
properties:
preset:
type: string
server_url:
type: string
auth_method:
type: string
calendar_url:
type: string
required:
- preset
- server_url
- auth_method
required:
- id
- provider
- calendar_id
- account_email
- member_id
- member_name
- connected_at
- status
- last_sync_at
- sync_status
- sync_error
- upcoming_booking_count
has_more:
type: boolean
required:
- data
- has_more
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1Calendars
x-operation-id-source: derived
/v1/calendars/{id}:
delete:
tags:
- Calendars
summary: Disconnect a calendar
description: Revokes the OAuth token at the provider and deletes the calendar connection. Dashboard users may only disconnect their own calendar unless they are an owner or admin. API keys carry organization-wide authority and may disconnect any connection.
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Calendar disconnected
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
deleted:
type: boolean
required:
- id
- deleted
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'403':
description: Caller does not own this connection and is not an admin
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'404':
description: Not found
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: deleteV1CalendarsById
x-operation-id-source: derived
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key authentication. Use your API key as the bearer token.