Astrocal Organizations API
The Organizations API from Astrocal — 3 operation(s) for organizations.
The Organizations API from Astrocal — 3 operation(s) for organizations.
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-organizations-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 Organizations 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: Organizations
paths:
/v1/organizations:
post:
tags:
- Organizations
summary: Create organization
description: Creates a new organization linked to a Supabase Auth user. Service key authentication required. Called by the dashboard during signup.
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 255
slug:
type: string
minLength: 1
maxLength: 63
pattern: ^[a-z0-9-]+$
owner_user_id:
type: string
minLength: 1
owner_email:
type: string
format: email
onboarding_persona:
type: string
enum:
- developer
- individual
- team_lead
timezone:
type: string
maxLength: 64
required:
- name
- owner_user_id
responses:
'201':
description: Organization created
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
slug:
type: string
owner_user_id:
type: string
nullable: true
default_calendar_connection_id:
type: string
nullable: true
format: uuid
onboarding_completed_at:
type: string
nullable: true
created_at:
type: string
updated_at:
type: string
required:
- id
- name
- slug
- owner_user_id
- default_calendar_connection_id
- onboarding_completed_at
- created_at
- updated_at
'400':
description: Validation error
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 — invalid or missing service key
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
'409':
description: Conflict — slug or owner_user_id already exists
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: postV1Organizations
x-operation-id-source: derived
get:
tags:
- Organizations
summary: Get organization by owner
description: Retrieves an organization by its owner's Supabase Auth user ID. Service key authentication required. Used by the dashboard to resolve the current user's org.
parameters:
- schema:
type: string
minLength: 1
required: true
name: owner_user_id
in: query
responses:
'200':
description: Organization found
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
slug:
type: string
owner_user_id:
type: string
nullable: true
default_calendar_connection_id:
type: string
nullable: true
format: uuid
onboarding_completed_at:
type: string
nullable: true
created_at:
type: string
updated_at:
type: string
required:
- id
- name
- slug
- owner_user_id
- default_calendar_connection_id
- onboarding_completed_at
- created_at
- updated_at
'401':
description: Unauthorized — invalid or missing service key
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: No organization found for this user
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: getV1Organizations
x-operation-id-source: derived
/v1/organizations/{id}:
patch:
tags:
- Organizations
summary: Update organization
description: 'Updates an organization''s name, slug or default calendar. Send `complete_onboarding: true` to mark the first-login onboarding flow as done — the API sets the timestamp itself and repeat calls keep the first one. `mark_booking_link_shared`, `mark_availability_confirmed` and `dismiss_checklist` work the same way for the dashboard getting-started checklist, as does `mark_first_booking_celebrated` for the first-booking celebration. Service key authentication required. Called by the dashboard settings page.'
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 255
slug:
type: string
minLength: 1
maxLength: 63
pattern: ^[a-z0-9-]+$
default_calendar_connection_id:
type: string
nullable: true
format: uuid
complete_onboarding:
type: boolean
mark_booking_link_shared:
type: boolean
mark_availability_confirmed:
type: boolean
dismiss_checklist:
type: boolean
mark_first_booking_celebrated:
type: boolean
responses:
'200':
description: Organization updated
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
slug:
type: string
owner_user_id:
type: string
nullable: true
default_calendar_connection_id:
type: string
nullable: true
format: uuid
onboarding_completed_at:
type: string
nullable: true
created_at:
type: string
updated_at:
type: string
required:
- id
- name
- slug
- owner_user_id
- default_calendar_connection_id
- onboarding_completed_at
- created_at
- updated_at
'400':
description: Validation error
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 — invalid or missing service key
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: Organization 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
'409':
description: Conflict — slug already exists
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: patchV1OrganizationsById
x-operation-id-source: derived
/v1/me/organizations:
get:
tags:
- Organizations
summary: List user organizations
description: Returns all organizations the authenticated user belongs to, along with their role in each. Requires service key auth and X-User-Id header.
parameters:
- schema:
type: string
minLength: 1
required: true
name: x-user-id
in: header
responses:
'200':
description: List of organizations the user belongs to
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
slug:
type: string
role:
type: string
enum:
- owner
- admin
- member
- viewer
default_calendar_connection_id:
type: string
nullable: true
format: uuid
onboarding_completed_at:
type: string
nullable: true
created_at:
type: string
required:
- id
- name
- slug
- role
- default_calendar_connection_id
- onboarding_completed_at
- created_at
required:
- data
'400':
description: Missing X-User-Id header
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 — invalid or missing service key
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: getV1MeOrganizations
x-operation-id-source: derived
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key authentication. Use your API key as the bearer token.