{
  "openapi": "3.1.0",
  "info": {
    "title": "Minute Notary Public API",
    "version": "1.0.0",
    "summary": "Read-only public data from Minute Notary, an online notary and commissioner of oaths in Ontario, Canada.",
    "description": "Next open appointment times and the list of Ontario court forms that require a commissioner. No API key and no login. Every endpoint is read-only and returns no client data.\n\nTo check a sealed document from code, use the open-source verifier sealed-pdf-verify (https://github.com/minutenotary/sealed-pdf-verify): the online check at https://minutenotary.ca/verify is for people in a browser and is protected against automated requests.",
    "contact": {
      "name": "Minute Notary",
      "url": "https://minutenotary.ca",
      "email": "info@minutenotary.ca"
    }
  },
  "externalDocs": {
    "description": "Minute Notary website",
    "url": "https://minutenotary.ca"
  },
  "servers": [
    {
      "url": "https://minutenotary.ca"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Appointments",
      "description": "When the next online appointment can start."
    },
    {
      "name": "Court forms",
      "description": "Ontario court forms that require a commissioner."
    }
  ],
  "paths": {
    "/api/book/availability-preview": {
      "get": {
        "operationId": "getNextAppointmentTimes",
        "tags": ["Appointments"],
        "summary": "Next open appointment times",
        "description": "Up to 4 of the next open start times, looking 7 days ahead. To book one, the customer goes to https://minutenotary.ca/book. Limit: 300 requests per minute per IP address.",
        "responses": {
          "200": {
            "description": "The next open times. `slots` is empty when none are open in the next 7 days.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityPreview"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "description": "Times could not be loaded right now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Failure"
                }
              }
            }
          }
        }
      }
    },
    "/court-forms/ontario-sworn-court-forms.csv": {
      "get": {
        "operationId": "getOntarioSwornCourtForms",
        "tags": ["Court forms"],
        "summary": "Ontario court forms that require a commissioner",
        "description": "One row per form: court, form number, title, whether it can be sworn over video, when it is needed, and links to the form. Licensed CC BY 4.0: credit Minute Notary. Browse it at https://minutenotary.ca/court-forms.",
        "responses": {
          "200": {
            "description": "The dataset as CSV, with a header row.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "TooManyRequests": {
        "description": "Too many requests from this IP address.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Failure"
            }
          }
        }
      }
    },
    "schemas": {
      "AvailabilityPreview": {
        "type": "object",
        "required": ["success", "slots", "timeZone", "timeZoneLabel"],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "slots": {
            "type": "array",
            "maxItems": 4,
            "items": {
              "$ref": "#/components/schemas/AppointmentTime"
            }
          },
          "timeZone": {
            "type": "string",
            "examples": ["America/Toronto"]
          },
          "timeZoneLabel": {
            "type": "string",
            "examples": ["Eastern Time (EST)"]
          }
        }
      },
      "AppointmentTime": {
        "type": "object",
        "required": [
          "startIso",
          "localDate",
          "startTime",
          "dateLabel",
          "timeLabel",
          "timeZoneLabel"
        ],
        "properties": {
          "startIso": {
            "type": "string",
            "format": "date-time",
            "examples": ["2026-11-05T12:00:00.000Z"]
          },
          "localDate": {
            "type": "string",
            "format": "date",
            "examples": ["2026-11-05"]
          },
          "startTime": {
            "type": "string",
            "examples": ["07:00"]
          },
          "dateLabel": {
            "type": "string",
            "examples": ["Thu, Nov 5"]
          },
          "timeLabel": {
            "type": "string",
            "examples": ["7:00 a.m."]
          },
          "timeZoneLabel": {
            "type": "string",
            "examples": ["Eastern Time (EST)"]
          }
        }
      },
      "Failure": {
        "type": "object",
        "required": ["success", "error"],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
