Skip to content

Scheduling infrastructure for absolutely everyone.

chore: tag deprecated platform oauth endpoints in api v2 (#26873)

Morganeee31d6e9ed3
diff --git a/apps/api/v2/src/ee/provider/provider.controller.ts b/apps/api/v2/src/ee/provider/provider.controller.ts
index bb5fd3d30e6..f10829eaa5c 100644
--- a/apps/api/v2/src/ee/provider/provider.controller.ts
+++ b/apps/api/v2/src/ee/provider/provider.controller.ts
@@ -1,11 +1,4 @@
-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";
-import { UserWithProfile } from "@/modules/users/users.repository";
+import { SUCCESS_STATUS } from "@calcom/platform-constants";
import {
BadRequestException,
Controller,
@@ -18,8 +11,14 @@ import {
UseGuards,
} from "@nestjs/common";
import { ApiExcludeController, ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
-
-import { SUCCESS_STATUS } from "@calcom/platform-constants";
+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";
+import { UserWithProfile } from "@/modules/users/users.repository";
@Controller({
path: "/v2/provider",
@@ -28,7 +27,7 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants";
// 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")
+@DocsTags("Deprecated: Platform / Cal Provider")
export class CalProviderController {
constructor(private readonly oauthClientRepository: OAuthClientRepository) {}
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 09fdc70d018..0a672c8debd 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
@@ -1,3 +1,23 @@
+import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
+import { MembershipRole } from "@calcom/platform-libraries";
+import type { User } from "@calcom/prisma/client";
+import {
+ Body,
+ Controller,
+ Delete,
+ Get,
+ HttpCode,
+ HttpStatus,
+ Logger,
+ NotFoundException,
+ Param,
+ ParseIntPipe,
+ Patch,
+ Post,
+ Query,
+ UseGuards,
+} from "@nestjs/common";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
import { GetOrgId } from "@/modules/auth/decorators/get-org-id/get-org-id.decorator";
import { MembershipRoles } from "@/modules/auth/decorators/roles/membership-roles.decorator";
@@ -11,40 +31,19 @@ import { TOKENS_DOCS } from "@/modules/oauth-clients/controllers/oauth-flow/oaut
import { KeysResponseDto } from "@/modules/oauth-clients/controllers/oauth-flow/responses/KeysResponse.dto";
import { OAuthClientGuard } from "@/modules/oauth-clients/guards/oauth-client-guard";
import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
-import { OAuthClientUsersOutputService } from "@/modules/oauth-clients/services/oauth-clients-users-output.service";
import { OAuthClientUsersService } from "@/modules/oauth-clients/services/oauth-clients-users.service";
+import { OAuthClientUsersOutputService } from "@/modules/oauth-clients/services/oauth-clients-users-output.service";
import { TokensRepository } from "@/modules/tokens/tokens.repository";
import { CreateManagedUserInput } from "@/modules/users/inputs/create-managed-user.input";
import { UpdateManagedUserInput } from "@/modules/users/inputs/update-managed-user.input";
import { UsersRepository } from "@/modules/users/users.repository";
-import {
- Body,
- Controller,
- Post,
- Logger,
- UseGuards,
- Get,
- HttpCode,
- HttpStatus,
- Param,
- Patch,
- Delete,
- Query,
- NotFoundException,
- ParseIntPipe,
-} from "@nestjs/common";
-import { ApiOperation, ApiTags as DocsTags, ApiHeader } from "@nestjs/swagger";
-
-import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
-import { MembershipRole } from "@calcom/platform-libraries";
-import type { User } from "@calcom/prisma/client";
@Controller({
path: "/v2/oauth-clients/:clientId/users",
version: API_VERSIONS_VALUES,
})
@UseGuards(ApiAuthGuard, OAuthClientGuard, OrganizationRolesGuard)
-@DocsTags("Platform / Managed Users")
+@DocsTags("Deprecated: Platform / Managed Users")
@ApiHeader({
name: X_CAL_SECRET_KEY,
description: "OAuth client secret key",
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 a1c3c1c082f..6e530caf44d 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
@@ -1,3 +1,10 @@
+import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
+import { MembershipRole } from "@calcom/platform-libraries";
+import { SkipTakePagination } from "@calcom/platform-types";
+import type { Webhook } from "@calcom/prisma/client";
+import { Body, Controller, Delete, Get, Param, Patch, Post, Query, UseGuards } from "@nestjs/common";
+import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
+import { plainToClass } from "class-transformer";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
import { MembershipRoles } from "@/modules/auth/decorators/roles/membership-roles.decorator";
import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
@@ -6,8 +13,8 @@ import { GetWebhook } from "@/modules/webhooks/decorators/get-webhook-decorator"
import { IsOAuthClientWebhookGuard } from "@/modules/webhooks/guards/is-oauth-client-webhook-guard";
import { CreateWebhookInputDto, UpdateWebhookInputDto } from "@/modules/webhooks/inputs/webhook.input";
import {
- OAuthClientWebhookOutputResponseDto,
OAuthClientWebhookOutputDto,
+ OAuthClientWebhookOutputResponseDto,
OAuthClientWebhooksOutputResponseDto,
} from "@/modules/webhooks/outputs/oauth-client-webhook.output";
import { DeleteManyWebhooksOutputResponseDto } from "@/modules/webhooks/outputs/webhook.output";
@@ -15,14 +22,6 @@ import { PartialWebhookInputPipe, WebhookInputPipe } from "@/modules/webhooks/pi
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 { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger";
-import { plainToClass } from "class-transformer";
-
-import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
-import { MembershipRole } from "@calcom/platform-libraries";
-import { SkipTakePagination } from "@calcom/platform-types";
-import type { Webhook } from "@calcom/prisma/client";
import { OAuthClientGuard } from "../../guards/oauth-client-guard";
@@ -31,7 +30,7 @@ import { OAuthClientGuard } from "../../guards/oauth-client-guard";
version: API_VERSIONS_VALUES,
})
@UseGuards(ApiAuthGuard, OrganizationRolesGuard, OAuthClientGuard)
-@DocsTags("Platform / Webhooks")
+@DocsTags("Deprecated: Platform / Webhooks")
@ApiHeader({
name: X_CAL_SECRET_KEY,
description: "OAuth client secret key",
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 cb7658b3984..a379d89c9e3 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,3 +1,28 @@
+import { SUCCESS_STATUS } from "@calcom/platform-constants";
+import { MembershipRole } from "@calcom/platform-libraries";
+import { CreateOAuthClientInput, Pagination, UpdateOAuthClientInput } from "@calcom/platform-types";
+import {
+ BadRequestException,
+ Body,
+ Controller,
+ Delete,
+ Get,
+ HttpCode,
+ HttpStatus,
+ Logger,
+ Param,
+ Patch,
+ Post,
+ Query,
+ UseGuards,
+} from "@nestjs/common";
+import {
+ ApiExcludeEndpoint,
+ ApiHeader,
+ ApiOperation,
+ ApiTags,
+ ApiCreatedResponse as DocsCreatedResponse,
+} from "@nestjs/swagger";
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";
@@ -9,42 +34,16 @@ 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 { OAuthClientUsersOutputService } from "@/modules/oauth-clients/services/oauth-clients-users-output.service";
import { OAuthClientsService } from "@/modules/oauth-clients/services/oauth-clients/oauth-clients.service";
+import { OAuthClientUsersOutputService } from "@/modules/oauth-clients/services/oauth-clients-users-output.service";
import { OrganizationsRepository } from "@/modules/organizations/index/organizations.repository";
import { UsersRepository } from "@/modules/users/users.repository";
-import {
- Body,
- Controller,
- Query,
- Get,
- Post,
- Patch,
- Delete,
- Param,
- HttpCode,
- HttpStatus,
- Logger,
- UseGuards,
- BadRequestException,
-} from "@nestjs/common";
-import {
- ApiCreatedResponse as DocsCreatedResponse,
- ApiTags,
- ApiOperation,
- ApiExcludeEndpoint,
- ApiHeader,
-} from "@nestjs/swagger";
-
-import { SUCCESS_STATUS } from "@calcom/platform-constants";
-import { MembershipRole } from "@calcom/platform-libraries";
-import { CreateOAuthClientInput, UpdateOAuthClientInput, Pagination } from "@calcom/platform-types";
@Controller({
path: "/v2/oauth-clients",
version: API_VERSIONS_VALUES,
})
-@ApiTags("OAuth Clients")
+@ApiTags("Deprecated: Platform OAuth Clients")
@UseGuards(ApiAuthGuard, OrganizationRolesGuard)
@ApiHeader(API_KEY_HEADER)
export class OAuthClientsController {
diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.ts
index 2dc5a3947a2..04e480f52bb 100644
--- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.ts
+++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.ts
@@ -1,15 +1,4 @@
-import { API_VERSIONS_VALUES } from "@/lib/api-versions";
-import { isOriginAllowed } from "@/lib/is-origin-allowed/is-origin-allowed";
-import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
-import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
-import { NextAuthGuard } from "@/modules/auth/guards/next-auth/next-auth.guard";
-import { KeysResponseDto } from "@/modules/oauth-clients/controllers/oauth-flow/responses/KeysResponse.dto";
-import { OAuthAuthorizeInput } from "@/modules/oauth-clients/inputs/authorize.input";
-import { ExchangeAuthorizationCodeInput } from "@/modules/oauth-clients/inputs/exchange-code.input";
-import { RefreshTokenInput } from "@/modules/oauth-clients/inputs/refresh-token.input";
-import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
-import { OAuthFlowService } from "@/modules/oauth-clients/services/oauth-flow.service";
-import { TokensRepository } from "@/modules/tokens/tokens.repository";
+import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
import {
BadRequestException,
Body,
@@ -23,14 +12,24 @@ import {
UseGuards,
} from "@nestjs/common";
import {
- ApiTags as DocsTags,
+ ApiOperation,
ApiExcludeEndpoint as DocsExcludeEndpoint,
ApiHeader as DocsHeader,
- ApiOperation,
+ ApiTags as DocsTags,
} from "@nestjs/swagger";
import { Response as ExpressResponse } from "express";
-
-import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
+import { API_VERSIONS_VALUES } from "@/lib/api-versions";
+import { isOriginAllowed } from "@/lib/is-origin-allowed/is-origin-allowed";
+import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
+import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard";
+import { NextAuthGuard } from "@/modules/auth/guards/next-auth/next-auth.guard";
+import { KeysResponseDto } from "@/modules/oauth-clients/controllers/oauth-flow/responses/KeysResponse.dto";
+import { OAuthAuthorizeInput } from "@/modules/oauth-clients/inputs/authorize.input";
+import { ExchangeAuthorizationCodeInput } from "@/modules/oauth-clients/inputs/exchange-code.input";
+import { RefreshTokenInput } from "@/modules/oauth-clients/inputs/refresh-token.input";
+import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
+import { OAuthFlowService } from "@/modules/oauth-clients/services/oauth-flow.service";
+import { TokensRepository } from "@/modules/tokens/tokens.repository";
export const TOKENS_DOCS = `Access token is valid for 60 minutes and refresh token for 1 year. Make sure to store them in your database, for example, in your User database model \`calAccessToken\` and \`calRefreshToken\` fields.
Response also contains \`accessTokenExpiresAt\` and \`refreshTokenExpiresAt\` fields, but if you decode the jwt token the payload will contain \`clientId\` (OAuth client ID), \`ownerId\` (user to whom token belongs ID), \`iat\` (issued at time) and \`expiresAt\` (when does the token expire) fields.`;
@@ -109,7 +108,7 @@ export class OAuthFlowController {
@Post("/refresh")
@HttpCode(HttpStatus.OK)
@UseGuards(ApiAuthGuard)
- @DocsTags("Platform / Managed Users")
+ @DocsTags("Deprecated: Platform / Managed Users")
@DocsHeader({
name: X_CAL_SECRET_KEY,
description: "OAuth client secret key.",
diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json
index e295c53b9c9..7fd24361e68 100644
--- a/docs/api-reference/v2/openapi.json
+++ b/docs/api-reference/v2/openapi.json
@@ -1,60 +1,52 @@
{
"openapi": "3.0.0",
"paths": {
- "/v2/oauth-clients/{clientId}/users": {
+ "/v2/organizations/{orgId}/attributes": {
"get": {
- "operationId": "OAuthClientUsersController_getManagedUsers",
- "summary": "Get all managed users",
+ "operationId": "OrganizationsAttributesController_getOrganizationAttributes",
+ "summary": "Get all attributes",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "limit",
+ "name": "take",
"required": false,
"in": "query",
- "description": "The number of items to return",
- "example": 10,
+ "description": "Maximum number of items to return",
+ "example": 25,
"schema": {
+ "minimum": 1,
+ "maximum": 250,
+ "default": 250,
"type": "number"
}
},
{
- "name": "offset",
+ "name": "skip",
"required": false,
"in": "query",
- "description": "The number of items to skip",
+ "description": "Number of items to skip",
"example": 0,
"schema": {
+ "minimum": 0,
+ "default": 0,
"type": "number"
}
- },
- {
- "name": "emails",
- "required": false,
- "in": "query",
- "description": "Filter managed users by email. If you want to filter by multiple emails, separate them with a comma.",
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
}
],
"responses": {
@@ -63,35 +55,35 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUsersOutput"
+ "$ref": "#/components/schemas/GetOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes"
]
},
"post": {
- "operationId": "OAuthClientUsersController_createUser",
- "summary": "Create a managed user",
+ "operationId": "OrganizationsAttributesController_createOrganizationAttribute",
+ "summary": "Create an attribute",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -100,7 +92,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateManagedUserInput"
+ "$ref": "#/components/schemas/CreateOrganizationAttributeInput"
}
}
}
@@ -111,45 +103,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateManagedUserOutput"
+ "$ref": "#/components/schemas/CreateOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes"
]
}
},
- "/v2/oauth-clients/{clientId}/users/{userId}": {
+ "/v2/organizations/{orgId}/attributes/{attributeId}": {
"get": {
- "operationId": "OAuthClientUsersController_getUserById",
- "summary": "Get a managed user",
+ "operationId": "OrganizationsAttributesController_getOrganizationAttribute",
+ "summary": "Get an attribute",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "userId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -159,43 +151,43 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUserOutput"
+ "$ref": "#/components/schemas/GetSingleAttributeOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes"
]
},
"patch": {
- "operationId": "OAuthClientUsersController_updateUser",
- "summary": "Update a managed user",
+ "operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
+ "summary": "Update an attribute",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "userId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -204,7 +196,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateManagedUserInput"
+ "$ref": "#/components/schemas/UpdateOrganizationAttributeInput"
}
}
}
@@ -215,43 +207,43 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUserOutput"
+ "$ref": "#/components/schemas/UpdateOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes"
]
},
"delete": {
- "operationId": "OAuthClientUsersController_deleteUser",
- "summary": "Delete a managed user",
+ "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
+ "summary": "Delete an attribute",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "userId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -261,34 +253,33 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetManagedUserOutput"
+ "$ref": "#/components/schemas/DeleteOrganizationAttributesOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes"
]
}
},
- "/v2/oauth-clients/{clientId}/users/{userId}/force-refresh": {
+ "/v2/organizations/{orgId}/attributes/{attributeId}/options": {
"post": {
- "operationId": "OAuthClientUsersController_forceRefresh",
- "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. Access token is valid for 60 minutes and refresh token for 1 year. Make sure to store them in your database, for example, in your User database model `calAccessToken` and `calRefreshToken` fields.\nResponse also contains `accessTokenExpiresAt` and `refreshTokenExpiresAt` fields, but if you decode the jwt token the payload will contain `clientId` (OAuth client ID), `ownerId` (user to whom token belongs ID), `iat` (issued at time) and `expiresAt` (when does the token expire) fields.",
+ "operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption",
+ "summary": "Create an attribute option",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "userId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
@@ -296,7 +287,7 @@
}
},
{
- "name": "clientId",
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
@@ -304,201 +295,165 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/KeysResponseDto"
+ "$ref": "#/components/schemas/CreateAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes / Options"
]
- }
- },
- "/v2/oauth/{clientId}/refresh": {
- "post": {
- "operationId": "OAuthFlowController_refreshTokens",
- "summary": "Refresh managed user tokens",
- "description": "If managed user access token is expired then get a new one using this endpoint - it will also refresh the refresh token, because we use\n \"refresh token rotation\" mechanism. Access token is valid for 60 minutes and refresh token for 1 year. Make sure to store them in your database, for example, in your User database model `calAccessToken` and `calRefreshToken` fields.\nResponse also contains `accessTokenExpiresAt` and `refreshTokenExpiresAt` fields, but if you decode the jwt token the payload will contain `clientId` (OAuth client ID), `ownerId` (user to whom token belongs ID), `iat` (issued at time) and `expiresAt` (when does the token expire) fields.",
+ },
+ "get": {
+ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
+ "summary": "Get all attribute options",
"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"
}
},
{
- "name": "x-cal-secret-key",
+ "name": "orgId",
"required": true,
- "in": "header",
- "description": "OAuth client secret key.",
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "attributeId",
+ "required": true,
+ "in": "path",
"schema": {
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/RefreshTokenInput"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/KeysResponseDto"
+ "$ref": "#/components/schemas/GetAllAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Platform / Managed Users"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/oauth-clients/{clientId}/webhooks": {
- "post": {
- "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
- "summary": "Create a webhook",
+ "/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
+ "delete": {
+ "operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption",
+ "summary": "Delete an attribute option",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "attributeId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateWebhookInputDto"
- }
+ },
+ {
+ "name": "optionId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/DeleteAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Orgs / Attributes / Options"
]
},
- "get": {
- "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
- "summary": "Get all webhooks",
+ "patch": {
+ "operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
+ "summary": "Update an attribute option",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "Maximum number of items to return",
- "example": 25,
- "schema": {
- "minimum": 1,
- "maximum": 250,
- "default": 250,
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "Number of items to skip",
- "example": 0,
- "schema": {
- "minimum": 0,
- "default": 0,
- "type": "number"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "Platform / Webhooks"
- ]
- },
- "delete": {
- "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
- "summary": "Delete all webhooks",
- "parameters": [
- {
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "OAuth client secret key",
+ "name": "attributeId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
},
{
- "name": "clientId",
+ "name": "optionId",
"required": true,
"in": "path",
"schema": {
@@ -506,113 +461,105 @@
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrganizationAttributeOptionInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
+ "$ref": "#/components/schemas/UpdateAttributeOptionOutput"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
- "patch": {
- "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
- "summary": "Update a webhook",
+ "/v2/organizations/{orgId}/attributes/{attributeId}/options/assigned": {
+ "get": {
+ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeAssignedOptions",
+ "summary": "Get all assigned attribute options by attribute ID",
"parameters": [
{
- "name": "x-cal-secret-key",
+ "name": "Authorization",
"in": "header",
- "description": "OAuth client secret key",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "webhookId",
+ "name": "orgId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateWebhookInputDto"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
- }
- }
+ "type": "number"
}
- }
- },
- "tags": [
- "Platform / Webhooks"
- ]
- },
- "get": {
- "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
- "summary": "Get a webhook",
- "parameters": [
+ },
{
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "OAuth client secret key",
+ "name": "attributeId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
- }
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "Number of responses to skip",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "Number of responses to take",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "assignedOptionIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter by assigned attribute option ids. ids must be separated by a comma.",
+ "example": "?assignedOptionIds=aaaaaaaa-bbbb-cccc-dddd-eeeeee1eee,aaaaaaaa-bbbb-cccc-dddd-eeeeee2eee",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
}
- }
- },
- "tags": [
- "Platform / Webhooks"
- ]
- },
- "delete": {
- "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
- "summary": "Delete a webhook",
- "parameters": [
+ },
{
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "OAuth client secret key",
- "required": true,
+ "name": "teamIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter by teamIds. Team ids must be separated by a comma.",
+ "example": "?teamIds=100,200",
"schema": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
}
}
],
@@ -622,21 +569,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
+ "$ref": "#/components/schemas/GetAllAttributeAssignedOptionOutput"
}
}
}
}
},
"tags": [
- "Platform / Webhooks"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/organizations/{orgId}/attributes": {
+ "/v2/organizations/{orgId}/attributes/slugs/{attributeSlug}/options/assigned": {
"get": {
- "operationId": "OrganizationsAttributesController_getOrganizationAttributes",
- "summary": "Get all attributes",
+ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeAssignedOptionsBySlug",
+ "summary": "Get all assigned attribute options by attribute slug",
"parameters": [
{
"name": "Authorization",
@@ -656,29 +603,56 @@
}
},
{
- "name": "take",
+ "name": "attributeSlug",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "skip",
"required": false,
"in": "query",
- "description": "Maximum number of items to return",
- "example": 25,
+ "description": "Number of responses to skip",
"schema": {
- "minimum": 1,
- "maximum": 250,
- "default": 250,
"type": "number"
}
},
{
- "name": "skip",
+ "name": "take",
"required": false,
"in": "query",
- "description": "Number of items to skip",
- "example": 0,
+ "description": "Number of responses to take",
"schema": {
- "minimum": 0,
- "default": 0,
"type": "number"
}
+ },
+ {
+ "name": "assignedOptionIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter by assigned attribute option ids. ids must be separated by a comma.",
+ "example": "?assignedOptionIds=aaaaaaaa-bbbb-cccc-dddd-eeeeee1eee,aaaaaaaa-bbbb-cccc-dddd-eeeeee2eee",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "name": "teamIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter by teamIds. Team ids must be separated by a comma.",
+ "example": "?teamIds=100,200",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ }
}
],
"responses": {
@@ -687,19 +661,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/GetAllAttributeAssignedOptionOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Attributes / Options"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/attributes/options/{userId}": {
"post": {
- "operationId": "OrganizationsAttributesController_createOrganizationAttribute",
- "summary": "Create an attribute",
+ "operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser",
+ "summary": "Assign an attribute to a user",
"parameters": [
{
"name": "Authorization",
@@ -717,110 +693,14 @@
"schema": {
"type": "number"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributeInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributesOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Attributes"
- ]
- }
- },
- "/v2/organizations/{orgId}/attributes/{attributeId}": {
- "get": {
- "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,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetSingleAttributeOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Attributes"
- ]
- },
- "patch": {
- "operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
- "summary": "Update an attribute",
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
- "schema": {
- "type": "string"
- }
},
{
- "name": "orgId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
- },
- {
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
}
],
"requestBody": {
@@ -828,30 +708,30 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributeInput"
+ "$ref": "#/components/schemas/AssignOrganizationAttributeOptionToUserInput"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/AssignOptionUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Attributes / Options"
]
},
- "delete": {
- "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
- "summary": "Delete an attribute",
+ "get": {
+ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
+ "summary": "Get all attribute options for a user",
"parameters": [
{
"name": "Authorization",
@@ -871,11 +751,11 @@
}
},
{
- "name": "attributeId",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -885,21 +765,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrganizationAttributesOutput"
+ "$ref": "#/components/schemas/GetOptionUserOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes"
+ "Orgs / Attributes / Options"
]
}
},
- "/v2/organizations/{orgId}/attributes/{attributeId}/options": {
- "post": {
- "operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption",
- "summary": "Create an attribute option",
+ "/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
+ "delete": {
+ "operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser",
+ "summary": "Unassign an attribute from a user",
"parameters": [
{
"name": "Authorization",
@@ -919,55 +799,7 @@
}
},
{
- "name": "attributeId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateAttributeOptionOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Attributes / Options"
- ]
- },
- "get": {
- "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",
+ "name": "userId",
"required": true,
"in": "path",
"schema": {
@@ -975,7 +807,7 @@
}
},
{
- "name": "attributeId",
+ "name": "attributeOptionId",
"required": true,
"in": "path",
"schema": {
@@ -989,7 +821,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllAttributeOptionOutput"
+ "$ref": "#/components/schemas/UnassignOptionUserOutput"
}
}
}
@@ -1000,290 +832,282 @@
]
}
},
- "/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
- "delete": {
- "operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption",
- "summary": "Delete an attribute option",
+ "/v2/organizations/{orgId}/bookings": {
+ "get": {
+ "operationId": "OrganizationsBookingsController_getAllOrgTeamBookings",
+ "summary": "Get organization bookings",
"parameters": [
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
+ "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": "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": "attributeId",
- "required": true,
- "in": "path",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "name": "optionId",
- "required": true,
- "in": "path",
+ "name": "status",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by status. If you want to filter by multiple statuses, separate them with a comma.",
+ "example": "?status=upcoming,past",
"schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteAttributeOptionOutput"
- }
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "upcoming",
+ "recurring",
+ "past",
+ "cancelled",
+ "unconfirmed"
+ ]
}
}
- }
- },
- "tags": [
- "Orgs / Attributes / Options"
- ]
- },
- "patch": {
- "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,
+ "name": "attendeeEmail",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by the attendee's email address.",
+ "example": "[email protected]",
"schema": {
"type": "string"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "attendeeName",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by the attendee's name.",
+ "example": "John Doe",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "attributeId",
- "required": true,
- "in": "path",
+ "name": "bookingUid",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by the booking Uid.",
+ "example": "2NtaeaVcKfpmSZ4CthFdfk",
"schema": {
"type": "string"
}
},
{
- "name": "optionId",
- "required": true,
- "in": "path",
+ "name": "eventTypeIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by event type ids belonging to the user. Event type ids must be separated by a comma.",
+ "example": "?eventTypeIds=100,200",
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOrganizationAttributeOptionInput"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateAttributeOptionOutput"
- }
- }
+ },
+ {
+ "name": "eventTypeId",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by event type id belonging to the user.",
+ "example": "?eventTypeId=100",
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Attributes / Options"
- ]
- }
- },
- "/v2/organizations/{orgId}/attributes/{attributeId}/options/assigned": {
- "get": {
- "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeAssignedOptions",
- "summary": "Get all assigned attribute options by attribute ID",
- "parameters": [
+ },
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
+ "name": "teamsIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by team ids that user is part of. Team ids must be separated by a comma.",
+ "example": "?teamIds=50,60",
"schema": {
"type": "string"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "teamId",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings by team id that user is part of",
+ "example": "?teamId=50",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "attributeId",
- "required": true,
- "in": "path",
+ "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": "skip",
+ "name": "beforeEnd",
"required": false,
"in": "query",
- "description": "Number of responses to skip",
+ "description": "Filter bookings with end before this date string.",
+ "example": "?beforeEnd=2025-03-07T11:00:00.000Z",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
+ "name": "afterCreatedAt",
"required": false,
"in": "query",
- "description": "Number of responses to take",
+ "description": "Filter bookings that have been created after this date string.",
+ "example": "?afterCreatedAt=2025-03-07T10:00:00.000Z",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "assignedOptionIds",
+ "name": "beforeCreatedAt",
"required": false,
"in": "query",
- "description": "Filter by assigned attribute option ids. ids must be separated by a comma.",
- "example": "?assignedOptionIds=aaaaaaaa-bbbb-cccc-dddd-eeeeee1eee,aaaaaaaa-bbbb-cccc-dddd-eeeeee2eee",
+ "description": "Filter bookings that have been created before this date string.",
+ "example": "?beforeCreatedAt=2025-03-14T11:00:00.000Z",
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
},
{
- "name": "teamIds",
+ "name": "afterUpdatedAt",
"required": false,
"in": "query",
- "description": "Filter by teamIds. Team ids must be separated by a comma.",
- "example": "?teamIds=100,200",
+ "description": "Filter bookings that have been updated after this date string.",
+ "example": "?afterUpdatedAt=2025-03-07T10:00:00.000Z",
"schema": {
- "type": "array",
- "items": {
- "type": "number"
- }
+ "type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetAllAttributeAssignedOptionOutput"
- }
- }
+ },
+ {
+ "name": "beforeUpdatedAt",
+ "required": false,
+ "in": "query",
+ "description": "Filter bookings that have been updated before this date string.",
+ "example": "?beforeUpdatedAt=2025-03-14T11:00:00.000Z",
+ "schema": {
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Attributes / Options"
- ]
- }
- },
- "/v2/organizations/{orgId}/attributes/slugs/{attributeSlug}/options/assigned": {
- "get": {
- "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeAssignedOptionsBySlug",
- "summary": "Get all assigned attribute options by attribute slug",
- "parameters": [
+ },
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
+ "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": "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"
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
},
{
- "name": "attributeSlug",
- "required": true,
- "in": "path",
+ "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": "skip",
+ "name": "sortUpdatedAt",
"required": false,
"in": "query",
- "description": "Number of responses to skip",
+ "description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
+ "example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
- "type": "number"
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
},
{
"name": "take",
"required": false,
"in": "query",
- "description": "Number of responses to take",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
+ "default": 100,
"type": "number"
}
},
{
- "name": "assignedOptionIds",
+ "name": "skip",
"required": false,
"in": "query",
- "description": "Filter by assigned attribute option ids. ids must be separated by a comma.",
- "example": "?assignedOptionIds=aaaaaaaa-bbbb-cccc-dddd-eeeeee1eee,aaaaaaaa-bbbb-cccc-dddd-eeeeee2eee",
+ "description": "The number of items to skip",
+ "example": 0,
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "default": 0,
+ "type": "number"
}
},
{
- "name": "teamIds",
+ "name": "userIds",
"required": false,
"in": "query",
- "description": "Filter by teamIds. Team ids must be separated by a comma.",
- "example": "?teamIds=100,200",
+ "description": "Filter bookings by ids of users within your organization.",
+ "example": "?userIds=100,200",
"schema": {
- "type": "array",
- "items": {
- "type": "number"
- }
+ "type": "string"
+ }
+ },
+ {
+ "name": "orgId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
}
}
],
@@ -1293,41 +1117,51 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllAttributeAssignedOptionOutput"
+ "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Bookings"
]
}
},
- "/v2/organizations/{orgId}/attributes/options/{userId}": {
+ "/v2/organizations/{orgId}/delegation-credentials": {
"post": {
- "operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser",
- "summary": "Assign an attribute to a user",
- "parameters": [
+ "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential",
+ "summary": "Save delegation credentials for your organization",
+ "parameters": [
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": false,
"schema": {
"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"
+ "type": "string"
}
},
{
- "name": "userId",
+ "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": {
@@ -1340,7 +1174,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AssignOrganizationAttributeOptionToUserInput"
+ "$ref": "#/components/schemas/CreateDelegationCredentialInput"
}
}
}
@@ -1351,25 +1185,45 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AssignOptionUserOutput"
+ "$ref": "#/components/schemas/CreateDelegationCredentialOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Delegation Credentials"
]
- },
- "get": {
- "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
- "summary": "Get all attribute options for a user",
+ }
+ },
+ "/v2/organizations/{orgId}/delegation-credentials/{credentialId}": {
+ "patch": {
+ "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
+ "summary": "Update delegation credentials of your organization",
"parameters": [
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
- "required": true,
+ "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"
}
@@ -1383,41 +1237,69 @@
}
},
{
- "name": "userId",
+ "name": "credentialId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateDelegationCredentialInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOptionUserOutput"
+ "$ref": "#/components/schemas/UpdateDelegationCredentialOutput"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Delegation Credentials"
]
}
},
- "/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
- "delete": {
- "operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser",
- "summary": "Unassign an attribute from a user",
+ "/v2/organizations/{orgId}/memberships": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getAllMemberships",
+ "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,
+ "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"
}
@@ -1431,19 +1313,28 @@
}
},
{
- "name": "userId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "Maximum number of items to return",
+ "example": 25,
"schema": {
+ "minimum": 1,
+ "maximum": 250,
+ "default": 250,
"type": "number"
}
},
{
- "name": "attributeOptionId",
- "required": true,
- "in": "path",
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "Number of items to skip",
+ "example": 0,
"schema": {
- "type": "string"
+ "minimum": 0,
+ "default": 0,
+ "type": "number"
}
}
],
@@ -1453,26 +1344,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnassignOptionUserOutput"
+ "$ref": "#/components/schemas/GetAllOrgMemberships"
}
}
}
}
},
"tags": [
- "Orgs / Attributes / Options"
+ "Orgs / Memberships"
]
- }
- },
- "/v2/organizations/{orgId}/bookings": {
- "get": {
- "operationId": "OrganizationsBookingsController_getAllOrgTeamBookings",
- "summary": "Get organization bookings",
+ },
+ "post": {
+ "operationId": "OrganizationsMembershipsController_createMembership",
+ "summary": "Create a membership",
"parameters": [
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
"schema": {
"type": "string"
@@ -1497,245 +1386,147 @@
}
},
{
- "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",
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "type": "number"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrgMembershipDto"
}
}
- },
- {
- "name": "attendeeEmail",
- "required": false,
- "in": "query",
- "description": "Filter bookings by the attendee's email address.",
- "example": "[email protected]",
- "schema": {
- "type": "string"
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrgMembershipOutput"
+ }
+ }
}
- },
+ }
+ },
+ "tags": [
+ "Orgs / Memberships"
+ ]
+ }
+ },
+ "/v2/organizations/{orgId}/memberships/{membershipId}": {
+ "get": {
+ "operationId": "OrganizationsMembershipsController_getOrgMembership",
+ "summary": "Get a membership",
+ "parameters": [
{
- "name": "attendeeName",
+ "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 name.",
- "example": "John Doe",
"schema": {
"type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"required": false,
- "in": "query",
- "description": "Filter bookings by the booking Uid.",
- "example": "2NtaeaVcKfpmSZ4CthFdfk",
"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 user. Event type ids must be separated by a comma.",
- "example": "?eventTypeIds=100,200",
"schema": {
"type": "string"
}
},
{
- "name": "eventTypeId",
- "required": false,
- "in": "query",
- "description": "Filter bookings by event type id belonging to the user.",
- "example": "?eventTypeId=100",
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "teamsIds",
- "required": false,
- "in": "query",
- "description": "Filter bookings by team ids that user is part of. Team ids must be separated by a comma.",
- "example": "?teamIds=50,60",
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
- },
- {
- "name": "teamId",
- "required": false,
- "in": "query",
- "description": "Filter bookings by team id that user is part of",
- "example": "?teamId=50",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "afterStart",
- "required": false,
- "in": "query",
- "description": "Filter bookings with start after this date string.",
- "example": "?afterStart=2025-03-07T10:00:00.000Z",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "beforeEnd",
- "required": false,
- "in": "query",
- "description": "Filter bookings with end before this date string.",
- "example": "?beforeEnd=2025-03-07T11:00:00.000Z",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "afterCreatedAt",
- "required": false,
- "in": "query",
- "description": "Filter bookings that have been created after this date string.",
- "example": "?afterCreatedAt=2025-03-07T10:00:00.000Z",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "beforeCreatedAt",
- "required": false,
- "in": "query",
- "description": "Filter bookings that have been created before this date string.",
- "example": "?beforeCreatedAt=2025-03-14T11:00:00.000Z",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "afterUpdatedAt",
- "required": false,
- "in": "query",
- "description": "Filter bookings that have been updated after this date string.",
- "example": "?afterUpdatedAt=2025-03-07T10:00:00.000Z",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "beforeUpdatedAt",
- "required": false,
- "in": "query",
- "description": "Filter bookings that have been updated before this date string.",
- "example": "?beforeUpdatedAt=2025-03-14T11: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"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetOrgMembership"
+ }
+ }
}
- },
+ }
+ },
+ "tags": [
+ "Orgs / Memberships"
+ ]
+ },
+ "delete": {
+ "operationId": "OrganizationsMembershipsController_deleteMembership",
+ "summary": "Delete a membership",
+ "parameters": [
{
- "name": "sortEnd",
+ "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 end time in ascending or descending order.",
- "example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
"type": "string"
}
},
{
- "name": "sortCreated",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "For platform customers - OAuth client secret key",
"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": "sortUpdatedAt",
+ "name": "x-cal-client-id",
+ "in": "header",
+ "description": "For platform customers - OAuth client ID",
"required": false,
- "in": "query",
- "description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
- "example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
"type": "string"
}
},
{
- "name": "take",
- "required": false,
- "in": "query",
- "description": "The number of items to return",
- "example": 10,
- "schema": {
- "default": 100,
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "The number of items to skip",
- "example": 0,
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
- "default": 0,
"type": "number"
}
},
{
- "name": "userIds",
- "required": false,
- "in": "query",
- "description": "Filter bookings by ids of users within your organization.",
- "example": "?userIds=100,200",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "orgId",
+ "name": "membershipId",
"required": true,
"in": "path",
"schema": {
@@ -1749,21 +1540,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingsOutput_2024_08_13"
+ "$ref": "#/components/schemas/DeleteOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Bookings"
+ "Orgs / Memberships"
]
- }
- },
- "/v2/organizations/{orgId}/delegation-credentials": {
- "post": {
- "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential",
- "summary": "Save delegation credentials for your organization",
+ },
+ "patch": {
+ "operationId": "OrganizationsMembershipsController_updateMembership",
+ "summary": "Update a membership",
"parameters": [
{
"name": "Authorization",
@@ -1799,6 +1588,14 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "membershipId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
}
],
"requestBody": {
@@ -1806,32 +1603,32 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialInput"
+ "$ref": "#/components/schemas/UpdateOrgMembershipDto"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/UpdateOrgMembership"
}
}
}
}
},
"tags": [
- "Orgs / Delegation Credentials"
+ "Orgs / Memberships"
]
}
},
- "/v2/organizations/{orgId}/delegation-credentials/{credentialId}": {
- "patch": {
- "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
- "summary": "Update delegation credentials of your organization",
+ "/v2/organizations/{orgId}/roles": {
+ "post": {
+ "operationId": "OrganizationsRolesController_createRole",
+ "summary": "Create a new organization role",
"parameters": [
{
"name": "Authorization",
@@ -1867,14 +1664,6 @@
"schema": {
"type": "number"
}
- },
- {
- "name": "credentialId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
}
],
"requestBody": {
@@ -1882,32 +1671,30 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialInput"
+ "$ref": "#/components/schemas/CreateOrgRoleInput"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/CreateOrgRoleOutput"
}
}
}
}
},
"tags": [
- "Orgs / Delegation Credentials"
+ "Orgs / Roles"
]
- }
- },
- "/v2/organizations/{orgId}/memberships": {
+ },
"get": {
- "operationId": "OrganizationsMembershipsController_getAllMemberships",
- "summary": "Get all memberships",
+ "operationId": "OrganizationsRolesController_getAllRoles",
+ "summary": "Get all organization roles",
"parameters": [
{
"name": "Authorization",
@@ -1976,19 +1763,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllOrgMemberships"
+ "$ref": "#/components/schemas/GetAllOrgRolesOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Roles"
]
- },
- "post": {
- "operationId": "OrganizationsMembershipsController_createMembership",
- "summary": "Create a membership",
+ }
+ },
+ "/v2/organizations/{orgId}/roles/{roleId}": {
+ "get": {
+ "operationId": "OrganizationsRolesController_getRole",
+ "summary": "Get a specific organization role",
"parameters": [
{
"name": "Authorization",
@@ -2024,39 +1813,35 @@
"schema": {
"type": "number"
}
+ },
+ {
+ "name": "roleId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipDto"
- }
- }
- }
- },
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgMembershipOutput"
+ "$ref": "#/components/schemas/GetOrgRoleOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Roles"
]
- }
- },
- "/v2/organizations/{orgId}/memberships/{membershipId}": {
- "get": {
- "operationId": "OrganizationsMembershipsController_getOrgMembership",
- "summary": "Get a membership",
+ },
+ "patch": {
+ "operationId": "OrganizationsRolesController_updateRole",
+ "summary": "Update an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2094,33 +1879,43 @@
}
},
{
- "name": "membershipId",
+ "name": "roleId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOrgRoleInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgMembership"
+ "$ref": "#/components/schemas/UpdateOrgRoleOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Roles"
]
},
"delete": {
- "operationId": "OrganizationsMembershipsController_deleteMembership",
- "summary": "Delete a membership",
+ "operationId": "OrganizationsRolesController_deleteRole",
+ "summary": "Delete an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2158,11 +1953,11 @@
}
},
{
- "name": "membershipId",
+ "name": "roleId",
"required": true,
"in": "path",
"schema": {
- "type": "number"
+ "type": "string"
}
}
],
@@ -2172,19 +1967,21 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteOrgMembership"
+ "$ref": "#/components/schemas/DeleteOrgRoleOutput"
}
}
}
}
},
"tags": [
- "Orgs / Memberships"
+ "Orgs / Roles"
]
- },
- "patch": {
- "operationId": "OrganizationsMembershipsController_updateMembership",
- "summary": "Update a membership",
+ }
+ },
+ "/v2/organizations/{orgId}/roles/{roleId}/permissions": {
+ "post": {
+ "operationId": "OrganizationsRolesPermissionsController_addPermissions",
+ "summary": "Add permissions to an organization role (single or batch)",
"parameters": [
{
"name": "Authorization",
@@ -2222,80 +2019,12 @@
}
},
{
- "name": "membershipId",
+ "name": "roleId",
"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/UpdateOrgMembership"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Memberships"
- ]
- }
- },
- "/v2/organizations/{orgId}/roles": {
- "post": {
- "operationId": "OrganizationsRolesController_createRole",
- "summary": "Create a new organization role",
- "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": {
@@ -2303,113 +2032,30 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateOrgRoleInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgRoleOutput"
- }
+ "$ref": "#/components/schemas/CreateOrgRolePermissionsInput"
}
}
}
},
- "tags": [
- "Orgs / Roles"
- ]
- },
- "get": {
- "operationId": "OrganizationsRolesController_getAllRoles",
- "summary": "Get all organization roles",
- "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": "Maximum number of items to return",
- "example": 25,
- "schema": {
- "minimum": 1,
- "maximum": 250,
- "default": 250,
- "type": "number"
- }
- },
- {
- "name": "skip",
- "required": false,
- "in": "query",
- "description": "Number of items to skip",
- "example": 0,
- "schema": {
- "minimum": 0,
- "default": 0,
- "type": "number"
- }
- }
- ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetAllOrgRolesOutput"
+ "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
}
}
}
}
},
"tags": [
- "Orgs / Roles"
+ "Orgs / Roles / Permissions"
]
- }
- },
- "/v2/organizations/{orgId}/roles/{roleId}": {
+ },
"get": {
- "operationId": "OrganizationsRolesController_getRole",
- "summary": "Get a specific organization role",
+ "operationId": "OrganizationsRolesPermissionsController_listPermissions",
+ "summary": "List permissions for an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2461,19 +2107,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgRoleOutput"
+ "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
}
}
}
}
},
"tags": [
- "Orgs / Roles"
+ "Orgs / Roles / Permissions"
]
},
- "patch": {
- "operationId": "OrganizationsRolesController_updateRole",
- "summary": "Update an organization role",
+ "put": {
+ "operationId": "OrganizationsRolesPermissionsController_setPermissions",
+ "summary": "Replace all permissions for an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2524,7 +2170,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgRoleInput"
+ "$ref": "#/components/schemas/CreateOrgRolePermissionsInput"
}
}
}
@@ -2535,19 +2181,19 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateOrgRoleOutput"
+ "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
}
}
}
}
},
"tags": [
- "Orgs / Roles"
+ "Orgs / Roles / Permissions"
]
},
"delete": {
- "operationId": "OrganizationsRolesController_deleteRole",
- "summary": "Delete an organization role",
+ "operationId": "OrganizationsRolesPermissionsController_removePermissions",
+ "summary": "Remove multiple permissions from an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2591,29 +2237,95 @@
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeleteOrgRoleOutput"
- }
+ },
+ {
+ "name": "permissions",
+ "required": false,
+ "in": "query",
+ "description": "Permissions to remove (format: resource.action). Supports comma-separated values as well as repeated query params.",
+ "example": "?permissions=eventType.read,booking.read",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "*.*",
+ "role.create",
+ "role.read",
+ "role.update",
+ "role.delete",
+ "eventType.create",
+ "eventType.read",
+ "eventType.update",
+ "eventType.delete",
+ "team.create",
+ "team.read",
+ "team.update",
+ "team.delete",
+ "team.invite",
+ "team.remove",
+ "team.listMembers",
+ "team.listMembersPrivate",
+ "team.changeMemberRole",
+ "team.impersonate",
+ "organization.create",
+ "organization.read",
+ "organization.listMembers",
+ "organization.listMembersPrivate",
+ "organization.invite",
+ "organization.remove",
+ "organization.manageBilling",
+ "organization.changeMemberRole",
+ "organization.impersonate",
+ "organization.update",
+ "booking.read",
+ "booking.readOrgBookings",
+ "booking.readRecordings",
+ "booking.update",
+ "booking.readOrgAuditLogs",
+ "insights.read",
+ "workflow.create",
+ "workflow.read",
+ "workflow.update",
+ "workflow.delete",
+ "organization.attributes.read",
+ "organization.attributes.update",
+ "organization.attributes.delete",
+ "organization.attributes.create",
+ "organization.attributes.editUsers",
+ "routingForm.create",
+ "routingForm.read",
+ "routingForm.update",
+ "routingForm.delete",
+ "webhook.create",
+ "webhook.read",
+ "webhook.update",
+ "webhook.delete",
+ "watchlist.create",
+ "watchlist.read",
+ "watchlist.update",
+ "watchlist.delete",
+ "featureOptIn.read",
+ "featureOptIn.update"
+ ]
}
}
}
+ ],
+ "responses": {
+ "204": {
+ "description": ""
+ }
},
"tags": [
- "Orgs / Roles"
+ "Orgs / Roles / Permissions"
]
}
},
- "/v2/organizations/{orgId}/roles/{roleId}/permissions": {
- "post": {
- "operationId": "OrganizationsRolesPermissionsController_addPermissions",
- "summary": "Add permissions to an organization role (single or batch)",
+ "/v2/organizations/{orgId}/roles/{roleId}/permissions/{permission}": {
+ "delete": {
+ "operationId": "OrganizationsRolesPermissionsController_removePermission",
+ "summary": "Remove a permission from an organization role",
"parameters": [
{
"name": "Authorization",
@@ -2657,331 +2369,182 @@
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgRolePermissionsInput"
- }
+ },
+ {
+ "name": "permission",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
- }
- }
- }
+ "204": {
+ "description": ""
}
},
"tags": [
"Orgs / Roles / Permissions"
]
- },
+ }
+ },
+ "/v2/organizations/{orgId}/routing-forms": {
"get": {
- "operationId": "OrganizationsRolesPermissionsController_listPermissions",
- "summary": "List permissions for an organization role",
+ "operationId": "OrganizationsRoutingFormsController_getOrganizationRoutingForms",
+ "summary": "Get organization routing forms",
"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,
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
"schema": {
"type": "string"
}
},
{
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "For platform customers - OAuth client secret key",
- "required": false,
+ "name": "orgId",
+ "required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "x-cal-client-id",
- "in": "header",
- "description": "For platform customers - OAuth client ID",
+ "name": "skip",
"required": false,
+ "in": "query",
+ "description": "Number of responses to skip",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "Number of responses to take",
"schema": {
"type": "number"
}
},
{
- "name": "roleId",
- "required": true,
- "in": "path",
+ "name": "sortCreatedAt",
+ "required": false,
+ "in": "query",
+ "description": "Sort by creation time",
"schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
- }
- }
+ },
+ {
+ "name": "sortUpdatedAt",
+ "required": false,
+ "in": "query",
+ "description": "Sort by update time",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
}
- }
- },
- "tags": [
- "Orgs / Roles / Permissions"
- ]
- },
- "put": {
- "operationId": "OrganizationsRolesPermissionsController_setPermissions",
- "summary": "Replace all permissions for an organization role",
- "parameters": [
+ },
{
- "name": "Authorization",
- "in": "header",
- "description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "name": "afterCreatedAt",
"required": false,
+ "in": "query",
+ "description": "Filter by responses created after this date",
"schema": {
+ "format": "date-time",
"type": "string"
}
},
{
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "For platform customers - OAuth client secret key",
+ "name": "beforeCreatedAt",
"required": false,
+ "in": "query",
+ "description": "Filter by responses created before this date",
"schema": {
+ "format": "date-time",
"type": "string"
}
},
{
- "name": "x-cal-client-id",
- "in": "header",
- "description": "For platform customers - OAuth client ID",
+ "name": "afterUpdatedAt",
"required": false,
+ "in": "query",
+ "description": "Filter by responses created after this date",
"schema": {
+ "format": "date-time",
"type": "string"
}
},
{
- "name": "orgId",
- "required": true,
- "in": "path",
+ "name": "beforeUpdatedAt",
+ "required": false,
+ "in": "query",
+ "description": "Filter by responses updated before this date",
"schema": {
- "type": "number"
+ "format": "date-time",
+ "type": "string"
}
},
{
- "name": "roleId",
- "required": true,
- "in": "path",
+ "name": "routedToBookingUid",
+ "required": false,
+ "in": "query",
+ "description": "Filter by responses routed to a specific booking",
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOrgRolePermissionsInput"
+ },
+ {
+ "name": "teamIds",
+ "required": false,
+ "in": "query",
+ "description": "Filter by teamIds. Team ids must be separated by a comma.",
+ "example": "?teamIds=100,200",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "number"
}
}
}
- },
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetOrgRolePermissionsOutput"
+ "$ref": "#/components/schemas/GetRoutingFormsOutput"
}
}
}
}
},
"tags": [
- "Orgs / Roles / Permissions"
- ]
- },
- "delete": {
- "operationId": "OrganizationsRolesPermissionsController_removePermissions",
- "summary": "Remove multiple permissions from an organization role",
- "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": "roleId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "permissions",
- "required": false,
- "in": "query",
- "description": "Permissions to remove (format: resource.action). Supports comma-separated values as well as repeated query params.",
- "example": "?permissions=eventType.read,booking.read",
- "schema": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "*.*",
- "role.create",
- "role.read",
- "role.update",
- "role.delete",
- "eventType.create",
- "eventType.read",
- "eventType.update",
- "eventType.delete",
- "team.create",
- "team.read",
- "team.update",
- "team.delete",
- "team.invite",
- "team.remove",
- "team.listMembers",
- "team.listMembersPrivate",
- "team.changeMemberRole",
- "team.impersonate",
- "organization.create",
- "organization.read",
- "organization.listMembers",
- "organization.listMembersPrivate",
- "organization.invite",
- "organization.remove",
- "organization.manageBilling",
- "organization.changeMemberRole",
- "organization.impersonate",
- "organization.update",
- "booking.read",
- "booking.readOrgBookings",
- "booking.readRecordings",
- "booking.update",
- "booking.readOrgAuditLogs",
- "insights.read",
- "workflow.create",
- "workflow.read",
- "workflow.update",
- "workflow.delete",
- "organization.attributes.read",
- "organization.attributes.update",
- "organization.attributes.delete",
- "organization.attributes.create",
- "organization.attributes.editUsers",
- "routingForm.create",
- "routingForm.read",
- "routingForm.update",
- "routingForm.delete",
- "webhook.create",
- "webhook.read",
- "webhook.update",
- "webhook.delete",
- "watchlist.create",
- "watchlist.read",
- "watchlist.update",
- "watchlist.delete",
- "featureOptIn.read",
- "featureOptIn.update"
- ]
- }
- }
- }
- ],
- "responses": {
- "204": {
- "description": ""
- }
- },
- "tags": [
- "Orgs / Roles / Permissions"
+ "Orgs / Routing forms"
]
}
},
- "/v2/organizations/{orgId}/roles/{roleId}/permissions/{permission}": {
- "delete": {
- "operationId": "OrganizationsRolesPermissionsController_removePermission",
- "summary": "Remove a permission from an organization role",
+ "/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses": {
+ "get": {
+ "operationId": "OrganizationsRoutingFormsResponsesController_getRoutingFormResponses",
+ "summary": "Get routing form responses",
"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,
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
"schema": {
"type": "string"
}
@@ -2995,53 +2558,12 @@
}
},
{
- "name": "roleId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "permission",
+ "name": "routingFormId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "204": {
- "description": ""
- }
- },
- "tags": [
- "Orgs / Roles / Permissions"
- ]
- }
- },
- "/v2/organizations/{orgId}/routing-forms": {
- "get": {
- "operationId": "OrganizationsRoutingFormsController_getOrganizationRoutingForms",
- "summary": "Get organization routing forms",
- "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,
- "in": "path",
- "schema": {
- "type": "number"
- }
},
{
"name": "skip",
@@ -3135,19 +2657,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "teamIds",
- "required": false,
- "in": "query",
- "description": "Filter by teamIds. Team ids must be separated by a comma.",
- "example": "?teamIds=100,200",
- "schema": {
- "type": "array",
- "items": {
- "type": "number"
- }
- }
}
],
"responses": {
@@ -3156,7 +2665,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetRoutingFormsOutput"
+ "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
}
}
}
@@ -3165,12 +2674,10 @@
"tags": [
"Orgs / Routing forms"
]
- }
- },
- "/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses": {
- "get": {
- "operationId": "OrganizationsRoutingFormsResponsesController_getRoutingFormResponses",
- "summary": "Get routing form responses",
+ },
+ "post": {
+ "operationId": "OrganizationsRoutingFormsResponsesController_createRoutingFormResponse",
+ "summary": "Create routing form response and get available slots",
"parameters": [
{
"name": "Authorization",
@@ -3198,170 +2705,31 @@
}
},
{
- "name": "skip",
- "required": false,
+ "name": "start",
+ "required": true,
"in": "query",
- "description": "Number of responses to skip",
+ "description": "\n Time starting from which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to start of day or specify hours:\n 2024-08-13 (will have hours 00:00:00 aka at very beginning of the date) or you can specify hours manually like 2024-08-13T09:00:00Z\n ",
+ "example": "2050-09-05",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "take",
- "required": false,
+ "name": "end",
+ "required": true,
"in": "query",
- "description": "Number of responses to take",
+ "description": "\n Time until which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to end of day or specify hours:\n 2024-08-20 (will have hours 23:59:59 aka at the very end of the date) or you can specify hours manually like 2024-08-20T18:00:00Z",
+ "example": "2050-09-06",
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "name": "sortCreatedAt",
+ "name": "timeZone",
"required": false,
"in": "query",
- "description": "Sort by creation time",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "name": "sortUpdatedAt",
- "required": false,
- "in": "query",
- "description": "Sort by update time",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
- }
- },
- {
- "name": "afterCreatedAt",
- "required": false,
- "in": "query",
- "description": "Filter by responses created after this date",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "beforeCreatedAt",
- "required": false,
- "in": "query",
- "description": "Filter by responses created before this date",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "afterUpdatedAt",
- "required": false,
- "in": "query",
- "description": "Filter by responses created after this date",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "beforeUpdatedAt",
- "required": false,
- "in": "query",
- "description": "Filter by responses updated before this date",
- "schema": {
- "format": "date-time",
- "type": "string"
- }
- },
- {
- "name": "routedToBookingUid",
- "required": false,
- "in": "query",
- "description": "Filter by responses routed to a specific booking",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetRoutingFormResponsesOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Orgs / Routing forms"
- ]
- },
- "post": {
- "operationId": "OrganizationsRoutingFormsResponsesController_createRoutingFormResponse",
- "summary": "Create routing form response and get available slots",
- "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,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
- {
- "name": "routingFormId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "start",
- "required": true,
- "in": "query",
- "description": "\n Time starting from which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to start of day or specify hours:\n 2024-08-13 (will have hours 00:00:00 aka at very beginning of the date) or you can specify hours manually like 2024-08-13T09:00:00Z\n ",
- "example": "2050-09-05",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "end",
- "required": true,
- "in": "query",
- "description": "\n Time until which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to end of day or specify hours:\n 2024-08-20 (will have hours 23:59:59 aka at the very end of the date) or you can specify hours manually like 2024-08-20T18:00:00Z",
- "example": "2050-09-06",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "timeZone",
- "required": false,
- "in": "query",
- "description": "Time zone in which the available slots should be returned. Defaults to UTC.",
- "example": "Europe/Rome",
+ "description": "Time zone in which the available slots should be returned. Defaults to UTC.",
+ "example": "Europe/Rome",
"schema": {
"type": "string"
}
@@ -10380,37 +9748,1115 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/recordings": {
+ "get": {
+ "operationId": "BookingsController_2024_08_13_getBookingRecordings",
+ "summary": "Get all the recordings for the booking",
+ "description": "Fetches all the recordings for the booking `:bookingUid`. Requires authentication and proper authorization. Access is granted if you are the booking organizer, team admin or org admin/owner.\n\n <Note>cal-api-version: `2024-08-13` is required in the request header.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingRecordingsOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/transcripts": {
+ "get": {
+ "operationId": "BookingsController_2024_08_13_getBookingTranscripts",
+ "summary": "Get Cal Video real time transcript download links for the booking",
+ "description": "Fetches all the transcript download links for the booking `:bookingUid`\n\n <Note>\n Transcripts are generated when clicking \"Transcribe\" during a Cal Video meeting. Download links are valid for 1 hour only - make a new request to generate fresh links after expiration.\n\n Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.\n </Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingTranscriptsOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/reschedule": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_rescheduleBooking",
+ "summary": "Reschedule a booking",
+ "description": "Reschedule a booking or seated booking\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": 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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "description": "Accepts different types of reschedule booking input: Reschedule Booking (Option 1) or Reschedule Seated Booking (Option 2). If you're rescheduling a seated booking as org admin of booking host, pass booking input for Reschedule Booking (Option 1) along with your access token in the request header.\n\n If you are rescheduling a seated booking for an event type with 'show attendees' disabled, then to retrieve attendees in the response either set 'show attendees' to true on event type level or\n you have to provide an authentication method of event type owner, host, team admin or owner or org admin or owner.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/RescheduleBookingInput_2024_08_13"
+ },
+ {
+ "$ref": "#/components/schemas/RescheduleSeatedBookingInput_2024_08_13"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RescheduleBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/cancel": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_cancelBooking",
+ "summary": "Cancel a booking",
+ "description": ":bookingUid can be :bookingUid of an usual booking, individual recurrence or recurring booking to cancel all recurrences.\n\n \nCancelling normal bookings:\n If the booking is not seated and not recurring, simply pass :bookingUid in the request URL `/bookings/:bookingUid/cancel` and optionally cancellationReason in the request body `{\"cancellationReason\": \"Will travel\"}`.\n\n \nCancelling seated bookings:\n It is possible to cancel specific seat within a booking as an attendee or all of the seats as the host.\n \n1. As an attendee - provide :bookingUid in the request URL `/bookings/:bookingUid/cancel` and seatUid in the request body `{\"seatUid\": \"123-123-123\"}` . This will remove this particular attendance from the booking.\n \n2. As the host or org admin of host - host can cancel booking for all attendees aka for every seat, this also applies to org admins. Provide :bookingUid in the request URL `/bookings/:bookingUid/cancel` and cancellationReason in the request body `{\"cancellationReason\": \"Will travel\"}` and `Authorization: Bearer token` request header where token is event type owner (host) credential. This will cancel the booking for all attendees.\n\n \nCancelling recurring seated bookings:\n For recurring seated bookings it is not possible to cancel all of them with 1 call\n like with non-seated recurring bookings by providing recurring bookind uid - you have to cancel each recurrence booking by its bookingUid + seatUid.\n\n If you are cancelling a seated booking for an event type with 'show attendees' disabled, then to retrieve attendees in the response either set 'show attendees' to true on event type level or\n you have to provide an authentication method of event type owner, host, team admin or owner or org admin or owner.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": 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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "description": "Accepts different types of cancel booking input: Cancel Booking (Option 1 which is for normal or recurring bookings) or Cancel Seated Booking (Option 2 which is for seated bookings)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/CancelBookingInput_2024_08_13"
+ },
+ {
+ "$ref": "#/components/schemas/CancelSeatedBookingInput_2024_08_13"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CancelBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/mark-absent": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_markNoShow",
+ "summary": "Mark a booking absence",
+ "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MarkAbsentBookingInput_2024_08_13"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MarkAbsentBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/reassign": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_reassignBooking",
+ "summary": "Reassign a booking to auto-selected host",
+ "description": "Currently only supports reassigning host for round robin bookings. The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReassignBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/reassign/{userId}": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_reassignBookingToUser",
+ "summary": "Reassign a booking to a specific host",
+ "description": "Currently only supports reassigning host for round robin bookings. The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "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": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReassignToUserBookingInput_2024_08_13"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReassignBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/confirm": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_confirmBooking",
+ "summary": "Confirm a booking",
+ "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/decline": {
+ "post": {
+ "operationId": "BookingsController_2024_08_13_declineBooking",
+ "summary": "Decline a booking",
+ "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeclineBookingInput_2024_08_13"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/calendar-links": {
+ "get": {
+ "operationId": "BookingsController_2024_08_13_getCalendarLinks",
+ "summary": "Get 'Add to Calendar' links for a booking",
+ "description": "Retrieve calendar links for a booking that can be used to add the event to various calendar services. Returns links for Google Calendar, Microsoft Office, Microsoft Outlook, and a downloadable ICS file.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CalendarLinksOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/references": {
+ "get": {
+ "operationId": "BookingsController_2024_08_13_getBookingReferences",
+ "summary": "Get booking references",
+ "description": "<Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "type",
+ "required": false,
+ "in": "query",
+ "description": "Filter booking references by type",
+ "example": "google_calendar",
+ "schema": {
+ "enum": [
+ "google_calendar",
+ "office365_calendar",
+ "daily_video",
+ "google_video",
+ "office365_video",
+ "zoom_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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BookingReferencesOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/conferencing-sessions": {
+ "get": {
+ "operationId": "BookingsController_2024_08_13_getVideoSessions",
+ "summary": "Get Video Meeting Sessions. Only supported for Cal Video",
+ "description": "Requires authentication and proper authorization. Access is granted if you are the booking organizer, team admin or org admin/owner.\n\n <Note>cal-api-version: `2024-08-13` is required in the request header.</Note>",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "default": "2024-08-13"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBookingVideoSessionsOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/location": {
+ "patch": {
+ "operationId": "BookingLocationController_2024_08_13_updateBookingLocation",
+ "summary": "Update booking location for an existing booking",
+ "description": "**Current Limitation:** Updating a booking location will update the location in Cal.com, but the corresponding Calendar event will not be updated automatically. The old location will persist in the Calendar event. This is a known limitation that will be addressed in a future update.\n \n <Note>The cal-api-version header is required for this endpoint. Without it, the request will fail with a 404 error.</Note>",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. This header is required as this endpoint does not exist in older API versions.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBookingLocationInput_2024_08_13"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBookingLocationOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings"
+ ]
+ }
+ },
+ "/v2/bookings/{bookingUid}/guests": {
+ "post": {
+ "operationId": "BookingGuestsController_2024_08_13_addGuests",
+ "summary": "Add guests to an existing booking",
+ "description": "Add one or more guests to an existing booking.\n \n **Email Notifications:**\n When guests are added, the following notifications are sent (unless disabled by event type settings):\n \n - **Organizer & Team Members:** Receive an \"Add Guests\" notification email informing them that new guests have been added to the booking.\n \n - **New Guests:** Receive a \"Scheduled Event\" email with full booking details and calendar invite. If they have a phone number, they also receive an SMS notification.\n \n - **Existing Guests:** Receive an \"Add Guests\" notification email informing them that additional guests have been added to the booking.\n \n <Note>The cal-api-version header is required for this endpoint. Without it, the request will fail with a 404 error.</Note>\n ",
+ "parameters": [
+ {
+ "name": "cal-api-version",
+ "in": "header",
+ "description": "Must be set to 2024-08-13. This header is required as this endpoint does not exist in older API versions.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "bookingUid",
+ "required": true,
+ "in": "path",
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddGuestsInput_2024_08_13"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddGuestsOutput_2024_08_13"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Bookings / Guests"
+ ]
+ }
+ },
+ "/v2/calendars/{calendar}/event/{eventUid}": {
+ "get": {
+ "operationId": "CalUnifiedCalendarsController_getCalendarEventDetails",
+ "summary": "Get meeting details from calendar",
+ "description": "Returns detailed information about a meeting including attendance metrics",
+ "parameters": [
+ {
+ "name": "calendar",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "enum": [
+ "google"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventUid",
+ "required": true,
+ "in": "path",
+ "description": "The Google Calendar event ID. You can retrieve this by getting booking references from the following endpoints:\n\n- For team events: https://cal.com/docs/api-reference/v2/orgs-teams-bookings/get-booking-references-for-a-booking\n\n- For user events: https://cal.com/docs/api-reference/v2/bookings/get-booking-references-for-a-booking",
+ "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": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetUnifiedCalendarEventOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Cal Unified Calendars"
+ ]
+ }
+ },
+ "/v2/calendars/{calendar}/events/{eventUid}": {
+ "patch": {
+ "operationId": "CalUnifiedCalendarsController_updateCalendarEvent",
+ "summary": "Update meeting details in calendar",
+ "description": "Updates event information in the specified calendar provider",
+ "parameters": [
+ {
+ "name": "calendar",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "enum": [
+ "google"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "eventUid",
+ "required": true,
+ "in": "path",
+ "description": "The Google Calendar event ID. You can retrieve this by getting booking references from the following endpoints:\n\n- For team events: https://cal.com/docs/api-reference/v2/orgs-teams-bookings/get-booking-references-for-a-booking\n\n- For user events: https://cal.com/docs/api-reference/v2/bookings/get-booking-references-for-a-booking",
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateUnifiedCalendarEventInput"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetUnifiedCalendarEventOutput"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Cal Unified Calendars"
+ ]
+ }
+ },
+ "/v2/calendars/ics-feed/save": {
+ "post": {
+ "operationId": "CalendarsController_createIcsFeed",
+ "summary": "Save an ICS feed",
+ "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": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateIcsFeedInputDto"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Calendars"
+ ]
+ }
+ },
+ "/v2/calendars/ics-feed/check": {
+ "get": {
+ "operationId": "CalendarsController_checkIcsFeed",
+ "summary": "Check an ICS feed",
+ "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": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/recordings": {
+ "/v2/calendars/busy-times": {
"get": {
- "operationId": "BookingsController_2024_08_13_getBookingRecordings",
- "summary": "Get all the recordings for the booking",
- "description": "Fetches all the recordings for the booking `:bookingUid`. Requires authentication and proper authorization. Access is granted if you are the booking organizer, team admin or org admin/owner.\n\n <Note>cal-api-version: `2024-08-13` is required in the request header.</Note>\n ",
+ "operationId": "CalendarsController_getBusyTimes",
+ "summary": "Get busy times",
+ "description": "Get busy times from a calendar. Example request URL is `https://api.cal.com/v2/calendars/busy-times?loggedInUsersTz=Europe%2FMadrid&dateFrom=2024-12-18&dateTo=2024-12-18&calendarsToLoad[0][credentialId]=135&calendarsToLoad[0][externalId]=skrauciz%40gmail.com`",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "name": "loggedInUsersTz",
"required": true,
+ "in": "query",
+ "description": "The timezone of the logged in user represented as a string",
+ "example": "America/New_York",
"schema": {
- "type": "string",
- "default": "2024-08-13"
+ "type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "dateFrom",
+ "required": false,
+ "in": "query",
+ "description": "The starting date for the busy times query",
+ "example": "2023-10-01",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "dateTo",
+ "required": false,
+ "in": "query",
+ "description": "The ending date for the busy times query",
+ "example": "2023-10-31",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "credentialId",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "externalId",
+ "in": "query",
"required": true,
- "in": "path",
"schema": {
"type": "string"
}
@@ -10431,41 +10877,22 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingRecordingsOutput"
+ "$ref": "#/components/schemas/GetBusyTimesOutput"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/transcripts": {
+ "/v2/calendars": {
"get": {
- "operationId": "BookingsController_2024_08_13_getBookingTranscripts",
- "summary": "Get Cal Video real time transcript download links for the booking",
- "description": "Fetches all the transcript download links for the booking `:bookingUid`\n\n <Note>\n Transcripts are generated when clicking \"Transcribe\" during a Cal Video meeting. Download links are valid for 1 hour only - make a new request to generate fresh links after expiration.\n\n Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.\n </Note>\n ",
+ "operationId": "CalendarsController_getCalendars",
+ "summary": "Get all calendars",
"parameters": [
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
{
"name": "Authorization",
"in": "header",
@@ -10482,212 +10909,135 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingTranscriptsOutput"
+ "$ref": "#/components/schemas/ConnectedCalendarsOutput"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/reschedule": {
- "post": {
- "operationId": "BookingsController_2024_08_13_rescheduleBooking",
- "summary": "Reschedule a booking",
- "description": "Reschedule a booking or seated booking\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "/v2/calendars/{calendar}/connect": {
+ "get": {
+ "operationId": "CalendarsController_redirect",
+ "summary": "Get OAuth connect URL",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "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",
- "default": "2024-08-13"
+ "type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
+ "enum": [
+ "office365",
+ "google"
+ ],
"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": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "For platform customers - OAuth client secret key",
- "required": false,
+ "name": "isDryRun",
+ "required": true,
+ "in": "query",
"schema": {
- "type": "string"
+ "type": "boolean"
}
},
{
- "name": "x-cal-client-id",
- "in": "header",
- "description": "For platform customers - OAuth client ID",
+ "name": "redir",
"required": false,
+ "in": "query",
+ "description": "Redirect URL after successful calendar authorization.",
"schema": {
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "description": "Accepts different types of reschedule booking input: Reschedule Booking (Option 1) or Reschedule Seated Booking (Option 2). If you're rescheduling a seated booking as org admin of booking host, pass booking input for Reschedule Booking (Option 1) along with your access token in the request header.\n\n If you are rescheduling a seated booking for an event type with 'show attendees' disabled, then to retrieve attendees in the response either set 'show attendees' to true on event type level or\n you have to provide an authentication method of event type owner, host, team admin or owner or org admin or owner.",
- "content": {
- "application/json": {
- "schema": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/RescheduleBookingInput_2024_08_13"
- },
- {
- "$ref": "#/components/schemas/RescheduleSeatedBookingInput_2024_08_13"
- }
- ]
- }
- }
- }
- },
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RescheduleBookingOutput_2024_08_13"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/cancel": {
- "post": {
- "operationId": "BookingsController_2024_08_13_cancelBooking",
- "summary": "Cancel a booking",
- "description": ":bookingUid can be :bookingUid of an usual booking, individual recurrence or recurring booking to cancel all recurrences.\n\n \nCancelling normal bookings:\n If the booking is not seated and not recurring, simply pass :bookingUid in the request URL `/bookings/:bookingUid/cancel` and optionally cancellationReason in the request body `{\"cancellationReason\": \"Will travel\"}`.\n\n \nCancelling seated bookings:\n It is possible to cancel specific seat within a booking as an attendee or all of the seats as the host.\n \n1. As an attendee - provide :bookingUid in the request URL `/bookings/:bookingUid/cancel` and seatUid in the request body `{\"seatUid\": \"123-123-123\"}` . This will remove this particular attendance from the booking.\n \n2. As the host or org admin of host - host can cancel booking for all attendees aka for every seat, this also applies to org admins. Provide :bookingUid in the request URL `/bookings/:bookingUid/cancel` and cancellationReason in the request body `{\"cancellationReason\": \"Will travel\"}` and `Authorization: Bearer token` request header where token is event type owner (host) credential. This will cancel the booking for all attendees.\n\n \nCancelling recurring seated bookings:\n For recurring seated bookings it is not possible to cancel all of them with 1 call\n like with non-seated recurring bookings by providing recurring bookind uid - you have to cancel each recurrence booking by its bookingUid + seatUid.\n\n If you are cancelling a seated booking for an event type with 'show attendees' disabled, then to retrieve attendees in the response either set 'show attendees' to true on event type level or\n you have to provide an authentication method of event type owner, host, team admin or owner or org admin or owner.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "/v2/calendars/{calendar}/save": {
+ "get": {
+ "operationId": "CalendarsController_save",
+ "summary": "Save Google or Outlook calendar credentials",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
+ "name": "state",
"required": true,
- "in": "path",
- "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": false,
+ "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "x-cal-secret-key",
- "in": "header",
- "description": "For platform customers - OAuth client secret key",
- "required": false,
+ "name": "code",
+ "required": true,
+ "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "x-cal-client-id",
- "in": "header",
- "description": "For platform customers - OAuth client ID",
- "required": false,
+ "name": "calendar",
+ "required": true,
+ "in": "path",
"schema": {
+ "enum": [
+ "office365",
+ "google"
+ ],
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "description": "Accepts different types of cancel booking input: Cancel Booking (Option 1 which is for normal or recurring bookings) or Cancel Seated Booking (Option 2 which is for seated bookings)",
- "content": {
- "application/json": {
- "schema": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/CancelBookingInput_2024_08_13"
- },
- {
- "$ref": "#/components/schemas/CancelSeatedBookingInput_2024_08_13"
- }
- ]
- }
- }
- }
- },
"responses": {
"200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CancelBookingOutput_2024_08_13"
- }
- }
- }
+ "description": ""
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
- },
- "/v2/bookings/{bookingUid}/mark-absent": {
- "post": {
- "operationId": "BookingsController_2024_08_13_markNoShow",
- "summary": "Mark a booking absence",
- "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
- "parameters": [
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
+ },
+ "/v2/calendars/{calendar}/credentials": {
+ "post": {
+ "operationId": "CalendarsController_syncCredentials",
+ "summary": "Save Apple calendar credentials",
+ "parameters": [
{
- "name": "bookingUid",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
+ "enum": [
+ "apple"
+ ],
"type": "string"
}
},
@@ -10706,49 +11056,36 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/MarkAbsentBookingInput_2024_08_13"
+ "$ref": "#/components/schemas/CreateCalendarCredentialsInput"
}
}
}
},
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/MarkAbsentBookingOutput_2024_08_13"
- }
- }
- }
+ "201": {
+ "description": ""
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/reassign": {
- "post": {
- "operationId": "BookingsController_2024_08_13_reassignBooking",
- "summary": "Reassign a booking to auto-selected host",
- "description": "Currently only supports reassigning host for round robin bookings. The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "/v2/calendars/{calendar}/check": {
+ "get": {
+ "operationId": "CalendarsController_check",
+ "summary": "Check a calendar connection",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
+ "enum": [
+ "apple",
+ "google",
+ "office365"
+ ],
"type": "string"
}
},
@@ -10768,49 +11105,35 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ReassignBookingOutput_2024_08_13"
+ "type": "object"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/reassign/{userId}": {
+ "/v2/calendars/{calendar}/disconnect": {
"post": {
- "operationId": "BookingsController_2024_08_13_reassignBookingToUser",
- "summary": "Reassign a booking to a specific host",
- "description": "Currently only supports reassigning host for round robin bookings. The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "operationId": "CalendarsController_deleteCalendarCredentials",
+ "summary": "Disconnect a calendar",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
+ "name": "calendar",
"required": true,
"in": "path",
"schema": {
+ "enum": [
+ "apple",
+ "google",
+ "office365"
+ ],
"type": "string"
}
},
- {
- "name": "userId",
- "required": true,
- "in": "path",
- "schema": {
- "type": "number"
- }
- },
{
"name": "Authorization",
"in": "header",
@@ -10826,7 +11149,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ReassignToUserBookingInput_2024_08_13"
+ "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto"
}
}
}
@@ -10837,38 +11160,31 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ReassignBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Calendars"
]
}
},
- "/v2/bookings/{bookingUid}/confirm": {
+ "/v2/conferencing/{app}/connect": {
"post": {
- "operationId": "BookingsController_2024_08_13_confirmBooking",
- "summary": "Confirm a booking",
- "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "operationId": "ConferencingController_connect",
+ "summary": "Connect your conferencing application",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
+ "name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "google-meet"
+ ],
"type": "string"
}
},
@@ -10888,102 +11204,128 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/ConferencingAppOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Conferencing"
]
}
},
- "/v2/bookings/{bookingUid}/decline": {
- "post": {
- "operationId": "BookingsController_2024_08_13_declineBooking",
- "summary": "Decline a booking",
- "description": "The provided authorization header refers to the owner of the booking.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "/v2/conferencing/{app}/oauth/auth-url": {
+ "get": {
+ "operationId": "ConferencingController_redirect",
+ "summary": "Get OAuth conferencing app auth URL",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "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",
- "default": "2024-08-13"
+ "type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "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",
+ "name": "returnTo",
"required": true,
+ "in": "query",
"schema": {
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DeclineBookingInput_2024_08_13"
- }
+ },
+ {
+ "name": "onErrorReturnTo",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetConferencingAppsOauthUrlResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Conferencing"
]
}
},
- "/v2/bookings/{bookingUid}/calendar-links": {
+ "/v2/conferencing/{app}/oauth/callback": {
"get": {
- "operationId": "BookingsController_2024_08_13_getCalendarLinks",
- "summary": "Get 'Add to Calendar' links for a booking",
- "description": "Retrieve calendar links for a booking that can be used to add the event to various calendar services. Returns links for Google Calendar, Microsoft Office, Microsoft Outlook, and a downloadable ICS file.\n\n <Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>\n ",
+ "operationId": "ConferencingController_save",
+ "summary": "Conferencing app OAuth callback",
"parameters": [
{
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "name": "state",
"required": true,
+ "in": "query",
"schema": {
- "type": "string",
- "default": "2024-08-13"
+ "type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "zoom",
+ "msteams"
+ ],
"type": "string"
}
},
+ {
+ "name": "code",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "Conferencing"
+ ]
+ }
+ },
+ "/v2/conferencing": {
+ "get": {
+ "operationId": "ConferencingController_listInstalledConferencingApps",
+ "summary": "List your conferencing applications",
+ "parameters": [
{
"name": "Authorization",
"in": "header",
@@ -11000,55 +11342,33 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CalendarLinksOutput_2024_08_13"
+ "$ref": "#/components/schemas/ConferencingAppsOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Conferencing"
]
}
},
- "/v2/bookings/{bookingUid}/references": {
- "get": {
- "operationId": "BookingsController_2024_08_13_getBookingReferences",
- "summary": "Get booking references",
- "description": "<Note>Please make sure to pass in the cal-api-version header value as mentioned in the Headers section. Not passing the correct value will default to an older version of this endpoint.</Note>",
- "parameters": [
- {
- "name": "cal-api-version",
- "in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
- "required": true,
- "schema": {
- "type": "string",
- "default": "2024-08-13"
- }
- },
- {
- "name": "bookingUid",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "type",
- "required": false,
- "in": "query",
- "description": "Filter booking references by type",
- "example": "google_calendar",
+ "/v2/conferencing/{app}/default": {
+ "post": {
+ "operationId": "ConferencingController_default",
+ "summary": "Set your default conferencing application",
+ "parameters": [
+ {
+ "name": "app",
+ "required": true,
+ "in": "path",
+ "description": "Conferencing application type",
"schema": {
"enum": [
- "google_calendar",
- "office365_calendar",
- "daily_video",
- "google_video",
- "office365_video",
- "zoom_video"
+ "google-meet",
+ "zoom",
+ "msteams",
+ "daily-video"
],
"type": "string"
}
@@ -11069,38 +11389,65 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BookingReferencesOutput_2024_08_13"
+ "$ref": "#/components/schemas/SetDefaultConferencingAppOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Conferencing"
]
}
},
- "/v2/bookings/{bookingUid}/conferencing-sessions": {
+ "/v2/conferencing/default": {
"get": {
- "operationId": "BookingsController_2024_08_13_getVideoSessions",
- "summary": "Get Video Meeting Sessions. Only supported for Cal Video",
- "description": "Requires authentication and proper authorization. Access is granted if you are the booking organizer, team admin or org admin/owner.\n\n <Note>cal-api-version: `2024-08-13` is required in the request header.</Note>",
+ "operationId": "ConferencingController_getDefault",
+ "summary": "Get your default conferencing application",
"parameters": [
{
- "name": "cal-api-version",
+ "name": "Authorization",
"in": "header",
- "description": "Must be set to 2024-08-13. If not set to this value, the endpoint will default to an older version.",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
"required": true,
"schema": {
- "type": "string",
- "default": "2024-08-13"
+ "type": "string"
}
- },
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetDefaultConferencingAppOutputResponseDto"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Conferencing"
+ ]
+ }
+ },
+ "/v2/conferencing/{app}/disconnect": {
+ "delete": {
+ "operationId": "ConferencingController_disconnect",
+ "summary": "Disconnect your conferencing application",
+ "parameters": [
{
- "name": "bookingUid",
+ "name": "app",
"required": true,
"in": "path",
+ "description": "Conferencing application type",
"schema": {
+ "enum": [
+ "google-meet",
+ "zoom",
+ "msteams"
+ ],
"type": "string"
}
},
@@ -11120,34 +11467,33 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBookingVideoSessionsOutput"
+ "$ref": "#/components/schemas/DisconnectConferencingAppOutputResponseDto"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Conferencing"
]
}
},
- "/v2/bookings/{bookingUid}/location": {
- "patch": {
- "operationId": "BookingLocationController_2024_08_13_updateBookingLocation",
- "summary": "Update booking location for an existing booking",
- "description": "**Current Limitation:** Updating a booking location will update the location in Cal.com, but the corresponding Calendar event will not be updated automatically. The old location will persist in the Calendar event. This is a known limitation that will be addressed in a future update.\n \n <Note>The cal-api-version header is required for this endpoint. Without it, the request will fail with a 404 error.</Note>",
+ "/v2/oauth-clients/{clientId}/users": {
+ "get": {
+ "operationId": "OAuthClientUsersController_getManagedUsers",
+ "summary": "Get all managed users",
"parameters": [
{
- "name": "cal-api-version",
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "Must be set to 2024-08-13. This header is required as this endpoint does not exist in older API versions.",
+ "description": "OAuth client secret key",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
@@ -11155,73 +11501,75 @@
}
},
{
- "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,
+ "name": "limit",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to return",
+ "example": 10,
"schema": {
- "type": "string"
+ "type": "number"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateBookingLocationInput_2024_08_13"
+ },
+ {
+ "name": "offset",
+ "required": false,
+ "in": "query",
+ "description": "The number of items to skip",
+ "example": 0,
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "name": "emails",
+ "required": false,
+ "in": "query",
+ "description": "Filter managed users by email. If you want to filter by multiple emails, separate them with a comma.",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
}
}
- },
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateBookingLocationOutput_2024_08_13"
+ "$ref": "#/components/schemas/GetManagedUsersOutput"
}
}
}
}
},
"tags": [
- "Bookings"
+ "Deprecated: Platform / Managed Users"
]
- }
- },
- "/v2/bookings/{bookingUid}/guests": {
+ },
"post": {
- "operationId": "BookingGuestsController_2024_08_13_addGuests",
- "summary": "Add guests to an existing booking",
- "description": "Add one or more guests to an existing booking.\n \n **Email Notifications:**\n When guests are added, the following notifications are sent (unless disabled by event type settings):\n \n - **Organizer & Team Members:** Receive an \"Add Guests\" notification email informing them that new guests have been added to the booking.\n \n - **New Guests:** Receive a \"Scheduled Event\" email with full booking details and calendar invite. If they have a phone number, they also receive an SMS notification.\n \n - **Existing Guests:** Receive an \"Add Guests\" notification email informing them that additional guests have been added to the booking.\n \n <Note>The cal-api-version header is required for this endpoint. Without it, the request will fail with a 404 error.</Note>\n ",
+ "operationId": "OAuthClientUsersController_createUser",
+ "summary": "Create a managed user",
"parameters": [
{
- "name": "cal-api-version",
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "Must be set to 2024-08-13. This header is required as this endpoint does not exist in older API versions.",
+ "description": "OAuth client secret key",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "bookingUid",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
- },
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
- "required": true,
- "schema": {
- "type": "string"
- }
}
],
"requestBody": {
@@ -11229,61 +11577,56 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AddGuestsInput_2024_08_13"
+ "$ref": "#/components/schemas/CreateManagedUserInput"
}
}
}
},
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AddGuestsOutput_2024_08_13"
+ "$ref": "#/components/schemas/CreateManagedUserOutput"
}
}
}
}
},
"tags": [
- "Bookings / Guests"
+ "Deprecated: Platform / Managed Users"
]
}
},
- "/v2/calendars/{calendar}/event/{eventUid}": {
+ "/v2/oauth-clients/{clientId}/users/{userId}": {
"get": {
- "operationId": "CalUnifiedCalendarsController_getCalendarEventDetails",
- "summary": "Get meeting details from calendar",
- "description": "Returns detailed information about a meeting including attendance metrics",
+ "operationId": "OAuthClientUsersController_getUserById",
+ "summary": "Get a managed user",
"parameters": [
{
- "name": "calendar",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "path",
"schema": {
- "enum": [
- "google"
- ],
"type": "string"
}
},
{
- "name": "eventUid",
+ "name": "clientId",
"required": true,
"in": "path",
- "description": "The Google Calendar event ID. You can retrieve this by getting booking references from the following endpoints:\n\n- For team events: https://cal.com/docs/api-reference/v2/orgs-teams-bookings/get-booking-references-for-a-booking\n\n- For user events: https://cal.com/docs/api-reference/v2/bookings/get-booking-references-for-a-booking",
"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",
+ "name": "userId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -11293,92 +11636,43 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetUnifiedCalendarEventOutput"
+ "$ref": "#/components/schemas/GetManagedUserOutput"
}
}
}
}
},
"tags": [
- "Cal Unified Calendars"
+ "Deprecated: Platform / Managed Users"
]
- }
- },
- "/v2/calendars/{calendar}/events/{eventUid}": {
+ },
"patch": {
- "operationId": "CalUnifiedCalendarsController_updateCalendarEvent",
- "summary": "Update meeting details in calendar",
- "description": "Updates event information in the specified calendar provider",
+ "operationId": "OAuthClientUsersController_updateUser",
+ "summary": "Update a managed user",
"parameters": [
{
- "name": "calendar",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "path",
"schema": {
- "enum": [
- "google"
- ],
"type": "string"
}
},
{
- "name": "eventUid",
+ "name": "clientId",
"required": true,
"in": "path",
- "description": "The Google Calendar event ID. You can retrieve this by getting booking references from the following endpoints:\n\n- For team events: https://cal.com/docs/api-reference/v2/orgs-teams-bookings/get-booking-references-for-a-booking\n\n- For user events: https://cal.com/docs/api-reference/v2/bookings/get-booking-references-for-a-booking",
"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"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateUnifiedCalendarEventInput"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetUnifiedCalendarEventOutput"
- }
- }
- }
- }
- },
- "tags": [
- "Cal Unified Calendars"
- ]
- }
- },
- "/v2/calendars/ics-feed/save": {
- "post": {
- "operationId": "CalendarsController_createIcsFeed",
- "summary": "Save an ICS feed",
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "name": "userId",
"required": true,
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "number"
}
}
],
@@ -11387,41 +11681,55 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateIcsFeedInputDto"
+ "$ref": "#/components/schemas/UpdateManagedUserInput"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto"
+ "$ref": "#/components/schemas/GetManagedUserOutput"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Managed Users"
]
- }
- },
- "/v2/calendars/ics-feed/check": {
- "get": {
- "operationId": "CalendarsController_checkIcsFeed",
- "summary": "Check an ICS feed",
+ },
+ "delete": {
+ "operationId": "OAuthClientUsersController_deleteUser",
+ "summary": "Delete a managed user",
"parameters": [
{
- "name": "Authorization",
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "description": "OAuth client secret key",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "userId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "number"
+ }
}
],
"responses": {
@@ -11430,74 +11738,44 @@
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/GetManagedUserOutput"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Managed Users"
]
}
},
- "/v2/calendars/busy-times": {
- "get": {
- "operationId": "CalendarsController_getBusyTimes",
- "summary": "Get busy times",
- "description": "Get busy times from a calendar. Example request URL is `https://api.cal.com/v2/calendars/busy-times?loggedInUsersTz=Europe%2FMadrid&dateFrom=2024-12-18&dateTo=2024-12-18&calendarsToLoad[0][credentialId]=135&calendarsToLoad[0][externalId]=skrauciz%40gmail.com`",
+ "/v2/oauth-clients/{clientId}/users/{userId}/force-refresh": {
+ "post": {
+ "operationId": "OAuthClientUsersController_forceRefresh",
+ "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. Access token is valid for 60 minutes and refresh token for 1 year. Make sure to store them in your database, for example, in your User database model `calAccessToken` and `calRefreshToken` fields.\nResponse also contains `accessTokenExpiresAt` and `refreshTokenExpiresAt` fields, but if you decode the jwt token the payload will contain `clientId` (OAuth client ID), `ownerId` (user to whom token belongs ID), `iat` (issued at time) and `expiresAt` (when does the token expire) fields.",
"parameters": [
{
- "name": "loggedInUsersTz",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "query",
- "description": "The timezone of the logged in user represented as a string",
- "example": "America/New_York",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "dateFrom",
- "required": false,
- "in": "query",
- "description": "The starting date for the busy times query",
- "example": "2023-10-01",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "dateTo",
- "required": false,
- "in": "query",
- "description": "The ending date for the busy times query",
- "example": "2023-10-31",
"schema": {
"type": "string"
}
},
{
- "name": "credentialId",
- "in": "query",
+ "name": "userId",
"required": true,
+ "in": "path",
"schema": {
"type": "number"
}
},
{
- "name": "externalId",
- "in": "query",
- "required": true,
- "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",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -11509,223 +11787,197 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetBusyTimesOutput"
+ "$ref": "#/components/schemas/KeysResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Managed Users"
]
}
},
- "/v2/calendars": {
- "get": {
- "operationId": "CalendarsController_getCalendars",
- "summary": "Get all calendars",
+ "/v2/oauth/{clientId}/refresh": {
+ "post": {
+ "operationId": "OAuthFlowController_refreshTokens",
+ "summary": "Refresh managed user tokens",
+ "description": "If managed user access token is expired then get a new one using this endpoint - it will also refresh the refresh token, because we use\n \"refresh token rotation\" mechanism. Access token is valid for 60 minutes and refresh token for 1 year. Make sure to store them in your database, for example, in your User database model `calAccessToken` and `calRefreshToken` fields.\nResponse also contains `accessTokenExpiresAt` and `refreshTokenExpiresAt` fields, but if you decode the jwt token the payload will contain `clientId` (OAuth client ID), `ownerId` (user to whom token belongs ID), `iat` (issued at time) and `expiresAt` (when does the token expire) fields.",
"parameters": [
{
- "name": "Authorization",
- "in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "name": "clientId",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "x-cal-secret-key",
"required": true,
+ "in": "header",
+ "description": "OAuth client secret key.",
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RefreshTokenInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ConnectedCalendarsOutput"
+ "$ref": "#/components/schemas/KeysResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Managed Users"
]
}
},
- "/v2/calendars/{calendar}/connect": {
- "get": {
- "operationId": "CalendarsController_redirect",
- "summary": "Get OAuth connect URL",
+ "/v2/oauth-clients/{clientId}/webhooks": {
+ "post": {
+ "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook",
+ "summary": "Create a webhook",
"parameters": [
{
- "name": "Authorization",
- "required": true,
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "calendar",
+ "description": "OAuth client secret key",
"required": true,
- "in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
"type": "string"
}
},
{
- "name": "isDryRun",
+ "name": "clientId",
"required": true,
- "in": "query",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "redir",
- "required": false,
- "in": "query",
- "description": "Redirect URL after successful calendar authorization.",
+ "in": "path",
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateWebhookInputDto"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
+ "201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Webhooks"
]
- }
- },
- "/v2/calendars/{calendar}/save": {
+ },
"get": {
- "operationId": "CalendarsController_save",
- "summary": "Save Google or Outlook calendar credentials",
+ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
+ "summary": "Get all webhooks",
"parameters": [
{
- "name": "state",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "code",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "in": "query",
"schema": {
"type": "string"
}
},
{
- "name": "calendar",
+ "name": "clientId",
"required": true,
"in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- },
- "tags": [
- "Calendars"
- ]
- }
- },
- "/v2/calendars/{calendar}/credentials": {
- "post": {
- "operationId": "CalendarsController_syncCredentials",
- "summary": "Save Apple calendar credentials",
- "parameters": [
+ },
{
- "name": "calendar",
- "required": true,
- "in": "path",
+ "name": "take",
+ "required": false,
+ "in": "query",
+ "description": "Maximum number of items to return",
+ "example": 25,
"schema": {
- "enum": [
- "apple"
- ],
- "type": "string"
+ "minimum": 1,
+ "maximum": 250,
+ "default": 250,
+ "type": "number"
}
- },
- {
- "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,
+ },
+ {
+ "name": "skip",
+ "required": false,
+ "in": "query",
+ "description": "Number of items to skip",
+ "example": 0,
"schema": {
- "type": "string"
+ "minimum": 0,
+ "default": 0,
+ "type": "number"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateCalendarCredentialsInput"
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto"
+ }
}
}
}
},
- "responses": {
- "201": {
- "description": ""
- }
- },
"tags": [
- "Calendars"
+ "Deprecated: Platform / Webhooks"
]
- }
- },
- "/v2/calendars/{calendar}/check": {
- "get": {
- "operationId": "CalendarsController_check",
- "summary": "Check a calendar connection",
+ },
+ "delete": {
+ "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
+ "summary": "Delete all webhooks",
"parameters": [
{
- "name": "calendar",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "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",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -11737,40 +11989,35 @@
"content": {
"application/json": {
"schema": {
- "type": "object"
+ "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Webhooks"
]
}
},
- "/v2/calendars/{calendar}/disconnect": {
- "post": {
- "operationId": "CalendarsController_deleteCalendarCredentials",
- "summary": "Disconnect a calendar",
+ "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
+ "patch": {
+ "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook",
+ "summary": "Update a webhook",
"parameters": [
{
- "name": "calendar",
+ "name": "x-cal-secret-key",
+ "in": "header",
+ "description": "OAuth client secret key",
"required": true,
- "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",
+ "name": "webhookId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -11781,7 +12028,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto"
+ "$ref": "#/components/schemas/UpdateWebhookInputDto"
}
}
}
@@ -11792,38 +12039,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Calendars"
+ "Deprecated: Platform / Webhooks"
]
- }
- },
- "/v2/conferencing/{app}/connect": {
- "post": {
- "operationId": "ConferencingController_connect",
- "summary": "Connect your conferencing application",
+ },
+ "get": {
+ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
+ "summary": "Get a webhook",
"parameters": [
{
- "name": "app",
- "required": true,
- "in": "path",
- "description": "Conferencing application type",
- "schema": {
- "enum": [
- "google-meet"
- ],
- "type": "string"
- }
- },
- {
- "name": "Authorization",
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "description": "OAuth client secret key",
"required": true,
"schema": {
"type": "string"
@@ -11836,56 +12069,25 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ConferencingAppOutputResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform / Webhooks"
]
- }
- },
- "/v2/conferencing/{app}/oauth/auth-url": {
- "get": {
- "operationId": "ConferencingController_redirect",
- "summary": "Get OAuth conferencing app auth URL",
+ },
+ "delete": {
+ "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
+ "summary": "Delete a webhook",
"parameters": [
{
- "name": "Authorization",
- "required": true,
+ "name": "x-cal-secret-key",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "app",
- "required": true,
- "in": "path",
- "description": "Conferencing application type",
- "schema": {
- "enum": [
- "zoom",
- "msteams"
- ],
- "type": "string"
- }
- },
- {
- "name": "returnTo",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "onErrorReturnTo",
+ "description": "OAuth client secret key",
"required": true,
- "in": "query",
"schema": {
"type": "string"
}
@@ -11897,71 +12099,66 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetConferencingAppsOauthUrlResponseDto"
+ "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform / Webhooks"
]
}
},
- "/v2/conferencing/{app}/oauth/callback": {
- "get": {
- "operationId": "ConferencingController_save",
- "summary": "Conferencing app OAuth callback",
+ "/v2/oauth-clients": {
+ "post": {
+ "operationId": "OAuthClientsController_createOAuthClient",
+ "summary": "Create an OAuth client",
"parameters": [
{
- "name": "state",
- "required": true,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "app",
- "required": true,
- "in": "path",
- "description": "Conferencing application type",
- "schema": {
- "enum": [
- "zoom",
- "msteams"
- ],
- "type": "string"
- }
- },
- {
- "name": "code",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "query",
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOAuthClientInput"
+ }
+ }
+ }
+ },
"responses": {
- "200": {
- "description": ""
+ "201": {
+ "description": "Create an OAuth client",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOAuthClientResponseDto"
+ }
+ }
+ }
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform OAuth Clients"
]
- }
- },
- "/v2/conferencing": {
+ },
"get": {
- "operationId": "ConferencingController_listInstalledConferencingApps",
- "summary": "List your conferencing applications",
+ "operationId": "OAuthClientsController_getOAuthClients",
+ "summary": "Get all OAuth clients",
"parameters": [
{
"name": "Authorization",
"in": "header",
- "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_ or managed user access token",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
@@ -11974,42 +12171,35 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ConferencingAppsOutputResponseDto"
+ "$ref": "#/components/schemas/GetOAuthClientsResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform OAuth Clients"
]
}
},
- "/v2/conferencing/{app}/default": {
- "post": {
- "operationId": "ConferencingController_default",
- "summary": "Set your default conferencing application",
+ "/v2/oauth-clients/{clientId}": {
+ "get": {
+ "operationId": "OAuthClientsController_getOAuthClientById",
+ "summary": "Get an OAuth client",
"parameters": [
{
- "name": "app",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "path",
- "description": "Conferencing application type",
"schema": {
- "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",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -12021,73 +12211,81 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SetDefaultConferencingAppOutputResponseDto"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform OAuth Clients"
]
- }
- },
- "/v2/conferencing/default": {
- "get": {
- "operationId": "ConferencingController_getDefault",
- "summary": "Get your default conferencing application",
+ },
+ "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_ or managed user access token",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateOAuthClientInput"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetDefaultConferencingAppOutputResponseDto"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform OAuth Clients"
]
- }
- },
- "/v2/conferencing/{app}/disconnect": {
+ },
"delete": {
- "operationId": "ConferencingController_disconnect",
- "summary": "Disconnect your conferencing application",
+ "operationId": "OAuthClientsController_deleteOAuthClient",
+ "summary": "Delete an OAuth client",
"parameters": [
{
- "name": "app",
+ "name": "Authorization",
+ "in": "header",
+ "description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
- "in": "path",
- "description": "Conferencing application type",
"schema": {
- "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",
+ "name": "clientId",
"required": true,
+ "in": "path",
"schema": {
"type": "string"
}
@@ -12099,14 +12297,14 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DisconnectConferencingAppOutputResponseDto"
+ "$ref": "#/components/schemas/GetOAuthClientResponseDto"
}
}
}
}
},
"tags": [
- "Conferencing"
+ "Deprecated: Platform OAuth Clients"
]
}
},
@@ -13334,204 +13532,6 @@
]
}
},
- "/v2/oauth-clients": {
- "post": {
- "operationId": "OAuthClientsController_createOAuthClient",
- "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": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOAuthClientInput"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Create an OAuth client",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- },
- "get": {
- "operationId": "OAuthClientsController_getOAuthClients",
- "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": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientsResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- }
- },
- "/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,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- },
- "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,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateOAuthClientInput"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- },
- "delete": {
- "operationId": "OAuthClientsController_deleteOAuthClient",
- "summary": "Delete 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,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetOAuthClientResponseDto"
- }
- }
- }
- }
- },
- "tags": [
- "OAuth Clients"
- ]
- }
- },
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/emails/verification-code/request": {
"post": {
"operationId": "OrgTeamsVerifiedResourcesController_requestEmailVerificationCode",