{
  "openapi": "3.0.3",
  "info": {
    "title": "Cally API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://cally.fyi"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "RegisterRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "API Registration Token used to request a signed bearer token from the registration endpoint."
          },
          "validFor": {
            "type": "string",
            "description": "Positive ISO 8601 duration for the issued bearer token."
          }
        },
        "required": [
          "code"
        ],
        "additionalProperties": false
      },
      "CallyCreateRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "startsAt": {
                  "type": "string"
                },
                "endsAt": {
                  "type": "string"
                },
                "timeZone": {
                  "type": "string"
                },
                "allDay": {
                  "type": "boolean"
                },
                "description": {
                  "type": "object",
                  "properties": {
                    "plain": {
                      "type": "string"
                    },
                    "html": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "location": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "TENTATIVE",
                    "CONFIRMED",
                    "CANCELLED"
                  ]
                },
                "recurrence": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "type": "object",
                      "properties": {
                        "freq": {
                          "type": "string",
                          "enum": [
                            "SECONDLY",
                            "MINUTELY",
                            "HOURLY",
                            "DAILY",
                            "WEEKLY",
                            "MONTHLY",
                            "YEARLY"
                          ]
                        },
                        "interval": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "until": {
                          "type": "string"
                        },
                        "byday": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "MO",
                              "TU",
                              "WE",
                              "TH",
                              "FR",
                              "SA",
                              "SU"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 7
                        },
                        "bymonth": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 12
                          },
                          "minItems": 1,
                          "maxItems": 12
                        },
                        "bymonthday": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -31,
                            "maximum": 31
                          },
                          "minItems": 1,
                          "maxItems": 31
                        },
                        "bysetpos": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -366,
                            "maximum": 366
                          },
                          "minItems": 1,
                          "maxItems": 366
                        },
                        "wkst": {
                          "type": "string",
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ]
                        }
                      },
                      "required": [
                        "freq"
                      ],
                      "additionalProperties": false
                    },
                    "exceptionTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "extraTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "title",
                "startsAt",
                "endsAt",
                "timeZone"
              ],
              "additionalProperties": false
            },
            "maxItems": 500
          }
        },
        "required": [
          "title"
        ],
        "additionalProperties": false
      },
      "CallyPatchRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CallyPutRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "startsAt": {
                  "type": "string"
                },
                "endsAt": {
                  "type": "string"
                },
                "timeZone": {
                  "type": "string"
                },
                "allDay": {
                  "type": "boolean"
                },
                "description": {
                  "type": "object",
                  "properties": {
                    "plain": {
                      "type": "string"
                    },
                    "html": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "location": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "TENTATIVE",
                    "CONFIRMED",
                    "CANCELLED"
                  ]
                },
                "recurrence": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "type": "object",
                      "properties": {
                        "freq": {
                          "type": "string",
                          "enum": [
                            "SECONDLY",
                            "MINUTELY",
                            "HOURLY",
                            "DAILY",
                            "WEEKLY",
                            "MONTHLY",
                            "YEARLY"
                          ]
                        },
                        "interval": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "until": {
                          "type": "string"
                        },
                        "byday": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "MO",
                              "TU",
                              "WE",
                              "TH",
                              "FR",
                              "SA",
                              "SU"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 7
                        },
                        "bymonth": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 12
                          },
                          "minItems": 1,
                          "maxItems": 12
                        },
                        "bymonthday": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -31,
                            "maximum": 31
                          },
                          "minItems": 1,
                          "maxItems": 31
                        },
                        "bysetpos": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -366,
                            "maximum": 366
                          },
                          "minItems": 1,
                          "maxItems": 366
                        },
                        "wkst": {
                          "type": "string",
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ]
                        }
                      },
                      "required": [
                        "freq"
                      ],
                      "additionalProperties": false
                    },
                    "exceptionTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "extraTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    }
                  },
                  "required": [
                    "rule"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "title",
                "startsAt",
                "endsAt",
                "timeZone"
              ],
              "additionalProperties": false
            },
            "maxItems": 500
          }
        },
        "required": [
          "title",
          "events"
        ],
        "additionalProperties": false
      },
      "EventCreateRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "allDay": {
            "type": "boolean"
          },
          "description": {
            "type": "object",
            "properties": {
              "plain": {
                "type": "string"
              },
              "html": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "location": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "TENTATIVE",
              "CONFIRMED",
              "CANCELLED"
            ]
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "rule": {
                "type": "object",
                "properties": {
                  "freq": {
                    "type": "string",
                    "enum": [
                      "SECONDLY",
                      "MINUTELY",
                      "HOURLY",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY",
                      "YEARLY"
                    ]
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "until": {
                    "type": "string"
                  },
                  "byday": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MO",
                        "TU",
                        "WE",
                        "TH",
                        "FR",
                        "SA",
                        "SU"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 7
                  },
                  "bymonth": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "minItems": 1,
                    "maxItems": 12
                  },
                  "bymonthday": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -31,
                      "maximum": 31
                    },
                    "minItems": 1,
                    "maxItems": 31
                  },
                  "bysetpos": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -366,
                      "maximum": 366
                    },
                    "minItems": 1,
                    "maxItems": 366
                  },
                  "wkst": {
                    "type": "string",
                    "enum": [
                      "MO",
                      "TU",
                      "WE",
                      "TH",
                      "FR",
                      "SA",
                      "SU"
                    ]
                  }
                },
                "required": [
                  "freq"
                ],
                "additionalProperties": false
              },
              "exceptionTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              },
              "extraTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              }
            },
            "required": [
              "rule"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "title",
          "startsAt",
          "endsAt",
          "timeZone"
        ],
        "additionalProperties": false
      },
      "EventPatchRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "allDay": {
            "type": "boolean"
          },
          "description": {
            "type": "object",
            "properties": {
              "plain": {
                "type": "string"
              },
              "html": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "location": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "TENTATIVE",
              "CONFIRMED",
              "CANCELLED"
            ]
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "rule": {
                "type": "object",
                "properties": {
                  "freq": {
                    "type": "string",
                    "enum": [
                      "SECONDLY",
                      "MINUTELY",
                      "HOURLY",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY",
                      "YEARLY"
                    ]
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "until": {
                    "type": "string"
                  },
                  "byday": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MO",
                        "TU",
                        "WE",
                        "TH",
                        "FR",
                        "SA",
                        "SU"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 7
                  },
                  "bymonth": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "minItems": 1,
                    "maxItems": 12
                  },
                  "bymonthday": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -31,
                      "maximum": 31
                    },
                    "minItems": 1,
                    "maxItems": 31
                  },
                  "bysetpos": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -366,
                      "maximum": 366
                    },
                    "minItems": 1,
                    "maxItems": 366
                  },
                  "wkst": {
                    "type": "string",
                    "enum": [
                      "MO",
                      "TU",
                      "WE",
                      "TH",
                      "FR",
                      "SA",
                      "SU"
                    ]
                  }
                },
                "required": [
                  "freq"
                ],
                "additionalProperties": false
              },
              "exceptionTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              },
              "extraTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              }
            },
            "required": [
              "rule"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "EventPutRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "allDay": {
            "type": "boolean"
          },
          "description": {
            "type": "object",
            "properties": {
              "plain": {
                "type": "string"
              },
              "html": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "location": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "TENTATIVE",
              "CONFIRMED",
              "CANCELLED"
            ]
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "rule": {
                "type": "object",
                "properties": {
                  "freq": {
                    "type": "string",
                    "enum": [
                      "SECONDLY",
                      "MINUTELY",
                      "HOURLY",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY",
                      "YEARLY"
                    ]
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "until": {
                    "type": "string"
                  },
                  "byday": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MO",
                        "TU",
                        "WE",
                        "TH",
                        "FR",
                        "SA",
                        "SU"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 7
                  },
                  "bymonth": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "minItems": 1,
                    "maxItems": 12
                  },
                  "bymonthday": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -31,
                      "maximum": 31
                    },
                    "minItems": 1,
                    "maxItems": 31
                  },
                  "bysetpos": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -366,
                      "maximum": 366
                    },
                    "minItems": 1,
                    "maxItems": 366
                  },
                  "wkst": {
                    "type": "string",
                    "enum": [
                      "MO",
                      "TU",
                      "WE",
                      "TH",
                      "FR",
                      "SA",
                      "SU"
                    ]
                  }
                },
                "required": [
                  "freq"
                ],
                "additionalProperties": false
              },
              "exceptionTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              },
              "extraTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              }
            },
            "required": [
              "rule"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "title",
          "startsAt",
          "endsAt",
          "timeZone"
        ],
        "additionalProperties": false
      },
      "PublicCally": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "startsAt": {
                  "type": "string"
                },
                "endsAt": {
                  "type": "string"
                },
                "timeZone": {
                  "type": "string"
                },
                "allDay": {
                  "type": "boolean"
                },
                "description": {
                  "type": "object",
                  "properties": {
                    "plain": {
                      "type": "string"
                    },
                    "html": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "location": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "TENTATIVE",
                    "CONFIRMED",
                    "CANCELLED"
                  ]
                },
                "recurrence": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "type": "object",
                      "properties": {
                        "freq": {
                          "type": "string",
                          "enum": [
                            "SECONDLY",
                            "MINUTELY",
                            "HOURLY",
                            "DAILY",
                            "WEEKLY",
                            "MONTHLY",
                            "YEARLY"
                          ]
                        },
                        "interval": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "until": {
                          "type": "string"
                        },
                        "byday": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "MO",
                              "TU",
                              "WE",
                              "TH",
                              "FR",
                              "SA",
                              "SU"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 7
                        },
                        "bymonth": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 12
                          },
                          "minItems": 1,
                          "maxItems": 12
                        },
                        "bymonthday": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -31,
                            "maximum": 31
                          },
                          "minItems": 1,
                          "maxItems": 31
                        },
                        "bysetpos": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -366,
                            "maximum": 366
                          },
                          "minItems": 1,
                          "maxItems": 366
                        },
                        "wkst": {
                          "type": "string",
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ]
                        }
                      },
                      "required": [
                        "freq"
                      ],
                      "additionalProperties": false
                    },
                    "exceptionTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "extraTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "rrule": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "rule",
                    "rrule"
                  ],
                  "additionalProperties": false
                },
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "startsAt",
                "endsAt",
                "timeZone",
                "allDay",
                "status",
                "id",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "public": {
                "type": "object",
                "properties": {
                  "web": {
                    "type": "string"
                  },
                  "subscription": {
                    "type": "string"
                  }
                },
                "required": [
                  "web",
                  "subscription"
                ]
              },
              "admin": {
                "type": "object",
                "properties": {
                  "web": {
                    "type": "string"
                  }
                },
                "required": [
                  "web"
                ]
              }
            },
            "required": [
              "public"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "events",
          "links"
        ]
      },
      "PrivateCally": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "startsAt": {
                  "type": "string"
                },
                "endsAt": {
                  "type": "string"
                },
                "timeZone": {
                  "type": "string"
                },
                "allDay": {
                  "type": "boolean"
                },
                "description": {
                  "type": "object",
                  "properties": {
                    "plain": {
                      "type": "string"
                    },
                    "html": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "location": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "TENTATIVE",
                    "CONFIRMED",
                    "CANCELLED"
                  ]
                },
                "recurrence": {
                  "type": "object",
                  "properties": {
                    "rule": {
                      "type": "object",
                      "properties": {
                        "freq": {
                          "type": "string",
                          "enum": [
                            "SECONDLY",
                            "MINUTELY",
                            "HOURLY",
                            "DAILY",
                            "WEEKLY",
                            "MONTHLY",
                            "YEARLY"
                          ]
                        },
                        "interval": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "until": {
                          "type": "string"
                        },
                        "byday": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "MO",
                              "TU",
                              "WE",
                              "TH",
                              "FR",
                              "SA",
                              "SU"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 7
                        },
                        "bymonth": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 12
                          },
                          "minItems": 1,
                          "maxItems": 12
                        },
                        "bymonthday": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -31,
                            "maximum": 31
                          },
                          "minItems": 1,
                          "maxItems": 31
                        },
                        "bysetpos": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -366,
                            "maximum": 366
                          },
                          "minItems": 1,
                          "maxItems": 366
                        },
                        "wkst": {
                          "type": "string",
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ]
                        }
                      },
                      "required": [
                        "freq"
                      ],
                      "additionalProperties": false
                    },
                    "exceptionTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "extraTimes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 500
                    },
                    "rrule": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "rule",
                    "rrule"
                  ],
                  "additionalProperties": false
                },
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "startsAt",
                "endsAt",
                "timeZone",
                "allDay",
                "status",
                "id",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "public": {
                "type": "object",
                "properties": {
                  "web": {
                    "type": "string"
                  },
                  "subscription": {
                    "type": "string"
                  }
                },
                "required": [
                  "web",
                  "subscription"
                ]
              },
              "admin": {
                "type": "object",
                "properties": {
                  "web": {
                    "type": "string"
                  }
                },
                "required": [
                  "web"
                ]
              }
            },
            "required": [
              "public"
            ]
          },
          "editId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "events",
          "links",
          "editId"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "allDay": {
            "type": "boolean"
          },
          "description": {
            "type": "object",
            "properties": {
              "plain": {
                "type": "string"
              },
              "html": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "location": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "TENTATIVE",
              "CONFIRMED",
              "CANCELLED"
            ]
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "rule": {
                "type": "object",
                "properties": {
                  "freq": {
                    "type": "string",
                    "enum": [
                      "SECONDLY",
                      "MINUTELY",
                      "HOURLY",
                      "DAILY",
                      "WEEKLY",
                      "MONTHLY",
                      "YEARLY"
                    ]
                  },
                  "interval": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "until": {
                    "type": "string"
                  },
                  "byday": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "MO",
                        "TU",
                        "WE",
                        "TH",
                        "FR",
                        "SA",
                        "SU"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 7
                  },
                  "bymonth": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 12
                    },
                    "minItems": 1,
                    "maxItems": 12
                  },
                  "bymonthday": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -31,
                      "maximum": 31
                    },
                    "minItems": 1,
                    "maxItems": 31
                  },
                  "bysetpos": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -366,
                      "maximum": 366
                    },
                    "minItems": 1,
                    "maxItems": 366
                  },
                  "wkst": {
                    "type": "string",
                    "enum": [
                      "MO",
                      "TU",
                      "WE",
                      "TH",
                      "FR",
                      "SA",
                      "SU"
                    ]
                  }
                },
                "required": [
                  "freq"
                ],
                "additionalProperties": false
              },
              "exceptionTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              },
              "extraTimes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500
              },
              "rrule": {
                "type": "string"
              }
            },
            "required": [
              "rule",
              "rrule"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "startsAt",
          "endsAt",
          "timeZone",
          "allDay",
          "status",
          "id",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "TokenResponse": {
        "type": "object",
        "properties": {
          "bearer": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "bearer",
          "expiresAt"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/api/v1/register": {
      "post": {
        "summary": "Register a bearer token",
        "description": "Exchanges an API Registration Token for a signed bearer token that can be used with write endpoints.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bearer token created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "403": {
            "description": "Forbidden"
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/v1/cally": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallyCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Cally created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateCally"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/v1/cally/{calid}": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCally"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v1/cally/{calid}/edit/{editid}": {
      "get": {
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateCally"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallyPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateCally"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallyPutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateCally"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v1/cally/{calid}/edit/{editid}/events": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Event created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v1/cally/{calid}/edit/{editid}/events/{eventid}": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "eventid",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "eventid",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventPutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "editid",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "eventid",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  }
}
