{
  "openapi": "3.0.3",
  "info": {
    "title": "RocketLead Connect API",
    "description": "Connect API documentation for RocketLead. Authenticate using API tokens with format \"Bearer rocketlead_xxx\".",
    "version": "2.16.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "Bearer",
        "bearerFormat": "rocketlead_",
        "description": "API token authentication. Use format \"Authorization: Bearer rocketlead_xxx\""
      }
    },
    "schemas": {
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Unauthorized"
          },
          "message": {
            "type": "string",
            "example": "API token required. Use \"Authorization: Bearer rocketlead_xxx\""
          }
        }
      },
      "ForbiddenError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Forbidden"
          },
          "message": {
            "type": "string",
            "example": "Read-only token cannot perform write operations"
          }
        }
      }
    }
  },
  "paths": {
    "/connect/calendar/": {
      "get": {
        "summary": "Retrieve all calendars",
        "tags": [
          "calendars"
        ],
        "description": "Get all calendars",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "format": "regex",
                        "pattern": "^#([A-Fa-f0-9]{6})$",
                        "type": "string"
                      },
                      "archived": {
                        "type": "boolean"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "tzdata": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "color",
                      "archived",
                      "updatedAt",
                      "createdAt",
                      "tzdata"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/calendar/{id}": {
      "get": {
        "summary": "Retrieve a calendar",
        "tags": [
          "calendarInstance"
        ],
        "description": "Get a calendar",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "minLength": 1,
                          "type": "string"
                        },
                        "organizationId": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "format": "regex",
                          "pattern": "^#([A-Fa-f0-9]{6})$",
                          "type": "string"
                        },
                        "archived": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "tzdata": {
                          "type": "string"
                        },
                        "count": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "name",
                        "color",
                        "archived",
                        "updatedAt",
                        "createdAt",
                        "tzdata"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "scheduleTypes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "count": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "count"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "format": "uuid",
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "color": {
                                    "format": "regex",
                                    "pattern": "^#([A-Fa-f0-9]{6})$",
                                    "type": "string"
                                  },
                                  "organizationId": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "calendarId": {
                                    "format": "uuid",
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "color",
                                  "organizationId",
                                  "calendarId"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "scheduleTypes"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/tables/": {
      "get": {
        "tags": [
          "tables"
        ],
        "description": "Get all tables for an organization",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "format": "regex",
                        "pattern": "^#([A-Fa-f0-9]{6})$",
                        "type": "string"
                      },
                      "organizationId": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "archived": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "color",
                      "organizationId",
                      "archived",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/tables/{id}": {
      "get": {
        "tags": [
          "tableInstance"
        ],
        "description": "Get a specific table by ID",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "format": "regex",
                          "pattern": "^#([A-Fa-f0-9]{6})$",
                          "type": "string"
                        },
                        "organizationId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "archived": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "count": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color",
                        "organizationId",
                        "archived",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "leadStates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "allOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "count": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "count"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "format": "uuid",
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "color": {
                                    "format": "regex",
                                    "pattern": "^#([A-Fa-f0-9]{6})$",
                                    "type": "string"
                                  },
                                  "organizationId": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "order": {
                                    "type": "number"
                                  },
                                  "category": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "new"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "inProgress"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "completed"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "notCompleted"
                                        ]
                                      }
                                    ]
                                  },
                                  "tableId": {
                                    "format": "uuid",
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "default": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "color",
                                  "organizationId",
                                  "order",
                                  "category",
                                  "tableId",
                                  "default"
                                ]
                              }
                            ]
                          }
                        },
                        "schema": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "format": "uuid",
                              "minLength": 1,
                              "type": "string"
                            },
                            "tableId": {
                              "format": "uuid",
                              "minLength": 1,
                              "type": "string"
                            },
                            "organizationId": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "createdAt": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "updatedAt": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "fields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "object",
                                "properties": {
                                  "friendlyName": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "specialType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "date"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "email"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "name"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "firstName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "middleName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "lastName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "childFirstName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "childMiddleName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "childLastName"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "phone"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "currency"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "percentage"
                                        ]
                                      }
                                    ]
                                  },
                                  "primaryOfSpecialType": {
                                    "type": "boolean"
                                  },
                                  "hidden": {
                                    "type": "boolean"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "validation": {
                                    "type": "object",
                                    "properties": {
                                      "pattern": {
                                        "type": "string"
                                      },
                                      "required": {
                                        "type": "boolean"
                                      },
                                      "min": {
                                        "type": "number"
                                      },
                                      "max": {
                                        "type": "number"
                                      }
                                    }
                                  },
                                  "frequency": {
                                    "type": "number"
                                  },
                                  "lastSeen": {
                                    "type": "string"
                                  },
                                  "isDeprecated": {
                                    "type": "boolean"
                                  },
                                  "converted": {
                                    "type": "boolean"
                                  },
                                  "convertedToCustomFieldId": {
                                    "format": "uuid",
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "friendlyName",
                                  "type",
                                  "frequency",
                                  "lastSeen",
                                  "isDeprecated"
                                ]
                              }
                            },
                            "version": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "tableId",
                            "organizationId",
                            "createdAt",
                            "updatedAt",
                            "fields",
                            "version"
                          ]
                        },
                        "scheduleTypeLinks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "format": "uuid",
                                "minLength": 1,
                                "type": "string"
                              },
                              "tableId": {
                                "format": "uuid",
                                "minLength": 1,
                                "type": "string"
                              },
                              "calendarId": {
                                "format": "uuid",
                                "minLength": 1,
                                "type": "string"
                              },
                              "scheduleTypeId": {
                                "format": "uuid",
                                "minLength": 1,
                                "type": "string"
                              },
                              "fieldKey": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "condition": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "equal"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not equal"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "contains"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not contains"
                                    ]
                                  }
                                ]
                              },
                              "organizationId": {
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "tableId",
                              "calendarId",
                              "scheduleTypeId",
                              "fieldKey",
                              "value",
                              "condition",
                              "organizationId"
                            ]
                          }
                        },
                        "followUpStatusCounts": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number"
                            },
                            "unset": {
                              "type": "number"
                            },
                            "today": {
                              "type": "number"
                            },
                            "overdue": {
                              "type": "number"
                            },
                            "upcoming": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "total",
                            "unset",
                            "today",
                            "overdue",
                            "upcoming"
                          ]
                        }
                      },
                      "required": [
                        "leadStates",
                        "followUpStatusCounts"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/table_entries/": {
      "post": {
        "summary": "Create new table entry",
        "tags": [
          "tableEntries"
        ],
        "description": "Create a new entry in a table. Requires write or admin scope API token.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tableId": {
                    "description": "The ID of the table the entry belongs to",
                    "type": "string"
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "customFieldData": {
                    "description": "JSON object keyed by customField ID with the corresponding value",
                    "type": "object",
                    "additionalProperties": {
                      "description": "Custom field value, either primitive or uuid for customFieldOption"
                    }
                  },
                  "leadStateId": {
                    "type": "string"
                  },
                  "interestedInAppointmentTypeId": {
                    "description": "Optional UUID of an appointment type the lead expressed interest in. Typically set at form submission when the form includes an `appointment-type` field (RKTL-455). Cleared to null when the referenced appointment type is deleted.",
                    "anyOf": [
                      {
                        "format": "uuid",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "tableId",
                  "data",
                  "leadStateId"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tableId": {
                      "description": "The ID of the table the entry belongs to",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "customFieldData": {
                      "description": "JSON object keyed by customField ID with the corresponding value",
                      "type": "object",
                      "additionalProperties": {
                        "description": "Custom field value, either primitive or uuid for customFieldOption"
                      }
                    },
                    "leadStateId": {
                      "type": "string"
                    },
                    "firstOpenedAt": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "followUpDate": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "interestedInAppointmentTypeId": {
                      "description": "Optional UUID of an appointment type the lead expressed interest in. Typically set at form submission when the form includes an `appointment-type` field (RKTL-455). Cleared to null when the referenced appointment type is deleted.",
                      "anyOf": [
                        {
                          "format": "uuid",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "tableId",
                    "id",
                    "organizationId",
                    "archived",
                    "createdAt",
                    "updatedAt",
                    "data",
                    "leadStateId",
                    "firstOpenedAt",
                    "followUpDate"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/table_entries/{id}": {
      "patch": {
        "summary": "Update table entry",
        "tags": [
          "tableEntryInstance"
        ],
        "description": "Update a specific entry in a table",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minProperties": 1,
                "type": "object",
                "properties": {
                  "data": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "customFieldData": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "leadStateId": {
                    "type": "string"
                  },
                  "firstOpenedAt": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "followUpDate": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interestedInAppointmentTypeId": {
                    "description": "Optional UUID of an appointment type the lead expressed interest in. Typically set at form submission when the form includes an `appointment-type` field (RKTL-455). Cleared to null when the referenced appointment type is deleted.",
                    "anyOf": [
                      {
                        "format": "uuid",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tableId": {
                      "description": "The ID of the table the entry belongs to",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "customFieldData": {
                      "description": "JSON object keyed by customField ID with the corresponding value",
                      "type": "object",
                      "additionalProperties": {
                        "description": "Custom field value, either primitive or uuid for customFieldOption"
                      }
                    },
                    "leadStateId": {
                      "type": "string"
                    },
                    "firstOpenedAt": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "followUpDate": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "interestedInAppointmentTypeId": {
                      "description": "Optional UUID of an appointment type the lead expressed interest in. Typically set at form submission when the form includes an `appointment-type` field (RKTL-455). Cleared to null when the referenced appointment type is deleted.",
                      "anyOf": [
                        {
                          "format": "uuid",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "tableId",
                    "id",
                    "organizationId",
                    "archived",
                    "createdAt",
                    "updatedAt",
                    "data",
                    "leadStateId",
                    "firstOpenedAt",
                    "followUpDate"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/calendar_bookings/": {
      "post": {
        "summary": "Create new booking",
        "tags": [
          "calendarBookings"
        ],
        "description": "Create a new calendar booking. Requires write or admin scope API token.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "calendarId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "entryId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "scheduleTypeId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "scheduleTypeSlotId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "resourceId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "appointmentTypeId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "resourceSlotId": {
                    "format": "uuid",
                    "minLength": 1,
                    "type": "string"
                  },
                  "name": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "startDateTime": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "endDateTime": {
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "required": [
                  "calendarId",
                  "startDateTime",
                  "endDateTime"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "calendarId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "tableEntryId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "tableEntryData": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "tableId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "tableSchemaFields": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "friendlyName": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "specialType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "date"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "email"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "name"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "firstName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "middleName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "lastName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "childFirstName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "childMiddleName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "childLastName"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "phone"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "url"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "currency"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "percentage"
                                ]
                              }
                            ]
                          },
                          "primaryOfSpecialType": {
                            "type": "boolean"
                          },
                          "hidden": {
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          },
                          "validation": {
                            "type": "object",
                            "properties": {
                              "pattern": {
                                "type": "string"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "min": {
                                "type": "number"
                              },
                              "max": {
                                "type": "number"
                              }
                            }
                          },
                          "frequency": {
                            "type": "number"
                          },
                          "lastSeen": {
                            "type": "string"
                          },
                          "isDeprecated": {
                            "type": "boolean"
                          },
                          "converted": {
                            "type": "boolean"
                          },
                          "convertedToCustomFieldId": {
                            "format": "uuid",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "friendlyName",
                          "type",
                          "frequency",
                          "lastSeen",
                          "isDeprecated"
                        ]
                      }
                    },
                    "calendarScheduleTypeId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "calendarScheduleTypeSlotId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "resourceId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "appointmentTypeId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "resourceSlotId": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "deletedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "endDateTime": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "startDateTime": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "leadStateColor": {
                      "type": "string"
                    },
                    "leadStateName": {
                      "type": "string"
                    },
                    "chainBookingGroupId": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "organizationId",
                    "calendarId",
                    "id",
                    "createdAt",
                    "endDateTime",
                    "startDateTime"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/calendar_bookings/{id}": {
      "delete": {
        "summary": "Delete booking",
        "tags": [
          "calendarBookingsInstance"
        ],
        "description": "Delete a calendar booking. Requires admin scope API token (write scope cannot delete).",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/calendar_schedule_types/": {
      "get": {
        "summary": "Retrieve all schedule types",
        "tags": [
          "calendarScheduleTypes"
        ],
        "description": "Deprecated: Use Resources and Appointment Types instead. Get all schedule types",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": false
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "format": "regex",
                        "pattern": "^#([A-Fa-f0-9]{6})$",
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "calendarId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "calendarName": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "color",
                      "organizationId",
                      "calendarId"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/calendar_schedule_types/{id}/available": {
      "get": {
        "summary": "Retrieve available slots",
        "tags": [
          "calendarScheduleTypes"
        ],
        "description": "Deprecated: Use GET /connect/availability instead. Get all available slots for the specified schedule types in a specific date range",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": true
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "start",
            "required": true
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "end",
            "required": true
          },
          {
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "in": "query",
            "name": "includeUnavailable",
            "required": false
          },
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "calendarId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "calendarScheduleTypeId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "maxBookings": {
                        "type": "integer"
                      },
                      "currentBookings": {
                        "type": "integer"
                      },
                      "startDateTime": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "endDateTime": {
                        "format": "date-time",
                        "type": "string"
                      }
                    },
                    "required": [
                      "calendarId",
                      "id",
                      "organizationId",
                      "name",
                      "calendarScheduleTypeId",
                      "maxBookings",
                      "currentBookings",
                      "startDateTime",
                      "endDateTime"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/availability/": {
      "get": {
        "summary": "Get availability",
        "tags": [
          "availability"
        ],
        "description": "Get available booking windows for an appointment type",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": true
          },
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "appointmentTypeId",
            "required": true
          },
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "resourceId",
            "required": false
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "start",
            "required": true
          },
          {
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "in": "query",
            "name": "end",
            "required": true
          },
          {
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "in": "query",
            "name": "includeUnavailable",
            "required": false
          },
          {
            "schema": {
              "default": 15,
              "minimum": 5,
              "maximum": 120,
              "type": "number"
            },
            "in": "query",
            "name": "stepLength",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceId": {
                            "type": "string"
                          },
                          "resourceName": {
                            "type": "string"
                          },
                          "resourceColor": {
                            "type": "string"
                          },
                          "resourceSlotId": {
                            "type": "string"
                          },
                          "appointmentTypeId": {
                            "type": "string"
                          },
                          "startDateTime": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "endDateTime": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "maxParallelBookings": {
                            "type": "number"
                          },
                          "currentBookings": {
                            "type": "number"
                          },
                          "available": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "resourceId",
                          "resourceName",
                          "resourceColor",
                          "resourceSlotId",
                          "appointmentTypeId",
                          "startDateTime",
                          "endDateTime",
                          "maxParallelBookings",
                          "currentBookings",
                          "available"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "appointmentTypeName": {
                          "type": "string"
                        },
                        "defaultBookingLength": {
                          "type": "number"
                        },
                        "bufferAfter": {
                          "type": "number"
                        },
                        "dynamicLength": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "appointmentTypeName",
                        "defaultBookingLength",
                        "bufferAfter",
                        "dynamicLength"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/resources/": {
      "get": {
        "summary": "Retrieve all resources",
        "tags": [
          "resources"
        ],
        "description": "Get all resources for the organization",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "format": "regex",
                        "pattern": "^#([A-Fa-f0-9]{6})$",
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "maxParallelBookings": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "createdAt",
                      "updatedAt",
                      "name",
                      "color",
                      "maxParallelBookings"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/resources/{id}": {
      "get": {
        "summary": "Retrieve a resource",
        "tags": [
          "resourceInstance"
        ],
        "description": "Get a specific resource with its calendar mappings",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "minLength": 1,
                          "type": "string"
                        },
                        "organizationId": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "format": "regex",
                          "pattern": "^#([A-Fa-f0-9]{6})$",
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "maxParallelBookings": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "createdAt",
                        "updatedAt",
                        "name",
                        "color",
                        "maxParallelBookings"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showInCalendars": {
                          "type": "array",
                          "items": {
                            "format": "uuid",
                            "minLength": 1,
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "showInCalendars"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/resource_slots/": {
      "get": {
        "summary": "Retrieve resource slots",
        "tags": [
          "resourceSlots"
        ],
        "description": "Get all resource slots for a calendar",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "calendarId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "resourceId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "allowPublicBooking": {
                        "type": "boolean"
                      },
                      "advertiseOnPublicCalendar": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "maxParallelBookings": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "startAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "endAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "recurrenceEndDate": {
                        "anyOf": [
                          {
                            "format": "date-time",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "recurrenceCron": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "calendarId",
                      "resourceId",
                      "allowPublicBooking",
                      "advertiseOnPublicCalendar",
                      "createdAt",
                      "updatedAt",
                      "maxParallelBookings",
                      "startAt",
                      "endAt",
                      "recurrenceEndDate",
                      "recurrenceCron"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/resource_slot_blockers/": {
      "get": {
        "summary": "Retrieve resource slot blockers",
        "tags": [
          "resourceSlotBlockers"
        ],
        "description": "Get all resource slot blockers for a calendar",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "calendarId": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "resourceId": {
                        "anyOf": [
                          {
                            "format": "uuid",
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "blockerType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "bank_holiday"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "closure"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          {
                            "type": "string",
                            "enum": [
                              "vacation"
                            ]
                          }
                        ]
                      },
                      "startAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "endAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "allDay": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "calendarId",
                      "resourceId",
                      "name",
                      "blockerType",
                      "startAt",
                      "endAt",
                      "allDay",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/appointment_types/": {
      "get": {
        "summary": "Retrieve all appointment types",
        "tags": [
          "appointmentTypes"
        ],
        "description": "Get all appointment types for the organization",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "minLength": 1,
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "color": {
                        "format": "regex",
                        "pattern": "^#([A-Fa-f0-9]{6})$",
                        "type": "string"
                      },
                      "defaultBookingLength": {
                        "minimum": 1,
                        "type": "number"
                      },
                      "bufferAfter": {
                        "minimum": 0,
                        "type": "number"
                      },
                      "dynamicLength": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "createdAt",
                      "updatedAt",
                      "name",
                      "color",
                      "defaultBookingLength",
                      "bufferAfter",
                      "dynamicLength"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/appointment_types/{id}": {
      "get": {
        "summary": "Retrieve an appointment type",
        "tags": [
          "appointmentTypeInstance"
        ],
        "description": "Get a specific appointment type with its resource mappings",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "minLength": 1,
                          "type": "string"
                        },
                        "organizationId": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "updatedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "format": "regex",
                          "pattern": "^#([A-Fa-f0-9]{6})$",
                          "type": "string"
                        },
                        "defaultBookingLength": {
                          "minimum": 1,
                          "type": "number"
                        },
                        "bufferAfter": {
                          "minimum": 0,
                          "type": "number"
                        },
                        "dynamicLength": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "createdAt",
                        "updatedAt",
                        "name",
                        "color",
                        "defaultBookingLength",
                        "bufferAfter",
                        "dynamicLength"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showInResources": {
                          "type": "array",
                          "items": {
                            "format": "uuid",
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "showInResources"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/resource_calendar_mappings/": {
      "get": {
        "summary": "Retrieve resource calendar mappings",
        "tags": [
          "resourceCalendarMappings"
        ],
        "description": "Get all resource-to-calendar mappings. Optionally filter by resourceId or calendarId.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "resourceId",
            "required": false
          },
          {
            "schema": {
              "format": "uuid",
              "minLength": 1,
              "type": "string"
            },
            "in": "query",
            "name": "calendarId",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "resourceId": {
                            "format": "uuid",
                            "minLength": 1,
                            "type": "string"
                          },
                          "calendarId": {
                            "format": "uuid",
                            "minLength": 1,
                            "type": "string"
                          },
                          "organizationId": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "maxParallelBookingsOverride": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "resourceId",
                          "calendarId",
                          "organizationId",
                          "createdAt",
                          "updatedAt",
                          "maxParallelBookingsOverride"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "resource": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "format": "uuid",
                                "minLength": 1,
                                "type": "string"
                              },
                              "organizationId": {
                                "minLength": 1,
                                "type": "string"
                              },
                              "createdAt": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "updatedAt": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "format": "regex",
                                "pattern": "^#([A-Fa-f0-9]{6})$",
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "maxParallelBookings": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "organizationId",
                              "createdAt",
                              "updatedAt",
                              "name",
                              "color",
                              "maxParallelBookings"
                            ]
                          }
                        },
                        "required": [
                          "resource"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/connect/appointment_type_resource_mappings/": {
      "get": {
        "summary": "Retrieve appointment type resource mappings",
        "tags": [
          "appointmentTypeResourceMappings"
        ],
        "description": "Get all appointment-type-to-resource mappings. Optionally filter by appointmentTypeId or resourceId.",
        "parameters": [
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "query",
            "name": "appointmentTypeId",
            "required": false
          },
          {
            "schema": {
              "format": "uuid",
              "type": "string"
            },
            "in": "query",
            "name": "resourceId",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "appointmentTypeId": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "resourceId": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "organizationId": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "defaultBookingLengthOverride": {
                        "anyOf": [
                          {
                            "minimum": 1,
                            "maximum": 1440,
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "bufferAfterOverride": {
                        "anyOf": [
                          {
                            "minimum": 0,
                            "maximum": 1440,
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "appointmentTypeId",
                      "resourceId",
                      "organizationId",
                      "defaultBookingLengthOverride",
                      "bufferAfterOverride",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "VALIDATION_ERROR"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {}
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "DATABASE_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number",
                          "enum": [
                            500
                          ]
                        },
                        "error": {
                          "type": "string",
                          "enum": [
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "statusCode",
                        "error",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api-local.maximtan.de:4000"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Calendars",
      "tags": [
        "calendars",
        "calendarInstance"
      ]
    },
    {
      "name": "Calendar Bookings",
      "tags": [
        "calendarBookings",
        "calendarBookingsInstance"
      ]
    },
    {
      "name": "[Deprecated] Calendar Schedule Types",
      "tags": [
        "calendarScheduleTypes"
      ]
    },
    {
      "name": "tables",
      "tags": [
        "tables",
        "tableInstance"
      ]
    },
    {
      "name": "Table Entries",
      "tags": [
        "tableEntries",
        "tableEntryInstance"
      ]
    },
    {
      "name": "Resources",
      "tags": [
        "resources",
        "resourceInstance"
      ]
    },
    {
      "name": "Resource Slots",
      "tags": [
        "resourceSlots"
      ]
    },
    {
      "name": "Resource Slot Blockers",
      "tags": [
        "resourceSlotBlockers"
      ]
    },
    {
      "name": "Appointment Types",
      "tags": [
        "appointmentTypes",
        "appointmentTypeInstance"
      ]
    },
    {
      "name": "Resource Calendar Mappings",
      "tags": [
        "resourceCalendarMappings"
      ]
    },
    {
      "name": "Appointment Type Resource Mappings",
      "tags": [
        "appointmentTypeResourceMappings"
      ]
    },
    {
      "name": "Availability",
      "tags": [
        "availability"
      ]
    }
  ],
  "tags": []
}