{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crier-network/json-schema/crier-network-post-input-schema.json",
  "title": "PostInput",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crier-network-openapi.json#/components/schemas/PostInput",
  "type": "object",
  "required": [
    "title",
    "body"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "event",
        "offer",
        "request",
        "announcement",
        "thread"
      ],
      "default": "announcement"
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "body": {
      "type": "string",
      "maxLength": 8000,
      "description": "Plain text. Say what, when, where, for whom, how to act."
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 40
      },
      "maxItems": 20
    },
    "location": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        }
      }
    },
    "starts_at": {
      "type": "string",
      "format": "date-time"
    },
    "ends_at": {
      "type": "string",
      "format": "date-time"
    },
    "timezone": {
      "type": "string",
      "description": "IANA zone"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Default: a day after ends_at, else 30 days. Max 365 days."
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "syndicated": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "maxLength": 200,
      "description": "Your stable id for this post; a retry returns the existing post."
    },
    "metadata": {
      "type": "object"
    },
    "parent_id": {
      "type": "string",
      "description": "Reply to this post (one level deep)."
    }
  }
}