Skip to content

Scheduling infrastructure for absolutely everyone.

docs: v2 authorization headers (#20453)

Lauris Skraucis69548e6ed0b4
diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts
index c13230148e4..c25034f760f 100644
--- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts
+++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts
@@ -7,6 +7,7 @@ import { ReassignBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outpu
import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output";
import { BookingsService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/bookings.service";
import { VERSION_2024_08_13_VALUE, VERSION_2024_08_13 } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -155,12 +156,7 @@ export class BookingsController_2024_08_13 {
@Get("/")
@UseGuards(ApiAuthGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
- })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Permissions([BOOKING_READ])
@ApiOperation({ summary: "Get all bookings" })
async getBookings(
@@ -245,13 +241,10 @@ export class BookingsController_2024_08_13 {
@HttpCode(HttpStatus.OK)
@Permissions([BOOKING_WRITE])
@UseGuards(ApiAuthGuard, BookingUidGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+ @ApiOperation({
+ summary: "Mark a booking absence - provided authorization header refers to owner of the booking.",
})
- @ApiOperation({ summary: "Mark a booking absence" })
async markNoShow(
@Param("bookingUid") bookingUid: string,
@Body() body: MarkAbsentBookingInput_2024_08_13,
@@ -269,13 +262,11 @@ export class BookingsController_2024_08_13 {
@HttpCode(HttpStatus.OK)
@Permissions([BOOKING_WRITE])
@UseGuards(ApiAuthGuard, BookingUidGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+ @ApiOperation({
+ summary:
+ "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.",
})
- @ApiOperation({ summary: "Automatically reassign booking to a new host" })
async reassignBooking(
@Param("bookingUid") bookingUid: string,
@GetUser() user: UserWithProfile
@@ -292,13 +283,11 @@ export class BookingsController_2024_08_13 {
@HttpCode(HttpStatus.OK)
@Permissions([BOOKING_WRITE])
@UseGuards(ApiAuthGuard, BookingUidGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+ @ApiOperation({
+ summary:
+ "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.",
})
- @ApiOperation({ summary: "Reassign a booking to a specific user" })
async reassignBookingToUser(
@Param("bookingUid") bookingUid: string,
@Param("userId") userId: number,
@@ -322,13 +311,11 @@ export class BookingsController_2024_08_13 {
@HttpCode(HttpStatus.OK)
@Permissions([BOOKING_WRITE])
@UseGuards(ApiAuthGuard, BookingUidGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+ @ApiOperation({
+ summary:
+ "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.",
})
- @ApiOperation({ summary: "Confirm booking that requires a confirmation" })
async confirmBooking(
@Param("bookingUid") bookingUid: string,
@GetUser() user: UserWithProfile
@@ -345,13 +332,11 @@ export class BookingsController_2024_08_13 {
@HttpCode(HttpStatus.OK)
@Permissions([BOOKING_WRITE])
@UseGuards(ApiAuthGuard, BookingUidGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+ @ApiOperation({
+ summary:
+ "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.",
})
- @ApiOperation({ summary: "Decline booking that requires a confirmation" })
async declineBooking(
@Param("bookingUid") bookingUid: string,
@Body() body: DeclineBookingInput_2024_08_13,
@@ -368,6 +353,7 @@ export class BookingsController_2024_08_13 {
@Get("/:bookingUid/calendar-links")
@UseGuards(ApiAuthGuard, BookingUidGuard)
@Permissions([BOOKING_READ])
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({
summary: "Get 'Add to Calendar' links for a booking",
description:
diff --git a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts
index 40e5e529ba2..99bb84b92dd 100644
--- a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts
+++ b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts
@@ -14,6 +14,7 @@ import { GoogleCalendarService } from "@/ee/calendars/services/gcal.service";
import { IcsFeedService } from "@/ee/calendars/services/ics-feed.service";
import { OutlookService } from "@/ee/calendars/services/outlook.service";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -34,7 +35,7 @@ import {
Post,
Body,
} from "@nestjs/common";
-import { ApiOperation, ApiParam, ApiQuery, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiParam, ApiQuery, ApiTags as DocsTags } from "@nestjs/swagger";
import { User } from "@prisma/client";
import { plainToClass } from "class-transformer";
import { Request } from "express";
@@ -68,6 +69,7 @@ export class CalendarsController {
@Post("/ics-feed/save")
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Save an ICS feed" })
async createIcsFeed(
@GetUser("id") userId: number,
@@ -79,12 +81,14 @@ export class CalendarsController {
@Get("/ics-feed/check")
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Check an ICS feed" })
async checkIcsFeed(@GetUser("id") userId: number): Promise<ApiResponse> {
return await this.icsFeedService.check(userId);
}
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Get("/busy-times")
@ApiOperation({
summary: "Get busy times",
@@ -113,6 +117,7 @@ export class CalendarsController {
@Get("/")
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Get all calendars" })
async getCalendars(@GetUser("id") userId: number): Promise<ConnectedCalendarsOutput> {
const calendars = await this.calendarsService.getCalendars(userId);
@@ -129,6 +134,7 @@ export class CalendarsController {
name: "calendar",
})
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Get("/:calendar/connect")
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: "Get oAuth connect URL" })
@@ -199,6 +205,7 @@ export class CalendarsController {
name: "calendar",
})
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Post("/:calendar/credentials")
@ApiOperation({ summary: "Sync credentials" })
async syncCredentials(
@@ -227,6 +234,7 @@ export class CalendarsController {
@Get("/:calendar/check")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard, PermissionsGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Permissions([APPS_READ])
@ApiOperation({ summary: "Check a calendar connection" })
async check(@GetUser("id") userId: number, @Param("calendar") calendar: string): Promise<ApiResponse> {
@@ -251,6 +259,7 @@ export class CalendarsController {
name: "calendar",
})
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@Post("/:calendar/disconnect")
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: "Disconnect a calendar" })
diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts
index 77c4ad37c30..ed15c46f744 100644
--- a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts
+++ b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts
@@ -7,6 +7,7 @@ import { EventTypeResponseTransformPipe } from "@/ee/event-types/event-types_202
import { EventTypesService_2024_06_14 } from "@/ee/event-types/event-types_2024_06_14/services/event-types.service";
import { InputEventTypesService_2024_06_14 } from "@/ee/event-types/event-types_2024_06_14/services/input-event-types.service";
import { VERSION_2024_06_14_VALUE } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -67,12 +68,7 @@ export class EventTypesController_2024_06_14 {
@Post("/")
@Permissions([EVENT_TYPE_WRITE])
@UseGuards(ApiAuthGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
- })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Create an event type" })
async createEventType(
@Body() body: CreateEventTypeInput_2024_06_14,
@@ -94,12 +90,7 @@ export class EventTypesController_2024_06_14 {
@Get("/:eventTypeId")
@Permissions([EVENT_TYPE_READ])
@UseGuards(ApiAuthGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
- })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Get an event type" })
async getEventTypeById(
@Param("eventTypeId") eventTypeId: string,
@@ -149,12 +140,7 @@ export class EventTypesController_2024_06_14 {
@Patch("/:eventTypeId")
@Permissions([EVENT_TYPE_WRITE])
@UseGuards(ApiAuthGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
- })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: "Update an event type" })
async updateEventType(
@@ -179,12 +165,7 @@ export class EventTypesController_2024_06_14 {
@Delete("/:eventTypeId")
@Permissions([EVENT_TYPE_WRITE])
@UseGuards(ApiAuthGuard)
- @ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
- })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Delete an event type" })
async deleteEventType(
@Param("eventTypeId") eventTypeId: number,
diff --git a/apps/api/v2/src/ee/me/me.controller.ts b/apps/api/v2/src/ee/me/me.controller.ts
index 682743750d6..4ae533b887e 100644
--- a/apps/api/v2/src/ee/me/me.controller.ts
+++ b/apps/api/v2/src/ee/me/me.controller.ts
@@ -2,6 +2,7 @@ import { GetMeOutput } from "@/ee/me/outputs/get-me.output";
import { UpdateMeOutput } from "@/ee/me/outputs/update-me.output";
import { SchedulesService_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/services/schedules.service";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -10,7 +11,7 @@ import { UpdateManagedUserInput } from "@/modules/users/inputs/update-managed-us
import { UsersService } from "@/modules/users/services/users.service";
import { UserWithProfile, UsersRepository } from "@/modules/users/users.repository";
import { Controller, UseGuards, Get, Patch, Body } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { PROFILE_READ, PROFILE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants";
import { userSchemaResponse } from "@calcom/platform-types";
@@ -21,6 +22,7 @@ import { userSchemaResponse } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, PermissionsGuard)
@DocsTags("Me")
+@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
export class MeController {
constructor(
private readonly usersRepository: UsersRepository,
diff --git a/apps/api/v2/src/ee/provider/provider.controller.ts b/apps/api/v2/src/ee/provider/provider.controller.ts
index 25ee2018953..bb5fd3d30e6 100644
--- a/apps/api/v2/src/ee/provider/provider.controller.ts
+++ b/apps/api/v2/src/ee/provider/provider.controller.ts
@@ -1,6 +1,7 @@
import { ProviderVerifyAccessTokenOutput } from "@/ee/provider/outputs/verify-access-token.output";
import { ProviderVerifyClientOutput } from "@/ee/provider/outputs/verify-client.output";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
@@ -16,7 +17,7 @@ import {
UnauthorizedException,
UseGuards,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiExcludeController, ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -24,6 +25,9 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
path: "/v2/provider",
version: API_VERSIONS_VALUES,
})
+// note(Lauris): this controller is used by useOAuthClient and useOAuthFlow internal hooks and if customer
+// wants to know if access token is expired then the flow is to make request and then receive message it expired.
+@ApiExcludeController()
@DocsTags("Platform / Cal Provider")
export class CalProviderController {
constructor(private readonly oauthClientRepository: OAuthClientRepository) {}
@@ -53,6 +57,7 @@ export class CalProviderController {
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Verify an access token" })
+ @ApiHeader(ACCESS_TOKEN_HEADER)
async verifyAccessToken(
@Param("clientId") clientId: string,
@GetUser() user: UserWithProfile
diff --git a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts
index 33e924029fc..0cced597528 100644
--- a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts
+++ b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts
@@ -1,5 +1,6 @@
import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service";
import { VERSION_2024_06_14, VERSION_2024_06_11 } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -46,12 +47,7 @@ import {
default: VERSION_2024_06_11,
},
})
-@ApiHeader({
- name: "Authorization",
- description:
- "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
- required: true,
-})
+@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
export class SchedulesController_2024_06_11 {
constructor(private readonly schedulesService: SchedulesService_2024_06_11) {}
diff --git a/apps/api/v2/src/lib/docs/headers.ts b/apps/api/v2/src/lib/docs/headers.ts
new file mode 100644
index 00000000000..97983f9a068
--- /dev/null
+++ b/apps/api/v2/src/lib/docs/headers.ts
@@ -0,0 +1,60 @@
+import { ApiHeaderOptions } from "@nestjs/swagger";
+
+import { X_CAL_CLIENT_ID, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
+
+export const OPTIONAL_X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = {
+ name: X_CAL_CLIENT_ID,
+ description: "For platform customers - OAuth client ID",
+ required: false,
+};
+
+export const OPTIONAL_X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = {
+ name: X_CAL_SECRET_KEY,
+ description: "For platform customers - OAuth client secret key",
+ required: false,
+};
+
+export const X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = {
+ name: X_CAL_CLIENT_ID,
+ description: "For platform customers - OAuth client ID",
+ required: false,
+};
+
+export const X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = {
+ name: X_CAL_SECRET_KEY,
+ description: "For platform customers - OAuth client secret key",
+ required: false,
+};
+
+export const OPTIONAL_API_KEY_HEADER: ApiHeaderOptions = {
+ name: "Authorization",
+ description:
+ "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ required: false,
+};
+
+export const API_KEY_HEADER: ApiHeaderOptions = {
+ name: "Authorization",
+ description: "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ required: true,
+};
+
+export const API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
+ name: "Authorization",
+ description:
+ "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ required: true,
+};
+
+export const OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
+ name: "Authorization",
+ description:
+ "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ required: false,
+};
+
+export const ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
+ name: "Authorization",
+ description: "value must be `Bearer <token>` where `<token>` is managed user access token",
+ required: true,
+};
diff --git a/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts b/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts
index 63a04c708fe..988f4f793a9 100644
--- a/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts
+++ b/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { RefreshApiKeyInput } from "@/modules/api-keys/inputs/refresh-api-key.input";
import { RefreshApiKeyOutput } from "@/modules/api-keys/outputs/refresh-api-key.output";
import { ApiKeysService } from "@/modules/api-keys/services/api-keys.service";
@@ -23,12 +24,7 @@ export class ApiKeysController {
summary: "Refresh API Key",
description: `Generate a new API key and delete the current one. Provide API key to refresh as a Bearer token in the Authorization header (e.g. "Authorization: Bearer <apiKey>").`,
})
- @ApiHeader({
- name: "Authorization",
- description: "Bearer <apiKey>",
- required: true,
- schema: { type: "string" },
- })
+ @ApiHeader(API_KEY_HEADER)
@Post("/refresh")
@HttpCode(HttpStatus.OK)
async refresh(
diff --git a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
index dd42e671b04..2d0710810ba 100644
--- a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
+++ b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import {
@@ -37,7 +38,7 @@ import {
Req,
HttpException,
} from "@nestjs/common";
-import { ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { Request } from "express";
@@ -70,6 +71,7 @@ export class ConferencingController {
@Post("/:app/connect")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Connect your conferencing application" })
@ApiParam({
name: "app",
@@ -98,6 +100,7 @@ export class ConferencingController {
@Get("/:app/oauth/auth-url")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Get OAuth conferencing app auth url" })
@ApiParam({
name: "app",
@@ -204,6 +207,7 @@ export class ConferencingController {
@Get("/")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "List your conferencing applications" })
async listInstalledConferencingApps(
@GetUser("id") userId: number
@@ -220,6 +224,7 @@ export class ConferencingController {
@Post("/:app/default")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Set your default conferencing application" })
@ApiParam({
name: "app",
@@ -238,6 +243,7 @@ export class ConferencingController {
@Get("/default")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Get your default conferencing application" })
async getDefault(@GetUser("id") userId: number): Promise<GetDefaultConferencingAppOutputResponseDto> {
const defaultconferencingApp = await this.conferencingService.getUserDefaultConferencingApp(userId);
@@ -247,6 +253,7 @@ export class ConferencingController {
@Delete("/:app/disconnect")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Disconnect your conferencing application" })
@ApiParam({
name: "app",
diff --git a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
index 8241f1b867b..dbc002e4646 100644
--- a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
+++ b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import { DestinationCalendarsInputBodyDto } from "@/modules/destination-calendars/inputs/destination-calendars.input";
@@ -9,7 +10,7 @@ import {
import { DestinationCalendarsService } from "@/modules/destination-calendars/services/destination-calendars.service";
import { UserWithProfile } from "@/modules/users/users.repository";
import { Body, Controller, Put, UseGuards } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -19,11 +20,12 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
version: API_VERSIONS_VALUES,
})
@DocsTags("Destination Calendars")
+@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
+@UseGuards(ApiAuthGuard)
export class DestinationCalendarsController {
constructor(private readonly destinationCalendarsService: DestinationCalendarsService) {}
@Put("/")
- @UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Update destination calendars" })
async updateDestinationCalendars(
@Body() input: DestinationCalendarsInputBodyDto,
diff --git a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts
index 25ac6b8e0cf..1953cea1d41 100644
--- a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts
+++ b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import { GetWebhook } from "@/modules/webhooks/decorators/get-webhook-decorator";
import { IsUserEventTypeWebhookGuard } from "@/modules/webhooks/guards/is-user-event-type-webhook-guard";
@@ -25,7 +26,7 @@ import {
Patch,
ParseIntPipe,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { Webhook } from "@prisma/client";
import { plainToClass } from "class-transformer";
@@ -38,6 +39,7 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsUserEventTypeWebhookGuard)
@DocsTags("Event Types / Webhooks")
+@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
export class EventTypeWebhooksController {
constructor(
private readonly webhooksService: WebhooksService,
diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
index 493193cebad..d4b23dae19f 100644
--- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
+++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
@@ -31,11 +31,10 @@ import {
Query,
NotFoundException,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiOperation, ApiTags as DocsTags, ApiHeader } from "@nestjs/swagger";
import { User, MembershipRole } from "@prisma/client";
-import { SUCCESS_STATUS } from "@calcom/platform-constants";
-import { Pagination } from "@calcom/platform-types";
+import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
@Controller({
path: "/v2/oauth-clients/:clientId/users",
@@ -43,6 +42,11 @@ import { Pagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, OAuthClientGuard, OrganizationRolesGuard)
@DocsTags("Platform / Managed Users")
+@ApiHeader({
+ name: X_CAL_SECRET_KEY,
+ description: "OAuth client secret key",
+ required: true,
+})
export class OAuthClientUsersController {
private readonly logger = new Logger("UserController");
diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
index 55b78e3fbe7..8dd6882b774 100644
--- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
+++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
@@ -16,11 +16,11 @@ import { WebhookOutputPipe } from "@/modules/webhooks/pipes/WebhookOutputPipe";
import { OAuthClientWebhooksService } from "@/modules/webhooks/services/oauth-clients-webhooks.service";
import { WebhooksService } from "@/modules/webhooks/services/webhooks.service";
import { Controller, Post, Body, UseGuards, Get, Param, Query, Delete, Patch } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { Webhook, MembershipRole } from "@prisma/client";
import { plainToClass } from "class-transformer";
-import { SUCCESS_STATUS } from "@calcom/platform-constants";
+import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
import { SkipTakePagination } from "@calcom/platform-types";
import { OAuthClientGuard } from "../../guards/oauth-client-guard";
@@ -31,6 +31,11 @@ import { OAuthClientGuard } from "../../guards/oauth-client-guard";
})
@UseGuards(NextAuthGuard, OrganizationRolesGuard, OAuthClientGuard)
@DocsTags("Platform / Webhooks")
+@ApiHeader({
+ name: X_CAL_SECRET_KEY,
+ description: "OAuth client secret key",
+ required: true,
+})
export class OAuthClientWebhooksController {
constructor(
private readonly webhooksService: WebhooksService,
diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
index 0a082cbc35a..922ba274124 100644
--- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
+++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { GetOrgId } from "@/modules/auth/decorators/get-org-id/get-org-id.decorator";
import { MembershipRoles } from "@/modules/auth/decorators/roles/membership-roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -9,7 +10,6 @@ import { CreateOAuthClientResponseDto } from "@/modules/oauth-clients/controller
import { GetOAuthClientResponseDto } from "@/modules/oauth-clients/controllers/oauth-clients/responses/GetOAuthClientResponse.dto";
import { GetOAuthClientsResponseDto } from "@/modules/oauth-clients/controllers/oauth-clients/responses/GetOAuthClientsResponse.dto";
import { OAuthClientGuard } from "@/modules/oauth-clients/guards/oauth-client-guard";
-import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
import { OAuthClientsService } from "@/modules/oauth-clients/services/oauth-clients/oauth-clients.service";
import { OrganizationsRepository } from "@/modules/organizations/index/organizations.repository";
import { UsersRepository } from "@/modules/users/users.repository";
@@ -26,10 +26,15 @@ import {
HttpStatus,
Logger,
UseGuards,
- NotFoundException,
BadRequestException,
} from "@nestjs/common";
-import { ApiCreatedResponse as DocsCreatedResponse, ApiTags } from "@nestjs/swagger";
+import {
+ ApiCreatedResponse as DocsCreatedResponse,
+ ApiTags,
+ ApiOperation,
+ ApiExcludeEndpoint,
+ ApiHeader,
+} from "@nestjs/swagger";
import { User, MembershipRole } from "@prisma/client";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -41,11 +46,11 @@ import { CreateOAuthClientInput, UpdateOAuthClientInput, Pagination } from "@cal
})
@ApiTags("OAuth Clients")
@UseGuards(ApiAuthGuard, OrganizationRolesGuard)
+@ApiHeader(API_KEY_HEADER)
export class OAuthClientsController {
private readonly logger = new Logger("OAuthClientController");
constructor(
- private readonly oauthClientRepository: OAuthClientRepository,
private readonly oAuthClientsService: OAuthClientsService,
private readonly userRepository: UsersRepository,
private readonly teamsRepository: OrganizationsRepository
@@ -58,6 +63,7 @@ export class OAuthClientsController {
description: "Create an OAuth client",
type: CreateOAuthClientResponseDto,
})
+ @ApiOperation({ summary: "Create an OAuth client" })
async createOAuthClient(
@GetOrgId() organizationId: number,
@Body() body: CreateOAuthClientInput
@@ -68,7 +74,9 @@ export class OAuthClientsController {
const organization = await this.teamsRepository.findByIdIncludeBilling(organizationId);
if (!organization?.platformBilling || !organization?.platformBilling?.subscriptionId) {
- throw new BadRequestException("Team is not subscribed, cannot create an OAuth Client.");
+ throw new BadRequestException(
+ "Team is not subscribed to platform plan, cannot create an OAuth Client."
+ );
}
const oAuthClientCredentials = await this.oAuthClientsService.createOAuthClient(organizationId, body);
@@ -81,6 +89,7 @@ export class OAuthClientsController {
@Get("/")
@HttpCode(HttpStatus.OK)
+ @ApiOperation({ summary: "Get all OAuth clients" })
@MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER])
async getOAuthClients(@GetOrgId() organizationId: number): Promise<GetOAuthClientsResponseDto> {
const clients = await this.oAuthClientsService.getOAuthClients(organizationId);
@@ -91,6 +100,7 @@ export class OAuthClientsController {
@HttpCode(HttpStatus.OK)
@MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER])
@UseGuards(OAuthClientGuard)
+ @ApiOperation({ summary: "Get an OAuth client" })
async getOAuthClientById(@Param("clientId") clientId: string): Promise<GetOAuthClientResponseDto> {
const client = await this.oAuthClientsService.getOAuthClientById(clientId);
return { status: SUCCESS_STATUS, data: client };
@@ -100,6 +110,9 @@ export class OAuthClientsController {
@HttpCode(HttpStatus.OK)
@MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER])
@UseGuards(OAuthClientGuard)
+ // note(Lauris): Excluding this endpoint because we have oauth-clients-users.controller to fetch oAuth users and I am leaving this endpoint
+ // just in case someone is using it.
+ @ApiExcludeEndpoint()
async getOAuthClientManagedUsersById(
@Param("clientId") clientId: string,
@Query() queryParams: Pagination
@@ -118,6 +131,7 @@ export class OAuthClientsController {
@HttpCode(HttpStatus.OK)
@MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER])
@UseGuards(OAuthClientGuard)
+ @ApiOperation({ summary: "Update an OAuth client" })
async updateOAuthClient(
@Param("clientId") clientId: string,
@Body() body: UpdateOAuthClientInput
@@ -131,6 +145,7 @@ export class OAuthClientsController {
@HttpCode(HttpStatus.OK)
@MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER])
@UseGuards(OAuthClientGuard)
+ @ApiOperation({ summary: "Delete an OAuth client" })
async deleteOAuthClient(@Param("clientId") clientId: string): Promise<GetOAuthClientResponseDto> {
this.logger.log(`Deleting OAuth Client with ID: ${clientId}`);
const client = await this.oAuthClientsService.deleteOAuthClient(clientId);
diff --git a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts
index ea38461a904..d0052e9b7ed 100644
--- a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts
+++ b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -28,7 +29,7 @@ import {
Query,
UseGuards,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
import { SkipTakePagination } from "@calcom/platform-types";
@@ -39,6 +40,7 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Attributes")
+@ApiHeader(API_KEY_HEADER)
export class OrganizationsAttributesController {
constructor(private readonly organizationsAttributesService: OrganizationAttributesService) {}
// Gets all attributes for an organization
diff --git a/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts b/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts
index 56ed7e5347c..fd3a496ee34 100644
--- a/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts
+++ b/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -20,7 +21,7 @@ import { GetAllAttributeOptionOutput } from "@/modules/organizations/attributes/
import { UpdateAttributeOptionOutput } from "@/modules/organizations/attributes/options/outputs/update-option.output";
import { OrganizationAttributeOptionService } from "@/modules/organizations/attributes/options/services/organization-attributes-option.service";
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post, UseGuards } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -30,6 +31,7 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Attributes / Options")
+@ApiHeader(API_KEY_HEADER)
export class OrganizationsAttributesOptionsController {
constructor(private readonly organizationsAttributesOptionsService: OrganizationAttributeOptionService) {}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts
index ccf182609a3..d8962f893d1 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts
+++ b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+ OPTIONAL_API_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
@@ -23,7 +28,7 @@ import {
HttpStatus,
Patch,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { User } from "@prisma/client";
import { plainToClass } from "class-transformer";
@@ -37,6 +42,9 @@ import { CreateDelegationCredentialInput } from "./inputs/create-delegation-cred
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Delegation Credentials")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsDelegationCredentialController {
constructor(private readonly delegationCredentialService: OrganizationsDelegationCredentialService) {}
diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
index b9c94c12417..0336924b003 100644
--- a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
+++ b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts
@@ -1,6 +1,11 @@
import { CreatePhoneCallInput } from "@/ee/event-types/event-types_2024_06_14/inputs/create-phone-call.input";
import { CreatePhoneCallOutput } from "@/ee/event-types/event-types_2024_06_14/outputs/create-phone-call.output";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
@@ -35,7 +40,7 @@ import {
NotFoundException,
Query,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { ERROR_STATUS, SUCCESS_STATUS } from "@calcom/platform-constants";
import { handleCreatePhoneCall } from "@calcom/platform-libraries";
@@ -56,7 +61,10 @@ export type EventTypeHandlerResponse = {
path: "/v2/organizations/:orgId",
version: API_VERSIONS_VALUES,
})
-@DocsTags("Orgs / Event Types")
+@DocsTags("Orgs / Teams / Event Types")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsEventTypesController {
constructor(
private readonly organizationsEventTypesService: OrganizationsEventTypesService,
diff --git a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts
index 7417ecfe89a..5994ba5c879 100644
--- a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts
+++ b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -30,7 +35,7 @@ import {
HttpCode,
HttpStatus,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -42,6 +47,9 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Memberships")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsMembershipsController {
constructor(private organizationsMembershipService: OrganizationsMembershipService) {}
diff --git a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts
index 2fa6d8ba3a4..ee293a0b091 100644
--- a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts
+++ b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { X_CAL_CLIENT_ID_HEADER, X_CAL_SECRET_KEY_HEADER } from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
@@ -28,7 +29,7 @@ import {
HttpStatus,
Delete,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -40,6 +41,8 @@ const SCALE = "SCALE";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Orgs")
+@ApiHeader(X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(X_CAL_SECRET_KEY_HEADER)
export class OrganizationsOrganizationsController {
constructor(private readonly managedOrganizationsService: ManagedOrganizationsService) {}
diff --git a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts
index 004f7619695..ec58e377ed2 100644
--- a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts
+++ b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts
@@ -1,5 +1,10 @@
import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -23,7 +28,7 @@ import {
HttpStatus,
Query,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
import {
@@ -42,7 +47,9 @@ import { SkipTakePagination } from "@calcom/platform-types";
version: API_VERSIONS_VALUES,
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
-@DocsTags("Orgs / Schedules")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsSchedulesController {
constructor(
private schedulesService: SchedulesService_2024_06_11,
@@ -52,6 +59,7 @@ export class OrganizationsSchedulesController {
@Roles("ORG_ADMIN")
@PlatformPlan("ESSENTIALS")
@Get("/schedules")
+ @DocsTags("Orgs / Schedules")
@ApiOperation({ summary: "Get all schedules" })
async getOrganizationSchedules(
@Param("orgId", ParseIntPipe) orgId: number,
diff --git a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts
index d503148e1fc..d73776b29d8 100644
--- a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts
+++ b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts
@@ -1,6 +1,11 @@
import { BookingUidGuard } from "@/ee/bookings/2024-08-13/guards/booking-uid.guard";
import { BookingsService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/bookings.service";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+ OPTIONAL_API_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
@@ -13,7 +18,7 @@ import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard";
import { GetOrganizationsTeamsBookingsInput_2024_08_13 } from "@/modules/organizations/teams/bookings/inputs/get-organizations-teams-bookings.input";
import { UserWithProfile } from "@/modules/users/users.repository";
import { Controller, UseGuards, Get, Param, ParseIntPipe, Query, HttpStatus, HttpCode } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
import { GetBookingsOutput_2024_08_13 } from "@calcom/platform-types";
@@ -24,6 +29,9 @@ import { GetBookingsOutput_2024_08_13 } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, IsTeamInOrg, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Teams / Bookings")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsTeamsBookingsController {
constructor(private readonly bookingsService: BookingsService_2024_08_13) {}
diff --git a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts
index 49384d7246f..25cda044c06 100644
--- a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts
+++ b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetTeam } from "@/modules/auth/decorators/get-team/get-team.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
@@ -30,10 +35,11 @@ import {
Patch,
Post,
Body,
- Headers,
+ Req,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
+import { Request } from "express";
import { SUCCESS_STATUS, X_CAL_CLIENT_ID } from "@calcom/platform-constants";
import { OrgTeamOutputDto } from "@calcom/platform-types";
@@ -46,11 +52,13 @@ import { Team } from "@calcom/prisma/client";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Teams")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsTeamsController {
constructor(private organizationsTeamsService: OrganizationsTeamsService) {}
@Get()
- @DocsTags("Teams")
@ApiOperation({ summary: "Get all teams" })
@Roles("ORG_ADMIN")
@PlatformPlan("ESSENTIALS")
@@ -148,8 +156,9 @@ export class OrganizationsTeamsController {
@Param("orgId", ParseIntPipe) orgId: number,
@Body() body: CreateOrgTeamDto,
@GetUser() user: UserWithProfile,
- @Headers(X_CAL_CLIENT_ID) oAuthClientId?: string
+ @Req() req: Request
): Promise<OrgTeamOutputResponseDto> {
+ const oAuthClientId = req.headers[X_CAL_CLIENT_ID] as string | undefined;
const team = oAuthClientId
? await this.organizationsTeamsService.createPlatformOrgTeam(orgId, oAuthClientId, body, user)
: await this.organizationsTeamsService.createOrgTeam(orgId, body, user);
diff --git a/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts b/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts
index ecca8145e8d..b3deaa0e33a 100644
--- a/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts
+++ b/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -33,7 +38,7 @@ import {
UnprocessableEntityException,
Logger,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -46,6 +51,9 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, IsTeamInOrg, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Teams / Memberships")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsTeamsMembershipsController {
private logger = new Logger("OrganizationsTeamsMembershipsController");
diff --git a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts
index cff980b761f..073554c4d5c 100644
--- a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts
+++ b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -8,11 +9,9 @@ import { IsOrgGuard } from "@/modules/auth/guards/organizations/is-org.guard";
import { IsRoutingFormInTeam } from "@/modules/auth/guards/routing-forms/is-routing-form-in-team.guard";
import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard";
import { Controller, Get, Param, UseGuards } from "@nestjs/common";
-import { ApiOperation, ApiTags } from "@nestjs/swagger";
-import { plainToClass } from "class-transformer";
+import { ApiHeader, ApiOperation, ApiTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
-import { RoutingFormResponseOutput } from "@calcom/platform-types";
import { RoutingFormsResponsesService } from "../../../../routing-forms-responses/services/routing-forms-responses.service";
import { GetRoutingFormResponsesOutput } from "../outputs/get-routing-form-responses.output";
@@ -30,6 +29,7 @@ import { GetRoutingFormResponsesOutput } from "../outputs/get-routing-form-respo
PlatformPlanGuard,
IsAdminAPIEnabledGuard
)
+@ApiHeader(API_KEY_HEADER)
export class OrganizationsTeamsRoutingFormsResponsesController {
constructor(private readonly routingFormsResponsesService: RoutingFormsResponsesService) {}
diff --git a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts
index cf826f497ed..db5914b1d43 100644
--- a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts
+++ b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts
@@ -1,5 +1,10 @@
import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -10,7 +15,7 @@ import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard";
import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard";
import { IsUserInOrgTeam } from "@/modules/auth/guards/users/is-user-in-org-team.guard";
import { Controller, UseGuards, Get, Param, ParseIntPipe } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
import { GetSchedulesOutput_2024_06_11 } from "@calcom/platform-types";
@@ -20,7 +25,9 @@ import { GetSchedulesOutput_2024_06_11 } from "@calcom/platform-types";
version: API_VERSIONS_VALUES,
})
@UseGuards(ApiAuthGuard, IsOrgGuard, IsTeamInOrg, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
-@DocsTags("Orgs / Teams / Schedules")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsTeamsSchedulesController {
constructor(private schedulesService: SchedulesService_2024_06_11) {}
@@ -29,7 +36,9 @@ export class OrganizationsTeamsSchedulesController {
@UseGuards(IsUserInOrgTeam)
@Get("/users/:userId/schedules")
@DocsTags("Orgs / Teams / Users / Schedules")
- @ApiOperation({ summary: "Get schedules of a team member" })
+ @ApiOperation({
+ summary: "Get schedules of a team member",
+ })
async getUserSchedules(
@Param("userId", ParseIntPipe) userId: number
): Promise<GetSchedulesOutput_2024_06_11> {
diff --git a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts
index 1df354df097..90b3bff6580 100644
--- a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts
+++ b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetOrg } from "@/modules/auth/decorators/get-org/get-org.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
@@ -33,7 +38,7 @@ import {
Query,
} from "@nestjs/common";
import { ClassSerializerInterceptor } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -47,6 +52,9 @@ import { Team } from "@calcom/prisma/client";
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@UseGuards(IsOrgGuard)
@DocsTags("Orgs / Users")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsUsersController {
constructor(private readonly organizationsUsersService: OrganizationsUsersService) {}
diff --git a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts
index a6659d256d1..0d11f8eb041 100644
--- a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts
+++ b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -35,7 +40,7 @@ import {
Query,
} from "@nestjs/common";
import { ClassSerializerInterceptor } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToInstance } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -48,6 +53,9 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@UseGuards(IsOrgGuard)
@DocsTags("Orgs / Users / OOO")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsUsersOOOController {
constructor(
private readonly userOOOService: UserOOOService,
diff --git a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts
index be7f392c97b..0cffcb83e0d 100644
--- a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts
+++ b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts
@@ -1,4 +1,9 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import {
+ OPTIONAL_API_KEY_HEADER,
+ OPTIONAL_X_CAL_CLIENT_ID_HEADER,
+ OPTIONAL_X_CAL_SECRET_KEY_HEADER,
+} from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -32,7 +37,7 @@ import {
HttpCode,
HttpStatus,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -44,6 +49,9 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Webhooks")
+@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER)
+@ApiHeader(OPTIONAL_API_KEY_HEADER)
export class OrganizationsWebhooksController {
constructor(
private organizationsWebhooksService: OrganizationsWebhooksService,
diff --git a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts
index da13b5e6da8..40961de13f9 100644
--- a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts
+++ b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import {
@@ -12,7 +13,7 @@ import {
import { SelectedCalendarsService } from "@/modules/selected-calendars/services/selected-calendars.service";
import { UserWithProfile } from "@/modules/users/users.repository";
import { Body, Controller, Post, UseGuards, Delete, Query } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -22,11 +23,12 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
version: API_VERSIONS_VALUES,
})
@DocsTags("Selected Calendars")
+@UseGuards(ApiAuthGuard)
+@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
export class SelectedCalendarsController {
constructor(private readonly selectedCalendarsService: SelectedCalendarsService) {}
@Post("/")
- @UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Add a selected calendar" })
async addSelectedCalendar(
@Body() input: SelectedCalendarsInputDto,
@@ -41,7 +43,6 @@ export class SelectedCalendarsController {
}
@Delete("/")
- @UseGuards(ApiAuthGuard)
@ApiOperation({ summary: "Delete a selected calendar" })
async deleteSelectedCalendar(
@Query() queryParams: SelectedCalendarsQueryParamsInputDto,
diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts
index ac191da1846..8884a5244bf 100644
--- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts
+++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts
@@ -1,4 +1,5 @@
import { VERSION_2024_09_04 } from "@/lib/api-versions";
+import { OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER, OPTIONAL_X_CAL_CLIENT_ID_HEADER } from "@/lib/docs/headers";
import { GetOptionalUser } from "@/modules/auth/decorators/get-optional-user/get-optional-user.decorator";
import { OptionalApiAuthGuard } from "@/modules/auth/guards/optional-api-auth/optional-api-auth.guard";
import { GetReservedSlotOutput_2024_09_04 } from "@/modules/slots/slots-2024-09-04/outputs/get-reserved-slot.output";
@@ -13,12 +14,10 @@ import {
Delete,
Post,
Param,
- Res,
HttpCode,
HttpStatus,
Patch,
UseGuards,
- BadRequestException,
} from "@nestjs/common";
import {
ApiOperation,
@@ -223,8 +222,12 @@ export class SlotsController_2024_09_04 {
@UseGuards(OptionalApiAuthGuard)
@ApiOperation({
summary: "Reserve a slot",
- description: "Make a slot not available for others to book for a certain period of time.",
+ description: `Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token
+ then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).`,
})
+ @ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+ @ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER)
+ @ApiHeader(OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER)
async reserveSlot(
@Body() body: ReserveSlotInput_2024_09_04,
@GetOptionalUser() user: User
diff --git a/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts b/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts
index 2333346f179..4bdb2672e42 100644
--- a/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts
+++ b/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import {
@@ -23,7 +24,7 @@ import {
Headers,
Param,
} from "@nestjs/common";
-import { ApiTags as DocsTags, ApiOperation } from "@nestjs/swagger";
+import { ApiTags as DocsTags, ApiOperation, ApiHeader } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { Request } from "express";
import { stringify } from "querystring";
@@ -42,6 +43,7 @@ export class StripeController {
@UseGuards(ApiAuthGuard)
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: "Get stripe connect URL" })
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
async redirect(
@Req() req: Request,
@Headers("Authorization") authorization: string,
@@ -100,6 +102,7 @@ export class StripeController {
@Get("/check")
@UseGuards(ApiAuthGuard)
@HttpCode(HttpStatus.OK)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Check stripe connection" })
async check(@GetUser() user: UserWithProfile): Promise<StripCredentialsCheckOutputResponseDto> {
return await this.stripeService.checkIfIndividualStripeAccountConnected(user.id);
@@ -108,6 +111,7 @@ export class StripeController {
@Get("/check/:teamId")
@UseGuards(ApiAuthGuard)
@HttpCode(HttpStatus.OK)
+ @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER)
@ApiOperation({ summary: "Check team stripe connection" })
async checkTeamStripeConnection(
@Param("teamId") teamId: string
diff --git a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts
index 18714bb91d8..029cfe50be4 100644
--- a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts
+++ b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts
@@ -1,6 +1,7 @@
import { CreatePhoneCallInput } from "@/ee/event-types/event-types_2024_06_14/inputs/create-phone-call.input";
import { CreatePhoneCallOutput } from "@/ee/event-types/event-types_2024_06_14/outputs/create-phone-call.output";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
@@ -31,7 +32,7 @@ import {
NotFoundException,
Query,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { ERROR_STATUS, SUCCESS_STATUS } from "@calcom/platform-constants";
import { handleCreatePhoneCall } from "@calcom/platform-libraries";
@@ -63,6 +64,7 @@ export class TeamsEventTypesController {
@Roles("TEAM_ADMIN")
@PlatformPlan("ESSENTIALS")
@UseGuards(ApiAuthGuard, RolesGuard)
+ @ApiHeader(API_KEY_HEADER)
@Post("/")
@ApiOperation({ summary: "Create an event type" })
async createTeamEventType(
@@ -86,6 +88,7 @@ export class TeamsEventTypesController {
@Roles("TEAM_ADMIN")
@UseGuards(ApiAuthGuard, RolesGuard)
+ @ApiHeader(API_KEY_HEADER)
@Get("/:eventTypeId")
@ApiOperation({ summary: "Get an event type" })
async getTeamEventType(
@@ -109,6 +112,7 @@ export class TeamsEventTypesController {
@Roles("TEAM_ADMIN")
@Post("/:eventTypeId/create-phone-call")
@UseGuards(ApiAuthGuard, RolesGuard)
+ @ApiHeader(API_KEY_HEADER)
@ApiOperation({ summary: "Create a phone call" })
async createPhoneCall(
@Param("eventTypeId") eventTypeId: number,
@@ -162,6 +166,7 @@ export class TeamsEventTypesController {
@Roles("TEAM_ADMIN")
@UseGuards(ApiAuthGuard, RolesGuard)
+ @ApiHeader(API_KEY_HEADER)
@Patch("/:eventTypeId")
@ApiOperation({ summary: "Update a team event type" })
async updateTeamEventType(
@@ -193,6 +198,7 @@ export class TeamsEventTypesController {
@Roles("TEAM_ADMIN")
@UseGuards(ApiAuthGuard, RolesGuard)
+ @ApiHeader(API_KEY_HEADER)
@Delete("/:eventTypeId")
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: "Delete a team event type" })
diff --git a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts
index bb62333b966..0c9ee462895 100644
--- a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts
+++ b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard";
@@ -27,7 +28,7 @@ import {
HttpStatus,
Logger,
} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -40,6 +41,7 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard, RolesGuard)
@DocsTags("Teams / Memberships")
+@ApiHeader(API_KEY_HEADER)
export class TeamsMembershipsController {
private logger = new Logger("TeamsMembershipsController");
diff --git a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts
index a9ac3af2a1e..1f747b073c5 100644
--- a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts
+++ b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Roles } from "@/modules/auth/decorators/roles/roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -14,7 +15,7 @@ import { TeamsService } from "@/modules/teams/teams/services/teams.service";
import { TeamsRepository } from "@/modules/teams/teams/teams.repository";
import { UserWithProfile } from "@/modules/users/users.repository";
import { Controller, UseGuards, Get, Param, ParseIntPipe, Delete, Patch, Post, Body } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
@@ -26,6 +27,7 @@ import { TeamOutputDto } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard)
@DocsTags("Teams")
+@ApiHeader(API_KEY_HEADER)
export class TeamsController {
constructor(private teamsService: TeamsService, private teamsRepository: TeamsRepository) {}
diff --git a/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts b/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts
index 281c87b15f1..32ecc98ab2a 100644
--- a/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts
+++ b/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts
@@ -1,7 +1,7 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
import { TimezonesService } from "@/modules/timezones/services/timezones.service";
import { Controller, Get } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiExcludeController, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
import type { CityTimezones } from "@calcom/platform-libraries";
@@ -11,6 +11,8 @@ import { ApiResponse } from "@calcom/platform-types";
path: "/v2/timezones",
version: API_VERSIONS_VALUES,
})
+// note(Lauris): controller used only internally by atoms
+@ApiExcludeController()
@DocsTags("Timezones")
export class TimezonesController {
constructor(private readonly timezonesService: TimezonesService) {}
diff --git a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts
index 5025699ddd4..b552a297452 100644
--- a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts
+++ b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts
@@ -1,4 +1,5 @@
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { API_KEY_HEADER } from "@/lib/docs/headers";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
import { UserWithProfile } from "@/modules/users/users.repository";
@@ -15,7 +16,7 @@ import { WebhookOutputPipe } from "@/modules/webhooks/pipes/WebhookOutputPipe";
import { UserWebhooksService } from "@/modules/webhooks/services/user-webhooks.service";
import { WebhooksService } from "@/modules/webhooks/services/webhooks.service";
import { Controller, Post, Body, UseGuards, Get, Param, Query, Delete, Patch } from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { Webhook } from "@prisma/client";
import { plainToClass } from "class-transformer";
@@ -28,6 +29,7 @@ import { SkipTakePagination } from "@calcom/platform-types";
})
@UseGuards(ApiAuthGuard)
@DocsTags("Webhooks")
+@ApiHeader(API_KEY_HEADER)
export class WebhooksController {
constructor(
private readonly webhooksService: WebhooksService,
diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json
index 1c03ede7e20..ee19b2a24a5 100644
--- a/apps/api/v2/swagger/documentation.json
+++ b/apps/api/v2/swagger/documentation.json
@@ -1,73 +1,20 @@
{
"openapi": "3.0.0",
"paths": {
- "/v2/provider/{clientId}": {
- "get": {
- "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": {
+ "/v2/oauth-clients/{clientId}/users": {
"get": {
- "operationId": "CalProviderController_verifyAccessToken",
- "summary": "Verify an access token",
+ "operationId": "OAuthClientUsersController_getManagedUsers",
+ "summary": "Get all managed users",
"parameters": [
{
- "name": "clientId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Platform / Cal Provider"
- ]
- }
- },
- "/v2/oauth-clients/{clientId}/users": {
- "get": {
- "operationId": "OAuthClientUsersController_getManagedUsers",
- "summary": "Get all managed users",
- "parameters": [
+ },
{
"name": "clientId",
"required": true,
@@ -130,6 +77,15 @@
"operationId": "OAuthClientUsersController_createUser",
"summary": "Create a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -171,6 +127,15 @@
"operationId": "OAuthClientUsersController_getUserById",
"summary": "Get a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -208,6 +173,15 @@
"operationId": "OAuthClientUsersController_updateUser",
"summary": "Update a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -255,6 +229,15 @@
"operationId": "OAuthClientUsersController_deleteUser",
"summary": "Delete a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -295,6 +278,15 @@
"summary": "Force refresh tokens",
"description": "If you have lost managed user access or refresh token, then you can get new ones by using OAuth credentials.\n Each access token is valid for 60 minutes and each refresh token for 1 year. Make sure to store them later in your database, for example, by updating the User model to have `calAccessToken` and `calRefreshToken` columns.",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "userId",
"required": true,
@@ -385,6 +377,15 @@
"operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -424,6 +425,15 @@
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -473,6 +483,15 @@
"operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
"summary": "Delete all webhooks",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -504,6 +523,15 @@
"operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -542,7 +570,17 @@
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -562,7 +600,17 @@
"delete": {
"operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
"summary": "Delete a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -585,6 +633,15 @@
"operationId": "OrganizationsAttributesController_getOrganizationAttributes",
"summary": "Get all attributes",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -634,6 +691,15 @@
"operationId": "OrganizationsAttributesController_createOrganizationAttribute",
"summary": "Create an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -675,6 +741,15 @@
"operationId": "OrganizationsAttributesController_getOrganizationAttribute",
"summary": "Get an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -712,6 +787,15 @@
"operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
"summary": "Update an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -759,6 +843,15 @@
"operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
"summary": "Delete an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -798,6 +891,15 @@
"operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption",
"summary": "Create an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -845,6 +947,15 @@
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
"summary": "Get all attribute options",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -884,6 +995,15 @@
"operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption",
"summary": "Delete an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -929,6 +1049,15 @@
"operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
"summary": "Update an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -986,6 +1115,15 @@
"operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser",
"summary": "Assign an attribute to a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1033,6 +1171,15 @@
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
"summary": "Get all attribute options for a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1072,6 +1219,15 @@
"operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser",
"summary": "Unassign an attribute from a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1120,16 +1276,43 @@
"summary": "Save delegation credentials for your organization.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
"content": {
"application/json": {
"schema": {
@@ -1160,6 +1343,33 @@
"operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
"summary": "Update delegation credentials of your organization.",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1204,17 +1414,36 @@
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
- "post": {
- "operationId": "OrganizationsEventTypesController_createTeamEventType",
- "summary": "Create an event type",
+ "/v2/organizations/{orgId}/memberships": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getAllMemberships",
+ "summary": "Get all memberships",
"parameters": [
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
{
@@ -1224,89 +1453,145 @@
"schema": {
"type": "number"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
- }
+ },
+ {
+ "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": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
+ "$ref": "#/components/schemas/GetAllOrgMemberships"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Memberships"
]
},
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
- "summary": "Get a team event type",
+ "post": {
+ "operationId": "OrganizationsMembershipsController_createMembership",
+ "summary": "Create a membership",
"parameters": [
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "eventSlug",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "Slug of team event type to return.",
"schema": {
"type": "string"
}
},
{
- "name": "hostsLimit",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrgMembershipDto"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ "$ref": "#/components/schemas/CreateOrgMembershipOutput"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Memberships"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
+ "/v2/organizations/{orgId}/memberships/{membershipId}": {
"get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventType",
- "summary": "Get an event type",
+ "operationId": "OrganizationsMembershipsController_getOrgMembership",
+ "summary": "Get a membership",
"parameters": [
{
- "name": "teamId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1314,7 +1599,7 @@
}
},
{
- "name": "eventTypeId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1328,22 +1613,49 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypeOutput"
+ "$ref": "#/components/schemas/GetOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Memberships"
]
},
- "patch": {
- "operationId": "OrganizationsEventTypesController_updateTeamEventType",
- "summary": "Update a team event type",
+ "delete": {
+ "operationId": "OrganizationsMembershipsController_deleteMembership",
+ "summary": "Delete a membership",
"parameters": [
{
- "name": "teamId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1351,7 +1663,7 @@
}
},
{
- "name": "eventTypeId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1359,38 +1671,55 @@
}
}
],
- "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"
+ "$ref": "#/components/schemas/DeleteOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Memberships"
]
},
- "delete": {
- "operationId": "OrganizationsEventTypesController_deleteTeamEventType",
- "summary": "Delete a team event type",
+ "patch": {
+ "operationId": "OrganizationsMembershipsController_updateMembership",
+ "summary": "Update a membership",
"parameters": [
{
- "name": "teamId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1398,7 +1727,7 @@
}
},
{
- "name": "eventTypeId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1406,34 +1735,55 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgMembershipDto"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
+ "$ref": "#/components/schemas/UpdateOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Memberships"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
+ "/v2/organizations/{orgId}/organizations": {
"post": {
- "operationId": "OrganizationsEventTypesController_createPhoneCall",
- "summary": "Create a phone call",
+ "operationId": "OrganizationsOrganizationsController_createOrganization",
+ "summary": "Create an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "eventTypeId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
{
@@ -1450,7 +1800,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreatePhoneCallInput"
+ "$ref": "#/components/schemas/CreateOrganizationInput"
}
}
}
@@ -1461,46 +1811,43 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreatePhoneCallOutput"
+ "$ref": "#/components/schemas/CreateManagedOrganizationOutput"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Orgs"
]
- }
- },
- "/v2/organizations/{orgId}/teams/event-types": {
+ },
"get": {
- "operationId": "OrganizationsEventTypesController_getTeamsEventTypes",
- "summary": "Get all team event types",
+ "operationId": "OrganizationsOrganizationsController_getOrganizations",
+ "summary": "Get all organizations within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -1512,46 +1859,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ "$ref": "#/components/schemas/GetManagedOrganizationsOutput"
}
}
}
}
},
"tags": [
- "Orgs / Event Types"
+ "Orgs / Orgs"
]
}
},
- "/v2/organizations/{orgId}/memberships": {
+ "/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
"get": {
- "operationId": "OrganizationsMembershipsController_getAllMemberships",
- "summary": "Get all memberships",
+ "operationId": "OrganizationsOrganizationsController_getOrganization",
+ "summary": "Get an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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": "managedOrganizationId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -1563,20 +1909,39 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllOrgMemberships"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Orgs"
]
},
- "post": {
- "operationId": "OrganizationsMembershipsController_createMembership",
- "summary": "Create a membership",
+ "patch": {
+ "operationId": "OrganizationsOrganizationsController_updateOrganization",
+ "summary": "Update an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1584,6 +1949,14 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "managedOrganizationId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
}
],
"requestBody": {
@@ -1591,43 +1964,52 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipDto"
+ "$ref": "#/components/schemas/UpdateOrganizationInput"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipOutput"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Orgs"
]
- }
- },
- "/v2/organizations/{orgId}/memberships/{membershipId}": {
- "get": {
- "operationId": "OrganizationsMembershipsController_getOrgMembership",
- "summary": "Get a membership",
+ },
+ "delete": {
+ "operationId": "OrganizationsOrganizationsController_deleteOrganization",
+ "summary": "Delete an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "managedOrganizationId",
"required": true,
"in": "path",
"schema": {
@@ -1641,20 +2023,49 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgMembership"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Orgs"
]
- },
- "delete": {
- "operationId": "OrganizationsMembershipsController_deleteMembership",
- "summary": "Delete a membership",
+ }
+ },
+ "/v2/organizations/{orgId}/schedules": {
+ "get": {
+ "operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
+ "summary": "Get all schedules",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1664,34 +2075,75 @@
}
},
{
- "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"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrgMembership"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Schedules"
]
- },
- "patch": {
- "operationId": "OrganizationsMembershipsController_updateMembership",
- "summary": "Update a membership",
+ }
+ },
+ "/v2/organizations/{orgId}/teams": {
+ "get": {
+ "operationId": "OrganizationsTeamsController_getAllTeams",
+ "summary": "Get all teams",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1701,47 +2153,73 @@
}
},
{
- "name": "membershipId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
"type": "number"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrgMembershipDto"
- }
+ },
+ {
+ "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/UpdateOrgMembership"
+ "$ref": "#/components/schemas/OrgTeamsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Teams"
]
- }
- },
- "/v2/organizations/{orgId}/organizations": {
+ },
"post": {
- "operationId": "OrganizationsOrganizationsController_createOrganization",
- "summary": "Create an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "operationId": "OrganizationsTeamsController_createTeam",
+ "summary": "Create a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1756,7 +2234,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrganizationInput"
+ "$ref": "#/components/schemas/CreateOrgTeamDto"
}
}
}
@@ -1767,21 +2245,49 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateManagedOrganizationOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Orgs"
+ "Orgs / Teams"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/teams/me": {
"get": {
- "operationId": "OrganizationsOrganizationsController_getOrganizations",
- "summary": "Get all organizations within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "operationId": "OrganizationsTeamsController_getMyTeams",
+ "summary": "Get teams membership for user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1789,6 +2295,26 @@
"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": {
@@ -1797,29 +2323,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationsOutput"
+ "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Orgs"
+ "Orgs / Teams"
]
}
},
- "/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
+ "/v2/organizations/{orgId}/teams/{teamId}": {
"get": {
- "operationId": "OrganizationsOrganizationsController_getOrganization",
- "summary": "Get an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "operationId": "OrganizationsTeamsController_getTeam",
+ "summary": "Get a team",
"parameters": [
{
- "name": "managedOrganizationId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
}
],
@@ -1829,21 +2373,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Orgs"
+ "Orgs / Teams"
]
},
- "patch": {
- "operationId": "OrganizationsOrganizationsController_updateOrganization",
- "summary": "Update an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "delete": {
+ "operationId": "OrganizationsTeamsController_deleteTeam",
+ "summary": "Delete a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1853,7 +2423,7 @@
}
},
{
- "name": "managedOrganizationId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -1861,39 +2431,556 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrganizationInput"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams"
+ ]
+ },
+ "patch": {
+ "operationId": "OrganizationsTeamsController_updateTeam",
+ "summary": "Update a team",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgTeamDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/bookings": {
+ "get": {
+ "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings",
+ "summary": "Get organization team bookings",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "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"
+ ]
+ }
+ }
+ },
+ {
+ "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 team. 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 team.",
+ "example": "?eventTypeId=100",
+ "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": "?sortCreated=asc OR ?sortCreated=desc",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
+ "schema": {
+ "minimum": 1,
+ "maximum": 250,
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "minimum": 0,
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams / Bookings"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
+ "post": {
+ "operationId": "OrganizationsEventTypesController_createTeamEventType",
+ "summary": "Create an event type",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams / Event Types"
+ ]
+ },
+ "get": {
+ "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
+ "summary": "Get a team event type",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventSlug",
+ "required": false,
+ "in": "query",
+ "description": "Slug of team event type to return.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "hostsLimit",
+ "required": false,
+ "in": "query",
+ "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams / Event Types"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
+ "get": {
+ "operationId": "OrganizationsEventTypesController_getTeamEventType",
+ "summary": "Get an event type",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Orgs"
+ "Orgs / Teams / Event Types"
]
},
- "delete": {
- "operationId": "OrganizationsOrganizationsController_deleteOrganization",
- "summary": "Delete an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "patch": {
+ "operationId": "OrganizationsEventTypesController_updateTeamEventType",
+ "summary": "Update a team event type",
"parameters": [
{
- "name": "managedOrganizationId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
@@ -1901,52 +2988,75 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
+ "$ref": "#/components/schemas/UpdateTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Orgs"
+ "Orgs / Teams / 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",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
@@ -1958,24 +3068,59 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules"
+ "Orgs / Teams / 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": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1988,7 +3133,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11"
+ "$ref": "#/components/schemas/CreatePhoneCallInput"
}
}
}
@@ -1999,55 +3144,137 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/CreatePhoneCallOutput"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Teams / 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": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "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"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Orgs / Teams / Event Types"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/memberships": {
+ "get": {
+ "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships",
+ "summary": "Get all memberships",
"parameters": [
{
- "name": "userId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
- }
- },
- "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
- "get": {
- "operationId": "OrganizationsSchedulesController_getUserSchedule",
- "summary": "Get a schedule",
- "parameters": [
+ },
{
- "name": "userId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -2055,9 +3282,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"
}
@@ -2069,23 +3308,49 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgTeamMembershipsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Teams / Memberships"
]
},
- "patch": {
- "operationId": "OrganizationsSchedulesController_updateUserSchedule",
- "summary": "Update a schedule",
+ "post": {
+ "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
+ "summary": "Create a membership",
"parameters": [
{
- "name": "userId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2093,7 +3358,7 @@
}
},
{
- "name": "scheduleId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -2106,34 +3371,62 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
+ "$ref": "#/components/schemas/CreateOrgTeamMembershipDto"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Teams / Memberships"
]
- },
- "delete": {
- "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
- "summary": "Delete a schedule",
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
+ "get": {
+ "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership",
+ "summary": "Get a membership",
"parameters": [
{
- "name": "userId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2141,7 +3434,15 @@
}
},
{
- "name": "scheduleId",
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -2155,23 +3456,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
+ "Orgs / Teams / Memberships"
]
- }
- },
- "/v2/organizations/{orgId}/teams": {
- "get": {
- "operationId": "OrganizationsTeamsController_getAllTeams",
- "summary": "Get all teams",
+ },
+ "delete": {
+ "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
+ "summary": "Delete a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -2181,21 +3506,17 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "teamId",
+ "required": true,
+ "in": "path",
"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"
}
@@ -2207,70 +3528,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamsOutputResponseDto"
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Teams",
- "Teams"
+ "Orgs / Teams / Memberships"
]
},
- "post": {
- "operationId": "OrganizationsTeamsController_createTeam",
- "summary": "Create a team",
+ "patch": {
+ "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
+ "summary": "Update a membership",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "x-cal-client-id",
- "required": true,
+ "name": "x-cal-secret-key",
"in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgTeamDto"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
- }
- }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Teams"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/me": {
- "get": {
- "operationId": "OrganizationsTeamsController_getMyTeams",
- "summary": "Get teams membership for user",
- "parameters": [
+ },
{
"name": "orgId",
"required": true,
@@ -2280,82 +3578,69 @@
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "teamId",
+ "required": true,
+ "in": "path",
"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"
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto"
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto"
}
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}": {
- "get": {
- "operationId": "OrganizationsTeamsController_getTeam",
- "summary": "Get a team",
- "parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Teams / Memberships"
]
- },
- "delete": {
- "operationId": "OrganizationsTeamsController_deleteTeam",
- "summary": "Delete a team",
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
+ "get": {
+ "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses",
+ "summary": "Get routing form responses",
"parameters": [
{
- "name": "orgId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
+ "name": "routingFormId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -2365,30 +3650,51 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Teams / Routing forms / Responses"
]
- },
- "patch": {
- "operationId": "OrganizationsTeamsController_updateTeam",
- "summary": "Update a team",
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
+ "get": {
+ "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules",
+ "summary": "Get schedules of a team member",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -2396,185 +3702,148 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrgTeamDto"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Teams"
+ "Orgs / Teams / Users / Schedules"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/bookings": {
+ "/v2/organizations/{orgId}/users": {
"get": {
- "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings",
- "summary": "Get organization team bookings",
+ "operationId": "OrganizationsUsersController_getOrganizationsUsers",
+ "summary": "Get all users",
"parameters": [
{
- "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"
- ]
- }
- }
- },
- {
- "name": "attendeeEmail",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "Filter bookings by the attendee's email address.",
- "example": "[email protected]",
"schema": {
"type": "string"
}
},
{
- "name": "attendeeName",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "Filter bookings by the attendee's name.",
- "example": "John Doe",
"schema": {
"type": "string"
}
},
{
- "name": "eventTypeIds",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "Filter bookings by event type ids belonging to the team. 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 team.",
- "example": "?eventTypeId=100",
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "afterStart",
+ "name": "take",
"required": false,
"in": "query",
- "description": "Filter bookings with start after this date string.",
- "example": "?afterStart=2025-03-07T10:00:00.000Z",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
- "type": "string"
+ "minimum": 1,
+ "maximum": 1000,
+ "type": "number"
}
},
{
- "name": "beforeEnd",
+ "name": "skip",
"required": false,
"in": "query",
- "description": "Filter bookings with end before this date string.",
- "example": "?beforeEnd=2025-03-07T11:00:00.000Z",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
- "type": "string"
+ "minimum": 0,
+ "type": "number"
}
},
{
- "name": "sortStart",
+ "name": "emails",
"required": false,
"in": "query",
- "description": "Sort results by their start time in ascending or descending order.",
- "example": "?sortStart=asc OR ?sortStart=desc",
+ "description": "The email address or an array of email addresses to filter by",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ "type": "array",
+ "items": {
+ "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"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrganizationUsersResponseDTO"
+ }
+ }
}
- },
+ }
+ },
+ "tags": [
+ "Orgs / Users"
+ ]
+ },
+ "post": {
+ "operationId": "OrganizationsUsersController_createOrganizationUser",
+ "summary": "Create a user",
+ "parameters": [
{
- "name": "sortCreated",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
- "example": "?sortCreated=asc OR ?sortCreated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
"type": "string"
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "minimum": 1,
- "maximum": 250,
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
"schema": {
- "minimum": 0,
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2582,85 +3851,139 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrganizationUserInput"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams / Bookings"
+ "Orgs / Users"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/memberships": {
- "get": {
- "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships",
- "summary": "Get all memberships",
+ "/v2/organizations/{orgId}/users/{userId}": {
+ "patch": {
+ "operationId": "OrganizationsUsersController_updateOrganizationUser",
+ "summary": "Update a user",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
},
{
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrganizationUserInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipsOutputResponseDto"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams / Memberships"
+ "Orgs / Users"
]
},
- "post": {
- "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
- "summary": "Create a membership",
+ "delete": {
+ "operationId": "OrganizationsUsersController_deleteOrganizationUser",
+ "summary": "Delete a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -2670,7 +3993,7 @@
}
},
{
- "name": "teamId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -2678,40 +4001,57 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgTeamMembershipDto"
- }
- }
- }
- },
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Teams / Memberships"
+ "Orgs / Users"
]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
+ "/v2/organizations/{orgId}/users/{userId}/ooo": {
"get": {
- "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership",
- "summary": "Get a membership",
+ "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO",
+ "summary": "Get all ooo entries of a user",
"parameters": [
{
- "name": "orgId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -2719,60 +4059,96 @@
}
},
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
"type": "number"
}
},
{
- "name": "membershipId",
- "required": true,
- "in": "path",
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
+ },
+ {
+ "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"
+ }
}
],
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
- }
- }
- }
+ "description": ""
}
},
"tags": [
- "Orgs / Teams / Memberships"
+ "Orgs / Users / OOO"
]
},
- "delete": {
- "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
- "summary": "Delete a membership",
+ "post": {
+ "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
+ "summary": "Create an ooo entry for user",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -2780,36 +4156,60 @@
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOutOfOfficeEntryDto"
}
}
}
},
+ "responses": {
+ "201": {
+ "description": ""
+ }
+ },
"tags": [
- "Orgs / Teams / Memberships"
+ "Orgs / Users / OOO"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
"patch": {
- "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
- "summary": "Update a membership",
+ "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO",
+ "summary": "Update ooo entry of a user",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -2817,7 +4217,7 @@
}
},
{
- "name": "membershipId",
+ "name": "oooId",
"required": true,
"in": "path",
"schema": {
@@ -2830,66 +4230,53 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto"
+ "$ref": "#/components/schemas/UpdateOutOfOfficeEntryDto"
}
}
}
},
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
- }
- }
- }
+ "description": ""
}
},
"tags": [
- "Orgs / Teams / Memberships"
+ "Orgs / Users / OOO"
]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
- "get": {
- "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses",
- "summary": "Get routing form responses",
+ },
+ "delete": {
+ "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
+ "summary": "Delete ooo entry of a user",
"parameters": [
{
- "name": "routingFormId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
- }
- }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Teams / Routing forms / Responses"
- ]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
- "get": {
- "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules",
- "summary": "Get schedules of a team member",
- "parameters": [
+ },
{
- "name": "userId",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "oooId",
"required": true,
"in": "path",
"schema": {
@@ -2899,27 +4286,46 @@
],
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
- }
- }
- }
+ "description": ""
}
},
"tags": [
- "Orgs / Teams / Schedules",
- "Orgs / Teams / Users / Schedules"
+ "Orgs / Users / OOO"
]
}
},
- "/v2/organizations/{orgId}/users": {
+ "/v2/organizations/{orgId}/ooo": {
"get": {
- "operationId": "OrganizationsUsersController_getOrganizationsUsers",
- "summary": "Get all users",
+ "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO",
+ "summary": "Get all OOO entries of org users",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -2935,8 +4341,6 @@
"description": "The number of items to return",
"example": 10,
"schema": {
- "minimum": 1,
- "maximum": 1000,
"type": "number"
}
},
@@ -2947,90 +4351,88 @@
"description": "The number of items to skip",
"example": 0,
"schema": {
- "minimum": 0,
"type": "number"
}
},
{
- "name": "emails",
+ "name": "sortStart",
"required": false,
"in": "query",
- "description": "The email address or an array of email addresses to filter by",
+ "description": "Sort results by their start time in ascending or descending order.",
+ "example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrganizationUsersResponseDTO"
- }
- }
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Users"
- ]
- },
- "post": {
- "operationId": "OrganizationsUsersController_createOrganizationUser",
- "summary": "Create a user",
- "parameters": [
+ },
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "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": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationUserInput"
- }
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
- }
- }
+ },
+ {
+ "name": "email",
+ "required": false,
+ "in": "query",
+ "description": "Filter ooo entries by the user email address. user must be within your organization.",
+ "example": "[email protected]",
+ "schema": {
+ "type": "string"
}
}
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ }
},
"tags": [
- "Orgs / Users"
+ "Orgs / Users / OOO"
]
}
},
- "/v2/organizations/{orgId}/users/{userId}": {
- "patch": {
- "operationId": "OrganizationsUsersController_updateOrganizationUser",
- "summary": "Update a user",
+ "/v2/organizations/{orgId}/users/{userId}/schedules": {
+ "post": {
+ "operationId": "OrganizationsSchedulesController_createUserSchedule",
+ "summary": "Create a schedule",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
{
@@ -3047,37 +4449,56 @@
"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 / 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",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
{
@@ -3095,94 +4516,59 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
"tags": [
- "Orgs / Users"
+ "Orgs / Users / Schedules"
]
}
},
- "/v2/organizations/{orgId}/users/{userId}/ooo": {
+ "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
"get": {
- "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO",
- "summary": "Get all ooo entries of a user",
+ "operationId": "OrganizationsSchedulesController_getUserSchedule",
+ "summary": "Get a schedule",
"parameters": [
{
- "name": "userId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "take",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "sortStart",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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",
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ "type": "number"
}
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": [
- "Orgs / Users / OOO"
- ]
- },
- "post": {
- "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
- "summary": "Create an ooo entry for user",
- "parameters": [
+ },
{
- "name": "userId",
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -3190,31 +4576,53 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOutOfOfficeEntryDto"
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ }
}
}
}
},
- "responses": {
- "201": {
- "description": ""
- }
- },
"tags": [
- "Orgs / Users / OOO"
+ "Orgs / Users / Schedules"
]
- }
- },
- "/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
+ },
"patch": {
- "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO",
- "summary": "Update ooo entry of a user",
+ "operationId": "OrganizationsSchedulesController_updateUserSchedule",
+ "summary": "Update a schedule",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "userId",
"required": true,
@@ -3224,7 +4632,7 @@
}
},
{
- "name": "oooId",
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -3237,122 +4645,89 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOutOfOfficeEntryDto"
+ "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
}
}
}
},
"responses": {
"200": {
- "description": ""
- }
- },
- "tags": [
- "Orgs / Users / OOO"
- ]
- },
- "delete": {
- "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
- "summary": "Delete ooo entry of a user",
- "parameters": [
- {
- "name": "oooId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
+ }
+ }
}
}
- ],
- "responses": {
- "200": {
- "description": ""
- }
},
"tags": [
- "Orgs / Users / OOO"
- ]
- }
- },
- "/v2/organizations/{orgId}/ooo": {
- "get": {
- "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO",
- "summary": "Get all OOO entries of org users",
- "parameters": [
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
+ "Orgs / Users / Schedules"
+ ]
+ },
+ "delete": {
+ "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
+ "summary": "Delete a schedule",
+ "parameters": [
{
- "name": "take",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "sortStart",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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",
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ "type": "number"
}
},
{
- "name": "email",
- "required": false,
- "in": "query",
- "description": "Filter ooo entries by the user email address. user must be within your organization.",
- "example": "[email protected]",
+ "name": "scheduleId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
"responses": {
"200": {
- "description": ""
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ }
+ }
+ }
}
},
"tags": [
- "Orgs / Users / OOO"
+ "Orgs / Users / Schedules"
]
}
},
@@ -3361,6 +4736,33 @@
"operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -3410,6 +4812,33 @@
"operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -3451,6 +4880,33 @@
"operationId": "OrganizationsWebhooksController_getOrganizationWebhook",
"summary": "Get a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3480,6 +4936,33 @@
"operationId": "OrganizationsWebhooksController_deleteWebhook",
"summary": "Delete a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3509,6 +4992,33 @@
"operationId": "OrganizationsWebhooksController_updateOrgWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3554,7 +5064,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "Bearer <apiKey>",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
@@ -3875,7 +5385,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4064,7 +5574,7 @@
"/v2/bookings/{bookingUid}/mark-absent": {
"post": {
"operationId": "BookingsController_2024_08_13_markNoShow",
- "summary": "Mark a booking absence",
+ "summary": "Mark a booking absence - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4087,7 +5597,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4124,7 +5634,7 @@
"/v2/bookings/{bookingUid}/reassign": {
"post": {
"operationId": "BookingsController_2024_08_13_reassignBooking",
- "summary": "Automatically reassign booking to a new host",
+ "summary": "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4147,7 +5657,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4174,7 +5684,7 @@
"/v2/bookings/{bookingUid}/reassign/{userId}": {
"post": {
"operationId": "BookingsController_2024_08_13_reassignBookingToUser",
- "summary": "Reassign a booking to a specific user",
+ "summary": "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4205,7 +5715,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4242,7 +5752,7 @@
"/v2/bookings/{bookingUid}/confirm": {
"post": {
"operationId": "BookingsController_2024_08_13_confirmBooking",
- "summary": "Confirm booking that requires a confirmation",
+ "summary": "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4265,7 +5775,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4292,7 +5802,7 @@
"/v2/bookings/{bookingUid}/decline": {
"post": {
"operationId": "BookingsController_2024_08_13_declineBooking",
- "summary": "Decline booking that requires a confirmation",
+ "summary": "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4315,7 +5825,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4372,6 +5882,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4395,7 +5914,17 @@
"post": {
"operationId": "CalendarsController_createIcsFeed",
"summary": "Save an ICS feed",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -4427,7 +5956,17 @@
"get": {
"operationId": "CalendarsController_checkIcsFeed",
"summary": "Check an ICS feed",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4496,6 +6035,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4519,7 +6067,17 @@
"get": {
"operationId": "CalendarsController_getCalendars",
"summary": "Get all calendars",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4546,6 +6104,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -4648,6 +6207,15 @@
],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4668,13 +6236,22 @@
{
"name": "calendar",
"required": true,
- "in": "path",
+ "in": "path",
+ "schema": {
+ "enum": [
+ "apple",
+ "google",
+ "office365"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
"schema": {
- "enum": [
- "apple",
- "google",
- "office365"
- ],
"type": "string"
}
}
@@ -4713,6 +6290,15 @@
],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -4758,6 +6344,15 @@
],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4786,6 +6381,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -4886,7 +6482,17 @@
"get": {
"operationId": "ConferencingController_listInstalledConferencingApps",
"summary": "List your conferencing applications",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4923,6 +6529,15 @@
],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4946,7 +6561,17 @@
"get": {
"operationId": "ConferencingController_getDefault",
"summary": "Get your default conferencing application",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4982,6 +6607,15 @@
],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -5005,7 +6639,17 @@
"put": {
"operationId": "DestinationCalendarsController_updateDestinationCalendars",
"summary": "Update destination calendars",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5051,7 +6695,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5187,7 +6831,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5235,7 +6879,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5293,7 +6937,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5322,6 +6966,15 @@
"operationId": "EventTypeWebhooksController_createEventTypeWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5361,6 +7014,15 @@
"operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5410,6 +7072,15 @@
"operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
"summary": "Delete all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5441,6 +7112,15 @@
"operationId": "EventTypeWebhooksController_updateEventTypeWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -5479,7 +7159,17 @@
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5499,7 +7189,17 @@
"delete": {
"operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
"summary": "Delete a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5521,7 +7221,17 @@
"get": {
"operationId": "MeController_getMe",
"summary": "Get my profile",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5541,7 +7251,17 @@
"patch": {
"operationId": "MeController_updateMe",
"summary": "Update my profile",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5572,7 +7292,18 @@
"/v2/oauth-clients": {
"post": {
"operationId": "OAuthClientsController_createOAuthClient",
- "parameters": [],
+ "summary": "Create an OAuth client",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5601,7 +7332,18 @@
},
"get": {
"operationId": "OAuthClientsController_getOAuthClients",
- "parameters": [],
+ "summary": "Get all OAuth clients",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5622,7 +7364,17 @@
"/v2/oauth-clients/{clientId}": {
"get": {
"operationId": "OAuthClientsController_getOAuthClientById",
+ "summary": "Get an OAuth client",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -5650,7 +7402,17 @@
},
"patch": {
"operationId": "OAuthClientsController_updateOAuthClient",
+ "summary": "Update an OAuth client",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -5688,37 +7450,17 @@
},
"delete": {
"operationId": "OAuthClientsController_deleteOAuthClient",
+ "summary": "Delete an OAuth client",
"parameters": [
{
- "name": "clientId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- }
- },
- "/v2/oauth-clients/{clientId}/managed-users": {
- "get": {
- "operationId": "OAuthClientsController_getOAuthClientManagedUsersById",
- "parameters": [
+ },
{
"name": "clientId",
"required": true,
@@ -5726,26 +7468,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "limit",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "offset",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
- "schema": {
- "type": "number"
- }
}
],
"responses": {
@@ -5754,7 +7476,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUsersOutput"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
@@ -5774,7 +7496,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5825,7 +7547,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5868,7 +7590,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5910,7 +7632,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5958,7 +7680,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -6016,7 +7738,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -6062,7 +7784,17 @@
"post": {
"operationId": "SelectedCalendarsController_addSelectedCalendar",
"summary": "Add a selected calendar",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -6093,6 +7825,15 @@
"operationId": "SelectedCalendarsController_deleteSelectedCalendar",
"summary": "Delete a selected calendar",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "integration",
"required": true,
@@ -6328,7 +8069,7 @@
"post": {
"operationId": "SlotsController_2024_09_04_reserveSlot",
"summary": "Reserve a slot",
- "description": "Make a slot not available for others to book for a certain period of time.",
+ "description": "Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token\n then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).",
"parameters": [
{
"name": "cal-api-version",
@@ -6339,6 +8080,24 @@
"type": "string",
"default": "2024-09-04"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6508,6 +8267,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -6573,7 +8333,17 @@
"get": {
"operationId": "StripeController_check",
"summary": "Check stripe connection",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -6603,6 +8373,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -6626,7 +8405,17 @@
"post": {
"operationId": "TeamsController_createTeam",
"summary": "Create a team",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -6656,7 +8445,17 @@
"get": {
"operationId": "TeamsController_getTeams",
"summary": "Get teams",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -6679,6 +8478,15 @@
"operationId": "TeamsController_getTeam",
"summary": "Get a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6708,6 +8516,15 @@
"operationId": "TeamsController_updateTeam",
"summary": "Update a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6747,6 +8564,15 @@
"operationId": "TeamsController_deleteTeam",
"summary": "Delete a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6785,6 +8611,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6881,6 +8716,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -6918,6 +8762,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6965,6 +8818,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -7004,6 +8866,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -7038,6 +8909,15 @@
"operationId": "TeamsMembershipsController_createTeamMembership",
"summary": "Create a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -7077,6 +8957,15 @@
"operationId": "TeamsMembershipsController_getTeamMemberships",
"summary": "Get all memberships",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -7128,6 +9017,15 @@
"operationId": "TeamsMembershipsController_getTeamMembership",
"summary": "Get a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -7165,6 +9063,15 @@
"operationId": "TeamsMembershipsController_updateTeamMembership",
"summary": "Create a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -7212,6 +9119,15 @@
"operationId": "TeamsMembershipsController_deleteTeamMembership",
"summary": "Delete a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -7246,33 +9162,21 @@
]
}
},
- "/v2/timezones": {
- "get": {
- "operationId": "TimezonesController_getTimeZones",
- "summary": "Get all timezones",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
- }
- }
- }
- },
- "tags": [
- "Timezones"
- ]
- }
- },
"/v2/webhooks": {
"post": {
"operationId": "WebhooksController_createWebhook",
"summary": "Create a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -7304,6 +9208,15 @@
"summary": "Get all webooks",
"description": "Gets a paginated list of webhooks for the authenticated user.",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "take",
"required": false,
@@ -7347,6 +9260,15 @@
"operationId": "WebhooksController_updateWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -7385,7 +9307,17 @@
"get": {
"operationId": "WebhooksController_getWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -7406,6 +9338,15 @@
"operationId": "WebhooksController_deleteWebhook",
"summary": "Delete a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -16244,61 +18185,6 @@
"data"
]
},
- "ProviderVerifyClientData": {
- "type": "object",
- "properties": {
- "clientId": {
- "type": "string"
- },
- "organizationId": {
- "type": "number"
- },
- "name": {
- "type": "string"
- }
- },
- "required": [
- "clientId",
- "organizationId",
- "name"
- ]
- },
- "ProviderVerifyClientOutput": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success",
- "enum": [
- "success",
- "error"
- ]
- },
- "data": {
- "$ref": "#/components/schemas/ProviderVerifyClientData"
- }
- },
- "required": [
- "status",
- "data"
- ]
- },
- "ProviderVerifyAccessTokenOutput": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success",
- "enum": [
- "success",
- "error"
- ]
- }
- },
- "required": [
- "status"
- ]
- },
"MeOrgOutput": {
"type": "object",
"properties": {
diff --git a/docs/api-reference/v2/introduction.mdx b/docs/api-reference/v2/introduction.mdx
index 4f40b7f7bd8..47cf42499da 100644
--- a/docs/api-reference/v2/introduction.mdx
+++ b/docs/api-reference/v2/introduction.mdx
@@ -3,6 +3,20 @@ title: 'Introduction to API v2'
description: 'Introduction to Cal.com API v2 endpoints'
---
+## Platform endpoints
+Platform customers have the following endpoints available:
+
+1. Endpoints prefixed with "Platform".
+2. Endpoints with no prefix e.g "Bookings", "Event Types".
+3. If you are at least on the ESSENTIALS plan, then all endpoints prefixed with "Orgs" except "Orgs / Attributes", "Orgs / Attributes / Options" and "Orgs / Teams / Routing forms / Responses".
+
+## Organizations endpoints
+Organizations customers have all the endpoints except the ones prefixed with "Platform" and "Teams" and "Orgs / Orgs" because
+children organizations are only allowed in the platform plan right now.
+
+## Teams endpoints
+Teams customers have all the endpoints except the ones prefixed with "Platform" and "Orgs".
+
## Authentication
The Cal.com API has 3 authentication methods:
@@ -40,7 +54,7 @@ You need to use OAuth credentials when:
1. Managing managed users [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/create-a-managed-user)
2. Creating OAuth client webhooks [API reference](https://cal.com/docs/api-reference/v2/platform-webhooks/create-a-webhook)
-3. Refreshing tokens of a managed user [API reference](https://cal.com/docs/api-reference/v2/oauth/post-v2oauth-refresh)
+3. Refreshing tokens of a managed user [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/refresh-managed-user-tokens)
4. Teams related endpoints: Managing organization teams [API reference](https://cal.com/docs/api-reference/v2/orgs-teams/create-a-team), adding managed users as members to teams [API reference](https://cal.com/docs/api-reference/v2/orgs-teams-memberships/create-a-membership), creating team event types [API reference](https://cal.com/docs/api-reference/v2/orgs-event-types/create-an-event-type).
OAuth credentials can be accessed in the platform dashboard https://app.cal.com/settings/platform after you have created an OAuth client. Each one has an ID and secret. You then need to pass them as request headers:
@@ -63,11 +77,3 @@ Validity period: access tokens are valid for 60 minutes and refresh tokens for 1
Recovering tokens: if you ever lose managed user's access or refresh tokens, you can force refresh them using the OAuth client credentials and store them in your database [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/force-refresh-tokens).
-## Navigating endpoints
-Platform customers have the following endpoints available:
-
-1. Endpoints prefixed with "Platform".
-2. Endpoints with no prefix e.g "Bookings", "Event Types".
-3. If you are at least on the ESSENTIALS plan, then all endpoints prefixed with "Orgs" except "Orgs / Attributes".
-
-Non-platform customers have all the endpoints except the ones prefixed with "Platform".
\ No newline at end of file
diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json
index 5a9813ac888..788c9cc1430 100644
--- a/docs/api-reference/v2/openapi.json
+++ b/docs/api-reference/v2/openapi.json
@@ -1,69 +1,20 @@
{
"openapi": "3.0.0",
"paths": {
- "/v2/provider/{clientId}": {
- "get": {
- "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": {
+ "/v2/oauth-clients/{clientId}/users": {
"get": {
- "operationId": "CalProviderController_verifyAccessToken",
- "summary": "Verify an access token",
+ "operationId": "OAuthClientUsersController_getManagedUsers",
+ "summary": "Get all managed users",
"parameters": [
{
- "name": "clientId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput"
- }
- }
- }
- }
- },
- "tags": ["Platform / Cal Provider"]
- }
- },
- "/v2/oauth-clients/{clientId}/users": {
- "get": {
- "operationId": "OAuthClientUsersController_getManagedUsers",
- "summary": "Get all managed users",
- "parameters": [
+ },
{
"name": "clientId",
"required": true,
@@ -124,6 +75,15 @@
"operationId": "OAuthClientUsersController_createUser",
"summary": "Create a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -163,6 +123,15 @@
"operationId": "OAuthClientUsersController_getUserById",
"summary": "Get a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -198,6 +167,15 @@
"operationId": "OAuthClientUsersController_updateUser",
"summary": "Update a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -243,6 +221,15 @@
"operationId": "OAuthClientUsersController_deleteUser",
"summary": "Delete a managed user",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -281,6 +268,15 @@
"summary": "Force refresh tokens",
"description": "If you have lost managed user access or refresh token, then you can get new ones by using OAuth credentials.\n Each access token is valid for 60 minutes and each refresh token for 1 year. Make sure to store them later in your database, for example, by updating the User model to have `calAccessToken` and `calRefreshToken` columns.",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "userId",
"required": true,
@@ -367,6 +363,15 @@
"operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -404,6 +409,15 @@
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -451,6 +465,15 @@
"operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
"summary": "Delete all webhooks",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -480,6 +503,15 @@
"operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -516,7 +548,17 @@
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -534,7 +576,17 @@
"delete": {
"operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
"summary": "Delete a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -555,6 +607,15 @@
"operationId": "OrganizationsAttributesController_getOrganizationAttributes",
"summary": "Get all attributes",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -602,6 +663,15 @@
"operationId": "OrganizationsAttributesController_createOrganizationAttribute",
"summary": "Create an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -641,6 +711,15 @@
"operationId": "OrganizationsAttributesController_getOrganizationAttribute",
"summary": "Get an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -676,6 +755,15 @@
"operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
"summary": "Update an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -721,6 +809,15 @@
"operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
"summary": "Delete an attribute",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -758,6 +855,15 @@
"operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption",
"summary": "Create an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -803,6 +909,15 @@
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
"summary": "Get all attribute options",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -840,6 +955,15 @@
"operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption",
"summary": "Delete an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -883,6 +1007,15 @@
"operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
"summary": "Update an attribute option",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -938,6 +1071,15 @@
"operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser",
"summary": "Assign an attribute to a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -983,6 +1125,15 @@
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
"summary": "Get all attribute options for a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1020,6 +1171,15 @@
"operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser",
"summary": "Unassign an attribute from a user",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1066,20 +1226,47 @@
"summary": "Save delegation credentials for your organization.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialInput"
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateDelegationCredentialInput"
}
}
}
@@ -1104,6 +1291,33 @@
"operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
"summary": "Update delegation credentials of your organization.",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1146,58 +1360,40 @@
"tags": ["Orgs / Delegation Credentials"]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
- "post": {
- "operationId": "OrganizationsEventTypesController_createTeamEventType",
- "summary": "Create an event type",
+ "/v2/organizations/{orgId}/memberships": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getAllMemberships",
+ "summary": "Get all memberships",
"parameters": [
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
- }
+ "type": "string"
}
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
- }
- }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Event Types"]
- },
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
- "summary": "Get a team event type",
- "parameters": [
+ },
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1205,19 +1401,21 @@
}
},
{
- "name": "eventSlug",
+ "name": "take",
"required": false,
"in": "query",
- "description": "Slug of team event type to return.",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "hostsLimit",
+ "name": "skip",
"required": false,
"in": "query",
- "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
"type": "number"
}
@@ -1229,65 +1427,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ "$ref": "#/components/schemas/GetAllOrgMemberships"
}
}
}
}
},
- "tags": ["Orgs / Event Types"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
- "get": {
- "operationId": "OrganizationsEventTypesController_getTeamEventType",
- "summary": "Get an event type",
+ "tags": ["Orgs / Memberships"]
+ },
+ "post": {
+ "operationId": "OrganizationsMembershipsController_createMembership",
+ "summary": "Create a membership",
"parameters": [
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "eventTypeId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetTeamEventTypeOutput"
- }
- }
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Event Types"]
- },
- "patch": {
- "operationId": "OrganizationsEventTypesController_updateTeamEventType",
- "summary": "Update a team event type",
- "parameters": [
+ },
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "eventTypeId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1300,31 +1480,60 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14"
+ "$ref": "#/components/schemas/CreateOrgMembershipDto"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateTeamEventTypeOutput"
+ "$ref": "#/components/schemas/CreateOrgMembershipOutput"
}
}
}
}
},
- "tags": ["Orgs / Event Types"]
- },
- "delete": {
- "operationId": "OrganizationsEventTypesController_deleteTeamEventType",
- "summary": "Delete a team event type",
+ "tags": ["Orgs / Memberships"]
+ }
+ },
+ "/v2/organizations/{orgId}/memberships/{membershipId}": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getOrgMembership",
+ "summary": "Get a membership",
"parameters": [
{
- "name": "teamId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1332,7 +1541,7 @@
}
},
{
- "name": "eventTypeId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1346,91 +1555,57 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
+ "$ref": "#/components/schemas/GetOrgMembership"
}
}
}
}
},
- "tags": ["Orgs / Event Types"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
- "post": {
- "operationId": "OrganizationsEventTypesController_createPhoneCall",
- "summary": "Create a phone call",
+ "tags": ["Orgs / Memberships"]
+ },
+ "delete": {
+ "operationId": "OrganizationsMembershipsController_deleteMembership",
+ "summary": "Delete a membership",
"parameters": [
{
- "name": "eventTypeId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreatePhoneCallInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreatePhoneCallOutput"
- }
- }
+ "type": "string"
}
- }
- },
- "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",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"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"
}
@@ -1442,67 +1617,111 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetTeamEventTypesOutput"
+ "$ref": "#/components/schemas/DeleteOrgMembership"
}
}
}
}
},
- "tags": ["Orgs / Event Types"]
- }
- },
- "/v2/organizations/{orgId}/memberships": {
- "get": {
- "operationId": "OrganizationsMembershipsController_getAllMemberships",
- "summary": "Get all memberships",
+ "tags": ["Orgs / Memberships"]
+ },
+ "patch": {
+ "operationId": "OrganizationsMembershipsController_updateMembership",
+ "summary": "Update a membership",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "number"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgMembershipDto"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllOrgMemberships"
+ "$ref": "#/components/schemas/UpdateOrgMembership"
}
}
}
}
},
"tags": ["Orgs / Memberships"]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/organizations": {
"post": {
- "operationId": "OrganizationsMembershipsController_createMembership",
- "summary": "Create a membership",
+ "operationId": "OrganizationsOrganizationsController_createOrganization",
+ "summary": "Create an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1517,7 +1736,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipDto"
+ "$ref": "#/components/schemas/CreateOrganizationInput"
}
}
}
@@ -1528,30 +1747,39 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipOutput"
+ "$ref": "#/components/schemas/CreateManagedOrganizationOutput"
}
}
}
}
},
- "tags": ["Orgs / Memberships"]
- }
- },
- "/v2/organizations/{orgId}/memberships/{membershipId}": {
+ "tags": ["Orgs / Orgs"]
+ },
"get": {
- "operationId": "OrganizationsMembershipsController_getOrgMembership",
- "summary": "Get a membership",
+ "operationId": "OrganizationsOrganizationsController_getOrganizations",
+ "summary": "Get all organizations within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1565,28 +1793,41 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgMembership"
+ "$ref": "#/components/schemas/GetManagedOrganizationsOutput"
}
}
}
}
},
- "tags": ["Orgs / Memberships"]
- },
- "delete": {
- "operationId": "OrganizationsMembershipsController_deleteMembership",
- "summary": "Delete a membership",
+ "tags": ["Orgs / Orgs"]
+ }
+ },
+ "/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
+ "get": {
+ "operationId": "OrganizationsOrganizationsController_getOrganization",
+ "summary": "Get an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "managedOrganizationId",
"required": true,
"in": "path",
"schema": {
@@ -1600,18 +1841,37 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrgMembership"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
- "tags": ["Orgs / Memberships"]
+ "tags": ["Orgs / Orgs"]
},
"patch": {
- "operationId": "OrganizationsMembershipsController_updateMembership",
- "summary": "Update a membership",
+ "operationId": "OrganizationsOrganizationsController_updateOrganization",
+ "summary": "Update an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1621,7 +1881,7 @@
}
},
{
- "name": "membershipId",
+ "name": "managedOrganizationId",
"required": true,
"in": "path",
"schema": {
@@ -1634,7 +1894,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgMembershipDto"
+ "$ref": "#/components/schemas/UpdateOrganizationInput"
}
}
}
@@ -1645,23 +1905,39 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgMembership"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
- "tags": ["Orgs / Memberships"]
- }
- },
- "/v2/organizations/{orgId}/organizations": {
- "post": {
- "operationId": "OrganizationsOrganizationsController_createOrganization",
- "summary": "Create an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "tags": ["Orgs / Orgs"]
+ },
+ "delete": {
+ "operationId": "OrganizationsOrganizationsController_deleteOrganization",
+ "summary": "Delete an organization within an organization",
+ "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
"parameters": [
{
- "name": "orgId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "managedOrganizationId",
"required": true,
"in": "path",
"schema": {
@@ -1669,35 +1945,53 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationInput"
- }
- }
- }
- },
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateManagedOrganizationOutput"
+ "$ref": "#/components/schemas/GetManagedOrganizationOutput"
}
}
}
}
},
"tags": ["Orgs / Orgs"]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/schedules": {
"get": {
- "operationId": "OrganizationsOrganizationsController_getOrganizations",
- "summary": "Get all organizations within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
+ "summary": "Get all schedules",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1705,6 +1999,26 @@
"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": {
@@ -1713,28 +2027,74 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationsOutput"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
- "tags": ["Orgs / Orgs"]
+ "tags": ["Orgs / Schedules"]
}
},
- "/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
+ "/v2/organizations/{orgId}/teams": {
"get": {
- "operationId": "OrganizationsOrganizationsController_getOrganization",
- "summary": "Get an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "operationId": "OrganizationsTeamsController_getAllTeams",
+ "summary": "Get all teams",
"parameters": [
{
- "name": "managedOrganizationId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "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": {
@@ -1743,29 +2103,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
+ "$ref": "#/components/schemas/OrgTeamsOutputResponseDto"
}
}
}
}
},
- "tags": ["Orgs / Orgs"]
+ "tags": ["Orgs / Teams"]
},
- "patch": {
- "operationId": "OrganizationsOrganizationsController_updateOrganization",
- "summary": "Update an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "post": {
+ "operationId": "OrganizationsTeamsController_createTeam",
+ "summary": "Create a team",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "managedOrganizationId",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -1778,59 +2156,58 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationInput"
+ "$ref": "#/components/schemas/CreateOrgTeamDto"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
- "tags": ["Orgs / Orgs"]
- },
- "delete": {
- "operationId": "OrganizationsOrganizationsController_deleteOrganization",
- "summary": "Delete an organization within an organization",
- "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.",
+ "tags": ["Orgs / Teams"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/me": {
+ "get": {
+ "operationId": "OrganizationsTeamsController_getMyTeams",
+ "summary": "Get teams membership for user",
"parameters": [
{
- "name": "managedOrganizationId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetManagedOrganizationOutput"
- }
- }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Orgs"]
- }
- },
- "/v2/organizations/{orgId}/schedules": {
- "get": {
- "operationId": "OrganizationsSchedulesController_getOrganizationSchedules",
- "summary": "Get all schedules",
- "parameters": [
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -1866,100 +2243,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto"
}
}
}
}
},
- "tags": ["Orgs / Schedules"]
+ "tags": ["Orgs / Teams"]
}
},
- "/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/CreateScheduleInput_2024_06_11"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11"
- }
- }
- }
- }
- },
- "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
- },
+ "/v2/organizations/{orgId}/teams/{teamId}": {
"get": {
- "operationId": "OrganizationsSchedulesController_getUserSchedules",
- "summary": "Get all schedules",
+ "operationId": "OrganizationsTeamsController_getTeam",
+ "summary": "Get a team",
"parameters": [
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
- }
- }
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
- }
- },
- "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
- "get": {
- "operationId": "OrganizationsSchedulesController_getUserSchedule",
- "summary": "Get a schedule",
- "parameters": [
+ },
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "scheduleId",
- "required": true,
- "in": "path",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -1969,65 +2291,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
- "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
+ "tags": ["Orgs / Teams"]
},
- "patch": {
- "operationId": "OrganizationsSchedulesController_updateUserSchedule",
- "summary": "Update a schedule",
+ "delete": {
+ "operationId": "OrganizationsTeamsController_deleteTeam",
+ "summary": "Delete a team",
"parameters": [
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "scheduleId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
- }
+ "type": "string"
}
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
- }
- }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
- },
- "delete": {
- "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
- "summary": "Delete a schedule",
- "parameters": [
+ },
{
- "name": "userId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2035,7 +2339,7 @@
}
},
{
- "name": "scheduleId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -2049,67 +2353,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
}
}
}
}
},
- "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
- }
- },
- "/v2/organizations/{orgId}/teams": {
- "get": {
- "operationId": "OrganizationsTeamsController_getAllTeams",
- "summary": "Get all teams",
+ "tags": ["Orgs / Teams"]
+ },
+ "patch": {
+ "operationId": "OrganizationsTeamsController_updateTeam",
+ "summary": "Update a team",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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/OrgTeamsOutputResponseDto"
- }
- }
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Teams", "Teams"]
- },
- "post": {
- "operationId": "OrganizationsTeamsController_createTeam",
- "summary": "Create a team",
- "parameters": [
+ },
{
"name": "orgId",
"required": true,
@@ -2119,11 +2401,11 @@
}
},
{
- "name": "x-cal-client-id",
+ "name": "teamId",
"required": true,
- "in": "header",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -2132,13 +2414,13 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgTeamDto"
+ "$ref": "#/components/schemas/UpdateOrgTeamDto"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
@@ -2152,160 +2434,38 @@
"tags": ["Orgs / Teams"]
}
},
- "/v2/organizations/{orgId}/teams/me": {
+ "/v2/organizations/{orgId}/teams/{teamId}/bookings": {
"get": {
- "operationId": "OrganizationsTeamsController_getMyTeams",
- "summary": "Get teams membership for user",
+ "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings",
+ "summary": "Get organization team bookings",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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/OrgMeTeamsOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": ["Orgs / Teams"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}": {
- "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",
- "parameters": [
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "teamId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": ["Orgs / Teams"]
- },
- "patch": {
- "operationId": "OrganizationsTeamsController_updateTeam",
- "summary": "Update a team",
- "parameters": [
- {
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
+ "type": "string"
}
},
- {
- "name": "teamId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrgTeamDto"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": ["Orgs / Teams"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/bookings": {
- "get": {
- "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings",
- "summary": "Get organization team bookings",
- "parameters": [
{
"name": "status",
"required": false,
@@ -2460,68 +2620,40 @@
"tags": ["Orgs / Teams / Bookings"]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/memberships": {
- "get": {
- "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships",
- "summary": "Get all memberships",
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types": {
+ "post": {
+ "operationId": "OrganizationsEventTypesController_createTeamEventType",
+ "summary": "Create an event type",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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/OrgTeamMembershipsOutputResponseDto"
- }
- }
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Teams / Memberships"]
- },
- "post": {
- "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
- "summary": "Create a membership",
- "parameters": [
+ },
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -2529,7 +2661,7 @@
}
},
{
- "name": "teamId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2542,7 +2674,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgTeamMembershipDto"
+ "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14"
}
}
}
@@ -2553,65 +2685,47 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ "$ref": "#/components/schemas/CreateTeamEventTypeOutput"
}
}
}
}
},
- "tags": ["Orgs / Teams / Memberships"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
+ "tags": ["Orgs / Teams / Event Types"]
+ },
"get": {
- "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership",
- "summary": "Get a membership",
+ "operationId": "OrganizationsEventTypesController_getTeamEventTypes",
+ "summary": "Get a team event type",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
- "required": true,
- "in": "path",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
- }
- }
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Teams / Memberships"]
- },
- "delete": {
- "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
- "summary": "Delete a membership",
- "parameters": [
+ },
{
- "name": "orgId",
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
@@ -2619,17 +2733,19 @@
}
},
{
- "name": "teamId",
- "required": true,
- "in": "path",
+ "name": "eventSlug",
+ "required": false,
+ "in": "query",
+ "description": "Slug of team event type to return.",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "membershipId",
- "required": true,
- "in": "path",
+ "name": "hostsLimit",
+ "required": false,
+ "in": "query",
+ "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.",
"schema": {
"type": "number"
}
@@ -2641,25 +2757,108 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ "$ref": "#/components/schemas/GetTeamEventTypesOutput"
}
}
}
}
},
- "tags": ["Orgs / Teams / Memberships"]
- },
- "patch": {
- "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
- "summary": "Update a membership",
+ "tags": ["Orgs / Teams / Event Types"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
+ "get": {
+ "operationId": "OrganizationsEventTypesController_getTeamEventType",
+ "summary": "Get an event type",
"parameters": [
{
- "name": "orgId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetTeamEventTypeOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Event Types"]
+ },
+ "patch": {
+ "operationId": "OrganizationsEventTypesController_updateTeamEventType",
+ "summary": "Update a team event type",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
{
"name": "teamId",
@@ -2670,7 +2869,7 @@
}
},
{
- "name": "membershipId",
+ "name": "eventTypeId",
"required": true,
"in": "path",
"schema": {
@@ -2683,7 +2882,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto"
+ "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14"
}
}
}
@@ -2694,26 +2893,59 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ "$ref": "#/components/schemas/UpdateTeamEventTypeOutput"
}
}
}
}
},
- "tags": ["Orgs / Teams / Memberships"]
- }
- },
- "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
- "get": {
- "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses",
- "summary": "Get routing form responses",
+ "tags": ["Orgs / Teams / Event Types"]
+ },
+ "delete": {
+ "operationId": "OrganizationsEventTypesController_deleteTeamEventType",
+ "summary": "Delete a team event type",
"parameters": [
{
- "name": "routingFormId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "teamId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
}
}
],
@@ -2723,22 +2955,57 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
+ "$ref": "#/components/schemas/DeleteTeamEventTypeOutput"
}
}
}
}
},
- "tags": ["Orgs / Teams / Routing forms / Responses"]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
- "/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
- "get": {
- "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules",
- "summary": "Get schedules of a team member",
+ "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
+ "post": {
+ "operationId": "OrganizationsEventTypesController_createPhoneCall",
+ "summary": "Create a phone call",
"parameters": [
{
- "name": "userId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventTypeId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -2746,26 +3013,63 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreatePhoneCallInput"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ "$ref": "#/components/schemas/CreatePhoneCallOutput"
}
}
}
}
},
- "tags": ["Orgs / Teams / Schedules", "Orgs / Teams / Users / Schedules"]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
- "/v2/organizations/{orgId}/users": {
+ "/v2/organizations/{orgId}/teams/event-types": {
"get": {
- "operationId": "OrganizationsUsersController_getOrganizationsUsers",
- "summary": "Get all users",
+ "operationId": "OrganizationsEventTypesController_getTeamsEventTypes",
+ "summary": "Get all team event types",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -2781,98 +3085,1191 @@
"description": "The number of items to return",
"example": 10,
"schema": {
- "minimum": 1,
- "maximum": 1000,
"type": "number"
}
},
{
- "name": "skip",
+ "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"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Event Types"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/memberships": {
+ "get": {
+ "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships",
+ "summary": "Get all memberships",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "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/OrgTeamMembershipsOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Memberships"]
+ },
+ "post": {
+ "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
+ "summary": "Create a membership",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrgTeamMembershipDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Memberships"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
+ "get": {
+ "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership",
+ "summary": "Get a membership",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Memberships"]
+ },
+ "delete": {
+ "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
+ "summary": "Delete a membership",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Memberships"]
+ },
+ "patch": {
+ "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
+ "summary": "Update a membership",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "teamId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Memberships"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
+ "get": {
+ "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses",
+ "summary": "Get routing form responses",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "routingFormId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Routing forms / Responses"]
+ }
+ },
+ "/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
+ "get": {
+ "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules",
+ "summary": "Get schedules of a team member",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Teams / Users / Schedules"]
+ }
+ },
+ "/v2/organizations/{orgId}/users": {
+ "get": {
+ "operationId": "OrganizationsUsersController_getOrganizationsUsers",
+ "summary": "Get all users",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "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": {
+ "minimum": 1,
+ "maximum": 1000,
+ "type": "number"
+ }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "minimum": 0,
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrganizationUsersResponseDTO"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Users"]
+ },
+ "post": {
+ "operationId": "OrganizationsUsersController_createOrganizationUser",
+ "summary": "Create a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrganizationUserInput"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Users"]
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}": {
+ "patch": {
+ "operationId": "OrganizationsUsersController_updateOrganizationUser",
+ "summary": "Update a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrganizationUserInput"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Users"]
+ },
+ "delete": {
+ "operationId": "OrganizationsUsersController_deleteOrganizationUser",
+ "summary": "Delete a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": ["Orgs / Users"]
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}/ooo": {
+ "get": {
+ "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO",
+ "summary": "Get all ooo entries of a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
+ "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"
+ }
+ },
+ {
+ "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"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ }
+ },
+ "tags": ["Orgs / Users / OOO"]
+ },
+ "post": {
+ "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
+ "summary": "Create an ooo entry for user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOutOfOfficeEntryDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": ""
+ }
+ },
+ "tags": ["Orgs / Users / OOO"]
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
+ "patch": {
+ "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO",
+ "summary": "Update ooo entry of a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "oooId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOutOfOfficeEntryDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": ""
+ }
+ },
+ "tags": ["Orgs / Users / OOO"]
+ },
+ "delete": {
+ "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
+ "summary": "Delete ooo entry of a user",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "oooId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ }
+ },
+ "tags": ["Orgs / Users / OOO"]
+ }
+ },
+ "/v2/organizations/{orgId}/ooo": {
+ "get": {
+ "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO",
+ "summary": "Get all OOO entries of org users",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "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"
+ }
+ },
+ {
+ "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": "The number of items to skip",
- "example": 0,
+ "description": "Sort results by their end time in ascending or descending order.",
+ "example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "minimum": 0,
- "type": "number"
+ "enum": ["asc", "desc"],
+ "type": "string"
}
},
{
- "name": "emails",
+ "name": "email",
"required": false,
"in": "query",
- "description": "The email address or an array of email addresses to filter by",
+ "description": "Filter ooo entries by the user email address. user must be within your organization.",
+ "example": "[email protected]",
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrganizationUsersResponseDTO"
- }
- }
- }
+ "description": ""
}
},
- "tags": ["Orgs / Users"]
- },
+ "tags": ["Orgs / Users / OOO"]
+ }
+ },
+ "/v2/organizations/{orgId}/users/{userId}/schedules": {
"post": {
- "operationId": "OrganizationsUsersController_createOrganizationUser",
- "summary": "Create a user",
+ "operationId": "OrganizationsSchedulesController_createUserSchedule",
+ "summary": "Create a schedule",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationUserInput"
- }
+ "type": "string"
}
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
- }
- }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": ["Orgs / Users"]
- }
- },
- "/v2/organizations/{orgId}/users/{userId}": {
- "patch": {
- "operationId": "OrganizationsUsersController_updateOrganizationUser",
- "summary": "Update a user",
- "parameters": [
+ },
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
@@ -2889,35 +4286,54 @@
"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"]
+ "tags": ["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",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
- "type": "number"
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
{
@@ -2935,84 +4351,57 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationUserOutput"
+ "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11"
}
}
}
}
},
- "tags": ["Orgs / Users"]
+ "tags": ["Orgs / Users / Schedules"]
}
},
- "/v2/organizations/{orgId}/users/{userId}/ooo": {
+ "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
"get": {
- "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO",
- "summary": "Get all ooo entries of a user",
+ "operationId": "OrganizationsSchedulesController_getUserSchedule",
+ "summary": "Get a schedule",
"parameters": [
{
- "name": "userId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "take",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "sortStart",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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",
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
- "enum": ["asc", "desc"],
- "type": "string"
+ "type": "number"
}
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": ["Orgs / Users / OOO"]
- },
- "post": {
- "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
- "summary": "Create an ooo entry for user",
- "parameters": [
+ },
{
- "name": "userId",
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -3020,29 +4409,51 @@
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOutOfOfficeEntryDto"
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11"
+ }
}
}
}
},
- "responses": {
- "201": {
- "description": ""
- }
- },
- "tags": ["Orgs / Users / OOO"]
- }
- },
- "/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
+ "tags": ["Orgs / Users / Schedules"]
+ },
"patch": {
- "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO",
- "summary": "Update ooo entry of a user",
+ "operationId": "OrganizationsSchedulesController_updateUserSchedule",
+ "summary": "Update a schedule",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "userId",
"required": true,
@@ -3052,7 +4463,7 @@
}
},
{
- "name": "oooId",
+ "name": "scheduleId",
"required": true,
"in": "path",
"schema": {
@@ -3065,111 +4476,86 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOutOfOfficeEntryDto"
+ "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11"
}
}
}
},
"responses": {
"200": {
- "description": ""
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11"
+ }
+ }
+ }
}
},
- "tags": ["Orgs / Users / OOO"]
+ "tags": ["Orgs / Users / Schedules"]
},
"delete": {
- "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
- "summary": "Delete ooo entry of a user",
- "parameters": [
- {
- "name": "oooId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": ["Orgs / Users / OOO"]
- }
- },
- "/v2/organizations/{orgId}/ooo": {
- "get": {
- "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO",
- "summary": "Get all OOO entries of org users",
+ "operationId": "OrganizationsSchedulesController_deleteUserSchedule",
+ "summary": "Delete a schedule",
"parameters": [
{
- "name": "orgId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "take",
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "skip",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "sortStart",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"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",
+ "name": "userId",
+ "required": true,
+ "in": "path",
"schema": {
- "enum": ["asc", "desc"],
- "type": "string"
+ "type": "number"
}
},
{
- "name": "email",
- "required": false,
- "in": "query",
- "description": "Filter ooo entries by the user email address. user must be within your organization.",
- "example": "[email protected]",
+ "name": "scheduleId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
"responses": {
"200": {
- "description": ""
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11"
+ }
+ }
+ }
}
},
- "tags": ["Orgs / Users / OOO"]
+ "tags": ["Orgs / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/webhooks": {
@@ -3177,6 +4563,33 @@
"operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -3224,6 +4637,33 @@
"operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "orgId",
"required": true,
@@ -3263,6 +4703,33 @@
"operationId": "OrganizationsWebhooksController_getOrganizationWebhook",
"summary": "Get a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3290,6 +4757,33 @@
"operationId": "OrganizationsWebhooksController_deleteWebhook",
"summary": "Delete a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3317,6 +4811,33 @@
"operationId": "OrganizationsWebhooksController_updateOrgWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -3360,7 +4881,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "Bearer <apiKey>",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
@@ -3659,7 +5180,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -3840,7 +5361,7 @@
"/v2/bookings/{bookingUid}/mark-absent": {
"post": {
"operationId": "BookingsController_2024_08_13_markNoShow",
- "summary": "Mark a booking absence",
+ "summary": "Mark a booking absence - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -3863,7 +5384,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -3898,7 +5419,7 @@
"/v2/bookings/{bookingUid}/reassign": {
"post": {
"operationId": "BookingsController_2024_08_13_reassignBooking",
- "summary": "Automatically reassign booking to a new host",
+ "summary": "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -3921,7 +5442,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -3946,7 +5467,7 @@
"/v2/bookings/{bookingUid}/reassign/{userId}": {
"post": {
"operationId": "BookingsController_2024_08_13_reassignBookingToUser",
- "summary": "Reassign a booking to a specific user",
+ "summary": "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -3977,7 +5498,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4012,7 +5533,7 @@
"/v2/bookings/{bookingUid}/confirm": {
"post": {
"operationId": "BookingsController_2024_08_13_confirmBooking",
- "summary": "Confirm booking that requires a confirmation",
+ "summary": "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4035,7 +5556,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4060,7 +5581,7 @@
"/v2/bookings/{bookingUid}/decline": {
"post": {
"operationId": "BookingsController_2024_08_13_declineBooking",
- "summary": "Decline booking that requires a confirmation",
+ "summary": "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.",
"parameters": [
{
"name": "cal-api-version",
@@ -4083,7 +5604,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4138,6 +5659,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4159,7 +5689,17 @@
"post": {
"operationId": "CalendarsController_createIcsFeed",
"summary": "Save an ICS feed",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -4189,7 +5729,17 @@
"get": {
"operationId": "CalendarsController_checkIcsFeed",
"summary": "Check an ICS feed",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4256,6 +5806,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4277,7 +5836,17 @@
"get": {
"operationId": "CalendarsController_getCalendars",
"summary": "Get all calendars",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4302,6 +5871,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -4392,6 +5962,15 @@
"enum": ["apple"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4415,6 +5994,15 @@
"enum": ["apple", "google", "office365"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4445,6 +6033,15 @@
"enum": ["apple", "google", "office365"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -4486,6 +6083,15 @@
"enum": ["google-meet"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4512,6 +6118,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -4602,7 +6209,17 @@
"get": {
"operationId": "ConferencingController_listInstalledConferencingApps",
"summary": "List your conferencing applications",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4632,6 +6249,15 @@
"enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4653,7 +6279,17 @@
"get": {
"operationId": "ConferencingController_getDefault",
"summary": "Get your default conferencing application",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -4683,6 +6319,15 @@
"enum": ["google-meet", "zoom", "msteams"],
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -4704,7 +6349,17 @@
"put": {
"operationId": "DestinationCalendarsController_updateDestinationCalendars",
"summary": "Update destination calendars",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -4748,7 +6403,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4880,7 +6535,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4926,7 +6581,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -4982,7 +6637,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5009,6 +6664,15 @@
"operationId": "EventTypeWebhooksController_createEventTypeWebhook",
"summary": "Create a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5046,6 +6710,15 @@
"operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
"summary": "Get all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5093,6 +6766,15 @@
"operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
"summary": "Delete all webhooks",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "eventTypeId",
"required": true,
@@ -5122,6 +6804,15 @@
"operationId": "EventTypeWebhooksController_updateEventTypeWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -5158,7 +6849,17 @@
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5176,7 +6877,17 @@
"delete": {
"operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
"summary": "Delete a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5196,7 +6907,17 @@
"get": {
"operationId": "MeController_getMe",
"summary": "Get my profile",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5214,7 +6935,17 @@
"patch": {
"operationId": "MeController_updateMe",
"summary": "Update my profile",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5243,7 +6974,18 @@
"/v2/oauth-clients": {
"post": {
"operationId": "OAuthClientsController_createOAuthClient",
- "parameters": [],
+ "summary": "Create an OAuth client",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5270,7 +7012,18 @@
},
"get": {
"operationId": "OAuthClientsController_getOAuthClients",
- "parameters": [],
+ "summary": "Get all OAuth clients",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -5289,7 +7042,17 @@
"/v2/oauth-clients/{clientId}": {
"get": {
"operationId": "OAuthClientsController_getOAuthClientById",
+ "summary": "Get an OAuth client",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -5315,7 +7078,17 @@
},
"patch": {
"operationId": "OAuthClientsController_updateOAuthClient",
+ "summary": "Update an OAuth client",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "clientId",
"required": true,
@@ -5351,35 +7124,17 @@
},
"delete": {
"operationId": "OAuthClientsController_deleteOAuthClient",
+ "summary": "Delete an OAuth client",
"parameters": [
{
- "name": "clientId",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": ["OAuth Clients"]
- }
- },
- "/v2/oauth-clients/{clientId}/managed-users": {
- "get": {
- "operationId": "OAuthClientsController_getOAuthClientManagedUsersById",
- "parameters": [
+ },
{
"name": "clientId",
"required": true,
@@ -5387,26 +7142,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "limit",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "offset",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
- "schema": {
- "type": "number"
- }
}
],
"responses": {
@@ -5415,7 +7150,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUsersOutput"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
@@ -5433,7 +7168,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5482,7 +7217,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5523,7 +7258,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5563,7 +7298,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5609,7 +7344,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5665,7 +7400,7 @@
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` either managed user access token or api key prefixed with cal_",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
"type": "string"
@@ -5709,7 +7444,17 @@
"post": {
"operationId": "SelectedCalendarsController_addSelectedCalendar",
"summary": "Add a selected calendar",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -5738,6 +7483,15 @@
"operationId": "SelectedCalendarsController_deleteSelectedCalendar",
"summary": "Delete a selected calendar",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "integration",
"required": true,
@@ -5969,7 +7723,7 @@
"post": {
"operationId": "SlotsController_2024_09_04_reserveSlot",
"summary": "Reserve a slot",
- "description": "Make a slot not available for others to book for a certain period of time.",
+ "description": "Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token\n then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).",
"parameters": [
{
"name": "cal-api-version",
@@ -5980,6 +7734,24 @@
"type": "string",
"default": "2024-09-04"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6141,6 +7913,7 @@
"name": "Authorization",
"required": true,
"in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"schema": {
"type": "string"
}
@@ -6202,7 +7975,17 @@
"get": {
"operationId": "StripeController_check",
"summary": "Check stripe connection",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -6230,6 +8013,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -6251,7 +8043,17 @@
"post": {
"operationId": "TeamsController_createTeam",
"summary": "Create a team",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -6279,7 +8081,17 @@
"get": {
"operationId": "TeamsController_getTeams",
"summary": "Get teams",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -6300,6 +8112,15 @@
"operationId": "TeamsController_getTeam",
"summary": "Get a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6327,6 +8148,15 @@
"operationId": "TeamsController_updateTeam",
"summary": "Update a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6364,6 +8194,15 @@
"operationId": "TeamsController_deleteTeam",
"summary": "Delete a team",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6400,6 +8239,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6492,6 +8340,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -6527,6 +8384,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6572,6 +8438,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -6609,6 +8484,15 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -6641,6 +8525,15 @@
"operationId": "TeamsMembershipsController_createTeamMembership",
"summary": "Create a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6678,6 +8571,15 @@
"operationId": "TeamsMembershipsController_getTeamMemberships",
"summary": "Get all memberships",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6727,6 +8629,15 @@
"operationId": "TeamsMembershipsController_getTeamMembership",
"summary": "Get a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6762,6 +8673,15 @@
"operationId": "TeamsMembershipsController_updateTeamMembership",
"summary": "Create a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6807,6 +8727,15 @@
"operationId": "TeamsMembershipsController_deleteTeamMembership",
"summary": "Delete a membership",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "teamId",
"required": true,
@@ -6839,31 +8768,21 @@
"tags": ["Teams / Memberships"]
}
},
- "/v2/timezones": {
- "get": {
- "operationId": "TimezonesController_getTimeZones",
- "summary": "Get all timezones",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object"
- }
- }
- }
- }
- },
- "tags": ["Timezones"]
- }
- },
"/v2/webhooks": {
"post": {
"operationId": "WebhooksController_createWebhook",
"summary": "Create a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"requestBody": {
"required": true,
"content": {
@@ -6893,6 +8812,15 @@
"summary": "Get all webooks",
"description": "Gets a paginated list of webhooks for the authenticated user.",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "take",
"required": false,
@@ -6934,6 +8862,15 @@
"operationId": "WebhooksController_updateWebhook",
"summary": "Update a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -6970,7 +8907,17 @@
"get": {
"operationId": "WebhooksController_getWebhook",
"summary": "Get a webhook",
- "parameters": [],
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "",
@@ -6989,6 +8936,15 @@
"operationId": "WebhooksController_deleteWebhook",
"summary": "Delete a webhook",
"parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "webhookId",
"required": true,
@@ -14635,46 +16591,6 @@
},
"required": ["status", "data"]
},
- "ProviderVerifyClientData": {
- "type": "object",
- "properties": {
- "clientId": {
- "type": "string"
- },
- "organizationId": {
- "type": "number"
- },
- "name": {
- "type": "string"
- }
- },
- "required": ["clientId", "organizationId", "name"]
- },
- "ProviderVerifyClientOutput": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success",
- "enum": ["success", "error"]
- },
- "data": {
- "$ref": "#/components/schemas/ProviderVerifyClientData"
- }
- },
- "required": ["status", "data"]
- },
- "ProviderVerifyAccessTokenOutput": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success",
- "enum": ["success", "error"]
- }
- },
- "required": ["status"]
- },
"MeOrgOutput": {
"type": "object",
"properties": {