{
  "openapi": "3.1.0",
  "info": {
    "title": "Daysli API",
    "version": "v1",
    "summary": "Connect the day. Protect the journal.",
    "description": "Read a Daysli owner’s free time, events, to-dos and requests, send them requests, and hear when things change — only as far as the owner allows. The journal is never available, through any scope, route or event."
  },
  "servers": [
    {
      "url": "https://beta-pages.daysli.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A personal token (`dsl_pat_…`, or `dsl_test_…` in test mode) from Settings → Developer, or an OAuth access token (`dsl_at_…`). Scopes: `profile:read` — See your name, username and timezone; `availability:read` — See your appointment types and when you’re free; `events:read` — See your calendar events and appointments; `tasks:read` — See your to-dos; `requests:read` — See requests people send you; `requests:contact` — See the email and phone number of people who send you requests; `requests:create` — Send requests to you, which you accept or decline; `webhooks` — Be told when these things change."
      }
    },
    "headers": {
      "RateLimit": {
        "description": "RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds).",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "bad_request",
                  "invalid_token",
                  "token_expired",
                  "insufficient_scope",
                  "app_suspended",
                  "not_found",
                  "method_not_allowed",
                  "slot_unavailable",
                  "invalid_transition",
                  "invalid_input",
                  "idempotency_mismatch",
                  "rate_limited",
                  "too_many_pending",
                  "internal",
                  "unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/me": {
      "get": {
        "operationId": "getAccount",
        "summary": "The account this token acts for",
        "description": "Who the token belongs to, as this token sees them: a stable account id, the scopes granted, whether it is a live or test token, and the profile with `profile:read`. Use it to check a token and to learn what it may do.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "pattern": "^acct_[A-Za-z0-9_-]{22}$"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "profile:read",
                          "availability:read",
                          "events:read",
                          "tasks:read",
                          "requests:read",
                          "requests:contact",
                          "requests:create",
                          "webhooks"
                        ]
                      }
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "live",
                        "test"
                      ]
                    },
                    "profile": {
                      "type": "object",
                      "properties": {
                        "displayName": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        },
                        "publicUrl": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "locale": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "displayName",
                        "username",
                        "publicUrl",
                        "timezone",
                        "locale"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "accountId",
                    "scopes",
                    "mode"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointment-types": {
      "get": {
        "operationId": "listAppointmentTypes",
        "summary": "Appointment types",
        "description": "The appointment types people can book, in the owner’s order. `404 not_found` while the owner’s booking is off.",
        "security": [
          {
            "bearer": [
              "availability:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "durationMinutes": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "durationMinutes"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "Free times for an appointment type",
        "description": "Free slots for one appointment type over up to 14 days in the timezone you name, from the same engine and rules as the owner’s booking page: working hours, minimum notice, the booking window, buffers, holidays, blocked dates and busy time. Only free time is ever returned — never why other times are not free.",
        "security": [
          {
            "bearer": [
              "availability:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "appointmentTypeId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "tz",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "appointmentTypeId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "start": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          },
                          "end": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "start",
                          "end"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "hasSlots": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "date",
                          "hasSlots"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "appointmentTypeId",
                    "timezone",
                    "slots",
                    "days"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Calendar events in a window",
        "description": "Events and accepted appointments between two instants (at most 62 days), repeating events expanded into their occurrences, in start order. Notes, participants and busy time imported from other calendars are never included.",
        "security": [
          {
            "bearer": [
              "events:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(@\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z)?$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "start": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          },
                          "end": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          },
                          "allDay": {
                            "type": "boolean"
                          },
                          "startDate": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "endDate": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "showAs": {
                            "type": "string",
                            "enum": [
                              "busy",
                              "free"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "confirmed",
                              "cancelled"
                            ]
                          },
                          "calendar": {
                            "type": "string"
                          },
                          "location": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isAppointment": {
                            "type": "boolean"
                          },
                          "requestId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "occurrenceOf": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "start",
                          "end",
                          "allDay",
                          "startDate",
                          "endDate",
                          "timezone",
                          "showAs",
                          "status",
                          "calendar",
                          "location",
                          "url",
                          "isAppointment",
                          "requestId",
                          "occurrenceOf",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "deletedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "summary": "One event or occurrence",
        "description": "An event by id, or one occurrence of a repeating event by `<series id>@<original start>` (the id `GET /events` returns for it).",
        "security": [
          {
            "bearer": [
              "events:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(@\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z)?$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "start": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    },
                    "end": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    },
                    "allDay": {
                      "type": "boolean"
                    },
                    "startDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "endDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "showAs": {
                      "type": "string",
                      "enum": [
                        "busy",
                        "free"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "confirmed",
                        "cancelled"
                      ]
                    },
                    "calendar": {
                      "type": "string"
                    },
                    "location": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isAppointment": {
                      "type": "boolean"
                    },
                    "requestId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "occurrenceOf": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "start",
                    "end",
                    "allDay",
                    "startDate",
                    "endDate",
                    "timezone",
                    "showAs",
                    "status",
                    "calendar",
                    "location",
                    "url",
                    "isAppointment",
                    "requestId",
                    "occurrenceOf",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks": {
      "get": {
        "operationId": "listTasks",
        "summary": "To-dos",
        "description": "Open and completed to-dos, oldest change first. Completed ones are returned for 90 days after completion. With `updatedSince`, only what changed since then; add `includeDeleted=true` for what was deleted.",
        "security": [
          {
            "bearer": [
              "tasks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "completed"
              ]
            }
          },
          {
            "name": "dueFrom",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "dueTo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "dueDate": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dueTime": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{2}:\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "timezone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "completed"
                            ]
                          },
                          "completedAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fromRequester": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "requestId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "durationMinutes": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "dueDate",
                          "dueTime",
                          "timezone",
                          "priority",
                          "status",
                          "completedAt",
                          "fromRequester",
                          "requestId",
                          "durationMinutes",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "deletedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}": {
      "get": {
        "operationId": "getTask",
        "summary": "One to-do",
        "description": "A to-do by id.",
        "security": [
          {
            "bearer": [
              "tasks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "dueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueTime": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{2}:\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "timezone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "completed"
                      ]
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fromRequester": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "durationMinutes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updatedAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "description",
                    "dueDate",
                    "dueTime",
                    "timezone",
                    "priority",
                    "status",
                    "completedAt",
                    "fromRequester",
                    "requestId",
                    "durationMinutes",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests": {
      "get": {
        "operationId": "listRequests",
        "summary": "Requests people sent",
        "description": "Appointment and to-do requests, oldest change first. Handled requests are returned for 90 days. Requesters’ email addresses and phone numbers need `requests:contact` as well.",
        "security": [
          {
            "bearer": [
              "requests:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "declined",
                "withdrawn",
                "expired",
                "rescheduled",
                "cancelled",
                "completed"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "appointment",
                "task"
              ]
            }
          },
          {
            "name": "createdByThisToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "appointment",
                              "task"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "declined",
                              "withdrawn",
                              "expired",
                              "rescheduled",
                              "cancelled",
                              "completed"
                            ]
                          },
                          "cancelledBy": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "requester"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "appointmentTypeId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "slot": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                  },
                                  "end": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                  }
                                },
                                "required": [
                                  "start",
                                  "end"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "suggestedDueDate": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "message": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "requester": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phone": {
                                "type": "string"
                              },
                              "contactMethod": {
                                "type": "string",
                                "enum": [
                                  "email",
                                  "phone_call",
                                  "sms",
                                  "whatsapp",
                                  "telegram",
                                  "signal",
                                  "viber",
                                  "wechat",
                                  "imessage",
                                  "other"
                                ]
                              },
                              "contactHandle": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "public",
                              "api"
                            ]
                          },
                          "createdByThisToken": {
                            "type": "boolean"
                          },
                          "test": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          },
                          "updatedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "status",
                          "cancelledBy",
                          "appointmentTypeId",
                          "slot",
                          "suggestedDueDate",
                          "message",
                          "note",
                          "requester",
                          "source",
                          "createdByThisToken",
                          "test",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "deleted": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "deletedAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          }
                        },
                        "required": [
                          "id",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests/{id}": {
      "get": {
        "operationId": "getRequest",
        "summary": "One request",
        "description": "A request by id.",
        "security": [
          {
            "bearer": [
              "requests:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "appointment",
                        "task"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "withdrawn",
                        "expired",
                        "rescheduled",
                        "cancelled",
                        "completed"
                      ]
                    },
                    "cancelledBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "owner",
                            "requester"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "appointmentTypeId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                            },
                            "end": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                            }
                          },
                          "required": [
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "suggestedDueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "contactMethod": {
                          "type": "string",
                          "enum": [
                            "email",
                            "phone_call",
                            "sms",
                            "whatsapp",
                            "telegram",
                            "signal",
                            "viber",
                            "wechat",
                            "imessage",
                            "other"
                          ]
                        },
                        "contactHandle": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "public",
                        "api"
                      ]
                    },
                    "createdByThisToken": {
                      "type": "boolean"
                    },
                    "test": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "cancelledBy",
                    "appointmentTypeId",
                    "slot",
                    "suggestedDueDate",
                    "message",
                    "note",
                    "requester",
                    "source",
                    "createdByThisToken",
                    "test",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests/appointments": {
      "post": {
        "operationId": "createAppointmentRequest",
        "summary": "Ask for an appointment",
        "description": "Sends an appointment request to the owner’s inbox, exactly as their booking page does: the slot is checked again, the same limits apply, and nothing is confirmed until the owner accepts. With `notifyRequester` the requester gets Daysli’s emails and status link; a test token never emails anyone.",
        "security": [
          {
            "bearer": [
              "requests:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "16 to 64 characters (letters, digits, `-`, `_`). The same key with the same body returns the first answer; with a different body, `422 idempotency_mismatch`. Keys last 24 hours.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "appointmentTypeId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "slot": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                      },
                      "end": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "additionalProperties": false
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+[1-9][0-9]{7,14}$"
                      },
                      "contactMethod": {
                        "type": "string",
                        "enum": [
                          "email",
                          "phone_call",
                          "sms",
                          "whatsapp",
                          "telegram",
                          "signal",
                          "viber",
                          "wechat",
                          "imessage",
                          "other"
                        ]
                      },
                      "contactHandle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "requesterTimezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "requesterLocale": {
                    "type": "string",
                    "maxLength": 35,
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
                  },
                  "notifyRequester": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "appointmentTypeId",
                  "slot",
                  "requester",
                  "requesterTimezone",
                  "requesterLocale"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "appointment",
                            "task"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "declined",
                            "withdrawn",
                            "expired",
                            "rescheduled",
                            "cancelled",
                            "completed"
                          ]
                        },
                        "cancelledBy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "owner",
                                "requester"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "appointmentTypeId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "slot": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                },
                                "end": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                }
                              },
                              "required": [
                                "start",
                                "end"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "suggestedDueDate": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "requester": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            },
                            "contactMethod": {
                              "type": "string",
                              "enum": [
                                "email",
                                "phone_call",
                                "sms",
                                "whatsapp",
                                "telegram",
                                "signal",
                                "viber",
                                "wechat",
                                "imessage",
                                "other"
                              ]
                            },
                            "contactHandle": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "public",
                            "api"
                          ]
                        },
                        "createdByThisToken": {
                          "type": "boolean"
                        },
                        "test": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "status",
                        "cancelledBy",
                        "appointmentTypeId",
                        "slot",
                        "suggestedDueDate",
                        "message",
                        "note",
                        "requester",
                        "source",
                        "createdByThisToken",
                        "test",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "statusUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "request",
                    "statusUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "slot_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input, idempotency_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited, too_many_pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests/tasks": {
      "post": {
        "operationId": "createTaskRequest",
        "summary": "Ask for a to-do",
        "description": "Sends a to-do request to the owner’s inbox, exactly as their page does. The owner decides whether it becomes one of their to-dos.",
        "security": [
          {
            "bearer": [
              "requests:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "16 to 64 characters (letters, digits, `-`, `_`). The same key with the same body returns the first answer; with a different body, `422 idempotency_mismatch`. Keys last 24 hours.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "suggestedDueDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254
                      },
                      "phone": {
                        "type": "string",
                        "pattern": "^\\+[1-9][0-9]{7,14}$"
                      },
                      "contactMethod": {
                        "type": "string",
                        "enum": [
                          "email",
                          "phone_call",
                          "sms",
                          "whatsapp",
                          "telegram",
                          "signal",
                          "viber",
                          "wechat",
                          "imessage",
                          "other"
                        ]
                      },
                      "contactHandle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "requesterTimezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "requesterLocale": {
                    "type": "string",
                    "maxLength": 35,
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
                  },
                  "notifyRequester": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "message",
                  "requester",
                  "requesterTimezone",
                  "requesterLocale"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "appointment",
                            "task"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "declined",
                            "withdrawn",
                            "expired",
                            "rescheduled",
                            "cancelled",
                            "completed"
                          ]
                        },
                        "cancelledBy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "owner",
                                "requester"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "appointmentTypeId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "slot": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                },
                                "end": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                                }
                              },
                              "required": [
                                "start",
                                "end"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "suggestedDueDate": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "requester": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            },
                            "contactMethod": {
                              "type": "string",
                              "enum": [
                                "email",
                                "phone_call",
                                "sms",
                                "whatsapp",
                                "telegram",
                                "signal",
                                "viber",
                                "wechat",
                                "imessage",
                                "other"
                              ]
                            },
                            "contactHandle": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "public",
                            "api"
                          ]
                        },
                        "createdByThisToken": {
                          "type": "boolean"
                        },
                        "test": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "status",
                        "cancelledBy",
                        "appointmentTypeId",
                        "slot",
                        "suggestedDueDate",
                        "message",
                        "note",
                        "requester",
                        "source",
                        "createdByThisToken",
                        "test",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "statusUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "request",
                    "statusUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input, idempotency_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited, too_many_pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests/{id}/withdraw": {
      "post": {
        "operationId": "withdrawRequest",
        "summary": "Withdraw a request this token made",
        "description": "Withdraws a request this token created while it is still pending. Requests from anywhere else are `404 not_found`.",
        "security": [
          {
            "bearer": [
              "requests:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "16 to 64 characters (letters, digits, `-`, `_`). The same key with the same body returns the first answer; with a different body, `422 idempotency_mismatch`. Keys last 24 hours.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "appointment",
                        "task"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "withdrawn",
                        "expired",
                        "rescheduled",
                        "cancelled",
                        "completed"
                      ]
                    },
                    "cancelledBy": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "owner",
                            "requester"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "appointmentTypeId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "slot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                            },
                            "end": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                            }
                          },
                          "required": [
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "suggestedDueDate": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "contactMethod": {
                          "type": "string",
                          "enum": [
                            "email",
                            "phone_call",
                            "sms",
                            "whatsapp",
                            "telegram",
                            "signal",
                            "viber",
                            "wechat",
                            "imessage",
                            "other"
                          ]
                        },
                        "contactHandle": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "public",
                        "api"
                      ]
                    },
                    "createdByThisToken": {
                      "type": "boolean"
                    },
                    "test": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "cancelledBy",
                    "appointmentTypeId",
                    "slot",
                    "suggestedDueDate",
                    "message",
                    "note",
                    "requester",
                    "source",
                    "createdByThisToken",
                    "test",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "invalid_transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "idempotency_mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhook-events": {
      "get": {
        "operationId": "listWebhookEvents",
        "summary": "Catch up on webhook events",
        "description": "The events this token was entitled to since an instant (at most 30 days back), oldest first: the same payloads the webhooks deliver, for a receiver that was down.",
        "security": [
          {
            "bearer": [
              "webhooks"
            ]
          }
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 512,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "request.created",
                              "request.withdrawn",
                              "request.accepted",
                              "request.declined",
                              "request.expired",
                              "appointment.rescheduled",
                              "appointment.confirmed",
                              "appointment.cancelled",
                              "appointment.completed",
                              "task.created",
                              "task.updated",
                              "task.completed",
                              "task.deleted",
                              "event.created",
                              "event.updated",
                              "event.deleted",
                              "authorization.revoked",
                              "ping"
                            ]
                          },
                          "apiVersion": {
                            "type": "string",
                            "const": "v1"
                          },
                          "occurredAt": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                          },
                          "account": {
                            "type": "string",
                            "pattern": "^acct_[A-Za-z0-9_-]{22}$"
                          },
                          "test": {
                            "type": "boolean"
                          },
                          "data": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "object": {
                                    "type": "string",
                                    "enum": [
                                      "request",
                                      "task",
                                      "event"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  }
                                },
                                "required": [
                                  "object",
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "object": {
                                    "type": "string",
                                    "const": "authorization"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner",
                                      "expired",
                                      "inactive",
                                      "app_suspended",
                                      "refresh_reuse",
                                      "account_deleted"
                                    ]
                                  }
                                },
                                "required": [
                                  "object",
                                  "reason"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "object": {
                                    "type": "string",
                                    "const": "ping"
                                  }
                                },
                                "required": [
                                  "object"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "apiVersion",
                          "occurredAt",
                          "account",
                          "test",
                          "data"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhook-events/{id}": {
      "get": {
        "operationId": "getWebhookEvent",
        "summary": "One webhook event",
        "description": "A webhook event by id.",
        "security": [
          {
            "bearer": [
              "webhooks"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "$ref": "#/components/headers/RateLimit"
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "request.created",
                        "request.withdrawn",
                        "request.accepted",
                        "request.declined",
                        "request.expired",
                        "appointment.rescheduled",
                        "appointment.confirmed",
                        "appointment.cancelled",
                        "appointment.completed",
                        "task.created",
                        "task.updated",
                        "task.completed",
                        "task.deleted",
                        "event.created",
                        "event.updated",
                        "event.deleted",
                        "authorization.revoked",
                        "ping"
                      ]
                    },
                    "apiVersion": {
                      "type": "string",
                      "const": "v1"
                    },
                    "occurredAt": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
                    },
                    "account": {
                      "type": "string",
                      "pattern": "^acct_[A-Za-z0-9_-]{22}$"
                    },
                    "test": {
                      "type": "boolean"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "enum": [
                                "request",
                                "task",
                                "event"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            }
                          },
                          "required": [
                            "object",
                            "id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "const": "authorization"
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "owner",
                                "expired",
                                "inactive",
                                "app_suspended",
                                "refresh_reuse",
                                "account_deleted"
                              ]
                            }
                          },
                          "required": [
                            "object",
                            "reason"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "const": "ping"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "apiVersion",
                    "occurredAt",
                    "account",
                    "test",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "invalid_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "insufficient_scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}