{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://living-bread.org/protocol/v0.1/gathering.schema.json",
  "title": "Kingdom Protocol v0.1: Gathering",
  "description": "A public Christian gathering: a service, a prayer night, a Bible study, a meal, a day of service. Only gatherings their host made public. A gathering that hides its address hides its city too.",
  "type": "object",
  "required": [
    "id",
    "title",
    "starts_at"
  ],
  "properties": {
    "id": {
      "description": "Stable id",
      "type": "string",
      "format": "uuid"
    },
    "slug": {
      "description": "Readable slug",
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "description": "What it is called",
      "type": "string"
    },
    "description": {
      "description": "Up to 4,000 characters",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "service, study, outreach, prayer or other",
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "description": "The host's category",
      "type": [
        "string",
        "null"
      ]
    },
    "starts_at": {
      "description": "Start, UTC",
      "type": "string",
      "format": "date-time"
    },
    "ends_at": {
      "description": "End, UTC",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "timezone": {
      "description": "IANA time zone when the host gave one",
      "type": [
        "string",
        "null"
      ]
    },
    "attendance_mode": {
      "description": "In person, online or both",
      "type": [
        "string",
        "null"
      ]
    },
    "is_online": {
      "description": "Online gathering",
      "type": [
        "boolean",
        "null"
      ]
    },
    "place_name": {
      "description": "Venue name, never a private home",
      "type": [
        "string",
        "null"
      ]
    },
    "neighborhood": {
      "description": "Neighborhood",
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "description": "City (null when the address is private)",
      "type": [
        "string",
        "null"
      ]
    },
    "region": {
      "description": "State or region",
      "type": [
        "string",
        "null"
      ]
    },
    "country": {
      "description": "ISO country code",
      "type": [
        "string",
        "null"
      ]
    },
    "lat": {
      "description": "Latitude, three decimals, null when private",
      "type": [
        "number",
        "null"
      ]
    },
    "lon": {
      "description": "Longitude, three decimals, null when private",
      "type": [
        "number",
        "null"
      ]
    },
    "online_url": {
      "description": "Join or livestream link when online",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "external_url": {
      "description": "Host's own page",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "image_url": {
      "description": "Image",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "is_free": {
      "description": "Free to attend",
      "type": [
        "boolean",
        "null"
      ]
    },
    "cost_label": {
      "description": "Cost in the host's words",
      "type": [
        "string",
        "null"
      ]
    },
    "language": {
      "description": "Language",
      "type": [
        "string",
        "null"
      ]
    },
    "beginner_friendly": {
      "description": "Welcoming to newcomers",
      "type": [
        "boolean",
        "null"
      ]
    },
    "childcare": {
      "description": "Childcare offered",
      "type": [
        "boolean",
        "null"
      ]
    },
    "accessibility": {
      "description": "Accessibility notes",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "object"
        ]
      }
    },
    "scripture_ref": {
      "description": "A Scripture reference the host chose",
      "type": [
        "string",
        "null"
      ]
    },
    "host": {
      "description": "kind (church, community or believer), id, name, verified; a person host is only ever A believer",
      "type": [
        "object",
        "null"
      ]
    },
    "source": {
      "description": "name, url, last_verified_at when mirrored from a church's own calendar",
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "description": "scheduled, published or cancelled",
      "type": [
        "string",
        "null"
      ]
    },
    "updated_at": {
      "description": "Last change",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "additionalProperties": true,
  "x-lb-urn": "lb:gathering:<uuid>",
  "x-lb-schema-org": "https://schema.org/Event",
  "x-lb-door": "/api/gathering/{uuid}, /api/gatherings, the feeds and ICS calendars",
  "x-lb-license": "Directory data CC BY 4.0. Words written by people remain theirs; quote with attribution."
}