{
  "openapi": "3.1.0",
  "info": {
    "title": "BankPulse machine-readable resources",
    "version": "0.5.0-slice5",
    "description": "BankPulse turns RBI master directions into plain-English points for bankers. This document covers the 10 public, read-only, unauthenticated GET resources BankPulse already serves live (R05 slice 1, plus /changes/index.json added in slice 4), plus the POST /api/ask contract (R64 slice 1) -- an honest first slice of each AUDIT_LEDGER.md item, not the full contract either one calls for. Slice 3 (12 Sep 2026) retyped every property as real JSON Schema, verified with openapi-spec-validator, after that tool proved slice 2's prose-as-schema convention was not actually valid JSON Schema. Slice 4 (12 Sep 2026, same day) documents the change feed's new daily bundle (R63). Slice 5 (13 Sep 2026) documents /changes.json's new integrity_manifest and per-event chain_hash (R63), a sha256 hash chain over every event's own event_id that makes tampering with the published history detectable. Not yet covered, because no source of truth for them exists in this repo yet: quotas/rate limits on the 9 GET resources, a formal change/deprecation policy anywhere, formal licence/redistribution terms, signed webhooks for the change feed, and prompt-injection test results for /api/ask -- see STATE.md WAITING FOR FOUNDER and NEXT BRICK. Free to use. No RBI text is copied here."
  },
  "servers": [
    {
      "url": "https://bankpulse.ai"
    }
  ],
  "x-authentication": "none -- every path below is a public request today, no key or token required anywhere.",
  "x-quotas": "not yet defined for the 10 GET resources; /api/ask has one real limit, 60/hour per hashed IP (see its own x-rate-limit).",
  "x-change-policy": "Pre-1.0 (this document is at 0.4.0-slice4). Checked against git history before writing this: every resource and field published in the first version of this document (10 Sep 2026) is still present, unchanged, today -- only new resources have been added (ask_index_meta.json through sitemap.xml on day one, POST /api/ask and /changes.json 12 Sep, /changes/index.json same day). No field has ever been removed or renamed. That said, no formal notice period for a future removal is agreed yet -- while this document is below version 1.0, a field could in principle change without notice, even though none has. A firm minimum-notice commitment for after 1.0 is a founder decision, not yet made.",
  "x-licence": "Free to use. No RBI text is copied here. Formal licence/redistribution terms beyond this sentence are not yet decided -- see STATE.md WAITING FOR FOUNDER.",
  "x-bulk-snapshot": "documents.json and mydesk.json are already full corpus dumps. Nothing in them is paged, and nothing is sampled. Both are checked at build time. See each resource's own x-bulk-snapshot note below. No separate bulk-download file or endpoint exists. These two do not need one. A change feed exists too: /changes.json, first published on 12 September 2026. It only adds to its end. It never rewrites itself. Every recorded change is one numbered event. So a machine can remember the last number it read. It can ask again later and take only what is above that number. A once-a-day bundle exists too. /changes/index.json lists every day. Each day has its own /changes/YYYY-MM-DD.json file. Signed webhooks still do not exist. That is a real gap, and it is not claimed here.",
  "paths": {
    "/documents.json": {
      "get": {
        "summary": "Every RBI document BankPulse tracks, one row each.",
        "x-notes": "",
        "x-bulk-snapshot": "Yes. Every one of the 2022 tracked documents is in this file's \"documents\" array today. This is checked at build time: the array length equals \"tracked\". It is not a page and not a sample. No separate dump file or endpoint exists. This GET request already is the full snapshot. It is refreshed on every rebuild (see \"generated_at\").",
        "security": [],
        "responses": {
          "200": {
            "description": "Every RBI document BankPulse tracks, one row each.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "what_this_is": {
                      "type": "string"
                    },
                    "generated_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "schema_version": {
                      "type": "integer"
                    },
                    "release_id": {
                      "type": "string",
                      "description": "string (short git SHA)"
                    },
                    "tracked": {
                      "type": "integer"
                    },
                    "with_bankpulse_page": {
                      "type": "integer"
                    },
                    "segments": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "description": "object (segment name -> count)"
                    },
                    "segment_meanings": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "object (segment name -> explanation)"
                    },
                    "coverage_page": {
                      "type": "string",
                      "description": "string (URL)"
                    },
                    "documents": {
                      "type": "array",
                      "description": "array of document objects (see item_fields)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "rbi_date": {
                            "type": "string"
                          },
                          "rbi_url": {
                            "type": "string",
                            "description": "string (URL)"
                          },
                          "read_by_bankpulse": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "string (ISO 8601 UTC) or null"
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "segment": {
                            "type": "string"
                          },
                          "bankpulse_page": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "string (URL) or null"
                          },
                          "why_no_page": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "string or null"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/changes.json": {
      "get": {
        "summary": "Every change BankPulse has recorded, one numbered event each, newest first.",
        "x-notes": "integrity_manifest (added 13 Sep 2026, closes part of R63's \"integrity manifest\" passes-when item): a sha256 hash chain over every event's own immutable event_id, oldest first -- editing, reordering, inserting or deleting any past event changes every chain_hash from that point on. See the field's own how_to_verify for the exact algorithm. The same chain_hash per cursor is also served on every /changes/YYYY-MM-DD.json day bundle. affected_resources (added 13 Sep 2026, closes R63's \"affected resources\" passes-when item) is stored on the event itself, like old/new, so which resources a past event touched never changes on a later build. Signed webhooks, the one remaining open half of R63, do not exist yet -- a real gap, not claimed here.",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Every change BankPulse has recorded, one numbered event each, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "what_this_is": {
                      "type": "string"
                    },
                    "how_to_follow": {
                      "type": "string"
                    },
                    "schema_version": {
                      "type": "integer"
                    },
                    "release_id": {
                      "type": "string",
                      "description": "string (short git SHA)"
                    },
                    "generated_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "times_are": {
                      "type": "string"
                    },
                    "latest_cursor": {
                      "type": "integer"
                    },
                    "oldest_cursor": {
                      "type": "integer"
                    },
                    "total_events": {
                      "type": "integer"
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "events_by_kind": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "description": "object (event kind -> count)"
                    },
                    "event_kinds": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "object (event kind -> explanation)"
                    },
                    "log_started_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "what_is_not_here_yet": {
                      "type": "string"
                    },
                    "seed_note": {
                      "type": "string"
                    },
                    "documents_file": {
                      "type": "string",
                      "description": "string (URL)"
                    },
                    "corrections_page": {
                      "type": "string",
                      "description": "string (URL)"
                    },
                    "integrity_manifest": {
                      "type": "object",
                      "description": "object (see notes)"
                    },
                    "events": {
                      "type": "array",
                      "description": "array of change-event objects (see item_fields)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cursor": {
                            "type": "integer"
                          },
                          "event_id": {
                            "type": "string"
                          },
                          "event": {
                            "type": "string"
                          },
                          "recorded_at": {
                            "type": "string",
                            "description": "string (ISO 8601 UTC)"
                          },
                          "document_id": {
                            "type": "string"
                          },
                          "document_kind": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "rbi_date": {
                            "type": "string"
                          },
                          "rbi_url": {
                            "type": "string",
                            "description": "string (URL)"
                          },
                          "bankpulse_page": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "string (URL) or null"
                          },
                          "affected_resources": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings (URLs) -- every served resource whose content actually changed because of this one event; always includes documents.json and mydesk.json (every document is listed in both), plus the regulation page and its /rule/<id>.json twin when either exists before or after this event"
                          },
                          "old": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "object or null"
                          },
                          "new": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "object or null"
                          },
                          "chain_hash": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/changes/index.json": {
      "get": {
        "summary": "Every day the change feed has a bundle for, oldest first, each with a link to that day's own file.",
        "x-notes": "The daily-bundle half of R63's \"a daily bundle\" requirement (polling is /changes.json above; signed webhooks still do not exist). Each listed day has its own file at /changes/YYYY-MM-DD.json (UTC calendar date), holding that day's events in the exact same shape as /changes.json's own \"events\" array -- same fields, same event_id, same cursors. The current UTC day's file, if present, carries complete: false because more events may still be recorded before the day ends; every earlier day is complete: true and, once written, never changes again.",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Every day the change feed has a bundle for, oldest first, each with a link to that day's own file.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "what_this_is": {
                      "type": "string"
                    },
                    "schema_version": {
                      "type": "integer"
                    },
                    "release_id": {
                      "type": "string",
                      "description": "string (short git SHA)"
                    },
                    "generated_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "days": {
                      "type": "integer"
                    },
                    "total_events": {
                      "type": "integer"
                    },
                    "full_feed": {
                      "type": "string",
                      "description": "string (URL)"
                    },
                    "dates": {
                      "type": "array",
                      "description": "array of day-summary objects (see item_fields)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "string (YYYY-MM-DD, UTC)"
                          },
                          "complete": {
                            "type": "boolean"
                          },
                          "event_count": {
                            "type": "integer"
                          },
                          "oldest_cursor": {
                            "type": "integer"
                          },
                          "latest_cursor": {
                            "type": "integer"
                          },
                          "url": {
                            "type": "string",
                            "description": "string (URL)"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/coverage.json": {
      "get": {
        "summary": "Every RBI source BankPulse reads, how often, and when it was last read.",
        "x-notes": "",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Every RBI source BankPulse reads, how often, and when it was last read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "sources": {
                      "type": "object",
                      "description": "object, holds 'watched': array of source objects (see item_fields)",
                      "properties": {
                        "watched": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "index_url": {
                                "type": "string",
                                "description": "string (URL)"
                              },
                              "how_often": {
                                "type": "string"
                              },
                              "read_by": {
                                "type": "string"
                              },
                              "on_daily_brief": {
                                "type": "boolean"
                              },
                              "gets_rule_pages": {
                                "type": "boolean"
                              },
                              "news_page_only": {
                                "type": "boolean"
                              },
                              "last_check_at": {
                                "type": "string",
                                "description": "string (ISO 8601 UTC)"
                              },
                              "last_check_ok": {
                                "type": "boolean"
                              },
                              "last_check_evidence": {
                                "type": "string"
                              },
                              "last_check_errors": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "description": "array or null"
                              },
                              "newest_document": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "documents_tracked": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mydesk.json": {
      "get": {
        "summary": "Every RBI document, mapped to the desks and institution kinds it reaches.",
        "x-notes": "",
        "x-bulk-snapshot": "Yes. Its \"documents\" array also holds all 2022 tracked documents. This is checked at build time against documents.json's count. Only the fields differ: desk and institution mapping instead of status and label. It is refreshed on every rebuild (see \"generated_ist\").",
        "security": [],
        "responses": {
          "200": {
            "description": "Every RBI document, mapped to the desks and institution kinds it reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "what_this_is": {
                      "type": "string"
                    },
                    "page": {
                      "type": "string",
                      "description": "string (URL)"
                    },
                    "generated_ist": {
                      "type": "string",
                      "description": "string (ISO 8601 +05:30)"
                    },
                    "schema_version": {
                      "type": "integer"
                    },
                    "release_id": {
                      "type": "string",
                      "description": "string (short git SHA)"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "documents": {
                            "type": "integer"
                          }
                        }
                      },
                      "description": "array of {code, name, documents(integer)}"
                    },
                    "institutions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "documents": {
                            "type": "integer"
                          }
                        }
                      },
                      "description": "array of {code, name, documents(integer)}"
                    },
                    "departments": {
                      "type": "array"
                    },
                    "documents": {
                      "type": "array",
                      "description": "array of document objects (see item_fields)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "date_iso": {
                            "type": "string"
                          },
                          "rbi_url": {
                            "type": "string",
                            "description": "string (URL)"
                          },
                          "page": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "string (URL) or null"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "institutions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "universal": {
                            "type": "boolean"
                          },
                          "importance": {
                            "type": [
                              "integer",
                              "string"
                            ],
                            "description": "integer or string"
                          },
                          "why": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ask_index_meta.json": {
      "get": {
        "summary": "Freshness manifest for the answer index that /ask.html searches.",
        "x-notes": "",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Freshness manifest for the answer index that /ask.html searches.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "what_this_is": {
                      "type": "string"
                    },
                    "generated_at": {
                      "type": "string",
                      "description": "string (ISO 8601 UTC)"
                    },
                    "row_count": {
                      "type": "integer"
                    },
                    "row_kinds": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "description": "object (kind -> count)"
                    },
                    "source_file": {
                      "type": "string"
                    },
                    "schema_version": {
                      "type": "integer"
                    },
                    "release_id": {
                      "type": "string",
                      "description": "string (short git SHA)"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/news.json": {
      "get": {
        "summary": "RBI-and-banking news items BankPulse's news page shows.",
        "x-notes": "",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "RBI-and-banking news items BankPulse's news page shows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "built_ist": {
                      "type": "string",
                      "description": "string (ISO 8601 +05:30)"
                    },
                    "checked_ist": {
                      "type": "string",
                      "description": "string (HH:MM)"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array",
                      "description": "array of news item objects (see item_fields)",
                      "items": {
                        "type": "object",
                        "properties": {
                          "link": {
                            "type": "string",
                            "description": "string (URL)"
                          },
                          "title": {
                            "type": "string"
                          },
                          "publishers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "source_ids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "region": {
                            "type": "string"
                          },
                          "section": {
                            "type": "string"
                          },
                          "labels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "array of strings"
                          },
                          "search": {
                            "type": "string"
                          },
                          "routine": {
                            "type": "boolean"
                          },
                          "when": {
                            "type": "string",
                            "description": "string (ISO 8601 +05:30)"
                          },
                          "when_words": {
                            "type": "string"
                          },
                          "imp": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "Standard XML sitemap of every live BankPulse URL.",
        "x-notes": "Carries a schema_version/release_id XML comment before <urlset> (see AUDIT_LEDGER.md R60).",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Standard XML sitemap of every live BankPulse URL.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "xml",
                  "x-root-element": "urlset"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "summary": "RSS 2.0 feed of BankPulse Daily Brief editions.",
        "x-notes": "Carries schema_version/release_id in its <generator> element (see AUDIT_LEDGER.md R60).",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "RSS 2.0 feed of BankPulse Daily Brief editions.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "xml",
                  "x-root-element": "rss"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "Plain-text summary of BankPulse for AI agents and crawlers.",
        "x-notes": "Carries a 'Schema-Version:' / 'Release-Id:' line (see AUDIT_LEDGER.md R60). llms-full.txt is the same idea, unabridged.",
        "x-bulk-snapshot": "",
        "security": [],
        "responses": {
          "200": {
            "description": "Plain-text summary of BankPulse for AI agents and crawlers.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "text/plain"
                }
              }
            }
          }
        }
      }
    },
    "/api/ask": {
      "post": {
        "summary": "Ask BankPulse a question; answered ONLY from BankPulse's own stored plain-English points, never from the model's memory.",
        "x-notes": "Fails closed: no points found, the model says it cannot answer, the model cites a point it was not given, or the answer carries a figure not present in any cited point -> not_verified, never a guess. Retrieved points are treated as data handed to the model, never as instructions -- the model's own system prompt forbids using anything outside the numbered POINTS list. See AUDIT_LEDGER.md R64.",
        "security": [],
        "x-authentication": "none -- public endpoint, no key or token required today.",
        "x-rate-limit": "60 requests per hour per hashed requester IP. The limit is RATE_PER_HOUR in src/ask.js. Over the limit the request returns 429-refused below.",
        "x-idempotency": "not yet defined -- no idempotency-key mechanism exists in src/ask.js today (checked before writing this).",
        "x-versioning": "not yet defined -- /api/ask carries no version segment or header, and no deprecation policy exists (checked before writing this); this is a real, open R64 gap, not invented as solved.",
        "x-prompt-injection-testing": "R64 requires prompt-injection tests to PASS before this item can close. That is a testing exercise, not documented here -- not yet run this slice; see STATE.md NEXT BRICK for the follow-up.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "q"
                ],
                "properties": {
                  "q": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500,
                    "description": "string, 3-500 characters (shorter is rejected, longer is truncated)"
                  },
                  "history": {
                    "type": "array",
                    "description": "array, optional, at most the last 3 turns used -- each item {q: string (truncated 300 chars), a: string (truncated 600 chars)}. Sent back by the reader's own browser; nothing is kept server-side, so one reader's thread never reaches another's.",
                    "maxItems": 3,
                    "items": {
                      "type": "object",
                      "properties": {
                        "q": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "the reader's earlier question in this thread"
                        },
                        "a": {
                          "type": "string",
                          "maxLength": 600,
                          "description": "BankPulse's earlier answer in this thread"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "200-answered",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "answered"
                        },
                        "answer": {
                          "type": "string",
                          "description": "string (2-6 sentences, each ending in [n] citation markers)"
                        },
                        "understood_as": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "string or null (the follow-up-joined search text, only when this turn was treated as a follow-up)"
                        },
                        "turn": {
                          "type": "integer",
                          "description": "integer (1-based turn count in this conversation)"
                        },
                        "note": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "string, up to 300 characters, empty string if nothing uncertain"
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "n": {
                                "type": "integer",
                                "description": "integer (1-based position in this response's own list)"
                              },
                              "header": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "sentence": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "title": {
                                "type": "string"
                              },
                              "para": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "rule_page": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, BankPulse's own rule page + anchor) or null"
                              },
                              "rbi_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, RBI's own page) or null"
                              },
                              "doc_date": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "known_from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "role": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "kind": {
                                "type": "string"
                              }
                            }
                          },
                          "description": "array of citation objects (see x-citation-schema)"
                        },
                        "documents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "n": {
                                "type": "integer",
                                "description": "integer (1-based position in this response's own list)"
                              },
                              "header": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "sentence": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "title": {
                                "type": "string"
                              },
                              "para": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "rule_page": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, BankPulse's own rule page + anchor) or null"
                              },
                              "rbi_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, RBI's own page) or null"
                              },
                              "doc_date": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "known_from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "role": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "kind": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 5,
                          "description": "array of citation objects, kind='title', up to 5"
                        },
                        "retrieved": {
                          "type": "integer",
                          "description": "integer (how many points were retrieved before the model saw them)"
                        },
                        "disclaimer": {
                          "type": "string",
                          "description": "string, fixed text: not RBI's words, not legal advice"
                        }
                      }
                    },
                    {
                      "x-case": "200-not_verified",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "not_verified"
                        },
                        "message": {
                          "type": "string",
                          "description": "string, explains why (no points found / model could not answer / bad citation / silence argued / unsupported figure)"
                        },
                        "understood_as": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "string or null"
                        },
                        "turn": {
                          "type": "integer"
                        },
                        "nearest": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "n": {
                                "type": "integer",
                                "description": "integer (1-based position in this response's own list)"
                              },
                              "header": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "sentence": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "title": {
                                "type": "string"
                              },
                              "para": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "rule_page": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, BankPulse's own rule page + anchor) or null"
                              },
                              "rbi_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, RBI's own page) or null"
                              },
                              "doc_date": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "known_from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "role": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "kind": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 5,
                          "description": "array of citation objects, up to 5 (the closest points, offered instead of a guess)"
                        },
                        "documents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "n": {
                                "type": "integer",
                                "description": "integer (1-based position in this response's own list)"
                              },
                              "header": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "sentence": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "title": {
                                "type": "string"
                              },
                              "para": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "rule_page": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, BankPulse's own rule page + anchor) or null"
                              },
                              "rbi_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, RBI's own page) or null"
                              },
                              "doc_date": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "known_from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "role": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "kind": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 5,
                          "description": "array of citation objects, kind='title', up to 5"
                        },
                        "pages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string",
                                "description": "string (URL)"
                              }
                            }
                          },
                          "maxItems": 2,
                          "description": "array of helpful-page objects (see x-helpful-page-schema), up to 2"
                        },
                        "search": {
                          "type": "string",
                          "description": "string (URL to /search?q=... as a fallback)"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "429-refused",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "refused"
                        },
                        "message": {
                          "type": "string",
                          "description": "string, fixed text about the hourly limit"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "502-error-search",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "error"
                        },
                        "message": {
                          "type": "string",
                          "description": "string, fixed text: search not reachable"
                        }
                      }
                    },
                    {
                      "x-case": "502-error-model",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "error"
                        },
                        "message": {
                          "type": "string",
                          "description": "string, fixed text: answer engine did not respond"
                        },
                        "nearest": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "n": {
                                "type": "integer",
                                "description": "integer (1-based position in this response's own list)"
                              },
                              "header": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "sentence": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "title": {
                                "type": "string"
                              },
                              "para": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "rule_page": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, BankPulse's own rule page + anchor) or null"
                              },
                              "rbi_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string (URL, RBI's own page) or null"
                              },
                              "doc_date": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "known_from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "role": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "string or null"
                              },
                              "kind": {
                                "type": "string"
                              }
                            }
                          },
                          "maxItems": 5,
                          "description": "array of citation objects, up to 5"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "503-unavailable",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "const": "unavailable"
                        },
                        "message": {
                          "type": "string",
                          "description": "string, fixed text: Ask BankPulse is not switched on yet"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "400-bad-request",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "string",
                          "description": "string (could not read the request body, or q shorter than 3 characters)"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "x-case": "405-method",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "string",
                          "const": "Use POST."
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "x-citation-schema": {
          "type": "object",
          "properties": {
            "n": {
              "type": "integer",
              "description": "integer (1-based position in this response's own list)"
            },
            "header": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "sentence": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "title": {
              "type": "string"
            },
            "para": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "rule_page": {
              "type": [
                "string",
                "null"
              ],
              "description": "string (URL, BankPulse's own rule page + anchor) or null"
            },
            "rbi_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "string (URL, RBI's own page) or null"
            },
            "doc_date": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "known_from": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "role": {
              "type": [
                "string",
                "null"
              ],
              "description": "string or null"
            },
            "kind": {
              "type": "string"
            }
          }
        },
        "x-helpful-page-schema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "description": "string (URL)"
            }
          }
        }
      }
    }
  }
}
