openapi: 3.0.0
info:
title: 'Cal.diy API v2 Api Keys Deprecated: Platform OAuth Clients API'
description: ''
version: 1.0.0
contact: {}
servers: []
tags:
- name: 'Deprecated: Platform OAuth Clients'
paths:
/v2/oauth-clients:
post:
operationId: OAuthClientsController_createOAuthClient
summary: Create an OAuth client
description: These endpoints are deprecated and will be removed in the future.
parameters:
- name: Authorization
in: header
description: value must be `Bearer ` where `` 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:
- 'Deprecated: Platform OAuth Clients'
get:
operationId: OAuthClientsController_getOAuthClients
summary: Get all OAuth clients
description: These endpoints are deprecated and will be removed in the future.
parameters:
- name: Authorization
in: header
description: value must be `Bearer ` where `` is api key prefixed with cal_
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/GetOAuthClientsResponseDto'
tags:
- 'Deprecated: Platform OAuth Clients'
/v2/oauth-clients/{clientId}:
get:
operationId: OAuthClientsController_getOAuthClientById
summary: Get an OAuth client
description: These endpoints are deprecated and will be removed in the future.
parameters:
- name: Authorization
in: header
description: value must be `Bearer ` where `` 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:
- 'Deprecated: Platform OAuth Clients'
patch:
operationId: OAuthClientsController_updateOAuthClient
summary: Update an OAuth client
description: These endpoints are deprecated and will be removed in the future.
parameters:
- name: Authorization
in: header
description: value must be `Bearer ` where `` 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:
- 'Deprecated: Platform OAuth Clients'
delete:
operationId: OAuthClientsController_deleteOAuthClient
summary: Delete an OAuth client
description: These endpoints are deprecated and will be removed in the future.
parameters:
- name: Authorization
in: header
description: value must be `Bearer ` where `` 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:
- 'Deprecated: Platform OAuth Clients'
components:
schemas:
UpdateOAuthClientInput:
type: object
properties:
logo:
type: string
name:
type: string
redirectUris:
type: array
items:
type: string
bookingRedirectUri:
type: string
bookingCancelRedirectUri:
type: string
bookingRescheduleRedirectUri:
type: string
areEmailsEnabled:
type: boolean
areDefaultEventTypesEnabled:
type: boolean
description: 'If true, when creating a managed user the managed user will have 4 default event types: 30 and 60 minutes without Cal video, 30 and 60 minutes with Cal video. Set this as false if you want to create a managed user and then manually create event types for the user.'
areCalendarEventsEnabled:
type: boolean
description: If true and if managed user has calendar connected, calendar events will be created. Disable it if you manually create calendar events. Default to true.
CreateOAuthClientInput:
type: object
properties:
logo:
type: string
name:
type: string
redirectUris:
type: array
items:
type: string
permissions:
type: array
description: Array of permission keys like ["BOOKING_READ", "BOOKING_WRITE"]. Use ["*"] to grant all permissions.
items:
type: string
enum:
- EVENT_TYPE_READ
- EVENT_TYPE_WRITE
- BOOKING_READ
- BOOKING_WRITE
- SCHEDULE_READ
- SCHEDULE_WRITE
- APPS_READ
- APPS_WRITE
- PROFILE_READ
- PROFILE_WRITE
- '*'
bookingRedirectUri:
type: string
bookingCancelRedirectUri:
type: string
bookingRescheduleRedirectUri:
type: string
areEmailsEnabled:
type: boolean
areDefaultEventTypesEnabled:
type: boolean
default: false
description: 'If true, when creating a managed user the managed user will have 4 default event types: 30 and 60 minutes without Cal video, 30 and 60 minutes with Cal video. Set this as false if you want to create a managed user and then manually create event types for the user.'
areCalendarEventsEnabled:
type: boolean
default: true
description: If true and if managed user has calendar connected, calendar events will be created. Disable it if you manually create calendar events. Default to true.
required:
- name
- redirectUris
- permissions
PlatformOAuthClientDto:
type: object
properties:
id:
type: string
example: clsx38nbl0001vkhlwin9fmt0
name:
type: string
example: MyClient
secret:
type: string
example: secretValue
permissions:
type: array
description: Array of permission keys like ["BOOKING_READ", "BOOKING_WRITE"]
items:
type: string
enum:
- EVENT_TYPE_READ
- EVENT_TYPE_WRITE
- BOOKING_READ
- BOOKING_WRITE
- SCHEDULE_READ
- SCHEDULE_WRITE
- APPS_READ
- APPS_WRITE
- PROFILE_READ
- PROFILE_WRITE
example:
- BOOKING_READ
- BOOKING_WRITE
logo:
type: object
example: https://example.com/logo.png
redirectUris:
example:
- https://example.com/callback
type: array
items:
type: string
organizationId:
type: number
example: 1
createdAt:
format: date-time
type: string
example: '2024-03-23T08:33:21.851Z'
areEmailsEnabled:
type: boolean
example: true
areDefaultEventTypesEnabled:
type: boolean
example: true
description: 'If enabled, when creating a managed user the managed user will have 4 default event types: 30 and 60 minutes without Cal video, 30 and 60 minutes with Cal video. Leave this disabled if you want to create a managed user and then manually create event types for the user.'
areCalendarEventsEnabled:
type: boolean
example: true
description: If true and if managed user has calendar connected, calendar events will be created. Disable it if you manually create calendar events. Default to true.
bookingRedirectUri:
type: string
example: https://example.com/booking-redirect
bookingCancelRedirectUri:
type: string
example: https://example.com/booking-cancel
bookingRescheduleRedirectUri:
type: string
example: https://example.com/booking-reschedule
required:
- id
- name
- secret
- permissions
- redirectUris
- organizationId
- createdAt
- areEmailsEnabled
- areDefaultEventTypesEnabled
- areCalendarEventsEnabled
CreateOAuthClientResponseDto:
type: object
properties:
status:
type: string
enum:
- success
- error
example: success
data:
example:
clientId: clsx38nbl0001vkhlwin9fmt0
clientSecret: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoib2F1dGgtY2xpZW50Iiwi
allOf:
- $ref: '#/components/schemas/CreateOAuthClientOutput'
required:
- status
- data
CreateOAuthClientOutput:
type: object
properties:
clientId:
type: string
example: clsx38nbl0001vkhlwin9fmt0
clientSecret:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoib2F1dGgtY2xpZW50Iiwi
required:
- clientId
- clientSecret
GetOAuthClientsResponseDto:
type: object
properties:
status:
type: string
example: success
enum:
- success
- error
data:
type: array
items:
$ref: '#/components/schemas/PlatformOAuthClientDto'
required:
- status
- data
GetOAuthClientResponseDto:
type: object
properties:
status:
type: string
example: success
enum:
- success
- error
data:
$ref: '#/components/schemas/PlatformOAuthClientDto'
required:
- status
- data