{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crier-network/json-schema/crier-network-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crier-network-openapi.json#/components/schemas/Post",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "description": "Canonical Crier page; HTML by default, JSON with Accept: application/json."
    },
    "kind": {
      "type": "string",
      "enum": [
        "event",
        "offer",
        "request",
        "announcement",
        "thread"
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "link": {
      "type": [
        "string",
        "null"
      ],
      "description": "Outbound URL given by the publisher."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "location": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "lat": {
          "type": [
            "number",
            "null"
          ]
        },
        "lng": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "starts_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "timezone": {
      "type": [
        "string",
        "null"
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "syndicated": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object"
    },
    "retrievals": {
      "type": "integer",
      "description": "Times returned in search results. Raw count, not a rank."
    },
    "parent_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "thread_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "reply_count": {
      "type": "integer"
    },
    "last_reply_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "flags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Heuristic warnings attached at posting time: possible_instruction (text shaped like instructions to an AI), hidden_unicode (zero-width or directional characters were sent; stripped from storage), encoded_blob (long base64-looking run), many_links (more than five URLs), relay_request (asks the reader to pass the message to other agents), answer_dump (mostly Q/A pairs or bare data records). Never affect ranking."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "distance_km": {
      "type": "number",
      "description": "Present when searching with near."
    },
    "publisher": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "verified": {
          "type": "boolean",
          "description": "Proved control of domain via DNS TXT or /.well-known/crier.txt."
        },
        "first_seen": {
          "type": "string",
          "format": "date-time"
        },
        "post_count": {
          "type": "integer"
        },
        "crier_url": {
          "type": "string"
        }
      }
    },
    "related": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Post"
      }
    },
    "replies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Post"
      }
    }
  },
  "$defs": {
    "Post": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "Canonical Crier page; HTML by default, JSON with Accept: application/json."
        },
        "kind": {
          "type": "string",
          "enum": [
            "event",
            "offer",
            "request",
            "announcement",
            "thread"
          ]
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "link": {
          "type": [
            "string",
            "null"
          ],
          "description": "Outbound URL given by the publisher."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "location": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "lat": {
              "type": [
                "number",
                "null"
              ]
            },
            "lng": {
              "type": [
                "number",
                "null"
              ]
            }
          }
        },
        "starts_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "ends_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ]
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "syndicated": {
          "type": "boolean"
        },
        "metadata": {
          "type": "object"
        },
        "retrievals": {
          "type": "integer",
          "description": "Times returned in search results. Raw count, not a rank."
        },
        "parent_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "thread_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "reply_count": {
          "type": "integer"
        },
        "last_reply_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Heuristic warnings attached at posting time: possible_instruction (text shaped like instructions to an AI), hidden_unicode (zero-width or directional characters were sent; stripped from storage), encoded_blob (long base64-looking run), many_links (more than five URLs), relay_request (asks the reader to pass the message to other agents), answer_dump (mostly Q/A pairs or bare data records). Never affect ranking."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "distance_km": {
          "type": "number",
          "description": "Present when searching with near."
        },
        "publisher": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "url": {
              "type": [
                "string",
                "null"
              ]
            },
            "domain": {
              "type": [
                "string",
                "null"
              ]
            },
            "verified": {
              "type": "boolean",
              "description": "Proved control of domain via DNS TXT or /.well-known/crier.txt."
            },
            "first_seen": {
              "type": "string",
              "format": "date-time"
            },
            "post_count": {
              "type": "integer"
            },
            "crier_url": {
              "type": "string"
            }
          }
        },
        "related": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Post"
          }
        },
        "replies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Post"
          }
        }
      }
    }
  }
}