Skip to content

Scheduling infrastructure for absolutely everyone.

chore: Add sorting to API v2 OpenAPI doc (#16786)

Keith Williamsf6ba77ccfe58
diff --git a/apps/api/v2/src/main.ts b/apps/api/v2/src/main.ts
index 1ec453ca099..0f68d9cd4ff 100644
--- a/apps/api/v2/src/main.ts
+++ b/apps/api/v2/src/main.ts
@@ -4,6 +4,12 @@ import { ConfigService } from "@nestjs/config";
import { NestFactory } from "@nestjs/core";
import type { NestExpressApplication } from "@nestjs/platform-express";
import { SwaggerModule, DocumentBuilder } from "@nestjs/swagger";
+import {
+ PathItemObject,
+ PathsObject,
+ OperationObject,
+ TagObject,
+} from "@nestjs/swagger/dist/interfaces/open-api-spec.interface";
import "dotenv/config";
import * as fs from "fs";
import { Server } from "http";
@@ -13,6 +19,8 @@ import { bootstrap } from "./app";
import { AppModule } from "./app.module";
import { loggerConfig } from "./lib/logger";
+const HttpMethods: (keyof PathItemObject)[] = ["get", "post", "put", "delete", "patch", "options", "head"];
+
const run = async () => {
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
logger: WinstonModule.createLogger(loggerConfig()),
@@ -35,12 +43,70 @@ const run = async () => {
}
};
+function customTagSort(a: string, b: string): number {
+ const platformPrefix = "Platform";
+ const orgsPrefix = "Orgs";
+
+ if (a.startsWith(platformPrefix) && !b.startsWith(platformPrefix)) {
+ return -1;
+ }
+ if (!a.startsWith(platformPrefix) && b.startsWith(platformPrefix)) {
+ return 1;
+ }
+
+ if (a.startsWith(orgsPrefix) && !b.startsWith(orgsPrefix)) {
+ return -1;
+ }
+ if (!a.startsWith(orgsPrefix) && b.startsWith(orgsPrefix)) {
+ return 1;
+ }
+
+ return a.localeCompare(b);
+}
+
+function isOperationObject(obj: any): obj is OperationObject {
+ return obj && typeof obj === "object" && "tags" in obj;
+}
+
+function groupAndSortPathsByFirstTag(paths: PathsObject): PathsObject {
+ const groupedPaths: { [key: string]: PathsObject } = {};
+
+ Object.keys(paths).forEach((pathKey) => {
+ const pathItem = paths[pathKey];
+
+ HttpMethods.forEach((method) => {
+ const operation = pathItem[method];
+
+ if (isOperationObject(operation) && operation.tags && operation.tags.length > 0) {
+ const firstTag = operation.tags[0];
+
+ if (!groupedPaths[firstTag]) {
+ groupedPaths[firstTag] = {};
+ }
+
+ groupedPaths[firstTag][pathKey] = pathItem;
+ }
+ });
+ });
+
+ const sortedTags = Object.keys(groupedPaths).sort(customTagSort);
+ const sortedPaths: PathsObject = {};
+
+ sortedTags.forEach((tag) => {
+ Object.assign(sortedPaths, groupedPaths[tag]);
+ });
+
+ return sortedPaths;
+}
+
async function generateSwagger(app: NestExpressApplication<Server>) {
const logger = new Logger("App");
logger.log(`Generating Swagger documentation...\n`);
const config = new DocumentBuilder().setTitle("Cal.com API v2").build();
const document = SwaggerModule.createDocument(app, config);
+ document.paths = groupAndSortPathsByFirstTag(document.paths);
+
const outputFile = "./swagger/documentation.json";
if (fs.existsSync(outputFile)) {
diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json
index 84980f63855..82f389dcdbe 100644
--- a/apps/api/v2/swagger/documentation.json
+++ b/apps/api/v2/swagger/documentation.json
@@ -1,9 +1,142 @@
{
"openapi": "3.0.0",
"paths": {
- "/health": {
+ "/v2/provider/{clientId}": {
"get": {
- "operationId": "AppController_getHealth",
+ "operationId": "CalProviderController_verifyClientId",
+ "summary": "Get a provider",
+ "parameters": [
+ {
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProviderVerifyClientOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Platform / Cal Provider"
+ ]
+ }
+ },
+ "/v2/provider/{clientId}/access-token": {
+ "get": {
+ "operationId": "CalProviderController_verifyAccessToken",
+ "summary": "Verify an access token",
+ "parameters": [
+ {
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Platform / Cal Provider"
+ ]
+ }
+ },
+ "/v2/gcal/oauth/auth-url": {
+ "get": {
+ "operationId": "GcalController_redirect",
+ "summary": "Get auth URL",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "required": true,
+ "in": "header",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GcalAuthUrlOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Platform / Google Calendar"
+ ]
+ }
+ },
+ "/v2/gcal/oauth/save": {
+ "get": {
+ "operationId": "GcalController_save",
+ "summary": "Connect a calendar",
+ "parameters": [
+ {
+ "name": "state",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "code",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GcalSaveRedirectOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Platform / Google Calendar"
+ ]
+ }
+ },
+ "/v2/gcal/check": {
+ "get": {
+ "operationId": "GcalController_check",
+ "summary": "Check a calendar connection status",
"parameters": [],
"responses": {
"200": {
@@ -11,14 +144,14 @@
"content": {
"application/json": {
"schema": {
- "type": "string"
+ "$ref": "#/components/schemas/GcalCheckOutput"
}
}
}
}
},
"tags": [
- "Health - development only"
+ "Platform / Google Calendar"
]
}
},
@@ -264,65 +397,98 @@
]
}
},
- "/v2/oauth-clients": {
+ "/v2/oauth-clients/{clientId}/webhooks": {
"post": {
- "operationId": "OAuthClientsController_createOAuthClient",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
- "parameters": [],
+ "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
+ "summary": "Create a webhook",
+ "parameters": [
+ {
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOAuthClientInput"
+ "$ref": "#/components/schemas/CreateWebhookInputDto"
}
}
}
},
"responses": {
"201": {
- "description": "Create an OAuth client",
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOAuthClientResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Platform / Webhooks"
]
},
"get": {
- "operationId": "OAuthClientsController_getOAuthClients",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
- "parameters": [],
+ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
+ "summary": "Get all webhooks",
+ "parameters": [
+ {
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOAuthClientsResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Platform / Webhooks"
]
- }
- },
- "/v2/oauth-clients/{clientId}": {
- "get": {
- "operationId": "OAuthClientsController_getOAuthClientById",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ },
+ "delete": {
+ "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
+ "summary": "Delete all webhooks",
"parameters": [
{
"name": "clientId",
@@ -339,23 +505,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
+ "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Platform / Webhooks"
]
- },
+ }
+ },
+ "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
"patch": {
- "operationId": "OAuthClientsController_updateOAuthClient",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
+ "summary": "Update a webhook",
"parameters": [
{
- "name": "clientId",
+ "name": "webhookId",
"required": true,
"in": "path",
"schema": {
@@ -368,7 +535,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOAuthClientInput"
+ "$ref": "#/components/schemas/UpdateWebhookInputDto"
}
}
}
@@ -379,63 +546,72 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Platform / Webhooks"
]
},
- "delete": {
- "operationId": "OAuthClientsController_deleteOAuthClient",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
- "parameters": [
- {
- "name": "clientId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
+ "get": {
+ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
+ "summary": "Get a webhook",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Platform / Webhooks"
+ ]
+ },
+ "delete": {
+ "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
+ "summary": "Delete a webhook",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Platform / Webhooks"
]
}
},
- "/v2/oauth-clients/{clientId}/managed-users": {
+ "/v2/organizations/{orgId}/attributes": {
"get": {
- "operationId": "OAuthClientsController_getOAuthClientManagedUsersById",
- "summary": "",
- "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "operationId": "OrganizationsAttributesController_getOrganizationAttributes",
+ "summary": "Get all attributes",
"parameters": [
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "limit",
+ "name": "take",
"required": false,
"in": "query",
"description": "The number of items to return",
@@ -443,6 +619,16 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
+ }
}
],
"responses": {
@@ -451,29 +637,26 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUsersOutput"
+ "$ref": "#/components/schemas/GetOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Orgs / Attributes"
]
- }
- },
- "/v2/oauth/{clientId}/authorize": {
+ },
"post": {
- "operationId": "OAuthFlowController_authorize",
- "summary": "Authorize an OAuth client",
- "description": "Redirects the user to the specified 'redirect_uri' with an authorization code in query parameter if the client is authorized successfully. The code is then exchanged for access and refresh tokens via the `/exchange` endpoint.",
+ "operationId": "OrganizationsAttributesController_createOrganizationAttribute",
+ "summary": "Create an attribute",
"parameters": [
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -482,40 +665,80 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthAuthorizeInput"
+ "$ref": "#/components/schemas/CreateOrganizationAttributeInput"
}
}
}
},
"responses": {
- "200": {
- "description": "The user is redirected to the 'redirect_uri' with an authorization code in query parameter e.g. `redirectUri?code=secretcode.`"
- },
- "400": {
- "description": "Bad request if the OAuth client is not found, if the redirect URI is invalid, or if the user has already authorized the client."
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrganizationAttributesOutput"
+ }
+ }
+ }
}
},
"tags": [
- "OAuth - development only"
+ "Orgs / Attributes"
]
}
},
- "/v2/oauth/{clientId}/exchange": {
- "post": {
- "operationId": "OAuthFlowController_exchange",
- "summary": "Exchange authorization code for access tokens",
- "description": "Exchanges the authorization code received from the `/authorize` endpoint for access and refresh tokens. The authorization code should be provided in the 'Authorization' header prefixed with 'Bearer '.",
+ "/v2/organizations/{orgId}/attributes/{attributeId}": {
+ "get": {
+ "operationId": "OrganizationsAttributesController_getOrganizationAttribute",
+ "summary": "Get an attribute",
"parameters": [
{
- "name": "Authorization",
+ "name": "orgId",
"required": true,
- "in": "header",
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "attributeId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "string"
}
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetSingleAttributeOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Attributes"
+ ]
+ },
+ "patch": {
+ "operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
+ "summary": "Update an attribute",
+ "parameters": [
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
},
{
- "name": "clientId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
@@ -528,98 +751,82 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ExchangeAuthorizationCodeInput"
+ "$ref": "#/components/schemas/UpdateOrganizationAttributeInput"
}
}
}
},
"responses": {
"200": {
- "description": "Successfully exchanged authorization code for access and refresh tokens.",
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/KeysResponseDto"
+ "$ref": "#/components/schemas/UpdateOrganizationAttributesOutput"
}
}
}
- },
- "400": {
- "description": "Bad request if the authorization code is missing, invalid, or if the client ID and secret do not match."
}
},
"tags": [
- "OAuth - development only"
+ "Orgs / Attributes"
]
- }
- },
- "/v2/oauth/{clientId}/refresh": {
- "post": {
- "operationId": "OAuthFlowController_refreshAccessToken",
+ },
+ "delete": {
+ "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
+ "summary": "Delete an attribute",
"parameters": [
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "x-cal-secret-key",
+ "name": "attributeId",
"required": true,
- "in": "header",
+ "in": "path",
"schema": {
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/RefreshTokenInput"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/KeysResponseDto"
+ "$ref": "#/components/schemas/DeleteOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "OAuth - development only"
+ "Orgs / Attributes"
]
}
},
- "/v2/event-types": {
+ "/v2/organizations/{orgId}/attributes/{attributeId}/options": {
"post": {
- "operationId": "EventTypesController_2024_06_14_createEventType",
- "summary": "Create an event type",
+ "operationId": "OrganizationsOptionsAttributesController_createOrganizationAttributeOption",
+ "summary": "Create an attribute option",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-14`",
+ "name": "orgId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "attributeId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -630,7 +837,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateEventTypeInput_2024_06_14"
+ "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput"
}
}
}
@@ -641,52 +848,32 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateEventTypeOutput_2024_06_14"
+ "$ref": "#/components/schemas/CreateAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Event Types"
+ "Orgs / Attributes / Options"
]
},
"get": {
- "operationId": "EventTypesController_2024_06_14_getEventTypes",
- "summary": "Get all event types",
+ "operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptions",
+ "summary": "Get all attribute options",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-14`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "username",
- "required": true,
- "in": "query",
- "description": "The username of the user to get event types for. If only username provided will get all event types.",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "eventSlug",
+ "name": "orgId",
"required": true,
- "in": "query",
- "description": "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "usernames",
+ "name": "attributeId",
"required": true,
- "in": "query",
- "description": "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`",
+ "in": "path",
"schema": {
"type": "string"
}
@@ -698,33 +885,32 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetEventTypesOutput_2024_06_14"
+ "$ref": "#/components/schemas/GetAllAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Event Types"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/event-types/{eventTypeId}": {
- "get": {
- "operationId": "EventTypesController_2024_06_14_getEventTypeById",
- "summary": "Get an event type",
+ "/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
+ "delete": {
+ "operationId": "OrganizationsOptionsAttributesController_deleteOrganizationAttributeOption",
+ "summary": "Delete an attribute option",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-14`",
+ "name": "orgId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "eventTypeId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
@@ -732,10 +918,9 @@
}
},
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "optionId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -747,42 +932,40 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetEventTypeOutput_2024_06_14"
+ "$ref": "#/components/schemas/DeleteAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Event Types"
+ "Orgs / Attributes / Options"
]
},
"patch": {
- "operationId": "EventTypesController_2024_06_14_updateEventType",
- "summary": "Update an event type",
+ "operationId": "OrganizationsOptionsAttributesController_updateOrganizationAttributeOption",
+ "summary": "Update an attribute option",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-14`",
+ "name": "orgId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "eventTypeId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "optionId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -793,7 +976,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateEventTypeInput_2024_06_14"
+ "$ref": "#/components/schemas/UpdateOrganizationAttributeOptionInput"
}
}
}
@@ -804,31 +987,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateEventTypeOutput_2024_06_14"
+ "$ref": "#/components/schemas/UpdateAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Event Types"
+ "Orgs / Attributes / Options"
]
- },
- "delete": {
- "operationId": "EventTypesController_2024_06_14_deleteEventType",
- "summary": "Delete an event type",
+ }
+ },
+ "/v2/organizations/{orgId}/attributes/options/{userId}": {
+ "post": {
+ "operationId": "OrganizationsOptionsAttributesController_assignOrganizationAttributeOptionToUser",
+ "summary": "Assign an attribute to a user",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-14`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "eventTypeId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -836,43 +1012,20 @@
}
},
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "userId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteEventTypeOutput_2024_06_14"
- }
- }
- }
- }
- },
- "tags": [
- "Event Types"
- ]
- }
- },
- "/v2/selected-calendars": {
- "post": {
- "operationId": "SelectedCalendarsController_addSelectedCalendar",
- "summary": "Add a selected calendar",
- "parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SelectedCalendarsInputDto"
+ "$ref": "#/components/schemas/AssignOrganizationAttributeOptionToUserInput"
}
}
}
@@ -883,42 +1036,34 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto"
+ "$ref": "#/components/schemas/AssignOptionUserOutput"
}
}
}
}
},
"tags": [
- "Selected Calendars"
+ "Orgs / Attributes / Options"
]
},
- "delete": {
- "operationId": "SelectedCalendarsController_removeSelectedCalendar",
- "summary": "Delete a selected calendar",
+ "get": {
+ "operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptionsForUser",
+ "summary": "Get all attribute options for a user",
"parameters": [
{
- "name": "integration",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "externalId",
+ "name": "orgId",
"required": true,
- "in": "query",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "credentialId",
+ "name": "userId",
"required": true,
- "in": "query",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -928,21 +1073,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto"
+ "$ref": "#/components/schemas/GetOptionUserOutput"
}
}
}
}
},
"tags": [
- "Selected Calendars"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/organizations/{orgId}/teams": {
- "get": {
- "operationId": "OrganizationsTeamsController_getAllTeams",
- "summary": "Get all teams",
+ "/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
+ "delete": {
+ "operationId": "OrganizationsOptionsAttributesController_unassignOrganizationAttributeOptionFromUser",
+ "summary": "Unassign an attribute from a user",
"parameters": [
{
"name": "orgId",
@@ -953,23 +1098,19 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
},
{
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "attributeOptionId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -979,23 +1120,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamsOutputResponseDto"
+ "$ref": "#/components/schemas/UnassignOptionUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams",
- "Teams"
+ "Orgs / Attributes / Options"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
"post": {
- "operationId": "OrganizationsTeamsController_createTeam",
- "summary": "Create a team",
+ "operationId": "OrganizationsEventTypesController_createTeamEventType",
+ "summary": "Create an event type",
"parameters": [
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1003,11 +1145,11 @@
}
},
{
- "name": "x-cal-client-id",
+ "name": "orgId",
"required": true,
- "in": "header",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -1016,7 +1158,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgTeamDto"
+ "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
}
}
}
@@ -1027,24 +1169,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Event Types"
]
- }
- },
- "/v2/organizations/{orgId}/teams/me": {
+ },
"get": {
- "operationId": "OrganizationsTeamsController_getMyTeams",
- "summary": "Get team membership for user",
+ "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
+ "summary": "Get a team event type",
"parameters": [
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1052,23 +1192,12 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
+ "name": "eventSlug",
+ "required": true,
"in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "description": "Slug of team event type to return.",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -1078,44 +1207,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto"
+ "$ref": "#/components/schemas/GetTeamEventTypesOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Event Types"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}": {
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
"get": {
- "operationId": "OrganizationsTeamsController_getTeam",
- "summary": "Get a team",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Teams"
- ]
- },
- "delete": {
- "operationId": "OrganizationsTeamsController_deleteTeam",
- "summary": "Delete a team",
+ "operationId": "OrganizationsEventTypesController_getTeamEventType",
+ "summary": "Get an event type",
"parameters": [
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1123,7 +1232,7 @@
}
},
{
- "name": "teamId",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
@@ -1137,22 +1246,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/GetTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Event Types"
]
},
"patch": {
- "operationId": "OrganizationsTeamsController_updateTeam",
- "summary": "Update a team",
+ "operationId": "OrganizationsEventTypesController_updateTeamEventType",
+ "summary": "Update a team event type",
"parameters": [
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1160,7 +1269,7 @@
}
},
{
- "name": "teamId",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
@@ -1173,7 +1282,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgTeamDto"
+ "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14"
}
}
}
@@ -1184,24 +1293,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/UpdateTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Event Types"
]
- }
- },
- "/v2/organizations/{orgId}/schedules": {
- "get": {
- "operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
- "summary": "Get all schedules",
+ },
+ "delete": {
+ "operationId": "OrganizationsEventTypesController_deleteTeamEventType",
+ "summary": "Delete a team event type",
"parameters": [
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1209,21 +1316,9 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -1235,24 +1330,32 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules"
+ "Orgs / Event Types"
]
}
},
- "/v2/organizations/{orgId}/users/{userId}/schedules": {
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
"post": {
- "operationId": "OrganizationsSchedulesController_createUserSchedule",
- "summary": "Create a schedule",
+ "operationId": "OrganizationsEventTypesController_createPhoneCall",
+ "summary": "Create a phone call",
"parameters": [
{
- "name": "userId",
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1265,7 +1368,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11"
+ "$ref": "#/components/schemas/CreatePhoneCallInput"
}
}
}
@@ -1276,28 +1379,49 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/CreatePhoneCallOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Event Types"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/teams/event-types": {
"get": {
- "operationId": "OrganizationsSchedulesController_getUserSchedules",
- "summary": "Get all schedules",
+ "operationId": "OrganizationsEventTypesController_getTeamsEventTypes",
+ "summary": "Get all team event types",
"parameters": [
{
- "name": "userId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
+ }
}
],
"responses": {
@@ -1306,25 +1430,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "$ref": "#/components/schemas/GetTeamEventTypesOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Event Types"
]
}
},
- "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
+ "/v2/organizations/{orgId}/memberships": {
"get": {
- "operationId": "OrganizationsSchedulesController_getUserSchedule",
- "summary": "Get a schedule",
+ "operationId": "OrganizationsMembershipsController_getAllMemberships",
+ "summary": "Get all memberships",
"parameters": [
{
- "name": "userId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1332,9 +1455,21 @@
}
},
{
- "name": "scheduleId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
@@ -1346,31 +1481,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/GetAllOrgMemberships"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Memberships"
]
},
- "patch": {
- "operationId": "OrganizationsSchedulesController_updateUserSchedule",
- "summary": "Update a schedule",
+ "post": {
+ "operationId": "OrganizationsMembershipsController_createMembership",
+ "summary": "Create a membership",
"parameters": [
{
- "name": "userId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "scheduleId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1383,34 +1509,35 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
+ "$ref": "#/components/schemas/CreateOrgMembershipDto"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/CreateOrgMembershipOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Memberships"
]
- },
- "delete": {
- "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
- "summary": "Delete a schedule",
+ }
+ },
+ "/v2/organizations/{orgId}/memberships/{membershipId}": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getOrgMembership",
+ "summary": "Get a membership",
"parameters": [
{
- "name": "userId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1418,7 +1545,7 @@
}
},
{
- "name": "scheduleId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1432,22 +1559,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/GetOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Memberships"
]
- }
- },
- "/v2/organizations/{orgId}/users": {
- "get": {
- "operationId": "OrganizationsUsersController_getOrganizationsUsers",
- "summary": "Get all users",
+ },
+ "delete": {
+ "operationId": "OrganizationsMembershipsController_deleteMembership",
+ "summary": "Delete a membership",
"parameters": [
{
"name": "orgId",
@@ -1458,36 +1582,12 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
- },
- {
- "name": "emails",
- "required": false,
- "in": "query",
- "description": "The email address or an array of email addresses to filter by",
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
}
],
"responses": {
@@ -1496,19 +1596,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUsersOutput"
+ "$ref": "#/components/schemas/DeleteOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Users"
+ "Orgs / Memberships"
]
},
- "post": {
- "operationId": "OrganizationsUsersController_createOrganizationUser",
- "summary": "Create a user",
+ "patch": {
+ "operationId": "OrganizationsMembershipsController_updateMembership",
+ "summary": "Update a membership",
"parameters": [
{
"name": "orgId",
@@ -1517,6 +1617,14 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
}
],
"requestBody": {
@@ -1524,32 +1632,32 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrganizationUserInput"
+ "$ref": "#/components/schemas/UpdateOrgMembershipDto"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ "$ref": "#/components/schemas/UpdateOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Users"
+ "Orgs / Memberships"
]
}
},
- "/v2/organizations/{orgId}/users/{userId}": {
- "patch": {
- "operationId": "OrganizationsUsersController_updateOrganizationUser",
- "summary": "Update a user",
+ "/v2/organizations/{orgId}/schedules": {
+ "get": {
+ "operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
+ "summary": "Get all schedules",
"parameters": [
{
"name": "orgId",
@@ -1560,52 +1668,88 @@
}
},
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
"type": "number"
}
- }
- ],
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Schedules"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}/schedules": {
+ "post": {
+ "operationId": "OrganizationsSchedulesController_createUserSchedule",
+ "summary": "Create a schedule",
+ "parameters": [
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationUserInput"
+ "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Users"
+ "Orgs / Schedules",
+ "Orgs / Users / Schedules"
]
},
- "delete": {
- "operationId": "OrganizationsUsersController_deleteOrganizationUser",
- "summary": "Delete a user",
+ "get": {
+ "operationId": "OrganizationsSchedulesController_getUserSchedules",
+ "summary": "Get all schedules",
"parameters": [
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
{
"name": "userId",
"required": true,
@@ -1621,24 +1765,25 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Users"
+ "Orgs / Schedules",
+ "Orgs / Users / Schedules"
]
}
},
- "/v2/organizations/{orgId}/memberships": {
+ "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
"get": {
- "operationId": "OrganizationsMembershipsController_getAllMemberships",
- "summary": "Get all memberships",
+ "operationId": "OrganizationsSchedulesController_getUserSchedule",
+ "summary": "Get a schedule",
"parameters": [
{
- "name": "orgId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -1646,21 +1791,9 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "scheduleId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -1672,22 +1805,31 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllOrgMemberships"
+ "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Schedules",
+ "Orgs / Users / Schedules"
]
},
- "post": {
- "operationId": "OrganizationsMembershipsController_createMembership",
- "summary": "Create a membership",
+ "patch": {
+ "operationId": "OrganizationsSchedulesController_updateUserSchedule",
+ "summary": "Update a schedule",
"parameters": [
{
- "name": "orgId",
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -1700,35 +1842,34 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipDto"
+ "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipOutput"
+ "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Schedules",
+ "Orgs / Users / Schedules"
]
- }
- },
- "/v2/organizations/{orgId}/memberships/{membershipId}": {
- "get": {
- "operationId": "OrganizationsMembershipsController_getOrgMembership",
- "summary": "Get a membership",
+ },
+ "delete": {
+ "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
+ "summary": "Delete a schedule",
"parameters": [
{
- "name": "orgId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -1736,7 +1877,7 @@
}
},
{
- "name": "membershipId",
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -1750,19 +1891,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgMembership"
+ "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Schedules",
+ "Orgs / Users / Schedules"
]
- },
- "delete": {
- "operationId": "OrganizationsMembershipsController_deleteMembership",
- "summary": "Delete a membership",
+ }
+ },
+ "/v2/organizations/{orgId}/teams": {
+ "get": {
+ "operationId": "OrganizationsTeamsController_getAllTeams",
+ "summary": "Get all teams",
"parameters": [
{
"name": "orgId",
@@ -1773,9 +1917,21 @@
}
},
{
- "name": "membershipId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
@@ -1787,19 +1943,20 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrgMembership"
+ "$ref": "#/components/schemas/OrgTeamsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Teams",
+ "Teams"
]
},
- "patch": {
- "operationId": "OrganizationsMembershipsController_updateMembership",
- "summary": "Update a membership",
+ "post": {
+ "operationId": "OrganizationsTeamsController_createTeam",
+ "summary": "Create a team",
"parameters": [
{
"name": "orgId",
@@ -1810,11 +1967,11 @@
}
},
{
- "name": "membershipId",
+ "name": "x-cal-client-id",
"required": true,
- "in": "path",
+ "in": "header",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -1823,35 +1980,35 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgMembershipDto"
+ "$ref": "#/components/schemas/CreateOrgTeamDto"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgMembership"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Teams"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
- "post": {
- "operationId": "OrganizationsEventTypesController_createTeamEventType",
- "summary": "Create an event type",
+ "/v2/organizations/{orgId}/teams/me": {
+ "get": {
+ "operationId": "OrganizationsTeamsController_getMyTeams",
+ "summary": "Get team membership for user",
"parameters": [
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1859,84 +2016,76 @@
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto"
+ }
}
}
}
},
+ "tags": [
+ "Orgs / Teams"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}": {
+ "get": {
+ "operationId": "OrganizationsTeamsController_getTeam",
+ "summary": "Get a team",
+ "parameters": [],
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Teams"
]
},
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
- "summary": "Get a team event type",
+ "delete": {
+ "operationId": "OrganizationsTeamsController_deleteTeam",
+ "summary": "Delete a team",
"parameters": [
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
- {
- "name": "eventSlug",
- "required": true,
- "in": "query",
- "description": "Slug of team event type to return.",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Event Types"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventType",
- "summary": "Get an event type",
- "parameters": [
{
"name": "teamId",
"required": true,
@@ -1944,14 +2093,6 @@
"schema": {
"type": "number"
}
- },
- {
- "name": "eventTypeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
}
],
"responses": {
@@ -1960,67 +2101,28 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypeOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Teams"
]
},
"patch": {
- "operationId": "OrganizationsEventTypesController_updateTeamEventType",
- "summary": "Update a team event type",
+ "operationId": "OrganizationsTeamsController_updateTeam",
+ "summary": "Update a team",
"parameters": [
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
- {
- "name": "eventTypeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateTeamEventTypeOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Event Types"
- ]
- },
- "delete": {
- "operationId": "OrganizationsEventTypesController_deleteTeamEventType",
- "summary": "Delete a team event type",
- "parameters": [
{
"name": "teamId",
"required": true,
@@ -2028,53 +2130,6 @@
"schema": {
"type": "number"
}
- },
- {
- "name": "eventTypeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Event Types"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
- "post": {
- "operationId": "OrganizationsEventTypesController_createPhoneCall",
- "summary": "Create a phone call",
- "parameters": [
- {
- "name": "eventTypeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
}
],
"requestBody": {
@@ -2082,76 +2137,25 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreatePhoneCallInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreatePhoneCallOutput"
- }
+ "$ref": "#/components/schemas/UpdateOrgTeamDto"
}
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/event-types": {
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamsEventTypes",
- "summary": "Get all team event types",
- "parameters": [
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
- "schema": {
- "type": "number"
- }
- }
- ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Teams"
]
}
},
@@ -2408,10 +2412,10 @@
]
}
},
- "/v2/organizations/{orgId}/attributes": {
+ "/v2/organizations/{orgId}/users": {
"get": {
- "operationId": "OrganizationsAttributesController_getOrganizationAttributes",
- "summary": "Get all attributes",
+ "operationId": "OrganizationsUsersController_getOrganizationsUsers",
+ "summary": "Get all users",
"parameters": [
{
"name": "orgId",
@@ -2440,6 +2444,18 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "emails",
+ "required": false,
+ "in": "query",
+ "description": "The email address or an array of email addresses to filter by",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
}
],
"responses": {
@@ -2448,19 +2464,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/GetOrganizationUsersOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Users"
]
},
"post": {
- "operationId": "OrganizationsAttributesController_createOrganizationAttribute",
- "summary": "Create an attribute",
+ "operationId": "OrganizationsUsersController_createOrganizationUser",
+ "summary": "Create a user",
"parameters": [
{
"name": "orgId",
@@ -2476,7 +2492,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributeInput"
+ "$ref": "#/components/schemas/CreateOrganizationUserInput"
}
}
}
@@ -2487,21 +2503,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Users"
]
}
},
- "/v2/organizations/{orgId}/attributes/{attributeId}": {
- "get": {
- "operationId": "OrganizationsAttributesController_getOrganizationAttribute",
- "summary": "Get an attribute",
+ "/v2/organizations/{orgId}/users/{userId}": {
+ "patch": {
+ "operationId": "OrganizationsUsersController_updateOrganizationUser",
+ "summary": "Update a user",
"parameters": [
{
"name": "orgId",
@@ -2512,33 +2528,43 @@
}
},
{
- "name": "attributeId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrganizationUserInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSingleAttributeOutput"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Users"
]
},
- "patch": {
- "operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
- "summary": "Update an attribute",
+ "delete": {
+ "operationId": "OrganizationsUsersController_deleteOrganizationUser",
+ "summary": "Delete a user",
"parameters": [
{
"name": "orgId",
@@ -2549,43 +2575,35 @@
}
},
{
- "name": "attributeId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributeInput"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Users"
]
- },
- "delete": {
- "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
- "summary": "Delete an attribute",
+ }
+ },
+ "/v2/organizations/{orgId}/webhooks": {
+ "get": {
+ "operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks",
+ "summary": "Get all webhooks",
"parameters": [
{
"name": "orgId",
@@ -2596,11 +2614,23 @@
}
},
{
- "name": "attributeId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
- "type": "string"
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
}
}
],
@@ -2610,21 +2640,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/TeamWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Webhooks"
]
- }
- },
- "/v2/organizations/{orgId}/attributes/{attributeId}/options": {
+ },
"post": {
- "operationId": "OrganizationsOptionsAttributesController_createOrganizationAttributeOption",
- "summary": "Create an attribute option",
+ "operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
+ "summary": "Create a webhook",
"parameters": [
{
"name": "orgId",
@@ -2633,14 +2661,6 @@
"schema": {
"type": "number"
}
- },
- {
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
}
],
"requestBody": {
@@ -2648,7 +2668,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput"
+ "$ref": "#/components/schemas/CreateWebhookInputDto"
}
}
}
@@ -2659,30 +2679,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateAttributeOptionOutput"
+ "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Webhooks"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/webhooks/{webhookId}": {
"get": {
- "operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptions",
- "summary": "Get all attribute options",
+ "operationId": "OrganizationsWebhooksController_getOrganizationWebhook",
+ "summary": "Get a webhook",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "attributeId",
+ "name": "webhookId",
"required": true,
"in": "path",
"schema": {
@@ -2696,40 +2710,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllAttributeOptionOutput"
+ "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Webhooks"
]
- }
- },
- "/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
+ },
"delete": {
- "operationId": "OrganizationsOptionsAttributesController_deleteOrganizationAttributeOption",
- "summary": "Delete an attribute option",
+ "operationId": "OrganizationsWebhooksController_deleteWebhook",
+ "summary": "Delete a webhook",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "optionId",
+ "name": "webhookId",
"required": true,
"in": "path",
"schema": {
@@ -2743,38 +2739,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteAttributeOptionOutput"
+ "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Webhooks"
]
},
"patch": {
- "operationId": "OrganizationsOptionsAttributesController_updateOrganizationAttributeOption",
- "summary": "Update an attribute option",
+ "operationId": "OrganizationsWebhooksController_updateOrgWebhook",
+ "summary": "Update a webhook",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "optionId",
+ "name": "webhookId",
"required": true,
"in": "path",
"schema": {
@@ -2787,7 +2767,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributeOptionInput"
+ "$ref": "#/components/schemas/UpdateWebhookInputDto"
}
}
}
@@ -2798,45 +2778,50 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateAttributeOptionOutput"
+ "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Webhooks"
]
}
},
- "/v2/organizations/{orgId}/attributes/options/{userId}": {
+ "/v2/bookings": {
"post": {
- "operationId": "OrganizationsOptionsAttributesController_assignOrganizationAttributeOptionToUser",
- "summary": "Assign an attribute to a user",
+ "operationId": "BookingsController_2024_08_13_createBooking",
+ "summary": "Create a booking",
+ "description": "\n POST /v2/bookings is used to create regular bookings, recurring bookings and instant bookings. The request bodies for all 3 are almost the same except:\n If eventTypeId in the request body is id of a regular event, then regular booking is created.\n\n If it is an id of a recurring event type, then recurring booking is created.\n\n Meaning that the request bodies are equal but the outcome depends on what kind of event type it is with the goal of making it as seamless for developers as possible.\n\n For team event types it is possible to create instant meeting. To do that just pass `\"instant\": true` to the request body.\n\n The start needs to be in UTC aka if the timezone is GMT+2 in Rome and meeting should start at 11, then UTC time should have hours 09:00 aka without time zone.\n ",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "userId",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
"required": true,
- "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
"requestBody": {
"required": true,
+ "description": "Accepts different types of booking input: CreateBookingInput_2024_08_13, CreateInstantBookingInput_2024_08_13, or CreateRecurringBookingInput_2024_08_13",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AssignOrganizationAttributeOptionToUserInput"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/CreateBookingInput_2024_08_13"
+ },
+ {
+ "$ref": "#/components/schemas/CreateInstantBookingInput_2024_08_13"
+ },
+ {
+ "$ref": "#/components/schemas/CreateRecurringBookingInput_2024_08_13"
+ }
+ ]
}
}
}
@@ -2847,79 +2832,196 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AssignOptionUserOutput"
+ "$ref": "#/components/schemas/CreateBookingOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Bookings"
]
},
"get": {
- "operationId": "OrganizationsOptionsAttributesController_getOrganizationAttributeOptionsForUser",
- "summary": "Get all attribute options for a user",
+ "operationId": "BookingsController_2024_08_13_getBookings",
+ "summary": "Get all bookings",
"parameters": [
{
- "name": "orgId",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
"required": true,
- "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "status",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by status. If you want to filter by multiple statuses, separate them with a comma.",
+ "example": "?status=upcoming,past",
"schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOptionUserOutput"
- }
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "upcoming",
+ "recurring",
+ "past",
+ "cancelled",
+ "unconfirmed"
+ ]
}
}
- }
- },
- "tags": [
- "Orgs / Attributes / Options"
- ]
- }
- },
- "/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
- "delete": {
- "operationId": "OrganizationsOptionsAttributesController_unassignOrganizationAttributeOptionFromUser",
- "summary": "Unassign an attribute from a user",
- "parameters": [
+ },
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "attendeeEmail",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by the attendee's email address.",
+ "example": "[email protected]",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "attendeeName",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by the attendee's name.",
+ "example": "John Doe",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventTypeIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by event type ids belonging to the user. Event type ids must be separated by a comma.",
+ "example": "?eventTypeIds=100,200",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by event type id belonging to the user.",
+ "example": "?eventTypeId=100",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamsIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by team ids that user is part of. Team ids must be separated by a comma.",
+ "example": "?teamIds=50,60",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by team id that user is part of",
+ "example": "?teamId=50",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "afterStart",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings with start after this date string.",
+ "example": "?afterStart=2025-03-07T10:00:00.000Z",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "beforeEnd",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings with end before this date string.",
+ "example": "?beforeEnd=2025-03-07T11:00:00.000Z",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "sortStart",
+ "required": false,
+ "in": "query",
+ "description": "Sort results by their start time in ascending or descending order.",
+ "example": "?sortStart=asc OR ?sortStart=desc",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "sortEnd",
+ "required": false,
+ "in": "query",
+ "description": "Sort results by their end time in ascending or descending order.",
+ "example": "?sortEnd=asc OR ?sortEnd=desc",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "sortCreated",
+ "required": false,
+ "in": "query",
+ "description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
+ "example": "?sortEnd=asc OR ?sortEnd=desc",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
"type": "number"
}
},
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
},
{
- "name": "attributeOptionId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
@@ -2931,48 +3033,38 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnassignOptionUserOutput"
+ "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Bookings"
]
}
},
- "/v2/organizations/{orgId}/webhooks": {
+ "/v2/bookings/{bookingUid}": {
"get": {
- "operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks",
- "summary": "Get all webhooks",
+ "operationId": "BookingsController_2024_08_13_getBooking",
+ "summary": "Get a booking",
+ "description": "`:bookingUid` can be\n\n 1. uid of a normal booking\n\n 2. uid of one of the recurring booking recurrences\n\n 3. uid of recurring booking which will return an array of all recurring booking recurrences (stored as recurringBookingUid on one of the individual recurrences).",
"parameters": [
{
- "name": "orgId",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
"required": true,
- "in": "path",
"schema": {
- "type": "number"
- }
- },
- {
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -2982,26 +3074,38 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/TeamWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Webhooks"
+ "Bookings"
]
- },
+ }
+ },
+ "/v2/bookings/{bookingUid}/reschedule": {
"post": {
- "operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
- "summary": "Create a webhook",
+ "operationId": "BookingsController_2024_08_13_rescheduleBooking",
+ "summary": "Reschedule a booking",
+ "description": "Reschedule a booking by passing `:bookingUid` of the booking that should be rescheduled and pass request body with a new start time to create a new booking.",
"parameters": [
{
- "name": "orgId",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "bookingUid",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -3010,7 +3114,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateWebhookInputDto"
+ "$ref": "#/components/schemas/RescheduleBookingInput_2024_08_13"
}
}
}
@@ -3021,24 +3125,33 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/RescheduleBookingOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Webhooks"
+ "Bookings"
]
}
},
- "/v2/organizations/{orgId}/webhooks/{webhookId}": {
- "get": {
- "operationId": "OrganizationsWebhooksController_getOrganizationWebhook",
- "summary": "Get a webhook",
+ "/v2/bookings/{bookingUid}/cancel": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_cancelBooking",
+ "summary": "Cancel a booking",
"parameters": [
{
- "name": "webhookId",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "bookingUid",
"required": true,
"in": "path",
"schema": {
@@ -3046,62 +3159,63 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CancelBookingInput_2024_08_13"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/CancelBookingOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Webhooks"
+ "Bookings"
]
- },
- "delete": {
- "operationId": "OrganizationsWebhooksController_deleteWebhook",
- "summary": "Delete a webhook",
- "parameters": [
- {
- "name": "webhookId",
- "required": true,
- "in": "path",
+ }
+ },
+ "/v2/bookings/{bookingUid}/mark-absent": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_markNoShow",
+ "summary": "Mark a booking absence",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-08-13`",
+ "required": true,
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Webhooks"
- ]
- },
- "patch": {
- "operationId": "OrganizationsWebhooksController_updateOrgWebhook",
- "summary": "Update a webhook",
- "parameters": [
+ },
{
- "name": "webhookId",
+ "name": "bookingUid",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -3109,7 +3223,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateWebhookInputDto"
+ "$ref": "#/components/schemas/MarkAbsentBookingInput_2024_08_13"
}
}
}
@@ -3120,48 +3234,27 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/TeamWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/MarkAbsentBookingOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Webhooks"
+ "Bookings"
]
}
},
- "/v2/schedules": {
+ "/v2/calendars/ics-feed/save": {
"post": {
- "operationId": "SchedulesController_2024_06_11_createSchedule",
- "summary": "Create a schedule",
- "description": "\n The point of creating schedules is for event types to be available at specific times.\n\n First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.\n 1. If you passed `timeZone` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via `AvailabilitySettings` atom.\n 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying\n `\"isDefault\": true` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom.\n\n Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule.\n After creating a non default schedule you can update event type to point to that schedule via the PATCH `event-types/{eventTypeId}` endpoint.\n\n When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc.\n ",
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-11`",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
+ "operationId": "CalendarsController_createIcsFeed",
+ "parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11"
+ "$ref": "#/components/schemas/CreateIcsFeedInputDto"
}
}
}
@@ -3172,169 +3265,121 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto"
}
}
}
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
- },
+ }
+ },
+ "/v2/calendars/ics-feed/check": {
"get": {
- "operationId": "SchedulesController_2024_06_11_getSchedules",
- "summary": "Get all schedules (of the authenticated user)",
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-11`",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
+ "operationId": "CalendarsController_checkIcsFeed",
+ "parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
}
},
- "/v2/schedules/default": {
+ "/v2/calendars/busy-times": {
"get": {
- "operationId": "SchedulesController_2024_06_11_getDefaultSchedule",
- "summary": "Get default schedule (of the authenticated user)",
+ "operationId": "CalendarsController_getBusyTimes",
+ "summary": "Get busy times",
"parameters": [
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "loggedInUsersTz",
"required": true,
+ "in": "query",
+ "description": "The timezone of the logged in user represented as a string",
+ "example": "America/New_York",
"schema": {
"type": "string"
}
},
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-11`",
+ "name": "calendarsToLoad",
"required": true,
+ "in": "query",
+ "description": "An array of Calendar objects representing the calendars to be loaded",
+ "example": "[{ credentialId: \"1\", externalId: \"AQgtJE7RnHEeyisVq2ENs2gAAAgEGAAAACgtJE7RnHEeyisVq2ENs2gAAAhSDAAAA\" }, { credentialId: \"2\", externalId: \"AQM7RnHEeyisVq2ENs2gAAAhFDBBBBB\" }]",
"schema": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
}
],
"responses": {
"200": {
- "description": "Returns the default schedule of the authenticated user",
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/GetBusyTimesOutput"
}
}
}
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
}
},
- "/v2/schedules/{scheduleId}": {
+ "/v2/calendars": {
"get": {
- "operationId": "SchedulesController_2024_06_11_getSchedule",
- "summary": "Get a schedule",
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-11`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "scheduleId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
+ "operationId": "CalendarsController_getCalendars",
+ "summary": "Get all calendars",
+ "parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/ConnectedCalendarsOutput"
}
}
}
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
- },
- "patch": {
- "operationId": "SchedulesController_2024_06_11_updateSchedule",
- "summary": "Update a schedule",
+ }
+ },
+ "/v2/calendars/{calendar}/connect": {
+ "get": {
+ "operationId": "CalendarsController_redirect",
+ "summary": "Get connect URL",
"parameters": [
{
"name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
"required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "cal-api-version",
"in": "header",
- "description": "Must be set to `2024-06-11`",
- "required": true,
"schema": {
"type": "string"
}
},
{
- "name": "scheduleId",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
@@ -3342,128 +3387,96 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
- },
- "delete": {
- "operationId": "SchedulesController_2024_06_11_deleteSchedule",
- "summary": "Delete a schedule",
+ }
+ },
+ "/v2/calendars/{calendar}/save": {
+ "get": {
+ "operationId": "CalendarsController_save",
+ "summary": "Save a calendar",
"parameters": [
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "state",
"required": true,
+ "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-06-11`",
+ "name": "code",
"required": true,
+ "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "scheduleId",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
- }
- }
- }
+ "description": ""
}
},
"tags": [
- "Schedules"
+ "Calendars"
]
}
},
- "/v2/gcal/oauth/auth-url": {
- "get": {
- "operationId": "GcalController_redirect",
- "summary": "Get auth URL",
+ "/v2/calendars/{calendar}/credentials": {
+ "post": {
+ "operationId": "CalendarsController_syncCredentials",
+ "summary": "Sync credentials",
"parameters": [
{
- "name": "Authorization",
+ "name": "calendar",
"required": true,
- "in": "header",
+ "in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GcalAuthUrlOutput"
- }
- }
- }
+ "201": {
+ "description": ""
}
},
"tags": [
- "Platform / Google Calendar"
+ "Calendars"
]
}
},
- "/v2/gcal/oauth/save": {
+ "/v2/calendars/{calendar}/check": {
"get": {
- "operationId": "GcalController_save",
- "summary": "Connect a calendar",
+ "operationId": "CalendarsController_check",
+ "summary": "Check a calendar connection",
"parameters": [
{
- "name": "state",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "code",
+ "name": "calendar",
"required": true,
- "in": "query",
+ "in": "path",
"schema": {
"type": "string"
}
@@ -3475,46 +3488,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GcalSaveRedirectOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Platform / Google Calendar"
- ]
- }
- },
- "/v2/gcal/check": {
- "get": {
- "operationId": "GcalController_check",
- "summary": "Check a calendar connection status",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GcalCheckOutput"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Platform / Google Calendar"
+ "Calendars"
]
}
},
- "/v2/provider/{clientId}": {
- "get": {
- "operationId": "CalProviderController_verifyClientId",
- "summary": "Get a provider",
+ "/v2/calendars/{calendar}/disconnect": {
+ "post": {
+ "operationId": "CalendarsController_deleteCalendarCredentials",
+ "summary": "Disconnect a calendar",
"parameters": [
{
- "name": "clientId",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
@@ -3522,85 +3513,44 @@
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProviderVerifyClientOutput"
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto"
}
}
}
},
- "tags": [
- "Platform / Cal Provider"
- ]
- }
- },
- "/v2/provider/{clientId}/access-token": {
- "get": {
- "operationId": "CalProviderController_verifyAccessToken",
- "summary": "Verify an access token",
- "parameters": [
- {
- "name": "clientId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput"
+ "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Platform / Cal Provider"
+ "Calendars"
]
}
},
- "/v2/me": {
- "get": {
- "operationId": "MeController_getMe",
- "summary": "Get my profile",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetMeOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Me"
- ]
- },
- "patch": {
- "operationId": "MeController_updateMe",
- "summary": "Update my profile",
+ "/v2/destination-calendars": {
+ "put": {
+ "operationId": "DestinationCalendarsController_updateDestinationCalendars",
+ "summary": "Update destination calendars",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateManagedUserInput"
+ "$ref": "#/components/schemas/DestinationCalendarsInputBodyDto"
}
}
}
@@ -3611,27 +3561,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateMeOutput"
+ "$ref": "#/components/schemas/DestinationCalendarsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Me"
+ "Destination Calendars"
]
}
},
- "/v2/calendars/ics-feed/save": {
+ "/v2/event-types": {
"post": {
- "operationId": "CalendarsController_createIcsFeed",
- "parameters": [],
+ "operationId": "EventTypesController_2024_06_14_createEventType",
+ "summary": "Create an event type",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-14`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateIcsFeedInputDto"
+ "$ref": "#/components/schemas/CreateEventTypeInput_2024_06_14"
}
}
}
@@ -3642,64 +3612,54 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Calendars"
- ]
- }
- },
- "/v2/calendars/ics-feed/check": {
- "get": {
- "operationId": "CalendarsController_checkIcsFeed",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
+ "$ref": "#/components/schemas/CreateEventTypeOutput_2024_06_14"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types"
]
- }
- },
- "/v2/calendars/busy-times": {
+ },
"get": {
- "operationId": "CalendarsController_getBusyTimes",
- "summary": "Get busy times",
+ "operationId": "EventTypesController_2024_06_14_getEventTypes",
+ "summary": "Get all event types",
"parameters": [
{
- "name": "loggedInUsersTz",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-14`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "username",
"required": true,
"in": "query",
- "description": "The timezone of the logged in user represented as a string",
- "example": "America/New_York",
+ "description": "The username of the user to get event types for. If only username provided will get all event types.",
"schema": {
"type": "string"
}
},
{
- "name": "calendarsToLoad",
+ "name": "eventSlug",
"required": true,
"in": "query",
- "description": "An array of Calendar objects representing the calendars to be loaded",
- "example": "[{ credentialId: \"1\", externalId: \"AQgtJE7RnHEeyisVq2ENs2gAAAgEGAAAACgtJE7RnHEeyisVq2ENs2gAAAhSDAAAA\" }, { credentialId: \"2\", externalId: \"AQM7RnHEeyisVq2ENs2gAAAhFDBBBBB\" }]",
+ "description": "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.",
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
+ }
+ },
+ {
+ "name": "usernames",
+ "required": true,
+ "in": "query",
+ "description": "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`",
+ "schema": {
+ "type": "string"
}
}
],
@@ -3709,103 +3669,148 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBusyTimesOutput"
+ "$ref": "#/components/schemas/GetEventTypesOutput_2024_06_14"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types"
]
}
},
- "/v2/calendars": {
+ "/v2/event-types/{eventTypeId}": {
"get": {
- "operationId": "CalendarsController_getCalendars",
- "summary": "Get all calendars",
- "parameters": [],
- "responses": {
+ "operationId": "EventTypesController_2024_06_14_getEventTypeById",
+ "summary": "Get an event type",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-14`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ConnectedCalendarsOutput"
+ "$ref": "#/components/schemas/GetEventTypeOutput_2024_06_14"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types"
]
- }
- },
- "/v2/calendars/{calendar}/connect": {
- "get": {
- "operationId": "CalendarsController_redirect",
- "summary": "Get connect URL",
+ },
+ "patch": {
+ "operationId": "EventTypesController_2024_06_14_updateEventType",
+ "summary": "Update an event type",
"parameters": [
{
- "name": "Authorization",
- "required": true,
+ "name": "cal-api-version",
"in": "header",
+ "description": "Must be set to `2024-06-14`",
+ "required": true,
"schema": {
"type": "string"
}
},
{
- "name": "calendar",
+ "name": "eventTypeId",
"required": true,
"in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateEventTypeInput_2024_06_14"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/UpdateEventTypeOutput_2024_06_14"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types"
]
- }
- },
- "/v2/calendars/{calendar}/save": {
- "get": {
- "operationId": "CalendarsController_save",
- "summary": "Save a calendar",
+ },
+ "delete": {
+ "operationId": "EventTypesController_2024_06_14_deleteEventType",
+ "summary": "Delete an event type",
"parameters": [
{
- "name": "state",
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-14`",
"required": true,
- "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "code",
+ "name": "eventTypeId",
"required": true,
- "in": "query",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "calendar",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
@@ -3813,49 +3818,91 @@
],
"responses": {
"200": {
- "description": ""
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteEventTypeOutput_2024_06_14"
+ }
+ }
+ }
}
},
"tags": [
- "Calendars"
+ "Event Types"
]
}
},
- "/v2/calendars/{calendar}/credentials": {
+ "/v2/event-types/{eventTypeId}/webhooks": {
"post": {
- "operationId": "CalendarsController_syncCredentials",
- "summary": "Sync credentials",
+ "operationId": "EventTypeWebhooksController_createEventTypeWebhook",
+ "summary": "Create a webhook",
"parameters": [
{
- "name": "calendar",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateWebhookInputDto"
+ }
+ }
+ }
+ },
"responses": {
"201": {
- "description": ""
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ }
+ }
+ }
}
},
"tags": [
- "Calendars"
+ "Event Types / Webhooks"
]
- }
- },
- "/v2/calendars/{calendar}/check": {
+ },
"get": {
- "operationId": "CalendarsController_check",
- "summary": "Check a calendar connection",
+ "operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
+ "summary": "Get all webhooks",
"parameters": [
{
- "name": "calendar",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
+ }
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
}
}
],
@@ -3865,69 +3912,55 @@
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/EventTypeWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types / Webhooks"
]
- }
- },
- "/v2/calendars/{calendar}/disconnect": {
- "post": {
- "operationId": "CalendarsController_deleteCalendarCredentials",
- "summary": "Disconnect a calendar",
+ },
+ "delete": {
+ "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
+ "summary": "Delete all webhooks",
"parameters": [
{
- "name": "calendar",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto"
+ "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Event Types / Webhooks"
]
}
},
- "/v2/bookings": {
- "post": {
- "operationId": "BookingsController_2024_08_13_createBooking",
- "summary": "Create a booking",
- "description": "\n POST /v2/bookings is used to create regular bookings, recurring bookings and instant bookings. The request bodies for all 3 are almost the same except:\n If eventTypeId in the request body is id of a regular event, then regular booking is created.\n\n If it is an id of a recurring event type, then recurring booking is created.\n\n Meaning that the request bodies are equal but the outcome depends on what kind of event type it is with the goal of making it as seamless for developers as possible.\n\n For team event types it is possible to create instant meeting. To do that just pass `\"instant\": true` to the request body.\n\n The start needs to be in UTC aka if the timezone is GMT+2 in Rome and meeting should start at 11, then UTC time should have hours 09:00 aka without time zone.\n ",
+ "/v2/event-types/{eventTypeId}/webhooks/{webhookId}": {
+ "patch": {
+ "operationId": "EventTypeWebhooksController_updateEventTypeWebhook",
+ "summary": "Update a webhook",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
+ "name": "webhookId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -3935,260 +3968,276 @@
],
"requestBody": {
"required": true,
- "description": "Accepts different types of booking input: CreateBookingInput_2024_08_13, CreateInstantBookingInput_2024_08_13, or CreateRecurringBookingInput_2024_08_13",
"content": {
"application/json": {
"schema": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/CreateBookingInput_2024_08_13"
- },
- {
- "$ref": "#/components/schemas/CreateInstantBookingInput_2024_08_13"
- },
- {
- "$ref": "#/components/schemas/CreateRecurringBookingInput_2024_08_13"
- }
- ]
+ "$ref": "#/components/schemas/UpdateWebhookInputDto"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Event Types / Webhooks"
]
},
"get": {
- "operationId": "BookingsController_2024_08_13_getBookings",
- "summary": "Get all bookings",
- "parameters": [
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "status",
- "required": false,
- "in": "query",
- "description": "Filter bookings by status. If you want to filter by multiple statuses, separate them with a comma.",
- "example": "?status=upcoming,past",
- "schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "operationId": "EventTypeWebhooksController_getEventTypeWebhook",
+ "summary": "Get a webhook",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ }
}
}
- },
- {
- "name": "attendeeEmail",
- "required": false,
- "in": "query",
- "description": "Filter bookings by the attendee's email address.",
- "example": "[email protected]",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "attendeeName",
- "required": false,
- "in": "query",
- "description": "Filter bookings by the attendee's name.",
- "example": "John Doe",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "eventTypeIds",
- "required": false,
- "in": "query",
- "description": "Filter bookings by event type ids belonging to the user. Event type ids must be separated by a comma.",
- "example": "?eventTypeIds=100,200",
- "schema": {
- "type": "string"
+ }
+ },
+ "tags": [
+ "Event Types / Webhooks"
+ ]
+ },
+ "delete": {
+ "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
+ "summary": "Delete a webhook",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ }
+ }
}
- },
- {
- "name": "eventTypeId",
- "required": false,
- "in": "query",
- "description": "Filter bookings by event type id belonging to the user.",
- "example": "?eventTypeId=100",
- "schema": {
- "type": "string"
+ }
+ },
+ "tags": [
+ "Event Types / Webhooks"
+ ]
+ }
+ },
+ "/health": {
+ "get": {
+ "operationId": "AppController_getHealth",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string"
+ }
+ }
}
- },
- {
- "name": "teamsIds",
- "required": false,
- "in": "query",
- "description": "Filter bookings by team ids that user is part of. Team ids must be separated by a comma.",
- "example": "?teamIds=50,60",
- "schema": {
- "type": "string"
+ }
+ },
+ "tags": [
+ "Health - development only"
+ ]
+ }
+ },
+ "/v2/me": {
+ "get": {
+ "operationId": "MeController_getMe",
+ "summary": "Get my profile",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetMeOutput"
+ }
+ }
}
- },
- {
- "name": "teamId",
- "required": false,
- "in": "query",
- "description": "Filter bookings by team id that user is part of",
- "example": "?teamId=50",
- "schema": {
- "type": "string"
+ }
+ },
+ "tags": [
+ "Me"
+ ]
+ },
+ "patch": {
+ "operationId": "MeController_updateMe",
+ "summary": "Update my profile",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateManagedUserInput"
+ }
}
- },
- {
- "name": "afterStart",
- "required": false,
- "in": "query",
- "description": "Filter bookings with start after this date string.",
- "example": "?afterStart=2025-03-07T10:00:00.000Z",
- "schema": {
- "type": "string"
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateMeOutput"
+ }
+ }
}
- },
- {
- "name": "beforeEnd",
- "required": false,
- "in": "query",
- "description": "Filter bookings with end before this date string.",
- "example": "?beforeEnd=2025-03-07T11:00:00.000Z",
- "schema": {
- "type": "string"
+ }
+ },
+ "tags": [
+ "Me"
+ ]
+ }
+ },
+ "/v2/oauth-clients": {
+ "post": {
+ "operationId": "OAuthClientsController_createOAuthClient",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOAuthClientInput"
+ }
}
- },
- {
- "name": "sortStart",
- "required": false,
- "in": "query",
- "description": "Sort results by their start time in ascending or descending order.",
- "example": "?sortStart=asc OR ?sortStart=desc",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Create an OAuth client",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOAuthClientResponseDto"
+ }
+ }
}
- },
- {
- "name": "sortEnd",
- "required": false,
- "in": "query",
- "description": "Sort results by their end time in ascending or descending order.",
- "example": "?sortEnd=asc OR ?sortEnd=desc",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ }
+ },
+ "tags": [
+ "OAuth - development only"
+ ]
+ },
+ "get": {
+ "operationId": "OAuthClientsController_getOAuthClients",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOAuthClientsResponseDto"
+ }
+ }
}
- },
+ }
+ },
+ "tags": [
+ "OAuth - development only"
+ ]
+ }
+ },
+ "/v2/oauth-clients/{clientId}": {
+ "get": {
+ "operationId": "OAuthClientsController_getOAuthClientById",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "parameters": [
{
- "name": "sortCreated",
- "required": false,
- "in": "query",
- "description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
- "example": "?sortEnd=asc OR ?sortEnd=desc",
+ "name": "clientId",
+ "required": true,
+ "in": "path",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
"type": "string"
}
- },
- {
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
- "schema": {
- "type": "number"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
+ }
+ }
}
- },
+ }
+ },
+ "tags": [
+ "OAuth - development only"
+ ]
+ },
+ "patch": {
+ "operationId": "OAuthClientsController_updateOAuthClient",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
+ "parameters": [
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOAuthClientInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "OAuth - development only"
]
- }
- },
- "/v2/bookings/{bookingUid}": {
- "get": {
- "operationId": "BookingsController_2024_08_13_getBooking",
- "summary": "Get a booking",
- "description": "`:bookingUid` can be\n\n 1. uid of a normal booking\n\n 2. uid of one of the recurring booking recurrences\n\n 3. uid of recurring booking which will return an array of all recurring booking recurrences (stored as recurringBookingUid on one of the individual recurrences).",
+ },
+ "delete": {
+ "operationId": "OAuthClientsController_deleteOAuthClient",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "bookingUid",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
@@ -4202,84 +4251,67 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "OAuth - development only"
]
}
},
- "/v2/bookings/{bookingUid}/reschedule": {
- "post": {
- "operationId": "BookingsController_2024_08_13_rescheduleBooking",
- "summary": "Reschedule a booking",
- "description": "Reschedule a booking by passing `:bookingUid` of the booking that should be rescheduled and pass request body with a new start time to create a new booking.",
+ "/v2/oauth-clients/{clientId}/managed-users": {
+ "get": {
+ "operationId": "OAuthClientsController_getOAuthClientManagedUsersById",
+ "summary": "",
+ "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
},
{
- "name": "bookingUid",
- "required": true,
- "in": "path",
+ "name": "limit",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/RescheduleBookingInput_2024_08_13"
- }
- }
- }
- },
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RescheduleBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetManagedUsersOutput"
}
}
}
}
},
"tags": [
- "Bookings"
+ "OAuth - development only"
]
}
},
- "/v2/bookings/{bookingUid}/cancel": {
+ "/v2/oauth/{clientId}/authorize": {
"post": {
- "operationId": "BookingsController_2024_08_13_cancelBooking",
- "summary": "Cancel a booking",
+ "operationId": "OAuthFlowController_authorize",
+ "summary": "Authorize an OAuth client",
+ "description": "Redirects the user to the specified 'redirect_uri' with an authorization code in query parameter if the client is authorized successfully. The code is then exchanged for access and refresh tokens via the `/exchange` endpoint.",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "bookingUid",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
@@ -4292,58 +4324,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CancelBookingInput_2024_08_13"
+ "$ref": "#/components/schemas/OAuthAuthorizeInput"
}
}
}
},
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CancelBookingOutput_2024_08_13"
- }
- }
- }
+ "description": "The user is redirected to the 'redirect_uri' with an authorization code in query parameter e.g. `redirectUri?code=secretcode.`"
+ },
+ "400": {
+ "description": "Bad request if the OAuth client is not found, if the redirect URI is invalid, or if the user has already authorized the client."
}
},
"tags": [
- "Bookings"
+ "OAuth - development only"
]
}
},
- "/v2/bookings/{bookingUid}/mark-absent": {
+ "/v2/oauth/{clientId}/exchange": {
"post": {
- "operationId": "BookingsController_2024_08_13_markNoShow",
- "summary": "Mark a booking absence",
+ "operationId": "OAuthFlowController_exchange",
+ "summary": "Exchange authorization code for access tokens",
+ "description": "Exchanges the authorization code received from the `/authorize` endpoint for access and refresh tokens. The authorization code should be provided in the 'Authorization' header prefixed with 'Bearer '.",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to `2024-08-13`",
+ "name": "Authorization",
"required": true,
+ "in": "header",
"schema": {
"type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
- },
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- "required": true,
- "schema": {
- "type": "string"
- }
}
],
"requestBody": {
@@ -4351,137 +4370,110 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/MarkAbsentBookingInput_2024_08_13"
+ "$ref": "#/components/schemas/ExchangeAuthorizationCodeInput"
}
}
}
},
"responses": {
"200": {
- "description": "",
+ "description": "Successfully exchanged authorization code for access and refresh tokens.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/MarkAbsentBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/KeysResponseDto"
}
}
}
+ },
+ "400": {
+ "description": "Bad request if the authorization code is missing, invalid, or if the client ID and secret do not match."
}
},
"tags": [
- "Bookings"
+ "OAuth - development only"
]
}
},
- "/v2/slots/reserve": {
+ "/v2/oauth/{clientId}/refresh": {
"post": {
- "operationId": "SlotsController_reserveSlot",
- "summary": "Reserve a slot",
- "parameters": [],
+ "operationId": "OAuthFlowController_refreshAccessToken",
+ "parameters": [
+ {
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "required": true,
+ "in": "header",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ReserveSlotInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
- }
- }
- }
- },
- "tags": [
- "Slots"
- ]
- }
- },
- "/v2/slots/selected-slot": {
- "delete": {
- "operationId": "SlotsController_deleteSelectedSlot",
- "summary": "Delete a selected slot",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
+ "$ref": "#/components/schemas/RefreshTokenInput"
}
}
}
},
- "tags": [
- "Slots"
- ]
- }
- },
- "/v2/slots/available": {
- "get": {
- "operationId": "SlotsController_getAvailableSlots",
- "summary": "Get available slots",
- "parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/KeysResponseDto"
}
}
}
}
},
"tags": [
- "Slots"
+ "OAuth - development only"
]
}
},
- "/v2/timezones": {
- "get": {
- "operationId": "TimezonesController_getTimeZones",
- "summary": "Get all timezones",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
- }
+ "/v2/schedules": {
+ "post": {
+ "operationId": "SchedulesController_2024_06_11_createSchedule",
+ "summary": "Create a schedule",
+ "description": "\n The point of creating schedules is for event types to be available at specific times.\n\n First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.\n 1. If you passed `timeZone` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via `AvailabilitySettings` atom.\n 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying\n `\"isDefault\": true` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom.\n\n Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule.\n After creating a non default schedule you can update event type to point to that schedule via the PATCH `event-types/{eventTypeId}` endpoint.\n\n When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc.\n ",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
- },
- "tags": [
- "Timezones"
- ]
- }
- },
- "/v2/webhooks": {
- "post": {
- "operationId": "WebhooksController_createWebhook",
- "summary": "Create a webhook",
- "parameters": [],
+ ],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateWebhookInputDto"
+ "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11"
}
}
}
@@ -4492,38 +4484,36 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Webhooks"
+ "Schedules"
]
},
"get": {
- "operationId": "WebhooksController_getWebhooks",
- "summary": "Get all webooks (paginated)",
+ "operationId": "SchedulesController_2024_06_11_getSchedules",
+ "summary": "Get all schedules (of the authenticated user)",
"parameters": [
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
+ "required": true,
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -4533,88 +4523,88 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UserWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Webhooks"
+ "Schedules"
]
}
},
- "/v2/webhooks/{webhookId}": {
- "patch": {
- "operationId": "WebhooksController_updateWebhook",
- "summary": "Update a webhook",
+ "/v2/schedules/default": {
+ "get": {
+ "operationId": "SchedulesController_2024_06_11_getDefaultSchedule",
+ "summary": "Get default schedule (of the authenticated user)",
"parameters": [
{
- "name": "webhookId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateWebhookInputDto"
- }
+ },
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
+ "required": true,
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
"200": {
- "description": "",
+ "description": "Returns the default schedule of the authenticated user",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Webhooks"
+ "Schedules"
]
- },
+ }
+ },
+ "/v2/schedules/{scheduleId}": {
"get": {
- "operationId": "WebhooksController_getWebhook",
- "summary": "Get a webhook",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Webhooks"
- ]
- },
- "delete": {
- "operationId": "WebhooksController_deleteWebhook",
- "summary": "Delete a webhook",
+ "operationId": "SchedulesController_2024_06_11_getSchedule",
+ "summary": "Get a schedule",
"parameters": [
{
- "name": "webhookId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "scheduleId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
}
],
"responses": {
@@ -4623,28 +4613,44 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Webhooks"
+ "Schedules"
]
- }
- },
- "/v2/event-types/{eventTypeId}/webhooks": {
- "post": {
- "operationId": "EventTypeWebhooksController_createEventTypeWebhook",
- "summary": "Create a webhook",
+ },
+ "patch": {
+ "operationId": "SchedulesController_2024_06_11_updateSchedule",
+ "summary": "Update a schedule",
"parameters": [
{
- "name": "eventTypeId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -4653,55 +4659,53 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateWebhookInputDto"
+ "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Schedules"
]
},
- "get": {
- "operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
- "summary": "Get all webhooks",
+ "delete": {
+ "operationId": "SchedulesController_2024_06_11_deleteSchedule",
+ "summary": "Delete a schedule",
"parameters": [
{
- "name": "eventTypeId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to `2024-06-11`",
+ "required": true,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "scheduleId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -4713,26 +4717,74 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EventTypeWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Schedules"
+ ]
+ }
+ },
+ "/v2/selected-calendars": {
+ "post": {
+ "operationId": "SelectedCalendarsController_addSelectedCalendar",
+ "summary": "Add a selected calendar",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SelectedCalendarsInputDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Selected Calendars"
]
},
"delete": {
- "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
- "summary": "Delete all webhooks",
+ "operationId": "SelectedCalendarsController_removeSelectedCalendar",
+ "summary": "Delete a selected calendar",
"parameters": [
{
- "name": "eventTypeId",
+ "name": "integration",
"required": true,
- "in": "path",
+ "in": "query",
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "externalId",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "credentialId",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
}
}
],
@@ -4742,60 +4794,75 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Selected Calendars"
]
}
},
- "/v2/event-types/{eventTypeId}/webhooks/{webhookId}": {
- "patch": {
- "operationId": "EventTypeWebhooksController_updateEventTypeWebhook",
- "summary": "Update a webhook",
- "parameters": [
- {
- "name": "webhookId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
+ "/v2/slots/reserve": {
+ "post": {
+ "operationId": "SlotsController_reserveSlot",
+ "summary": "Reserve a slot",
+ "parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateWebhookInputDto"
+ "$ref": "#/components/schemas/ReserveSlotInput"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
}
}
}
},
+ "tags": [
+ "Slots"
+ ]
+ }
+ },
+ "/v2/slots/selected-slot": {
+ "delete": {
+ "operationId": "SlotsController_deleteSelectedSlot",
+ "summary": "Delete a selected slot",
+ "parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Slots"
]
- },
+ }
+ },
+ "/v2/slots/available": {
"get": {
- "operationId": "EventTypeWebhooksController_getEventTypeWebhook",
- "summary": "Get a webhook",
+ "operationId": "SlotsController_getAvailableSlots",
+ "summary": "Get available slots",
"parameters": [],
"responses": {
"200": {
@@ -4803,19 +4870,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Slots"
]
- },
- "delete": {
- "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
- "summary": "Delete a webhook",
+ }
+ },
+ "/v2/timezones": {
+ "get": {
+ "operationId": "TimezonesController_getTimeZones",
+ "summary": "Get all timezones",
"parameters": [],
"responses": {
"200": {
@@ -4823,31 +4892,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Event Types / Webhooks"
+ "Timezones"
]
}
},
- "/v2/oauth-clients/{clientId}/webhooks": {
+ "/v2/webhooks": {
"post": {
- "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
+ "operationId": "WebhooksController_createWebhook",
"summary": "Create a webhook",
- "parameters": [
- {
- "name": "clientId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
+ "parameters": [],
"requestBody": {
"required": true,
"content": {
@@ -4864,28 +4924,20 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Webhooks"
]
},
"get": {
- "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
- "summary": "Get all webhooks",
+ "operationId": "WebhooksController_getWebhooks",
+ "summary": "Get all webooks (paginated)",
"parameters": [
- {
- "name": "clientId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
{
"name": "take",
"required": false,
@@ -4913,49 +4965,20 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Platform / Webhooks"
- ]
- },
- "delete": {
- "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
- "summary": "Delete all webhooks",
- "parameters": [
- {
- "name": "clientId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/UserWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Webhooks"
]
}
},
- "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
+ "/v2/webhooks/{webhookId}": {
"patch": {
- "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
+ "operationId": "WebhooksController_updateWebhook",
"summary": "Update a webhook",
"parameters": [
{
@@ -4983,18 +5006,18 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Webhooks"
]
},
"get": {
- "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
+ "operationId": "WebhooksController_getWebhook",
"summary": "Get a webhook",
"parameters": [],
"responses": {
@@ -5003,66 +5026,43 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Webhooks"
]
},
"delete": {
- "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
+ "operationId": "WebhooksController_deleteWebhook",
"summary": "Delete a webhook",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Platform / Webhooks"
- ]
- }
- },
- "/v2/destination-calendars": {
- "put": {
- "operationId": "DestinationCalendarsController_updateDestinationCalendars",
- "summary": "Update destination calendars",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DestinationCalendarsInputBodyDto"
- }
+ "parameters": [
+ {
+ "name": "webhookId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DestinationCalendarsOutputResponseDto"
+ "$ref": "#/components/schemas/UserWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Destination Calendars"
+ "Webhooks"
]
}
}
@@ -5073,104 +5073,7 @@
"version": "1.0.0",
"contact": {}
},
- "tags": [
- {
- "name": "Bookings",
- "description": ""
- },
- {
- "name": "Calendars",
- "description": ""
- },
- {
- "name": "Destination Calendars",
- "description": ""
- },
- {
- "name": "Event Types",
- "description": ""
- },
- {
- "name": "Event Types / Webhooks",
- "description": ""
- },
- {
- "name": "Me",
- "description": ""
- },
- {
- "name": "Orgs / Attributes",
- "description": ""
- },
- {
- "name": "Orgs / Attributes / Options",
- "description": ""
- },
- {
- "name": "Orgs / Event Types",
- "description": ""
- },
- {
- "name": "Orgs / Memberships",
- "description": ""
- },
- {
- "name": "Orgs / Teams",
- "description": ""
- },
- {
- "name": "Orgs / Teams / Memberships",
- "description": ""
- },
- {
- "name": "Orgs / Schedules",
- "description": ""
- },
- {
- "name": "Orgs / Users",
- "description": ""
- },
- {
- "name": "Orgs / Webhooks",
- "description": ""
- },
- {
- "name": "Platform / Cal Provider",
- "description": ""
- },
- {
- "name": "Platform / Google Calendar",
- "description": ""
- },
- {
- "name": "Platform / Managed Users",
- "description": ""
- },
- {
- "name": "Platform / Webhooks",
- "description": ""
- },
- {
- "name": "Selected Calendars",
- "description": ""
- },
- {
- "name": "Schedules",
- "description": ""
- },
- {
- "name": "Slots",
- "description": ""
- },
- {
- "name": "Timezones",
- "description": ""
- },
- {
- "name": "Webhooks",
- "description": ""
- }
- ],
+ "tags": [],
"servers": [],
"components": {
"schemas": {
@@ -5315,12 +5218,12 @@
},
"timeFormat": {
"type": "number",
- "example": 12,
"enum": [
12,
24
],
- "description": "Must be 12 or 24"
+ "example": 12,
+ "description": "Must be a number 12 or 24"
},
"weekStart": {
"type": "string",