{
  "schemaVersion": "1.0",
  "product": "topcal",
  "humanPage": "https://topcal.ai/developers",
  "agentMarkdown": "https://topcal.ai/developers.md",
  "skill": "https://topcal.ai/skill/SKILL.md",
  "exploreEndpoints": {
    "label": "Explore endpoints",
    "docs": "https://app.topcal.ai/docs",
    "openapi": "https://app.topcal.ai/api/v1/openapi",
    "discovery": "https://app.topcal.ai/.well-known/agent-discovery.json"
  },
  "origins": {
    "public": "https://topcal.ai",
    "app": "https://app.topcal.ai"
  },
  "jobs": [
    {
      "id": "guest_book",
      "title": "Book a public link",
      "requiresApiKey": false,
      "antiAbuse": "email-otp",
      "bookingUrl": "https://topcal.ai/{workspace}/{username}/{eventSlug}",
      "restBase": "https://topcal.ai/api/v1/public",
      "get": [
        {
          "method": "GET",
          "path": "/api/v1/public/{workspace}/{username}",
          "purpose": "List their event types and any form fields you must collect."
        },
        {
          "method": "GET",
          "path": "/api/v1/public/{workspace}/{username}/{eventSlug}/slots?timezone={IANA}",
          "purpose": "Read open times. Each slot has UTC and a local display string."
        },
        {
          "method": "GET",
          "path": "/api/v1/public/{workspace}/{username}/{eventSlug}/otp?email=&startAt=&timezone=&name=",
          "purpose": "Email the code. Response has confirmUrl — use that, not a token field."
        },
        {
          "method": "GET",
          "path": "{confirmUrl}&code={6 digits}",
          "purpose": "Confirm with the digits the guest read from email. Never guess."
        }
      ],
      "post": [
        {
          "method": "POST",
          "path": "/api/v1/public/{workspace}/{username}/{eventSlug}/otp",
          "purpose": "Same code email. Body: { email, name? }."
        },
        {
          "method": "POST",
          "path": "/api/v1/public/{workspace}/{username}/{eventSlug}/book",
          "purpose": "Finish the booking. Body: { startAt, code, invitee, customFields? }."
        }
      ],
      "mcp": {
        "url": "https://topcal.ai/api/mcp/public/mcp",
        "transport": "streamable-http",
        "requiresAuth": false,
        "tools": [
          {
            "name": "find_bookable_calendar",
            "purpose": "Start here. Workspace + username → events and form fields."
          },
          {
            "name": "get_availability",
            "purpose": "Open slots for one event. Pass the guest's IANA timezone."
          },
          {
            "name": "request_booking_code",
            "purpose": "Email a 6-digit code to the guest."
          },
          {
            "name": "confirm_booking",
            "purpose": "Book with startAt, the code, invitee, and optional customFields."
          }
        ]
      },
      "customFields": "Pass requiredFieldKeys from GET …/{username} as customFields on book."
    },
    {
      "id": "host_setup",
      "title": "Share your own link",
      "requiresApiKey": false,
      "auth": "device-auth — topcal auth register opens a browser approve page",
      "steps": [
        "Paste the skill into Cursor, Claude, or ChatGPT.",
        "Approve in the browser at app.topcal.ai/cli/approve. No key to copy.",
        "Connect Google or Microsoft. Share topcal.ai/{workspace}/{you}/{event}."
      ],
      "cli": {
        "package": "@topcal/cli",
        "setup": "npm install -g @topcal/cli\n\ntopcal auth register --wait auto --url https://app.topcal.ai --client-name cursor --agent-name topcal\ntopcal auth status --json\ntopcal calendars connect --provider google\ntopcal calendars status --json"
      },
      "openapi": "https://app.topcal.ai/api/v1/openapi",
      "docs": "https://app.topcal.ai/docs",
      "mcp": "https://app.topcal.ai/api/mcp/mcp",
      "discovery": "https://app.topcal.ai/.well-known/agent-discovery.json",
      "agentGuide": "https://app.topcal.ai/signup/agents",
      "skill": "https://topcal.ai/skill/SKILL.md"
    }
  ],
  "rules": [
    "Guest bookings use the guest's email. They confirm the code. You book on their behalf.",
    "Never invent API keys or codes. Hosts run topcal auth register.",
    "Public booking lives on topcal.ai. Sign-in and host API live on app.topcal.ai.",
    "Read slots JSON. Do not scrape the HTML booking page.",
    "A website button is an HTML link (app.topcal.ai/docs/embed), not a REST integration.",
    "Cancel and reschedule need the manage token from the confirmation email."
  ],
  "related": {
    "llms": "https://topcal.ai/llms.txt",
    "pricingMarkdown": "https://topcal.ai/pricing.md",
    "pricingJson": "https://topcal.ai/pricing.json",
    "embedGuide": "https://app.topcal.ai/docs/embed"
  }
}