Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales" -L afterall,datea,fo,ist,optionel`
4965 lines
151 KiB
JSON
4965 lines
151 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"servers": [
|
|
{
|
|
"url": "https://api.cal.com/v1"
|
|
}
|
|
],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com",
|
|
"description": "Find more info at our main docs: https://docs.cal.com/"
|
|
},
|
|
"info": {
|
|
"title": "@calcom/api: Public API for Cal.com",
|
|
"version": "1.0.0"
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"ApiKeyAuth": {
|
|
"type": "apiKey",
|
|
"in": "query",
|
|
"name": "apiKey"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Attendee": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"bookingId": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"timeZone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AttendeesFetchedResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attendees": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Attendee"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AttendeeCreatedResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attendee": {
|
|
"$ref": "#/components/schemas/Attendee"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Attendee created successfully"
|
|
}
|
|
}
|
|
},
|
|
"AttendeeFetchedResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attendee": {
|
|
"$ref": "#/components/schemas/Attendee"
|
|
}
|
|
}
|
|
},
|
|
"ArrayOfBookings": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "number"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"fromReschedule": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "uuid"
|
|
},
|
|
"attendees": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"user": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
},
|
|
"payment": {
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"example": 1
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"paymentOption": {
|
|
"type": "string",
|
|
"example": "ON_BOOKING"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ArrayOfRecordings": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"room_name": {
|
|
"type": "string"
|
|
},
|
|
"start_ts": {
|
|
"type": "number"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"max_participants": {
|
|
"type": "number"
|
|
},
|
|
"duration": {
|
|
"type": "number"
|
|
},
|
|
"download_link": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Recording": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"room_name": {
|
|
"type": "string"
|
|
},
|
|
"start_ts": {
|
|
"type": "number"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"max_participants": {
|
|
"type": "number"
|
|
},
|
|
"duration": {
|
|
"type": "number"
|
|
},
|
|
"download_link": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Booking": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "number"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"fromReschedule": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "uuid"
|
|
},
|
|
"attendees": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"user": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
},
|
|
"payment": {
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"example": 1
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"paymentOption": {
|
|
"type": "string",
|
|
"example": "ON_BOOKING"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "Users"
|
|
},
|
|
{
|
|
"name": "Event Types"
|
|
},
|
|
{
|
|
"name": "Bookings"
|
|
},
|
|
{
|
|
"name": "Attendees"
|
|
},
|
|
{
|
|
"name": "Payments"
|
|
},
|
|
{
|
|
"name": "Schedules"
|
|
},
|
|
{
|
|
"name": "Teams"
|
|
},
|
|
{
|
|
"name": "Memberships"
|
|
},
|
|
{
|
|
"name": "Availabilities",
|
|
"description": "Allows modifying unique availabilities tied to a schedule."
|
|
},
|
|
{
|
|
"name": "Custom Inputs"
|
|
},
|
|
{
|
|
"name": "Event References"
|
|
},
|
|
{
|
|
"name": "Booking References"
|
|
},
|
|
{
|
|
"name": "Destination Calendars"
|
|
},
|
|
{
|
|
"name": "Selected Calendars"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/attendees": {
|
|
"get": {
|
|
"operationId": "listAttendees",
|
|
"summary": "Find all attendees",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Attendees"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Find All Attendees",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AttendeesFetchedResponse"
|
|
},
|
|
"examples": {
|
|
"Attendees found successfully": {
|
|
"value": {
|
|
"attendees": [
|
|
{
|
|
"id": 251,
|
|
"bookingId": 313,
|
|
"name": "John Doe",
|
|
"email": "[email protected]",
|
|
"timeZone": "Asia/Jerusalem"
|
|
},
|
|
{
|
|
"id": 252,
|
|
"bookingId": 314,
|
|
"name": "Jane Doe",
|
|
"email": "[email protected]",
|
|
"timeZone": "Asia/Dubai"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "No attendees were found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "No attendees were found."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "addAttendee",
|
|
"summary": "Creates a new attendee",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new attendee related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["bookingId", "name", "email", "timeZone"],
|
|
"properties": {
|
|
"bookingId": {
|
|
"type": "number"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Attendees"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Attendee created successfully.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AttendeeCreatedResponse"
|
|
},
|
|
"examples": {
|
|
"Attendee created successfully": {
|
|
"value": {
|
|
"attendee": {
|
|
"id": 255,
|
|
"bookingId": 313,
|
|
"name": "Justin Doe",
|
|
"email": "[email protected]",
|
|
"timeZone": "Asia/Jerusalem"
|
|
},
|
|
"message": "Attendee created successfully"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Attendee body is invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Bad request. Attendee body is invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/attendees/{id}": {
|
|
"delete": {
|
|
"operationId": "removeAttendeeById",
|
|
"summary": "Remove an existing attendee",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the attendee to delete"
|
|
}
|
|
],
|
|
"tags": ["Attendees"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, attendee removed successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "OK, attendee removed successfully"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Attendee id is invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Bad request. Attendee id is invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getAttendeeById",
|
|
"summary": "Find an attendee",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the attendee to get"
|
|
}
|
|
],
|
|
"tags": ["Attendees"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AttendeeFetchedResponse"
|
|
},
|
|
"examples": {
|
|
"Attendee fetched successfully": {
|
|
"value": {
|
|
"attendee": {
|
|
"id": 255,
|
|
"bookingId": 313,
|
|
"name": "Justin Doe",
|
|
"email": "[email protected]",
|
|
"timeZone": "Asia/Jerusalem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Attendee was not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Attendee was not found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editAttendeeById",
|
|
"summary": "Edit an existing attendee",
|
|
"requestBody": {
|
|
"description": "Edit an existing attendee related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the attendee to get"
|
|
}
|
|
],
|
|
"tags": ["Attendees"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, attendee edited successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AttendeeFetchedResponse"
|
|
},
|
|
"examples": {
|
|
"Attendee edited successfully": {
|
|
"value": {
|
|
"attendee": {
|
|
"id": 255,
|
|
"bookingId": 313,
|
|
"name": "Justin Doe",
|
|
"email": "[email protected]",
|
|
"timeZone": "Asia/Jerusalem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Attendee body is invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Bad request. Attendee body is invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/availabilities": {
|
|
"post": {
|
|
"operationId": "addAvailability",
|
|
"summary": "Creates a new availability",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Edit an existing availability related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["scheduleId", "startTime", "endTime"],
|
|
"properties": {
|
|
"days": {
|
|
"type": "array",
|
|
"description": "Array of integers depicting weekdays",
|
|
"items": {
|
|
"type": "integer",
|
|
"enum": [0, 1, 2, 3, 4, 5]
|
|
}
|
|
},
|
|
"scheduleId": {
|
|
"type": "integer",
|
|
"description": "ID of schedule this availability is associated with"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"description": "Start time of the availability"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"description": "End time of the availability"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"availability": {
|
|
"summary": "An example of availability",
|
|
"value": {
|
|
"scheduleId": 123,
|
|
"days": [1, 2, 3, 5],
|
|
"startTime": "1970-01-01T17:00:00.000Z",
|
|
"endTime": "1970-01-01T17:00:00.000Z"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Availabilities"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/availability"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, availability created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Availability body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/availabilities/{id}": {
|
|
"delete": {
|
|
"operationId": "removeAvailabilityById",
|
|
"summary": "Remove an existing availability",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the availability to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Availabilities"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/availability"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, availability removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Availability id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getAvailabilityById",
|
|
"summary": "Find an availability",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the availability to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Availabilities"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/availability"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid"
|
|
},
|
|
"404": {
|
|
"description": "Availability not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editAvailabilityById",
|
|
"summary": "Edit an existing availability",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"description": "Your API key",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"description": "ID of the availability to edit"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Edit an existing availability related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"days": {
|
|
"type": "array",
|
|
"description": "Array of integers depicting weekdays",
|
|
"items": {
|
|
"type": "integer",
|
|
"enum": [0, 1, 2, 3, 4, 5]
|
|
}
|
|
},
|
|
"scheduleId": {
|
|
"type": "integer",
|
|
"description": "ID of schedule this availability is associated with"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"description": "Start time of the availability"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"description": "End time of the availability"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"availability": {
|
|
"summary": "An example of availability",
|
|
"value": {
|
|
"scheduleId": 123,
|
|
"days": [1, 2, 3, 5],
|
|
"startTime": "1970-01-01T17:00:00.000Z",
|
|
"endTime": "1970-01-01T17:00:00.000Z"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Availabilities"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/availability"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, availability edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Availability body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/booking-references": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"operationId": "listBookingReferences",
|
|
"summary": "Find all booking references",
|
|
"tags": ["Booking References"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No booking references were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"operationId": "addBookingReference",
|
|
"summary": "Creates a new booking reference",
|
|
"requestBody": {
|
|
"description": "Create a new booking reference related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["type", "uid"],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "string"
|
|
},
|
|
"meetingId": {
|
|
"type": "string"
|
|
},
|
|
"meetingPassword": {
|
|
"type": "string"
|
|
},
|
|
"meetingUrl": {
|
|
"type": "string"
|
|
},
|
|
"bookingId": {
|
|
"type": "boolean"
|
|
},
|
|
"externalCalendarId": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"credentialId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Booking References"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, booking reference created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. BookingReference body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/booking-references/{id}": {
|
|
"delete": {
|
|
"operationId": "removeBookingReferenceById",
|
|
"summary": "Remove an existing booking reference",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking reference to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Booking References"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, bookingReference removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. BookingReference id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getBookingReferenceById",
|
|
"summary": "Find a booking reference",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking reference to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Booking References"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "BookingReference was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editBookingReferenceById",
|
|
"summary": "Edit an existing booking reference",
|
|
"requestBody": {
|
|
"description": "Edit an existing booking reference related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"meetingId": {
|
|
"type": "string"
|
|
},
|
|
"meetingPassword": {
|
|
"type": "string"
|
|
},
|
|
"externalCalendarId": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"credentialId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking reference to edit"
|
|
}
|
|
],
|
|
"tags": ["Booking References"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, BookingReference edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. BookingReference body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings": {
|
|
"post": {
|
|
"summary": "Creates a new booking",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"operationId": "addBooking",
|
|
"requestBody": {
|
|
"description": "Create a new booking related to one of your event-types",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["eventTypeId", "start", "responses", "timeZone", "language", "metadata"],
|
|
"properties": {
|
|
"eventTypeId": {
|
|
"type": "integer",
|
|
"description": "ID of the event type to book"
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Start time of the Event"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "End time of the Event"
|
|
},
|
|
"rescheduleUid": {
|
|
"type": "string",
|
|
"format": "UID",
|
|
"description": "Uid of the booking to reschedule"
|
|
},
|
|
"responses": {
|
|
"type": "object",
|
|
"required": ["name", "email", "location"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Attendee full name"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email",
|
|
"description": "Attendee email address"
|
|
},
|
|
"location": {
|
|
"type": "object",
|
|
"properties": {
|
|
"optionValue": {
|
|
"type": "string",
|
|
"description": "Option value for the location"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "The meeting URL, Phone number or Address"
|
|
}
|
|
},
|
|
"description": "Meeting location"
|
|
},
|
|
"smsReminderNumber": {
|
|
"type": "number",
|
|
"description": "SMS reminder number"
|
|
}
|
|
}
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"description": "Any metadata associated with the booking"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"description": "TimeZone of the Attendee"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "Language of the Attendee"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Booking event title"
|
|
},
|
|
"recurringEventId": {
|
|
"type": "integer",
|
|
"description": "Recurring event ID if the event is recurring"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Event description"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Acceptable values one of [\"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\"]"
|
|
},
|
|
"seatsPerTimeSlot": {
|
|
"type": "integer",
|
|
"description": "The number of seats for each time slot"
|
|
},
|
|
"seatsShowAttendees": {
|
|
"type": "boolean",
|
|
"description": "Share Attendee information in seats"
|
|
},
|
|
"seatsShowAvailabilityCount": {
|
|
"type": "boolean",
|
|
"description": "Show the number of available seats"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"New Booking example": {
|
|
"value": {
|
|
"eventTypeId": 2323232,
|
|
"start": "2023-05-24T13:00:00.000Z",
|
|
"end": "2023-05-24T13:30:00.000Z",
|
|
"responses": {
|
|
"name": "Hello Hello",
|
|
"email": "[email protected]",
|
|
"smsReminderNumber": null,
|
|
"location": {
|
|
"value": "userPhone",
|
|
"optionValue": ""
|
|
}
|
|
},
|
|
"timeZone": "Europe/London",
|
|
"language": "en",
|
|
"title": "Debugging between Syed Ali Shahbaz and Hello Hello",
|
|
"description": null,
|
|
"status": "PENDING",
|
|
"metadata": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Booking(s) created successfully.",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"booking created successfully example": {
|
|
"value": {
|
|
"booking": {
|
|
"id": 91,
|
|
"userId": 5,
|
|
"description": "",
|
|
"eventTypeId": 7,
|
|
"uid": "bFJeNb2uX8ANpT3JL5EfXw",
|
|
"title": "60min between Pro Example and John Doe",
|
|
"startTime": "2023-05-25T09:30:00.000Z",
|
|
"endTime": "2023-05-25T10:30:00.000Z",
|
|
"attendees": [
|
|
{
|
|
"email": "[email protected]",
|
|
"name": "John Doe",
|
|
"timeZone": "Asia/Kolkata",
|
|
"locale": "en"
|
|
}
|
|
],
|
|
"user": {
|
|
"email": "[email protected]",
|
|
"name": "Pro Example",
|
|
"timeZone": "Asia/Kolkata",
|
|
"locale": "en"
|
|
},
|
|
"payment": [
|
|
{
|
|
"id": 1,
|
|
"success": true,
|
|
"paymentOption": "ON_BOOKING"
|
|
}
|
|
],
|
|
"metadata": {},
|
|
"status": "ACCEPTED",
|
|
"responses": {
|
|
"email": "[email protected]",
|
|
"name": "John Doe",
|
|
"location": {
|
|
"optionValue": "",
|
|
"value": "inPerson"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request\n<table>\n <tr>\n <td>Message</td>\n <td>Cause</td>\n </tr>\n <tr>\n <td>Booking body is invalid</td>\n <td>Missing property on booking entity.</td>\n </tr>\n <tr>\n <td>Invalid eventTypeId</td>\n <td>The provided eventTypeId does not exist.</td>\n </tr>\n <tr>\n <td>Missing recurringCount</td>\n <td>The eventType is recurring, and no recurringCount was passed.</td>\n </tr>\n <tr>\n <td>Invalid recurringCount</td>\n <td>The provided recurringCount is greater than the eventType recurring config</td>\n </tr>\n</table>\n"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings/{id}/cancel": {
|
|
"delete": {
|
|
"summary": "Booking cancellation",
|
|
"operationId": "cancelBookingById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking to cancel"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "allRemainingBookings",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean"
|
|
},
|
|
"description": "Delete all remaining bookings"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "cancellationReason",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The reason for cancellation of the booking, not required except for hosts"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, booking cancelled successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request\n <table>\n <tr>\n <td>Message</td>\n <td>Cause</td>\n </tr>\n <tr>\n <td>Booking not found</td>\n <td>The provided id didn't correspond to any existing booking.</td>\n </tr>\n <tr>\n <td>User not found</td>\n <td>The userId did not matched an existing user.</td>\n </tr>\n </table>\n"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings/{id}": {
|
|
"get": {
|
|
"summary": "Find a booking",
|
|
"operationId": "getBookingById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "number"
|
|
},
|
|
"uid": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"fromReschedule": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"format": "uuid"
|
|
},
|
|
"attendees": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"user": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "[email protected]"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"example": "Europe/London"
|
|
},
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "en"
|
|
}
|
|
}
|
|
},
|
|
"payment": {
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"example": 1
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"paymentOption": {
|
|
"type": "string",
|
|
"example": "ON_BOOKING"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"booking": {
|
|
"value": {
|
|
"booking": {
|
|
"id": 91,
|
|
"userId": 5,
|
|
"description": "",
|
|
"eventTypeId": 7,
|
|
"uid": "bFJeNb2uX8ANpT3JL5EfXw",
|
|
"title": "60min between Pro Example and John Doe",
|
|
"startTime": "2023-05-25T09:30:00.000Z",
|
|
"endTime": "2023-05-25T10:30:00.000Z",
|
|
"attendees": [
|
|
{
|
|
"email": "[email protected]",
|
|
"name": "John Doe",
|
|
"timeZone": "Asia/Kolkata",
|
|
"locale": "en"
|
|
}
|
|
],
|
|
"user": {
|
|
"email": "[email protected]",
|
|
"name": "Pro Example",
|
|
"timeZone": "Asia/Kolkata",
|
|
"locale": "en"
|
|
},
|
|
"payment": [
|
|
{
|
|
"id": 1,
|
|
"success": true,
|
|
"paymentOption": "ON_BOOKING"
|
|
}
|
|
],
|
|
"metadata": {},
|
|
"status": "ACCEPTED",
|
|
"responses": {
|
|
"email": "[email protected]",
|
|
"name": "John Doe",
|
|
"location": {
|
|
"optionValue": "",
|
|
"value": "inPerson"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Booking was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Edit an existing booking",
|
|
"operationId": "editBookingById",
|
|
"requestBody": {
|
|
"description": "Edit an existing booking related to one of your event-types",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Booking event title"
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Start time of the Event"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "End time of the Event"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Acceptable values one of [\"ACCEPTED\", \"PENDING\", \"CANCELLED\", \"REJECTED\"]"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Description of the meeting"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"editBooking": {
|
|
"value": {
|
|
"title": "Debugging between Syed Ali Shahbaz and Hello Hello",
|
|
"start": "2023-05-24T13:00:00.000Z",
|
|
"end": "2023-05-24T13:30:00.000Z",
|
|
"status": "CANCELLED"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking to edit"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, booking edited successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"bookings": {
|
|
"value": {
|
|
"booking": {
|
|
"id": 11223344,
|
|
"userId": 182,
|
|
"description": null,
|
|
"eventTypeId": 2323232,
|
|
"uid": "stoSJtnh83PEL4rZmqdHe2",
|
|
"title": "Debugging between Syed Ali Shahbaz and Hello Hello",
|
|
"startTime": "2023-05-24T13:00:00.000Z",
|
|
"endTime": "2023-05-24T13:30:00.000Z",
|
|
"metadata": {},
|
|
"status": "CANCELLED",
|
|
"responses": {
|
|
"email": "[email protected]",
|
|
"name": "John Doe",
|
|
"location": {
|
|
"optionValue": "",
|
|
"value": "inPerson"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Booking body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings/{id}/recordings": {
|
|
"get": {
|
|
"summary": "Find all Cal video recordings of that booking",
|
|
"operationId": "getRecordingsByBookingId",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking for which recordings need to be fetched. Recording download link is only valid for 12 hours and you would have to fetch the recordings again to get new download link"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"room_name": {
|
|
"type": "string"
|
|
},
|
|
"start_ts": {
|
|
"type": "number"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"max_participants": {
|
|
"type": "number"
|
|
},
|
|
"duration": {
|
|
"type": "number"
|
|
},
|
|
"download_link": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"recordings": {
|
|
"value": [
|
|
{
|
|
"id": "ad90a2e7-154f-49ff-a815-5da1db7bf899",
|
|
"room_name": "0n22w24AQ5ZFOtEKX2gX",
|
|
"start_ts": 1716215386,
|
|
"status": "finished",
|
|
"max_participants": 1,
|
|
"duration": 11,
|
|
"share_token": "x94YK-69Gnh7",
|
|
"download_link": "https://daily-meeting-recordings..."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Booking was not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings/{id}/transcripts": {
|
|
"get": {
|
|
"summary": "Find all Cal video transcripts of that booking",
|
|
"operationId": "getTranscriptsByBookingId",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking for which recordings need to be fetched."
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Booking was not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bookings/{id}/transcripts/{recordingId}": {
|
|
"get": {
|
|
"summary": "Find all Cal video transcripts of that recording",
|
|
"operationId": "getTranscriptsByRecordingId",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the booking for which transcripts need to be fetched."
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "recordingId",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the recording(daily.co recording id) for which transcripts need to be fetched."
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Bookings"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Booking was not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/credential-sync": {
|
|
"delete": {
|
|
"operationId": "deleteUserAppCredential",
|
|
"summary": "Delete a credential record for a user",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the user to fetch the credentials for"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "credentialId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the credential to update"
|
|
}
|
|
],
|
|
"tags": ["Credentials"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"505": {
|
|
"description": "Credential syncing not enabled"
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getUserAppCredentials",
|
|
"summary": "Get all app credentials for a user",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the user to fetch the credentials for"
|
|
}
|
|
],
|
|
"tags": ["Credentials"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"505": {
|
|
"description": "Credential syncing not enabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "updateUserAppCredential",
|
|
"summary": "Update a credential record for a user",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the user to fetch the credentials for"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "credentialId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the credential to update"
|
|
}
|
|
],
|
|
"tags": ["Credentials"],
|
|
"requestBody": {
|
|
"description": "Update a new credential",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["encryptedKey"],
|
|
"properties": {
|
|
"encryptedKey": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"505": {
|
|
"description": "Credential syncing not enabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "createUserAppCredential",
|
|
"summary": "Create a credential record for a user",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "ID of the user to fetch the credentials for"
|
|
}
|
|
],
|
|
"tags": ["Credentials"],
|
|
"requestBody": {
|
|
"description": "Create a new credential",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["encryptedKey", "appSlug"],
|
|
"properties": {
|
|
"encryptedKey": {
|
|
"type": "string"
|
|
},
|
|
"appSlug": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"505": {
|
|
"description": "Credential syncing not enabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/destination-calendars": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"summary": "Find all destination calendars",
|
|
"tags": ["Destination Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No destination calendars were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"summary": "Creates a new destination calendar",
|
|
"requestBody": {
|
|
"description": "Create a new destination calendar for your events",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["integration", "externalId", "credentialId"],
|
|
"properties": {
|
|
"integration": {
|
|
"type": "string",
|
|
"description": "The integration"
|
|
},
|
|
"externalId": {
|
|
"type": "string",
|
|
"description": "The external ID of the integration"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "integer",
|
|
"description": "The ID of the eventType it is associated with"
|
|
},
|
|
"bookingId": {
|
|
"type": "integer",
|
|
"description": "The booking ID it is associated with"
|
|
},
|
|
"userId": {
|
|
"type": "integer",
|
|
"description": "The user it is associated with"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Destination Calendars"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, destination calendar created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. DestinationCalendar body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/destination-calendars/{id}": {
|
|
"delete": {
|
|
"summary": "Remove an existing destination calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the destination calendar to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Destination Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, destinationCalendar removed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Destination calendar not found"
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Find a destination calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the destination calendar to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Destination Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Destination calendar not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Edit an existing destination calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the destination calendar to edit"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new booking related to one of your event-types",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"integration": {
|
|
"type": "string",
|
|
"description": "The integration"
|
|
},
|
|
"externalId": {
|
|
"type": "string",
|
|
"description": "The external ID of the integration"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "integer",
|
|
"description": "The ID of the eventType it is associated with"
|
|
},
|
|
"bookingId": {
|
|
"type": "integer",
|
|
"description": "The booking ID it is associated with"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Destination Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Destination calendar not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/event-types": {
|
|
"get": {
|
|
"summary": "Find all event types",
|
|
"operationId": "listEventTypes",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "slug",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": false,
|
|
"description": "Slug to filter event types by"
|
|
}
|
|
],
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No event types were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Creates a new event type",
|
|
"operationId": "addEventType",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new event-type related to your user or team",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["title", "slug", "length", "metadata"],
|
|
"properties": {
|
|
"length": {
|
|
"type": "integer",
|
|
"description": "Duration of the event type in minutes"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"description": "Metadata relating to event type. Pass {} if empty"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Title of the event type"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "Unique slug for the event type"
|
|
},
|
|
"hosts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"type": "number"
|
|
},
|
|
"isFixed": {
|
|
"type": "boolean",
|
|
"description": "Host MUST be available for any slot to be bookable."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"hidden": {
|
|
"type": "boolean",
|
|
"description": "If the event type should be hidden from your public booking page"
|
|
},
|
|
"scheduleId": {
|
|
"type": "number",
|
|
"description": "The ID of the schedule for this event type"
|
|
},
|
|
"position": {
|
|
"type": "integer",
|
|
"description": "The position of the event type on the public booking page"
|
|
},
|
|
"teamId": {
|
|
"type": "integer",
|
|
"description": "Team ID if the event type should belong to a team"
|
|
},
|
|
"periodType": {
|
|
"type": "string",
|
|
"enum": ["UNLIMITED", "ROLLING", "RANGE"],
|
|
"description": "To decide how far into the future an invitee can book an event with you"
|
|
},
|
|
"periodStartDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Start date of bookable period (Required if periodType is 'range')"
|
|
},
|
|
"periodEndDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "End date of bookable period (Required if periodType is 'range')"
|
|
},
|
|
"periodDays": {
|
|
"type": "integer",
|
|
"description": "Number of bookable days (Required if periodType is rolling)"
|
|
},
|
|
"periodCountCalendarDays": {
|
|
"type": "boolean",
|
|
"description": "If calendar days should be counted for period days"
|
|
},
|
|
"requiresConfirmation": {
|
|
"type": "boolean",
|
|
"description": "If the event type should require your confirmation before completing the booking"
|
|
},
|
|
"recurringEvent": {
|
|
"type": "object",
|
|
"description": "If the event should recur every week/month/year with the selected frequency",
|
|
"properties": {
|
|
"interval": {
|
|
"type": "integer"
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"freq": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"disableGuests": {
|
|
"type": "boolean",
|
|
"description": "If the event type should disable adding guests to the booking"
|
|
},
|
|
"hideCalendarNotes": {
|
|
"type": "boolean",
|
|
"description": "If the calendar notes should be hidden from the booking"
|
|
},
|
|
"minimumBookingNotice": {
|
|
"type": "integer",
|
|
"description": "Minimum time in minutes before the event is bookable"
|
|
},
|
|
"beforeEventBuffer": {
|
|
"type": "integer",
|
|
"description": "Number of minutes of buffer time before a Cal Event"
|
|
},
|
|
"afterEventBuffer": {
|
|
"type": "integer",
|
|
"description": "Number of minutes of buffer time after a Cal Event"
|
|
},
|
|
"schedulingType": {
|
|
"type": "string",
|
|
"description": "The type of scheduling if a Team event. Required for team events only",
|
|
"enum": ["ROUND_ROBIN", "COLLECTIVE", "MANAGED"]
|
|
},
|
|
"price": {
|
|
"type": "integer",
|
|
"description": "Price of the event type booking"
|
|
},
|
|
"parentId": {
|
|
"type": "integer",
|
|
"description": "EventTypeId of the parent managed event"
|
|
},
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency acronym. Eg- usd, eur, gbp, etc."
|
|
},
|
|
"slotInterval": {
|
|
"type": "integer",
|
|
"description": "The intervals of available bookable slots in minutes"
|
|
},
|
|
"successRedirectUrl": {
|
|
"type": "string",
|
|
"format": "url",
|
|
"description": "A valid URL where the booker will redirect to, once the booking is completed successfully"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Description of the event type"
|
|
},
|
|
"locations": {
|
|
"type": "array",
|
|
"description": "A list of all available locations for the event type",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["integrations:daily"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["attendeeInPerson"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["inPerson"]
|
|
},
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"displayLocationPublicly": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["link"]
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"displayLocationPublicly": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"event-type": {
|
|
"summary": "An example of an individual event type POST request",
|
|
"value": {
|
|
"title": "Hello World",
|
|
"slug": "hello-world",
|
|
"length": 30,
|
|
"hidden": false,
|
|
"position": 0,
|
|
"eventName": null,
|
|
"timeZone": null,
|
|
"scheduleId": 5,
|
|
"periodType": "UNLIMITED",
|
|
"periodStartDate": "2023-02-15T08:46:16.000Z",
|
|
"periodEndDate": "2023-0-15T08:46:16.000Z",
|
|
"periodDays": null,
|
|
"periodCountCalendarDays": false,
|
|
"requiresConfirmation": false,
|
|
"recurringEvent": null,
|
|
"disableGuests": false,
|
|
"hideCalendarNotes": false,
|
|
"minimumBookingNotice": 120,
|
|
"beforeEventBuffer": 0,
|
|
"afterEventBuffer": 0,
|
|
"price": 0,
|
|
"currency": "usd",
|
|
"slotInterval": null,
|
|
"successRedirectUrl": null,
|
|
"description": "A test event type",
|
|
"metadata": {
|
|
"apps": {
|
|
"stripe": {
|
|
"price": 0,
|
|
"enabled": false,
|
|
"currency": "usd"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"team-event-type": {
|
|
"summary": "An example of a team event type POST request",
|
|
"value": {
|
|
"title": "Tennis class",
|
|
"slug": "tennis-class-{{$guid}}",
|
|
"length": 60,
|
|
"hidden": false,
|
|
"position": 0,
|
|
"teamId": 3,
|
|
"eventName": null,
|
|
"timeZone": null,
|
|
"periodType": "UNLIMITED",
|
|
"periodStartDate": null,
|
|
"periodEndDate": null,
|
|
"periodDays": null,
|
|
"periodCountCalendarDays": null,
|
|
"requiresConfirmation": true,
|
|
"recurringEvent": {
|
|
"interval": 2,
|
|
"count": 10,
|
|
"freq": 2
|
|
},
|
|
"disableGuests": false,
|
|
"hideCalendarNotes": false,
|
|
"minimumBookingNotice": 120,
|
|
"beforeEventBuffer": 0,
|
|
"afterEventBuffer": 0,
|
|
"schedulingType": "COLLECTIVE",
|
|
"price": 0,
|
|
"currency": "usd",
|
|
"slotInterval": null,
|
|
"successRedirectUrl": null,
|
|
"description": null,
|
|
"locations": [
|
|
{
|
|
"address": "London",
|
|
"type": "inPerson"
|
|
}
|
|
],
|
|
"metadata": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, event type created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. EventType body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/event-types/{id}": {
|
|
"delete": {
|
|
"operationId": "removeEventTypeById",
|
|
"summary": "Remove an existing eventType",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the eventType to delete"
|
|
}
|
|
],
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, eventType removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. EventType id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getEventTypeById",
|
|
"summary": "Find a eventType",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"example": 4,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the eventType to get"
|
|
}
|
|
],
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "EventType was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editEventTypeById",
|
|
"summary": "Edit an existing eventType",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the eventType to edit"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new event-type related to your user or team",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"length": {
|
|
"type": "integer",
|
|
"description": "Duration of the event type in minutes"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"description": "Metadata relating to event type. Pass {} if empty"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Title of the event type"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "Unique slug for the event type"
|
|
},
|
|
"scheduleId": {
|
|
"type": "number",
|
|
"description": "The ID of the schedule for this event type"
|
|
},
|
|
"hosts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"type": "number"
|
|
},
|
|
"isFixed": {
|
|
"type": "boolean",
|
|
"description": "Host MUST be available for any slot to be bookable."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"hidden": {
|
|
"type": "boolean",
|
|
"description": "If the event type should be hidden from your public booking page"
|
|
},
|
|
"position": {
|
|
"type": "integer",
|
|
"description": "The position of the event type on the public booking page"
|
|
},
|
|
"teamId": {
|
|
"type": "integer",
|
|
"description": "Team ID if the event type should belong to a team"
|
|
},
|
|
"periodType": {
|
|
"type": "string",
|
|
"enum": ["UNLIMITED", "ROLLING", "RANGE"],
|
|
"description": "To decide how far into the future an invitee can book an event with you"
|
|
},
|
|
"periodStartDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Start date of bookable period (Required if periodType is 'range')"
|
|
},
|
|
"periodEndDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "End date of bookable period (Required if periodType is 'range')"
|
|
},
|
|
"periodDays": {
|
|
"type": "integer",
|
|
"description": "Number of bookable days (Required if periodType is rolling)"
|
|
},
|
|
"periodCountCalendarDays": {
|
|
"type": "boolean",
|
|
"description": "If calendar days should be counted for period days"
|
|
},
|
|
"requiresConfirmation": {
|
|
"type": "boolean",
|
|
"description": "If the event type should require your confirmation before completing the booking"
|
|
},
|
|
"recurringEvent": {
|
|
"type": "object",
|
|
"description": "If the event should recur every week/month/year with the selected frequency",
|
|
"properties": {
|
|
"interval": {
|
|
"type": "integer"
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"freq": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"disableGuests": {
|
|
"type": "boolean",
|
|
"description": "If the event type should disable adding guests to the booking"
|
|
},
|
|
"hideCalendarNotes": {
|
|
"type": "boolean",
|
|
"description": "If the calendar notes should be hidden from the booking"
|
|
},
|
|
"minimumBookingNotice": {
|
|
"type": "integer",
|
|
"description": "Minimum time in minutes before the event is bookable"
|
|
},
|
|
"beforeEventBuffer": {
|
|
"type": "integer",
|
|
"description": "Number of minutes of buffer time before a Cal Event"
|
|
},
|
|
"afterEventBuffer": {
|
|
"type": "integer",
|
|
"description": "Number of minutes of buffer time after a Cal Event"
|
|
},
|
|
"schedulingType": {
|
|
"type": "string",
|
|
"description": "The type of scheduling if a Team event. Required for team events only",
|
|
"enum": ["ROUND_ROBIN", "COLLECTIVE"]
|
|
},
|
|
"price": {
|
|
"type": "integer",
|
|
"description": "Price of the event type booking"
|
|
},
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Currency acronym. Eg- usd, eur, gbp, etc."
|
|
},
|
|
"slotInterval": {
|
|
"type": "integer",
|
|
"description": "The intervals of available bookable slots in minutes"
|
|
},
|
|
"successRedirectUrl": {
|
|
"type": "string",
|
|
"format": "url",
|
|
"description": "A valid URL where the booker will redirect to, once the booking is completed successfully"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Description of the event type"
|
|
},
|
|
"seatsPerTimeSlot": {
|
|
"type": "integer",
|
|
"description": "The number of seats for each time slot"
|
|
},
|
|
"seatsShowAttendees": {
|
|
"type": "boolean",
|
|
"description": "Share Attendee information in seats"
|
|
},
|
|
"seatsShowAvailabilityCount": {
|
|
"type": "boolean",
|
|
"description": "Show the number of available seats"
|
|
},
|
|
"locations": {
|
|
"type": "array",
|
|
"description": "A list of all available locations for the event type",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["integrations:daily"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["attendeeInPerson"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["inPerson"]
|
|
},
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"displayLocationPublicly": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["link"]
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"displayLocationPublicly": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event-type": {
|
|
"summary": "An example of event type PATCH request",
|
|
"value": {
|
|
"length": 60,
|
|
"requiresConfirmation": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, eventType edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. EventType body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/memberships": {
|
|
"get": {
|
|
"summary": "Find all memberships",
|
|
"tags": ["Memberships"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No memberships were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Creates a new membership",
|
|
"tags": ["Memberships"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, membership created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Membership body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/memberships/{userId}_{teamId}": {
|
|
"delete": {
|
|
"summary": "Remove an existing membership",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric userId of the membership to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric teamId of the membership to get"
|
|
}
|
|
],
|
|
"tags": ["Memberships"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, membership removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Membership id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Find a membership by userID and teamID",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric userId of the membership to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric teamId of the membership to get"
|
|
}
|
|
],
|
|
"tags": ["Memberships"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Membership was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Edit an existing membership",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric userId of the membership to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric teamId of the membership to get"
|
|
}
|
|
],
|
|
"tags": ["Memberships"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, membership edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Membership body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payments/{id}": {
|
|
"get": {
|
|
"summary": "Find a payment",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the payment to get"
|
|
}
|
|
],
|
|
"tags": ["Payments"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Payment was not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payments": {
|
|
"get": {
|
|
"summary": "Find all payments",
|
|
"tags": ["Payments"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No payments were found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/schedules": {
|
|
"get": {
|
|
"operationId": "listSchedules",
|
|
"summary": "Find all schedules",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"tags": ["Schedules"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"schedules": {
|
|
"value": {
|
|
"schedules": [
|
|
{
|
|
"id": 1234,
|
|
"userId": 5678,
|
|
"name": "Sample Schedule 1",
|
|
"timeZone": "America/Chicago",
|
|
"availability": [
|
|
{
|
|
"id": 987,
|
|
"eventTypeId": null,
|
|
"days": [1, 2, 3, 4, 5],
|
|
"startTime": "09:00:00",
|
|
"endTime": "23:00:00"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 2345,
|
|
"userId": 6789,
|
|
"name": "Sample Schedule 2",
|
|
"timeZone": "Europe/Amsterdam",
|
|
"availability": [
|
|
{
|
|
"id": 876,
|
|
"eventTypeId": null,
|
|
"days": [1, 2, 3, 4, 5],
|
|
"startTime": "09:00:00",
|
|
"endTime": "17:00:00"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No schedules were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "addSchedule",
|
|
"summary": "Creates a new schedule",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new schedule",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["name", "timeZone"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the schedule"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"description": "The timeZone for this schedule"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"schedule": {
|
|
"value": {
|
|
"name": "Sample Schedule",
|
|
"timeZone": "Asia/Calcutta"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Schedules"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, schedule created",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"schedule": {
|
|
"value": {
|
|
"schedule": {
|
|
"id": 79471,
|
|
"userId": 182,
|
|
"name": "Total Testing",
|
|
"timeZone": "Asia/Calcutta",
|
|
"availability": [
|
|
{
|
|
"id": 337917,
|
|
"eventTypeId": null,
|
|
"days": [1, 2, 3, 4, 5],
|
|
"startTime": "09:00:00",
|
|
"endTime": "17:00:00"
|
|
}
|
|
]
|
|
},
|
|
"message": "Schedule created successfully"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Schedule body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/schedules/{id}": {
|
|
"delete": {
|
|
"operationId": "removeScheduleById",
|
|
"summary": "Remove an existing schedule",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the schedule to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"tags": ["Schedules"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, schedule removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Schedule id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getScheduleById",
|
|
"summary": "Find a schedule",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the schedule to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"tags": ["Schedules"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"schedule": {
|
|
"value": {
|
|
"schedule": {
|
|
"id": 12345,
|
|
"userId": 182,
|
|
"name": "Sample Schedule",
|
|
"timeZone": "Asia/Calcutta",
|
|
"availability": [
|
|
{
|
|
"id": 111,
|
|
"eventTypeId": null,
|
|
"days": [0, 1, 2, 3, 4, 6],
|
|
"startTime": "00:00:00",
|
|
"endTime": "23:45:00"
|
|
},
|
|
{
|
|
"id": 112,
|
|
"eventTypeId": null,
|
|
"days": [5],
|
|
"startTime": "00:00:00",
|
|
"endTime": "12:00:00"
|
|
},
|
|
{
|
|
"id": 113,
|
|
"eventTypeId": null,
|
|
"days": [5],
|
|
"startTime": "15:00:00",
|
|
"endTime": "23:45:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Schedule was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editScheduleById",
|
|
"summary": "Edit an existing schedule",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the schedule to edit"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Edit an existing schedule",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the schedule"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"description": "The timezone for this schedule"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"schedule": {
|
|
"value": {
|
|
"name": "Updated Schedule",
|
|
"timeZone": "Asia/Calcutta"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Schedules"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, schedule edited successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"schedule": {
|
|
"value": {
|
|
"schedule": {
|
|
"id": 12345,
|
|
"userId": 1,
|
|
"name": "Total Testing Part 2",
|
|
"timeZone": "Asia/Calcutta",
|
|
"availability": [
|
|
{
|
|
"id": 4567,
|
|
"eventTypeId": null,
|
|
"days": [1, 2, 3, 4, 5],
|
|
"startTime": "09:00:00",
|
|
"endTime": "17:00:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Schedule body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/selected-calendars": {
|
|
"get": {
|
|
"operationId": "listSelectedCalendars",
|
|
"summary": "Find all selected calendars",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"tags": ["Selected Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No selected calendars were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Creates a new selected calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new selected calendar",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["integration", "externalId"],
|
|
"properties": {
|
|
"integration": {
|
|
"type": "string",
|
|
"description": "The integration name"
|
|
},
|
|
"externalId": {
|
|
"type": "string",
|
|
"description": "The external ID of the integration"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Selected Calendars"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, selected calendar created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. SelectedCalendar body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/selected-calendars/{userId}_{integration}_{externalId}": {
|
|
"delete": {
|
|
"operationId": "removeSelectedCalendarById",
|
|
"summary": "Remove a selected calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "userId of the selected calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "externalId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "externalId of the selected-calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "integration",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "integration of the selected calendar to get"
|
|
}
|
|
],
|
|
"tags": ["Selected Calendars"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, selected-calendar removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. SelectedCalendar id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getSelectedCalendarById",
|
|
"summary": "Find a selected calendar by providing the compoundId(userId_integration_externalId) separated by `_`",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "userId of the selected calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "externalId",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "externalId of the selected calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "integration",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "integration of the selected calendar to get"
|
|
}
|
|
],
|
|
"tags": ["Selected Calendars"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "SelectedCalendar was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editSelectedCalendarById",
|
|
"summary": "Edit a selected calendar",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "userId of the selected calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "externalId",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "externalId of the selected calendar to get"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "integration",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "integration of the selected calendar to get"
|
|
}
|
|
],
|
|
"tags": ["Selected Calendars"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, selected-calendar edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. SelectedCalendar body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slots": {
|
|
"get": {
|
|
"summary": "Get all bookable slots between a datetime range",
|
|
"tags": ["slots"],
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"description": "Your API Key",
|
|
"schema": {
|
|
"type": "string",
|
|
"example": "cal_live_<unique_identifier>"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "eventTypeId",
|
|
"required": false,
|
|
"description": "The event type Id to fetch available slots against",
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "startTime",
|
|
"required": true,
|
|
"description": "Start time of the slot lookup",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "endTime",
|
|
"required": true,
|
|
"description": "End time of the slot lookup",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "timeZone",
|
|
"description": "TimeZone for the slot lookup",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "usernameList",
|
|
"description": "An array of usernames, or team slug in case of a team event [To be used when not using eventTypeId]",
|
|
"example": ["user1", "user2", "user3"],
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"style": "form",
|
|
"explode": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "eventTypeSlug",
|
|
"description": "Slug of the event type to fetch available slots against [To be used when not using eventTypeId]",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "orgSlug",
|
|
"description": "Slug of the organization that the user belongs to, in case the user belongs to an organization [To be used when not using eventTypeId]",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "isTeamEvent",
|
|
"description": "True if the event is a team event",
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"example": {
|
|
"slots": {
|
|
"2024-04-13": [
|
|
{
|
|
"time": "2024-04-13T11:00:00+04:00"
|
|
},
|
|
{
|
|
"time": "2024-04-13T12:00:00+04:00"
|
|
},
|
|
{
|
|
"time": "2024-04-13T13:00:00+04:00"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
},
|
|
"example": {
|
|
"message": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams": {
|
|
"get": {
|
|
"operationId": "listTeams",
|
|
"summary": "Find all teams",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Teams"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No teams were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "addTeam",
|
|
"summary": "Creates a new team",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new custom input for an event type",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"slug",
|
|
"hideBookATeamMember",
|
|
"brandColor",
|
|
"darkBrandColor",
|
|
"timeZone",
|
|
"weekStart",
|
|
"isPrivate"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the team"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "A unique slug that works as path for the team public page"
|
|
},
|
|
"hideBookATeamMember": {
|
|
"type": "boolean",
|
|
"description": "Flag to hide or show the book a team member option"
|
|
},
|
|
"brandColor": {
|
|
"type": "string",
|
|
"description": "Primary brand color for the team"
|
|
},
|
|
"darkBrandColor": {
|
|
"type": "string",
|
|
"description": "Dark variant of the primary brand color for the team"
|
|
},
|
|
"timeZone": {
|
|
"type": "string",
|
|
"description": "Time zone of the team"
|
|
},
|
|
"weekStart": {
|
|
"type": "string",
|
|
"description": "Starting day of the week for the team"
|
|
},
|
|
"isPrivate": {
|
|
"type": "boolean",
|
|
"description": "Flag indicating if the team is private"
|
|
},
|
|
"ownerId": {
|
|
"type": "number",
|
|
"description": "ID of the team owner - only admins can set this."
|
|
},
|
|
"parentId": {
|
|
"type": "number",
|
|
"description": "ID of the parent organization."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Teams"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, team created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Team body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams/{teamId}": {
|
|
"delete": {
|
|
"operationId": "removeTeamById",
|
|
"summary": "Remove an existing team",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the team to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Teams"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, team removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Team id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "getTeamById",
|
|
"summary": "Find a team",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the team to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Teams"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Team was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "editTeamById",
|
|
"summary": "Edit an existing team",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the team to edit"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new custom input for an event type",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the team"
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "A unique slug that works as path for the team public page"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Teams"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, team edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Team body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams/{teamId}/event-types": {
|
|
"get": {
|
|
"summary": "Find all event types that belong to teamId",
|
|
"operationId": "listEventTypesByTeamId",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API Key"
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "teamId",
|
|
"schema": {
|
|
"type": "number"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"tags": ["Event Types"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/event-types"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No event types were found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"operationId": "listUsers",
|
|
"summary": "Find all users",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "email",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "email"
|
|
}
|
|
},
|
|
"style": "form",
|
|
"explode": true,
|
|
"description": "The email address or an array of email addresses to filter by"
|
|
}
|
|
],
|
|
"tags": ["Users"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No users were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "addUser",
|
|
"summary": "Creates a new user",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new user",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["email", "username"],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email",
|
|
"description": "Email that belongs to the user being edited"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"description": "Username for the user being created"
|
|
},
|
|
"brandColor": {
|
|
"description": "The new user's brand color",
|
|
"type": "string"
|
|
},
|
|
"darkBrandColor": {
|
|
"description": "The new user's brand color for dark mode",
|
|
"type": "string"
|
|
},
|
|
"hideBranding": {
|
|
"description": "Remove branding from the user's calendar page",
|
|
"type": "boolean"
|
|
},
|
|
"weekStart": {
|
|
"description": "Start of the week. Acceptable values are one of [SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY]",
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"description": "The new user's time zone. Eg- 'EUROPE/PARIS'",
|
|
"type": "string"
|
|
},
|
|
"theme": {
|
|
"description": "Default theme for the new user. Acceptable values are one of [DARK, LIGHT]",
|
|
"type": "string"
|
|
},
|
|
"timeFormat": {
|
|
"description": "The new user's time format. Acceptable values are one of [TWELVE, TWENTY_FOUR]",
|
|
"type": "string"
|
|
},
|
|
"locale": {
|
|
"description": "The new user's locale. Acceptable values are one of [EN, FR, IT, RU, ES, DE, PT, RO, NL, PT_BR, ES_419, KO, JA, PL, AR, IW, ZH_CH, ZH_TW, CS, SR, SV, VI]",
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"description": "The user's avatar, in base64 format",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"user": {
|
|
"summary": "An example of USER",
|
|
"value": {
|
|
"email": "[email protected]",
|
|
"username": "johndoe",
|
|
"weekStart": "MONDAY",
|
|
"brandColor": "#555555",
|
|
"darkBrandColor": "#111111",
|
|
"timeZone": "EUROPE/PARIS",
|
|
"theme": "LIGHT",
|
|
"timeFormat": "TWELVE",
|
|
"locale": "FR"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Users"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, user created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. user body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{userId}": {
|
|
"delete": {
|
|
"summary": "Remove an existing user",
|
|
"operationId": "removeUserById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the user to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Users"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, user removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. User id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Find a user, returns your user if regular user.",
|
|
"operationId": "getUserById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"example": 4,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the user to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"required": true,
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Users"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "User was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Edit an existing user",
|
|
"operationId": "editUserById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"example": 4,
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "ID of the user to edit"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Edit an existing attendee related to one of your bookings",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"format": "email",
|
|
"description": "Email that belongs to the user being edited"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"description": "Username for the user being edited"
|
|
},
|
|
"brandColor": {
|
|
"description": "The user's brand color",
|
|
"type": "string"
|
|
},
|
|
"darkBrandColor": {
|
|
"description": "The user's brand color for dark mode",
|
|
"type": "string"
|
|
},
|
|
"weekStart": {
|
|
"description": "Start of the week. Acceptable values are one of [SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY]",
|
|
"type": "string"
|
|
},
|
|
"timeZone": {
|
|
"description": "The user's time zone",
|
|
"type": "string"
|
|
},
|
|
"hideBranding": {
|
|
"description": "Remove branding from the user's calendar page",
|
|
"type": "boolean"
|
|
},
|
|
"theme": {
|
|
"description": "Default theme for the user. Acceptable values are one of [DARK, LIGHT]",
|
|
"type": "string"
|
|
},
|
|
"timeFormat": {
|
|
"description": "The user's time format. Acceptable values are one of [TWELVE, TWENTY_FOUR]",
|
|
"type": "string"
|
|
},
|
|
"locale": {
|
|
"description": "The user's locale. Acceptable values are one of [EN, FR, IT, RU, ES, DE, PT, RO, NL, PT_BR, ES_419, KO, JA, PL, AR, IW, ZH_CH, ZH_TW, CS, SR, SV, VI]",
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"description": "The user's avatar, in base64 format",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"user": {
|
|
"summary": "An example of USER",
|
|
"value": {
|
|
"email": "[email protected]",
|
|
"username": "johndoe",
|
|
"weekStart": "MONDAY",
|
|
"brandColor": null,
|
|
"darkBrandColor": null,
|
|
"timeZone": "EUROPE/PARIS",
|
|
"theme": "LIGHT",
|
|
"timeFormat": "TWELVE",
|
|
"locale": "FR"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Users"],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK, user edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. User body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to access resource."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/webhooks": {
|
|
"get": {
|
|
"summary": "Find all webhooks",
|
|
"operationId": "listWebhooks",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Webhooks"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/webhooks"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "No webhooks were found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"summary": "Creates a new webhook",
|
|
"operationId": "addWebhook",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Create a new webhook",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["subscriberUrl", "eventTriggers", "active"],
|
|
"properties": {
|
|
"subscriberUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "The URL to subscribe to this webhook"
|
|
},
|
|
"eventTriggers": {
|
|
"type": "string",
|
|
"enum": ["BOOKING_CREATED", "BOOKING_RESCHEDULED", "BOOKING_CANCELLED", "MEETING_ENDED"],
|
|
"description": "The events which should trigger this webhook call"
|
|
},
|
|
"active": {
|
|
"type": "boolean",
|
|
"description": "Whether the webhook is active and should trigger on associated trigger events"
|
|
},
|
|
"payloadTemplate": {
|
|
"type": "string",
|
|
"description": "The template of the webhook's payload"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "number",
|
|
"description": "The event type ID if this webhook should be associated with only that event type"
|
|
},
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "The secret to verify the authenticity of the received payload"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Webhooks"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/webhooks"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, webhook created"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. webhook body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/webhooks/{id}": {
|
|
"delete": {
|
|
"summary": "Remove an existing hook",
|
|
"operationId": "removeWebhookById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric ID of the hooks to delete"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Webhooks"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/webhooks"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, hook removed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. hook id is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"summary": "Find a webhook",
|
|
"operationId": "getWebhookById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric ID of the webhook to get"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"tags": ["Webhooks"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/webhooks"
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
},
|
|
"404": {
|
|
"description": "Webhook was not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"summary": "Edit an existing webhook",
|
|
"operationId": "editWebhookById",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id",
|
|
"schema": {
|
|
"type": "integer"
|
|
},
|
|
"required": true,
|
|
"description": "Numeric ID of the webhook to edit"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "apiKey",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Your API key"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"description": "Edit an existing webhook",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"subscriberUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "The URL to subscribe to this webhook"
|
|
},
|
|
"eventTriggers": {
|
|
"type": "string",
|
|
"enum": ["BOOKING_CREATED", "BOOKING_RESCHEDULED", "BOOKING_CANCELLED", "MEETING_ENDED"],
|
|
"description": "The events which should trigger this webhook call"
|
|
},
|
|
"active": {
|
|
"type": "boolean",
|
|
"description": "Whether the webhook is active and should trigger on associated trigger events"
|
|
},
|
|
"payloadTemplate": {
|
|
"type": "string",
|
|
"description": "The template of the webhook's payload"
|
|
},
|
|
"eventTypeId": {
|
|
"type": "number",
|
|
"description": "The event type ID if this webhook should be associated with only that event type"
|
|
},
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "The secret to verify the authenticity of the received payload"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["Webhooks"],
|
|
"externalDocs": {
|
|
"url": "https://docs.cal.com/docs/core-features/webhooks"
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "OK, webhook edited successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request. Webhook body is invalid."
|
|
},
|
|
"401": {
|
|
"description": "Authorization information is missing or invalid."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|